CN109150400A - Data transmission method, device, electronic equipment and computer-readable medium - Google Patents
Data transmission method, device, electronic equipment and computer-readable medium Download PDFInfo
- Publication number
- CN109150400A CN109150400A CN201810925255.7A CN201810925255A CN109150400A CN 109150400 A CN109150400 A CN 109150400A CN 201810925255 A CN201810925255 A CN 201810925255A CN 109150400 A CN109150400 A CN 109150400A
- Authority
- CN
- China
- Prior art keywords
- encryption algorithm
- electronic equipment
- account number
- user
- algorithm
- 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
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/0001—Systems modifying transmission characteristics according to link quality, e.g. power backoff
- H04L1/0015—Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the adaptation strategy
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Theoretical Computer Science (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- Mobile Radio Communication Systems (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the present application provides a kind of data transmission method, device, electronic equipment and computer-readable medium, is related to field of communication technology.Method includes: when electronic equipment connects wireless audio playback equipment, and whether detection electronic equipment receives the playing request of audio data to be played;If receiving playing request, the current user account number for logging in electronic equipment is obtained, as target user's account number;Target code algorithm is determined according to target user's account number;Audio data to be played is sent to wireless audio playback equipment according to target code algorithm.Therefore, can the more flexible encryption algorithm selected for audio data to be sent to wireless audio playback equipment, improve user experience.
Description
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 the electronic equipment connects wireless audio playback equipment, detecting whether the electronic equipment receives audio to be played
The playing request of data;If receiving playing request, the user account number for currently logging in the electronic equipment is obtained, is used as target
Family account number;Target code algorithm is determined according to target user's account number;It will be described to be played according to the target code algorithm
Audio data is sent to the wireless audio playback equipment.
Second aspect, the embodiment of the present application also provides a kind of data transmission devices, are applied to electronic equipment, described device
It include: detection unit, acquiring unit, determination 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.Acquiring unit, if for receiving
Playing request obtains the user account number for currently logging in the electronic equipment.Determination unit, for being determined according to the user account number
Target code algorithm.Transmission unit, it is described for being sent to the audio data to be played according to the target code algorithm
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, when the electricity
When sub- equipment connection wireless audio playback equipment, and detect that the electronic equipment receives the broadcasting of audio data to be played and asks
When asking, encryption algorithm corresponding to the user account number is determined according to the current user account number for logging in electronic equipment, according to the volume
Audio data to be played is sent to wireless audio playback equipment by code algorithm.Therefore, it more flexible can select for inciting somebody to action
Audio data is sent to the encryption algorithm of wireless audio playback equipment, improves user experience.
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 the encryption algorithm selection interface of one embodiment of the application offer;
Fig. 5 shows the schematic diagram for the encryption algorithm selection interface that another embodiment of the application provides;
Fig. 6 shows a kind of method flow diagram for data transmission method that the another embodiment of the application provides;
Fig. 7 shows a kind of method flow diagram of data transmission method of the application another embodiment offer;
Fig. 8 shows a kind of module frame chart of data transmission device provided by the embodiments of the present application;
Fig. 9 shows the module frame chart of electronic equipment provided by the embodiments of the present application;
Figure 10 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, is made
Encryption algorithm is relatively more fixed, and lacks flexibility.
Therefore, it in order to solve drawbacks described above, referring to Fig. 2, the embodiment of the present application provides a kind of data transmission method, answers
For above-mentioned electronic equipment, specifically, this method comprises: S201 to S204.
S201: when the electronic equipment connects wireless audio playback equipment, detect whether the electronic equipment receives
The playing request of audio data to be played.
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 detection electronic equipment receives playing request, which is for requesting to play audio
The request of data.
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 electronic equipment currently receives the playing request of audio data, for example, user chooses
Video clicks the broadcast button of the broadcast interface into the broadcast interface of video, and application program passes through to user's touch control operation
It monitors, be able to detect that user currently clicked is what kind of video, and specifically, broadcast button is provided with default category
Property, detect the attribute of the acquired corresponding broadcast button of touch control operation, it will be able to determine the view to be played that user is chosen
Frequently, and then playing request and the corresponding audio of the playing request are got.
S202: the user account number for currently logging in the electronic equipment is obtained, as target user's account number.
Wherein, user account number is the account number that user logs in the electronic equipment, specifically, can be and logs in electronic equipment
The account number of operating system.For example, the Apple ID of IOS system.And user can be by electronics for the operation note of electronic equipment
Device is recorded, then when user logs in electronic equipment using user account number, electronic equipment obtains the user of user's input
Account number and password, determine whether the user account number and password match, and set if it does, then the user account number successfully logs in electronics
It is standby.Specifically, user account number and password that electronic equipment is inputted by obtaining user in logging program, wherein logging program is electricity
A program module in the operating system of sub- equipment, user execute the relevant operation that user logs in.
As an implementation, the corresponding data of user account number can be sent to server and stored by electronic equipment,
Then specifically, user sends a logging request to server when logging in electronic equipment.Wherein, logging request includes user
Account number and password, it is according to the pre-stored data corresponding with user account number to step on after server obtains the user account number and password
Password is recorded, whether the user account number and password compared in logging request matches, if it does, i.e. user name is registered, and
The corresponding password of user name is correct, then successfully logs in electronic equipment, and by the relevant data of the register of this user account number
It is stored in user record.The user record has recorded the corresponding register of user account number, data upload and down operation etc.,
For example, the number logged in, time, data upload operation or the data acquisition operations of login etc..Electronic equipment is stepped in transmission as a result,
When record request, it will be able to obtain the current user account number for logging in electronic equipment.
S203: target code algorithm is determined according to target user's account number.
Wherein, the encryption algorithm is for the audio data between the electronic equipment and the wireless audio playback equipment
Transmission, specifically, can be audio data, for example, the audio of MP3 format, is encoded into packets of audio data according to encryption algorithm
It is sent to wireless audio playback equipment later, for example, above-mentioned Apt-X, SBC, AAC, LDAC encryption algorithm.
As an implementation, the corresponding relationship of user account number and encryption algorithm is stored in electronic equipment, such as 1 institute of table
Show:
Table 1
User account number | Encryption algorithm |
ID1 | SBC |
ID2 | AAC |
ID3 | SBC、AAC、LDAC |
The then corresponding relationship according to shown in above-mentioned table 1, it will be able to determine that target code corresponding to target user's account number is calculated
Method, wherein, can be from corresponding multiple encryption algorithms if the corresponding encryption algorithm of target user's account is polyalgorithm
One encryption algorithm of middle determination is as target code algorithm.Wherein, corresponding relationship shown in the table 1, can be user account number institute
Used encryption algorithm, is recorded by electronic equipment or server.
As an implementation, by the corresponding all encryption algorithms of target user's account number alternately encryption algorithm, really
The quantity of encryption algorithm included in the fixed alternative encryption algorithm, if if it is greater than 1, then according to the pre-stored data greater than 1
The usage record of each encryption algorithm obtains the use information of each encryption algorithm in alternative encryption algorithm, the use information packet
Include access times, using time span or frequency of use.Then using the highest encryption algorithm of use information as target code algorithm.
, may be in the corresponding relationship shown in above-mentioned table 1 furthermore, it is contemplated that some users are new users, acquisition finds this
The user account number of user, the then if user account number is not found in table 1 above, using system default encryption algorithm as the use
The corresponding target code algorithm of family account number.Wherein, system default encryption algorithm can be most-often used encryption algorithm.
Specifically, judge whether the user is new user, it can be determined that whether the user account number is to first log into electronics to set
It is standby.As an implementation, user is when logging in electronic equipment, inputs user account number and password, such as described above steps on
The process of electronic equipment is recorded, then this time the relevant data of register of user account number are stored in user record, wherein user
The register of account number includes the number logged in, time, data upload operation or the data acquisition operations of login etc..By searching for
The register of the user record is it is determined that whether this user name is to first log into.
Then specifically, judge whether that the process first logged into may is that the user account number for obtaining and logging in electronic equipment;With
Family record in search the corresponding login times of the user account number, wherein the user record be stored with multiple user account numbers and
The corresponding login times of each user account number;If login times are preset value, the user name for logging in electronic equipment is determined
It first logs into.
Specifically, available to the user account number for logging in electronic equipment by parsing above-mentioned logging request.Again from upper
The corresponding login times of user account number are obtained in the user record stated.Wherein, user record can be the login for describing user
Number is also possible to record the register of user, and configures a login label for each register, passes through counting user
Login label in record can obtain the corresponding login times of user account number.It then, will after getting login times
Login times are compared with preset value.Wherein, the setting of preset value depends on executing the step of comparing login times and preset value
Timing node.In a kind of embodiment, before this register is stored in user record, execute judgement is server
The non-operation first logged into, then above-mentioned preset value is 0, then, if login times are 0, indicate the use before this login
Family account number was not logged in the electronic equipment, then determined that the user account number for logging in electronic equipment first logs into, similarly, if stepped on
Recording number is not 0, then determines that the user account number for logging in electronic equipment is non-and first log into.In another embodiment, service
Device by this register be stored in user record and then execute judge whether the non-operation first logged into.Then this is implemented
In mode, preset value 1, then, if login times are 1, indicate to log on as logging in for the first time at this, i.e., stepped on described in judgement
The user account number of record electronic equipment first logs into.If login times are not 1, indicate that this login is not to log in for the first time, then
Determine that the user account number for logging in electronic equipment is non-to first log into.
S204: the audio data to be played is sent to by the wireless audio broadcasting according to the target code algorithm and is set
It is standby.
By audio data to be played according to target code algorithm coding after, generate packets of audio data, pass through electronic equipment
Packets of audio data is sent to the wireless audio playback equipment by the data link between wireless audio playback equipment, so as to
Audio data is sent to wireless audio playback equipment by enough realize.
Furthermore, it is contemplated that different user account numbers is with the record case for using the time of electronic equipment and being consumed,
Then the grade of user account number will be different, and for those commonly using electronic equipment or the user often consumed, if
Used encryption algorithm is higher or effect is more preferable, then the interest that user uses electronic equipment is able to ascend, to improve use
Family Experience Degree.
Then specifically, referring to Fig. 3, the embodiment of the present application provides a kind of data transmission method, this method comprises: S301
To S305.
S301: when the electronic equipment connects wireless audio playback equipment, detect whether the electronic equipment receives
The playing request of audio data to be played.
S302: the user account number for currently logging in the electronic equipment is obtained, as target user's account number.
S303: the grade of target user's account number is obtained.
Specifically, the login time of the grade of user account and user, login times and integral obtained even disappear
Take amount of money correlation, the grade of each user account number is stored in electronic equipment, that is, is stored with user account number pass corresponding with grade
System, then after getting the current target user's account number for logging in electronic equipment, according to the corresponding relationship, it will be able to determine the mesh
Mark the grade of user account number.
S304: target code algorithm is determined according to the grade of target user's account number.
Specifically, since the grade of user account number is different, then can indicate the used electronic equipment of user time or
Demand is different, then different encryption algorithms can be set for different grades of user account number, so that those grades are higher
More encryption algorithms can be used in user, thus a possibility that promoting the use electronic equipment of user more frequently.
As an implementation, be stored in electronic equipment user account number the corresponding encryption algorithm of grade that, that is, exist
Different grades of user account number respectively corresponds to an encryption algorithm, also, different grades of user account in the corresponding relationship
Corresponding encryption algorithm is different.It is as shown in table 2:
Table 2
User account number | Grade | Encryption algorithm |
ID1 | J1 | SBC |
ID2 | J2 | SBC、AAC |
ID3 | J3 | SBC、AAC、Apt-X |
ID4 | J4 | SBC、AAC、Apt-X、LDAC |
In table 2, the grade of grade J1 is minimum, and the grade highest of grade J4, that is to say, that number after J more it is big then
Higher grade, and the ascending variation of respective encoding rate of encryption algorithm SBC, AAC, Apt-X, LDAC, i.e. the encoding rate of SBC
It is minimum, and the encoding rate highest of LDAC.That is, higher grade, and in corresponding encryption algorithm, the highest coding of encoding rate
The encoding rate of algorithm is higher, and such as the corresponding grade J1 of ID1, corresponding encryption algorithm is SBC, and encryption algorithm corresponding to J3
It include: SBC, AAC, Apt-X, then wherein the highest encryption algorithm of encoding rate is Apt-X, and highest encoding rate corresponding to J3
The encoding rate of encryption algorithm Apt-X is higher than the encoding rate of encryption algorithm SBC corresponding to J1.
Specifically, when audio data is sent to wireless audio playback equipment by electronic equipment, for improve data transfer
Speed is needed 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, Mei Gebian
Encoding rate corresponding to code algorithm is different, i.e., when different encryption algorithms is to the same audio data coding, obtained coding
The size of audio data later 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.Therefore, coding is calculated
The corresponding encoding rate of method is higher, so that the useful information that audio data is lost is fewer, i.e. the sound quality of audio data is higher, still
Audio data is formed by data packet data volume after being encoded is bigger.
Therefore, target user's account just can determine according to the corresponding relationship of the grade of above-mentioned encryption algorithm and user account number
Number grade corresponding to encryption algorithm, it is contemplated that encryption algorithm corresponding to the grade of user account number be it is multiple, then need from
An encryption algorithm is determined in multiple encryption algorithms as target code algorithm, specifically, according to the grade of the user account number
It is corresponding with encryption algorithm according to the grade of preset user account number to determine that the specific embodiment of target code algorithm may is that
Relationship determines encryption algorithm all corresponding to the grade of target user's account number, alternately encryption algorithm;By described
The target code algorithm is determined in alternative encryption algorithm.
Wherein, in the grade of the user account number and the corresponding relationship of encryption algorithm, the higher grade of user account number, institute
Corresponding encryption algorithm is more, further, can also be that the encoding rate of corresponding encryption algorithm is higher.Specifically, according to
The grade of user account number described in above-mentioned table 2 and the corresponding relationship of encryption algorithm determine that target user's account number is corresponding all
Encryption algorithm, alternately encryption algorithm, wherein if user account number not in the corresponding relationship described in the table 2, for example, with
Family account number is new user, then can specifically join using the encryption algorithm of default as the alternative encryption algorithm of user account number
Aforementioned embodiments are examined, details are not described herein.
After the alternative encryption algorithm of target user's account number has been determined, determine that target code is calculated from alternative encryption algorithm
Method specifically determines an encryption algorithm as target code algorithm from alternative encryption algorithm.Specifically, it first determines alternative
The quantity of encryption algorithm in encryption algorithm inputs the quantity equal to 1, then calculates the alternative encryption algorithm as target code
Method can determine target code according to the use information of encryption algorithm each in alternative encryption algorithm if the quantity is greater than 1
Algorithm, wherein the use information includes access times, using time span or frequency of use, for example, access times are most
Encryption algorithm is as target code algorithm.
As another embodiment, it can also be one encryption algorithm selection interface of interface display in electronic equipment,
Target code algorithm is then determined according to the encryption algorithm selection interface.Specifically, as described in being determined in the alternative encryption algorithm
The specific embodiment of target code algorithm are as follows: the code displaying algorithms selection interface in the display interface of the electronic equipment,
The mark of each encryption algorithm in the alternative encryption algorithm is shown in the encryption algorithm selection interface;User is obtained to be based on
The mark of the selected encryption algorithm of encryption algorithm selection interface;By the corresponding coding of the mark of selected encryption algorithm
Algorithm is as target code algorithm.
Wherein, the display interface at code displaying algorithms selection interface can be the current display interface of electronic equipment, specifically
The audio broadcast interface on ground, audio play-back application of the user in operation electronic equipment plays audio data to be played,
For example, the playback of songs interface of some playback of songs software, as shown in figure 4, user chooses to be played in audio broadcast interface
Song, i.e., audio data to be played, then click play button will code displaying algorithms selection interface.User is based on the volume
Code algorithms selection interface, chooses an encryption algorithm, clicks and determines key, then electronic equipment is obtained user and selected based on encryption algorithm
The selected encryption algorithm in interface is selected, using selected encryption algorithm as target code algorithm.Wherein, encryption algorithm selects boundary
Face is a pop-up, in the area when electronic equipment shows the encryption algorithm selection interface, except the encryption algorithm selection interface
Touch control operation accessed by domain is shielded, i.e., electronic equipment is not responding to user for the area except the encryption algorithm selection interface
The touch control operation of domain input, and only after user selects encryption algorithm or clicks cancel button, it can just close the coding
Algorithms selection interface.
In some embodiments it is contemplated that electronic equipment will affect user when code displaying algorithms selection interface
Operation, therefore, electronic equipment obtain user be based on the selected encryption algorithm of encryption algorithm selection interface after,
The encryption algorithm selection interface is no longer shown in preset time period, but persistently using user selected by the encryption algorithm selection interface
The encryption algorithm selected obtains user in electronic equipment and is based on selected by the encryption algorithm selection interface as target code algorithm
After the encryption algorithm selected, keeps the corresponding target code algorithm of target user's account number constant within a preset period of time, remove non-electrical
Sub- equipment replacement user account number or preset time period terminate, then redefine target code algorithm.Wherein, preset time period
For to obtain time point of the user based on the selected encryption algorithm of encryption algorithm selection interface as the time in electronic equipment
Certain time length after starting point.
By the way of above-mentioned encryption algorithm selection interface, obtains the selected encryption algorithm of user and calculated as target code
Method, although a possibility that can be improved user's operation encryption algorithm selection interface, if wanted during playing song
Alternate coding algorithm, then needs to stop playing by song, then click play button again, in addition need to exit audio play it is soft
It is reopened after part.Therefore, as another embodiment, as shown in figure 5, one in the current display interface of electronic equipment
A menu bar, the menu bar can be pull-up menu column or drop-down menu column, and alternative volume will be shown by clicking the menu bar
Code algorithm selects one of encryption algorithm as shown in Fig. 5 (a) in alternative encryption algorithm, then by the changing interface of Fig. 5 (a)
To the interface of Fig. 5 (b), then, user is in click play button, it will be able to realize audio number according to the encryption algorithm chosen
According to being sent to wireless audio playback equipment.In addition, user clicks the menu bar, and replaces in audio data playing process
Encryption algorithm, then the song can replay, and be sent to audio data wirelessly using the encryption algorithm of newest selection
Audio-frequence player device, meanwhile, electronic equipment records target code algorithm corresponding to user account number, then user broadcasts in the audio
It softens all songs that part is played and is all made of the target code algorithm.
S305: the audio data to be played is sent to by the wireless audio broadcasting according to the target code algorithm and is set
It is standby.
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.
Furthermore, it is contemplated that if compared with the bandwidth of the data link between current electronic device and wireless audio playback equipment
It is narrow, and the corresponding encoding rate of the selected encryption algorithm of user is higher, then uses the too low bandwidth for transmission audio data, can drop
The continuity of low audio data transmission, and there is the phenomenon that Caton when playing.Therefore, in order to solve the defect, this
Application embodiment provides a kind of data transmission method, as shown in fig. 6, this method comprises: S601 to S609.
S601: when the electronic equipment connects wireless audio playback equipment, detect whether the electronic equipment receives
The playing request of audio data to be played.
S602: the user account number for currently logging in the electronic equipment is obtained, as target user's account number.
S603: the grade of target user's account number is obtained.
S604: according to the corresponding relationship of the grade of preset user account number and encryption algorithm, target user's account is determined
Number grade corresponding to all encryption algorithm.
S605: the bandwidth of the communication link between presently described electronic equipment and the wireless audio playback equipment is determined.
When electronic equipment is connect with wireless audio playback equipment, electronic equipment selects bluetooth, WiFi or other connections
Mode sends connection request to wireless audio playback equipment, then the frequency range for the communication mode supported in wireless audio playback equipment
It is interior to search the wireless audio playback equipment, for example, electronic equipment opens bluetooth, then in the corresponding communications band of bluetooth
Interior, e.g. 2.4GHz can search the wireless audio playback 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, and the mark of multiple hot spots is shown in the list, wherein the corresponding communications band of some hot spots is
2.4GHz, the corresponding communications band of some hot spots is 5GHz, and in Fig. 4, the corresponding communications band of WiFi-1 is 2.4GHz,
The corresponding communications band of WiFi-1-5GHz is 5GHz, then user selects WiFi-1, then passes through between electronic equipment and WiFi-1
The communications band of 2.4GHz connects, and if user selects WiFi-1-5GHz, pass through 5GHz between electronic equipment and WiFi-1
Communications band connection.Electronic equipment just can determine the frequency of the communication between electronic equipment and the Wi-Fi hotspot connected as a result,
Section.
After the classification that the communication link between electronic equipment and wireless audio playback equipment has been determined, the communication is read
The messaging parameter of link just can determine the corresponding bandwidth of the communication link, wherein messaging parameter include bandwidth, retransmission rate and
The parameters such as transmission rate.It just can determine the numerical value of the bandwidth of current communication link as a result,.
S606: the encryption algorithm that the bandwidth is supported is obtained.
As an implementation, it is stored with the corresponding relationship of bandwidth and encryption algorithm in electronic equipment, is closed in the correspondence
Include encryption algorithm corresponding to multiple bandwidth and each bandwidth in system, as an implementation, is calculated according to bandwidth and coding
The corresponding relationship of method determines the bandwidth institute of the communication link between presently described electronic equipment and the wireless audio playback equipment
The encryption algorithm of support, wherein in the corresponding relationship of the bandwidth and encryption algorithm, the size of the bandwidth and the coding are calculated
The encoding rate height of method is positively correlated.It is as shown in table 3:
Table 3
In table 3 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 3, 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.
The then corresponding relationship according to shown in the table 3, it will be able to determine current electronic device and wireless audio playback equipment it
Between the encryption algorithm supported of the corresponding bandwidth of communication link.
S607: it by the corresponding all encryption algorithms of the grade of target user's account number, is supported with the bandwidth
The matched encryption algorithm of encryption algorithm alternately encryption algorithm.
In S604, determines encryption algorithm all corresponding to the grade of target user's account number, then use target
Communication between all encryption algorithms, with current electronic device and wireless audio playback equipment corresponding to the grade of family account number
Common encryption algorithm alternately encryption algorithm is found between the encryption algorithm that the corresponding bandwidth of link is supported.For example, mesh
Marking all encryption algorithm corresponding to the grade of user account number is SBC, AAC, Apt-X, and current electronic equipment and wireless
The encryption algorithm that the corresponding bandwidth of communication link between audio-frequence player device is supported is SBC, AAC, then the two finds phase
Same encryption algorithm is SBC, AAC, then alternative encryption algorithm is SBC, AAC.
In addition, if encryption algorithm all corresponding to the grade of target user's account number, with current electronic device and nothing
Common coding is not found between the encryption algorithm that the corresponding bandwidth of communication link between line audio-frequence player device is supported to calculate
Method, then by encryption algorithm minimum to bandwidth demand in default code algorithm alternately encryption algorithm, or by default code
The encryption algorithm that the corresponding bandwidth of communication link between algorithm and current electronic device and wireless audio playback equipment is supported
Find common encryption algorithm alternately encryption algorithm.
S608: by determining the target code algorithm in the alternative encryption algorithm.
S609: the audio data to be played is sent to by the wireless audio broadcasting according to the target code algorithm and is set
It is standby.
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.
Furthermore, it is contemplated that the audio data to be played sound relatively high if it is requirement of real-time transmitted by electronic equipment
Frequently, for example, audio in audio or communication process in video, then in order in view of audio data is sent to nothing in time
Line audio-frequence player device plays out, then can not be excessively high by the complexity of encryption algorithm, that is, encoding rate setting, specifically, asks
Refering to Fig. 7, a kind of data transmission method provided by the embodiments of the present application is shown, comprising: S701 to S709.
S701: when the electronic equipment connects wireless audio playback equipment, detect whether the electronic equipment receives
The playing request of audio data to be played.
S702: the user account number for currently logging in the electronic equipment is obtained, as target user's account number.
S703: the grade of target user's account number is obtained.
S704: according to the corresponding relationship of the grade of preset user account number and encryption algorithm, target user's account is determined
Number grade corresponding to all encryption algorithm.
S705: the real-time rank of the audio data to be played 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 to be played, further according to the application
The mark of program determines the real-time rank of audio data to be played.Specifically, it is determined that sending broadcasting for the audio data to be played
The mark of the destination application of request is put, then determines 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 4 below:
Table 4
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 4 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, to
Playing audio-fequency data can be sound effect of game, then the corresponding application program of the sound effect of game is so-and-so game APP, affiliated classification
It is type of play, the type of the audio data is then determined according to the type of application program, it specifically, can be by application program
Type of the type as audio data to be played, for example, the type of application program is game, then the class of audio data to be played
Type 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 5 below:
Table 5
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.
S706: the encryption algorithm that the real-time rank is supported is obtained.
As an implementation, the corresponding relationship of real-time rank and encryption algorithm is stored in electronic equipment, at this
It include encryption algorithm corresponding to multiple real-time ranks and each real-time rank in corresponding relationship, as a kind of embodiment party
Formula determines the encryption algorithm that presently described real-time rank is supported according to the corresponding relationship of real-time rank and encryption algorithm,
Wherein, in the corresponding relationship of the real-time rank and encryption algorithm, the size of the real-time rank and the encryption algorithm
Encoding rate height it is negatively correlated, that is to say, that real-time rank is higher, and the encoding rate of corresponding encryption algorithm is lower, then audio
Data are lower, more send data to wireless audio playback equipment convenient for quick.
S707: by the corresponding all encryption algorithms of the grade of the user account number, with the audio data to be played
The matched encryption algorithm of the encryption algorithm that real-time rank is supported alternately encryption algorithm.
In S704, determines encryption algorithm all corresponding to the grade of target user's account number, then use target
All encryption algorithms corresponding to the grade of family account number, the coding supported with the real-time rank of audio data to be played are calculated
Common encryption algorithm alternately encryption algorithm is found between method.For example, owning corresponding to the grade of target user's account number
Encryption algorithm be SBC, AAC, Apt-X, LDAC, and the encryption algorithm that the real-time rank of audio data to be played is supported is
SBC, AAC, then it is SBC, AAC that the two, which finds identical encryption algorithm, then alternative encryption algorithm is SBC, AAC.
Similarly, if encryption algorithm all corresponding to the grade of target user's account number, with audio data to be played
Common encryption algorithm is not found between the encryption algorithm that real-time rank is supported, then by default code algorithm and sound to be played
Common encryption algorithm alternately encryption algorithm is found between the encryption algorithm that the real-time rank of frequency evidence is supported.
S708: by determining the target code algorithm in the alternative encryption algorithm.
S709: the audio data to be played is sent to by the wireless audio broadcasting according to the target code algorithm and is set
It is standby.
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. 8, showing a kind of data transmission device 800 provided by the embodiments of the present application, which is applied to upper
The electronic equipment stated, specifically, the device include: detection unit 801, acquiring unit 802, determination unit 803 and transmission unit
804。
Detection unit 801, for whether detecting the electronic equipment when electronic equipment connects wireless audio playback equipment
Receive the playing request of audio data.
Acquiring unit 802, if determining the corresponding encoding rate of the audio data for receiving playing request.
Determination unit 803, for improving the electronic equipment and the wireless audio playback equipment according to the encoding rate
Between destination data link bandwidth.
Transmission unit 804, for the audio data being sent to described according to 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. 9, it illustrates the structural block diagrams of a kind of electronic equipment provided by the embodiments of the present application.The electronic equipment
100, which can be smart phone, tablet computer, e-book etc., can run the electronic equipment of application program.Electronics in the application
Equipment 100 may include one or more such as lower component: processor 110, memory 120, bluetooth module 140 and one are more
A application program, wherein one or more application programs can be stored in memory 120 and be configured as by one or more
A processor 110 executes, and one or more programs are configured to carry out the method as described in preceding method embodiment.
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 bluetooth mould
The equipment that block 140 is connected passes through bluetooth connection so as to can be realized between electronic equipment and external equipment.
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 is also connect with bluetooth module 140, for depositing
Put the received data of bluetooth module, data to be sent and messaging parameter of bluetooth etc..
Bluetooth module 140 for realizing the bluetooth connection between electronic equipment and bluetooth equipment, and with bluetooth equipment it
Between data interaction.Specifically, can also pass through with bluetooth equipment by Bluetooth protocol 5.0/4.2/4.1/2.1/2.0
Bluetooth low energy consumption technologies (Bluetooh Low Energy, BLE), bluetooth enhancing rate technology (Enhanced Data Rate,
) or bluetooth basic rate (Base Rate, BR) etc. EDR.Then bluetooth module 140 may include power amplifier, wireless receiving and dispatching
Device, transmit/receive switch, low-noise amplifier and antenna etc..When sending signal, transceiver itself can directly export low power
Faint radiofrequency signal is sent to power amplifier (Power Amplifier, PA) and carries out power amplification, is then cut by transmitting-receiving
Parallel operation (Transmit/Receive Switch) is radiated to space via antenna (Antenna).When receiving signal, antenna can be felt
It should be to the electromagnetic signal in space, by sending after switch to low-noise amplifier (Low Noise Amplifier, LNA)
It amplifies, is handled, demodulated in this way, amplified signal can be directly fed to transceiver, the bluetooth module 140
2.4GHz frequency range can be used.
Referring to FIG. 10, 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 1000, said program code can be called by processor and execute above-mentioned side
Method described in method embodiment.
Computer readable storage medium 1000 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 1000 includes non-volatile
Property computer-readable medium (non-transitory computer-readable storage medium).It is computer-readable
Storage medium 1000 has the memory space for the program code 1010 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 1010 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 the electronic equipment connects wireless audio playback equipment, detect whether the electronic equipment receives audio to be played
The playing request of data;
If receiving playing request, the user account number for currently logging in the electronic equipment is obtained, as target user's account number;
Target code algorithm is determined according to target user's account number;
The audio data to be played is sent to the wireless audio playback equipment according to the target code algorithm.
2. the method according to claim 1, wherein described determine that target code is calculated according to the user account number
Method, comprising:
Obtain the grade of target user's account number;
Target code algorithm is determined according to the grade of target user's account number.
3. according to the method described in claim 2, it is characterized in that, the grade according to the user account number determines that target is compiled
Code algorithm, comprising:
According to the corresponding relationship of the grade of preset user account number and encryption algorithm, the grade institute of target user's account number is determined
Corresponding all encryption algorithms, alternately encryption algorithm, wherein in the grade of the user account number and pair of encryption algorithm
In should being related to, the higher grade of user account number, and corresponding encryption algorithm is more;
By determining the target code algorithm in the alternative encryption algorithm.
4. according to the method described in claim 3, it is characterized in that, described by determining the target in the alternative encryption algorithm
Encryption algorithm, comprising:
The code displaying algorithms selection interface in the display interface of the electronic equipment, the interior display of the encryption algorithm selection interface
There is the mark of each encryption algorithm in the alternative encryption algorithm;
Obtain mark of the user based on the selected encryption algorithm of encryption algorithm selection interface;
Using the corresponding encryption algorithm of the mark of selected encryption algorithm as target code algorithm.
5. the method according to claim 3 or 4, which is characterized in that the grade and volume according to preset user account number
The corresponding relationship of code algorithm, determines encryption algorithm all corresponding to the grade of target user's account number, alternately compiles
Code algorithm, comprising:
According to the corresponding relationship of the grade of preset user account number and encryption algorithm, the grade institute of target user's account number is determined
Corresponding all encryption algorithms;
Determine the bandwidth of the communication link between presently described electronic equipment and the wireless audio playback equipment;
Obtain the encryption algorithm that the bandwidth is supported;
The encryption algorithm that in the corresponding all encryption algorithms of the grade of target user's account number, will be supported with the bandwidth
Matched encryption algorithm alternately encryption algorithm.
6. according to the method described in claim 5, it is characterized in that, the encryption algorithm that the determination bandwidth is supported, packet
It includes:
According to the corresponding relationship of bandwidth and encryption algorithm, determine presently described electronic equipment and the wireless audio playback equipment it
Between communication link the encryption algorithm supported of bandwidth, wherein in the corresponding relationship of the bandwidth and encryption algorithm, the band
The encoding rate height of wide size and the encryption algorithm is positively correlated.
7. the method according to claim 3 or 4, which is characterized in that the grade and volume according to preset user account number
The corresponding relationship of code algorithm, determines encryption algorithm all corresponding to the grade of target user's account number, alternately compiles
Code algorithm, comprising:
According to the corresponding relationship of the grade of preset user account number and encryption algorithm, the grade institute of target user's account number is determined
Corresponding all encryption algorithms;
Determine the real-time rank of the audio data to be played;
Obtain the encryption algorithm that the real-time rank is supported;
By the real-time rank in the corresponding all encryption algorithms of the grade of the user account number, with the audio data to be played
The matched encryption algorithm of the encryption algorithm supported alternately encryption algorithm.
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 to be played;
Acquiring unit, if obtaining the user account number for currently logging in the electronic equipment for receiving playing request;
Determination unit, for determining target code algorithm according to the user account number;
Transmission unit is broadcast for the audio data to be played to be sent to the wireless audio according to the target code algorithm
Put 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.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810925255.7A CN109150400B (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 |
---|---|---|---|
CN201810925255.7A CN109150400B (en) | 2018-08-14 | 2018-08-14 | Data transmission method and device, electronic equipment and computer readable medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109150400A true CN109150400A (en) | 2019-01-04 |
CN109150400B CN109150400B (en) | 2021-08-17 |
Family
ID=64793109
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810925255.7A Active CN109150400B (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) | CN109150400B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120570A1 (en) * | 2019-12-17 | 2021-06-24 | 中兴通讯股份有限公司 | Bluetooth audio transmission method and apparatus, terminal, and readable storage medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030231859A1 (en) * | 2002-06-03 | 2003-12-18 | Hyun-Su Son | Apparatus and method for managing data |
CN1688178A (en) * | 2005-06-07 | 2005-10-26 | 北京北方烽火科技有限公司 | Up compression mode selecting method for broadband CDMA mobile communication system |
CN101184203A (en) * | 2007-12-21 | 2008-05-21 | 北京海尔集成电路设计有限公司 | Television related apparatus and method for compelled play multimedia content |
CN103618911A (en) * | 2013-10-12 | 2014-03-05 | 北京视博云科技有限公司 | Video streaming providing method and device based on video attribute information |
CN103685179A (en) * | 2012-09-12 | 2014-03-26 | 中国移动通信集团公司 | Method, device and system for compressing content |
CN103885987A (en) * | 2012-12-21 | 2014-06-25 | 中国移动通信集团公司 | Music recommendation method and system |
CN105188157A (en) * | 2015-09-28 | 2015-12-23 | Tcl通力电子(惠州)有限公司 | Audio playing method and audio terminal |
CN205754704U (en) * | 2016-04-27 | 2016-11-30 | 上海象融蓝海文化传媒有限公司 | A kind of Internet video Play System based on user gradation |
-
2018
- 2018-08-14 CN CN201810925255.7A patent/CN109150400B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030231859A1 (en) * | 2002-06-03 | 2003-12-18 | Hyun-Su Son | Apparatus and method for managing data |
CN1688178A (en) * | 2005-06-07 | 2005-10-26 | 北京北方烽火科技有限公司 | Up compression mode selecting method for broadband CDMA mobile communication system |
CN101184203A (en) * | 2007-12-21 | 2008-05-21 | 北京海尔集成电路设计有限公司 | Television related apparatus and method for compelled play multimedia content |
CN103685179A (en) * | 2012-09-12 | 2014-03-26 | 中国移动通信集团公司 | Method, device and system for compressing content |
CN103885987A (en) * | 2012-12-21 | 2014-06-25 | 中国移动通信集团公司 | Music recommendation method and system |
CN103618911A (en) * | 2013-10-12 | 2014-03-05 | 北京视博云科技有限公司 | Video streaming providing method and device based on video attribute information |
CN105188157A (en) * | 2015-09-28 | 2015-12-23 | Tcl通力电子(惠州)有限公司 | Audio playing method and audio terminal |
CN205754704U (en) * | 2016-04-27 | 2016-11-30 | 上海象融蓝海文化传媒有限公司 | A kind of Internet video Play System based on user gradation |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021120570A1 (en) * | 2019-12-17 | 2021-06-24 | 中兴通讯股份有限公司 | Bluetooth audio transmission method and apparatus, terminal, and readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN109150400B (en) | 2021-08-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109246671B (en) | Data transmission method, device and system | |
CN105872253B (en) | Live broadcast sound processing method and mobile terminal | |
CN109150399A (en) | Data transmission method, device, electronic equipment and computer-readable medium | |
CN103905474B (en) | A kind of information sharing method, terminal, server and system | |
CN109445739A (en) | Audio frequency playing method, device, electronic equipment and computer-readable medium | |
US7110755B2 (en) | Information processing system, information processing method of information processing system, information processing apparatus, and information processing program | |
CN109379491A (en) | Audio frequency playing method, device, electronic equipment and computer-readable medium | |
CN111199743B (en) | Audio coding format determining method and device, storage medium and electronic equipment | |
CN109003618A (en) | Coding control method, device, electronic equipment and storage medium | |
CN105828134B (en) | Control method for playing back and device in a kind of audio-video frequency playing system | |
CN109273017A (en) | Coding control method, device and electronic equipment | |
CN109274405A (en) | Data transmission method, device, electronic equipment and computer-readable medium | |
CN109413537A (en) | Audio signal playback method, device and earphone | |
CN109379490B (en) | Audio playing method and device, electronic equipment and computer readable medium | |
CN109151566A (en) | Audio frequency playing method, device, electronic equipment and computer-readable medium | |
CN105072146A (en) | Music information sharing method and device | |
CN106375581B (en) | Method for playing audio during call and mobile terminal | |
CN109150400A (en) | Data transmission method, device, electronic equipment and computer-readable medium | |
JP6151112B2 (en) | REPRODUCTION DEVICE, REPRODUCTION DEVICE CONTROL METHOD, SERVER, AND SYSTEM | |
CN109102816A (en) | Coding control method, device and electronic equipment | |
CN107171760B (en) | A kind of radio playback method, cloud server and radio | |
CN109194998A (en) | Data transmission method, device, electronic equipment and computer-readable medium | |
CN105635916A (en) | Audio processing method and apparatus | |
JP2008270901A (en) | Telephone terminal and communicating system | |
CN105025353B (en) | A kind of control method for playing back and user terminal |
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 |