A kind of mobile terminal and its method for playing audio file
Technical field
The present invention relates to fields of communication technology, more particularly to a kind of mobile terminal and its method for playing audio file.
Background technique
With the fast development and extensive use of various electronic products especially mobile terminal, the function of various mobile terminals
Property and interest are more and more stronger, and people also carry out the dependence of various mobile terminals stronger.The following communication security is asked
Topic also receives the concern of people, and while enjoyment mobile science and technology live to us and bring convenient, people also increasingly focus on
Protection to personal information and data safety.
Encryption technology is relied primarily on for the protection of mobile terminal data in the prior art, associated patent has China
2014 application a patent of invention " a kind of speech ciphering method of mobile communication terminal ", application number:
CN201410121505.3, a kind of speech ciphering method of mobile communication terminal of the disclosure of the invention, by mobile call end
It holds external voice terminal to realize cipher round results, and has the function of independently setting, the safety of user's mobile call terminal can be met
Use demand improves the safety of voice communication.Voice protection in the prior art is primarily directed to call safety, few needles
Protection to local audio is particularly in the audio of broadcast state.
The function of present mobile terminal is increasing, equally can be by it when the audio on mobile terminal is in broadcast state
He listens to equipment, such as:
1. launch party of the mobile phone A as FM, when playing song in mobile phone A, the equipment B/C/D ... as FM recipient can
To listen to the audio that mobile phone A is played.
2. mobile phone A and mobile phone B are by after bluetooth approach successful connection, if opening handset audio function, mobile phone A at this time
The song of broadcasting is played back by mobile phone B;And the voice communication information that mobile phone A receives is played by mobile phone B
Out.
3. after mobile phone A is connect with equipment such as bluetooth headsets, if mobile phone A plays audio or receives calls, bluetooth headset can
Normally receive the audio in mobile phone A.
If audio file is not encrypted before broadcasting, mobile phone A is in the transmitting function for being not turned off or forgetting closing FM
When can or not disconnect the linkage function with other equipment, it can be received by other equipment when playing audio, as the owner of mobile phone A
Selection audio file finds that the audio is unwilling to be heard by other side when opening, and the audio file has been transferred to other at this time
Equipment, having had resulted in needs audio file to be protected to be received or heard by other mobile phones unintentionally, and then leads to personal letter
The leakage of breath and data can not protect the safety of the privacy of oneself or the audio file shared of oneself being unwilling conscientiously.
Summary of the invention
In view of the foregoing deficiencies of prior art, the purpose of the present invention is to provide a kind of mobile terminal and its broadcasting sounds
The method of frequency file because of maloperation or is not intended to operation and leads for solving in the prior art in the case where audio file unencryption
The individual privacy of cause or the problem of audio file shared is revealed of being unwilling.
In order to achieve the above objects and other related objects, the present invention provides a kind of side of mobile terminal playing audio file
Method, the method for the mobile terminal playing audio file the following steps are included:
Judge whether the first movement terminal is in transmitting when first movement terminal executes and plays audio file operation
State continues to play the audio file if the first movement terminal is not in emission state;If the first movement is whole
End be in emission state, then issue whether CIPHERING REQUEST;
If not responding the CIPHERING REQUEST, the first movement terminal continues to play the audio file, and second is mobile
Terminal normally receives and listens to the audio file;If responding the CIPHERING REQUEST, the first movement terminal is to the sound
Frequency file encryption, and encrypted audio files are sent to second mobile terminal;
The encrypted audio files received are decrypted in second mobile terminal, if decryption failure, described the
Two mobile terminals can not audio file described in normal play;If successful decryption, described in the second mobile terminal normal play
Audio file.
Preferably, the method for the first movement terminal encryption are as follows: apply for one section of fixation in the first movement terminal
The memory of length copies to the audio data in the audio file in the memory of the regular length, to described fixed long
Traffic encryption in the memory of degree, then by encrypted data stream to second mobile terminal, then by next section
Audio data copies in the memory of the regular length, carries out the encryption and transmission of lower one piece of data stream, until audio data
It is all encrypted and sends;Wherein, the encrypted data flow of first segment is started with first symbol, followed by password and audio data;
The encrypted data flow of final stage is ended up with end mark.
Preferably, the method for the first movement terminal encryption are as follows: apply for that first is interim in the first movement terminal
Memory, the length of the first interim memory are the length for the audio data that can currently read, by the current sound that can be read
Frequency is according to copying in the described first interim memory, to the traffic encryption in the described first interim memory, then will be encrypted
Then data stream applies for the second interim memory, before the length of the second interim memory is to second mobile terminal
The audio data read is copied to institute to the length between the audio data that can currently read by the audio data once read
It states in the second interim memory, carries out the encryption and transmission of lower one piece of data stream, until audio data is all encrypted and sends;Its
In, the encrypted data flow of first segment is started with first symbol, followed by password and audio data;The encrypted data of final stage
Stream is ended up with end mark.
It is highly preferred that the method for the second mobile terminal decryption are as follows: second mobile terminal receives described first and moves
The encrypted data flow that dynamic terminal is sent, inputs password in second mobile terminal, the input password with encrypt after
Data flow in the consistent then successful decryption of the password that provides.
Preferably, second mobile terminal supports character input function.
Preferably, the first movement terminal and second mobile terminal include mobile phone, it is phone, tablet computer, portable
Formula computer and/or intercom.
In order to achieve the above objects and other related objects, the present invention provides a kind of mobile terminal, and the mobile terminal is at least
Include:
Audio playing module, for playing audio file;
Detection module, for detecting whether the mobile terminal is in when the audio playing module plays audio file
Emission state;
Encryption/decryption module, the audio file for sending when responding CIPHERING REQUEST to needs encrypts, or is used for
It is decrypted to encrypted audio files are received;
Transceiver module is sent for converting electrical signals to electromagnetic wave signal, or the electromagnetic wave received is believed
Number be converted to electric signal.
Preferably, the encryption/decryption module includes encryption unit and decryption unit, and the encryption unit copies to segmentation
Audio data in memory is encrypted paragraph by paragraph, wherein the encrypted data flow of first segment is started with first symbol, followed by password
And audio data, the encrypted data flow of final stage are ended up with end mark;The decryption unit is encrypted to what is received
Data flow is decrypted, and the password provided in the input password of the decryption unit acquisition and encrypted data flow is consistent, solves
Close success.
It is highly preferred that each section of memory can be regular length, it can also be according to the current audio data that can be read
Length provisional application.
As described above, mobile terminal of the invention and its method for playing audio file, have the advantages that
Mobile terminal of the invention and its method for playing audio file pass through FM in the state of broadcasting in local audio
The mode of transmitting terminal or bluetooth encrypts it when launching, and inputs correct password by recipient and realize decryption,
To ensure in the case where audio file unencryption, because of maloperation or operation will not be not intended to lead to individual privacy or be unwilling point
The audio file leakage enjoyed, greatly improves the safety and confidentiality of personal information and data.Further, since the present invention is to reception
The functional requirement of side is relatively low, without supporting decryption function, it is only necessary to support character input function, therefore shifting of the invention
The method universality of dynamic terminal plays audio file is high.
Detailed description of the invention
Fig. 1 is shown as the method flow schematic diagram of mobile terminal playing audio file of the invention.
Fig. 2~Fig. 3 is shown as encryption method schematic diagram of the invention.
Fig. 4 is shown as the structural schematic diagram of mobile terminal of the invention.
Component label instructions
S1~S3 step
1 mobile terminal
11 audio playing modules
12 detection modules
13 encryption/decryption modules
14 transceiver modules
15 passwords obtain module
Specific embodiment
Illustrate embodiments of the present invention below by way of specific specific example, those skilled in the art can be by this specification
Other advantages and efficacy of the present invention can be easily understood for disclosed content.The present invention can also pass through in addition different specific realities
The mode of applying is embodied or practiced, the various details in this specification can also based on different viewpoints and application, without departing from
Various modifications or alterations are carried out under spirit of the invention.It should be noted that in the absence of conflict, following embodiment and implementation
Feature in example can be combined with each other.
It should be noted that illustrating the basic structure that only the invention is illustrated in a schematic way provided in following embodiment
Think, only shown in schema then with related component in the present invention rather than component count, shape and size when according to actual implementation
Draw, when actual implementation kenel, quantity and the ratio of each component can arbitrarily change for one kind, and its assembly layout kenel
It is likely more complexity.
Embodiment one
FIG. 1 to FIG. 3 is please referred to, the present invention provides a kind of method of mobile terminal playing audio file, the mobile terminal
Play audio file method the following steps are included:
Step S1: judge whether the first movement terminal is located when first movement terminal executes and plays audio file operation
In emission state, if the first movement terminal is not in emission state, continue to play the audio file;If described first
Mobile terminal is in emission state, then issue whether CIPHERING REQUEST.
Specifically, as shown in Figure 1, when first movement terminal executes the operation for playing audio file, described in real time monitoring
The state of first movement terminal, judges whether it is in emission state, including but not limited to whole by detecting the first movement
Whether end is connect in a manner of FM transmitting terminal or bluetooth with other mobile terminals with the state of the determination first movement terminal.
In the present embodiment, the first movement terminal includes but is not limited to mobile phone, phone, tablet computer, portable electric
Brain or intercom, any equipment with audio playing module, transmission channel, encryption/decryption module can be used as the first movement
Terminal.
If the first movement terminal is not connect with other mobile terminals, the audio file is whole in the first movement
Continue to play on end, there is no the danger of leaking data.
If the first movement terminal is connect with other mobile terminals, there are the danger of leaking data, described first is moved
Dynamic terminal issues CIPHERING REQUEST.
Step S2: if not responding the CIPHERING REQUEST, the first movement terminal continues to play the audio file, the
Two mobile terminals normally receive and listen to the audio file;If responding the CIPHERING REQUEST, the first movement terminal pair
The audio file encryption, and encrypted audio files are sent to second mobile terminal.
Specifically, as shown in Figure 1, if the user thinks that the audio file is then not responding to the encryption and asks without secrecy
It asks, the audio file continues to play in the first movement terminal, while the audio file passes through FM transmitting terminal or indigo plant
The mode of tooth is received by second mobile terminal, and second mobile terminal normal play and can listen to the audio file,
Realize the shared of local audio data.In the present embodiment, second mobile terminal includes but is not limited to mobile phone, phone, puts down
Plate computer, portable computer or intercom, any equipment with receiving channel, audio playing module and character input module are equal
It can be used as the second mobile terminal.
If the user thinks that in the audio file there are individual privacy or the audio file be user be unwilling with
What people shared, then it maintains secrecy, responds the CIPHERING REQUEST.It is provided with encryption/decryption module in the first movement terminal,
The audio file is encrypted by the encryption/decryption module, while the audio file is in the first movement terminal
Continue to play.
Encryption method is specific as follows: applying for the memory of one section of regular length in the first movement terminal, in this implementation
In example, the length of the memory is set as 1024 bytes, can be according to the length of the audio file sound intermediate frequency data in practical application
Degree specifically sets the length of the memory the considerations of transmit real-time to data, is not limited to this embodiment.
If the length of the audio file sound intermediate frequency data is greater than 1024 bytes (length of the memory of the regular length),
Then the audio data segment in the audio file is copied in the memory, by Encryption Algorithm to filling up the regular length
The data flow of memory encrypted, encrypted data flow is sent to second mobile terminal, the Encryption Algorithm packet
DES, 3DES, RC2, RC4, IDEA or RSA are included but be not limited only to, can be realized by any Encryption Algorithm.Then by next section
The audio data of 1024 bytes copies in the memory of the regular length, carries out the encryption and transmission of lower one piece of data stream, directly
It is all encrypted and sends to audio data.Wherein, the encrypted data flow of first segment is started with first symbol, in the present embodiment
In, the first symbol is 010;Then closely follow the first symbol is password, and in the present embodiment, the password is 123456,
The length and particular content of password can be by user's sets itselfs;Remaining byte is by audio data in the memory of the regular length
It fills up, as shown in Figure 2.The encrypted data flow of final stage is ended up with end mark, and in the present embodiment, the end mark is
110, as shown in Figure 3.
If the length of the audio file sound intermediate frequency data less than 1024 bytes (length of the memory of the regular length),
Then the audio data in the audio file is all copied in the memory of the regular length, by Encryption Algorithm to filling up
The data flow for stating the memory of regular length is encrypted, and encrypted data flow is sent to second mobile terminal, described
Encryption Algorithm includes but are not limited to DES, 3DES, RC2, RC4, IDEA or RSA, can be realized by any Encryption Algorithm.Wherein,
Encrypted data flow is started with first symbol, and in the present embodiment, the first symbol is 010;Then immediately following the first symbol
It is password, in the present embodiment, the password is 123456, and the length and particular content of password can be by user's sets itselfs;So
After be audio data;It is finally ended up with end mark, in the present embodiment, the end mark is 110.
Step S3: the encrypted audio files are decrypted in second mobile terminal, if decryption failure, described the
Two mobile terminals can not audio file described in normal play;If successful decryption, described in the second mobile terminal normal play
Audio file.
Specifically, as shown in Figure 1, second mobile terminal receives the encrypted of the first movement terminal transmission
Data flow, having first symbol 010 then in the data flow received indicates the audio file received for encryption file, when described second
Mobile terminal receives after the data of 1024 byte of first segment just first to the data deciphering of this 1024 byte.The method of decryption is specific
It is as follows: password being inputted in second mobile terminal according to prompt, is provided in the input password and encrypted data flow
The consistent then successful decryption of password, otherwise decryption failure.It is relatively low to the functional requirement of second mobile terminal, without supporting
Decrypt function, it is only necessary to support character input function.
In the present embodiment, password 123456, therefore when the input password is 123456, then password match, is decrypted
Success, the audio data after being decrypted.The data flow that second mobile terminal again encrypts next section is decrypted, until
Having in the data flow that second mobile terminal receives indicates that encryption file transmission finishes when end mark 110, solve to it
All ciphertext datas are combined as the entire audio file after close, second mobile terminal can normal play and receipts
The audio file for listening the first movement terminal plays realizes the shared of local audio data.
When the input password is not 123456, then password mismatches, and decryption failure, obtained audio data is still encryption
, it is broadcasted in click play on second mobile terminal with noise, the local audio data in the first movement terminal
It is protected, avoids because of maloperation or what individual privacy or the audio file shared of being unwilling caused by being not intended to operation were revealed asks
Topic.
The mode for being encrypted, being sent and being decrypted after certain byte is filled up in encryption and decryption method fixation in the present embodiment
Easy to operate, effect is high.
Embodiment two
A kind of method of mobile terminal playing audio file, the method in this method and embodiment one are provided in the present embodiment
It is almost the same, the difference is that:
The method encrypted in embodiment one is the memory by applying for one section of regular length, to the number in regular length memory
Encrypted according to stream, and in the present embodiment, the length of the memory be it is unfixed, when the first movement terminal is encrypted
When operation, the audio file plays in the first movement terminal, and the length for the audio data that can currently read is more
Few the first interim memory for just applying for how much length, then copies to the described first interim memory for the audio data read
In, recycle the method in embodiment one to be encrypted to it and be transmitted to second mobile terminal;When first segment data flow
After sending, apply for one section of second interim memory, the length of the second interim memory again in the first movement terminal
It is the preceding audio data once read to the length between the audio data currently read, and so on, until audio text
Part is by whole encrypting and transmittings.If the audio data in the audio file is shorter, before first application memory
It runs through, then need to only apply for the interim memory of the audio file sound intermediate frequency data length.This method is advantageous in that nothing
It needs to wait for audio data and fills up memory can carrying out subsequent cryptographic operation, real-time is high.Other operating processes and embodiment are one by one
It causes, will not repeat them here.
Embodiment three
As shown in figure 4, the present invention provides a kind of mobile terminal 1, the mobile terminal 1 includes: audio playing module 11, inspection
It surveys module 12, encryption/decryption module 13, transceiver module 14 and password and obtains module 15.
Wherein, the audio playing module 11 is for converting electrical signals to voice signal, to play the mobile terminal 1
On audio file.
The detection module 12 is connected to the audio playing module 11, for playing sound in the audio playing module 11
Detect whether the mobile terminal 1 is in emission state when frequency file.
The encryption/decryption module 13 is connected to the audio playing module 11, the transceiver module 14 and the password and obtains
Module 15 responds CIPHERING REQUEST when the mobile terminal 1 is as sender, and the audio file sent to needs encrypts
And it is output to the transceiver module 14;When the mobile terminal 1 is as recipient, for the encrypted audio files received
It is decrypted and is output to the audio playing module 11.Specifically, the encryption/decryption module 13 includes encryption unit and decryption
Unit, the audio data that the encryption unit copies in memory segmentation encrypt paragraph by paragraph, wherein first segment is encrypted
Data flow is started with first symbol, followed by password and audio data, and the encrypted data flow of final stage is ended up with end mark;Institute
It states decryption unit the encrypted data flow received is decrypted, after the input password of the decryption unit acquisition and encryption
Data flow in the consistent then successful decryption of the password that provides.Each section of memory can be regular length, can also be according to current energy
The length provisional application of the audio data read.
The transceiver module 14 includes sendaisle and receiving channel, described when the mobile terminal 1 is as sender
Transceiver module 14 converts electrical signals to electromagnetic wave signal and sends;When the mobile terminal 1 is as recipient, the receipts
It sends out module 14 and the electromagnetic wave signal received is converted into electric signal.
The password obtains module 15 and is connected to the encryption/decryption module 13, is obtained by password acquisition module 15 defeated
Enter password, the input password identified, and by the input password after identification be sent to the encryption/decryption module 13 for
The audio file of the encryption received is decrypted in the encryption/decryption module 13, in the present embodiment, is obtained by character input
Take password;Password can also be obtained by voice messaging, then the voice messaging is identified as electric signal;The acquisition modes packet of password
It includes but is not limited only to cited by the present embodiment, any mode for obtaining password is suitable for the present invention.
The working principle of the mobile terminal 1 is as follows:
When user plays audio file by the audio playing module 11 on mobile terminals, the detection module 12
Mobile terminal is detected, to judge whether mobile terminal is in emission state, including but not limited to detection mobile terminal is
It is no to be connect as FM transmitting terminal or by bluetooth with other mobile terminals.If mobile terminal is not in emission state, then after continued broadcasting
It puts;If mobile terminal is in emission state, then CIPHERING REQUEST is issued.If being not responding to the CIPHERING REQUEST, the audio text
Part is directly output to the transceiver module 14 and is sent to other mobile terminals, is received by the transceiver module of other mobile terminals
The audio file, and played out by the audio playing module of other mobile terminals;If responding the CIPHERING REQUEST,
The audio file played in the audio playing module 11 is encrypted by the encryption/decryption module 13, encrypted audio files
It is output to the transceiver module 14, the transceiver module 14 is sent out after the electric signal sent being needed to be converted to electromagnetic wave signal again
It is shot out.Electric signal, which is converted into, after the electromagnetic wave signal that the transceiver module 14 receives obtains encrypted audio files,
And be output to the encryption/decryption module 13 and be decrypted, the encryption/decryption module 13 obtains defeated from password acquisition module 15
Enter password and with the password match that is provided in the encrypted audio files, successful match then successful decryption, the audio text after decryption
Part is output to the audio playing module 11 and plays out.
Mobile terminal of the invention and its method for playing audio file, have the advantages that
Mobile terminal of the invention and its method for playing audio file detect mobile terminal when audio file is in broadcasting
Whether it is in emission state, audio file being played on is encrypted if in emission state, and just by recipient's input
True password realizes decryption, to ensure in the case where audio file unencryption, because of maloperation or will not be not intended to operation and causes
Individual privacy or the audio file shared leakage of being unwilling, greatly improve the safety and confidentiality of personal information and data.This
Outside, since functional requirement of the present invention to recipient is relatively low, without supporting decryption function, it is only necessary to support character input function
, therefore the method universality of mobile terminal playing audio file of the invention is high.
In conclusion the present invention provides a kind of mobile terminal, comprising: play the audio playing module of audio file;Institute
It states and detects the detection module whether mobile terminal is in emission state when audio playing module plays audio file;For
The audio file sent when responding CIPHERING REQUEST to needs encrypts, or for carrying out to the encrypted audio files received
The encryption/decryption module of decryption;It is sent for converting electrical signals to electromagnetic wave signal, or the electromagnetic wave received is believed
Number be converted to the transceiver module of electric signal.The method of the mobile terminal playing audio file first the following steps are included: move
Dynamic terminal, which executes, judges whether the first movement terminal is in emission state when playing audio file operation, if described first moves
Dynamic terminal is not in emission state, then continues to play the audio file;If the first movement terminal is in emission state,
Issue whether CIPHERING REQUEST;If being not responding to the CIPHERING REQUEST, the first movement terminal continues to play the audio file,
Second mobile terminal normally receives and listens to the audio file;If responding the CIPHERING REQUEST, the first movement terminal
The audio file is encrypted, and is sent to second mobile terminal;Second mobile terminal is to the encrypted audio text
Part decryption, if decryption failure, second mobile terminal can not audio file described in normal play;If successful decryption, institute
State audio file described in the second mobile terminal normal play.The method of mobile terminal and its broadcasting audio file of the invention is at this
It is encrypted when ground audio is launched by way of FM transmitting terminal or bluetooth in the state of broadcasting, and passes through reception
Side inputs correct password and realizes decryption, to ensure in the case where audio file unencryption, because of maloperation or will not be not intended to
Operation leads to individual privacy or the audio file shared leakage of being unwilling, greatly improves safety and the guarantor of personal information and data
Close property.Further, since the present invention is relatively low to the functional requirement of recipient, without supporting decryption function, it is only necessary to support character
Input function, therefore the method universality of mobile terminal playing audio file of the invention is high.So effective gram of the present invention
It has taken various shortcoming in the prior art and has had high industrial utilization value.
The above-described embodiments merely illustrate the principles and effects of the present invention, and is not intended to limit the present invention.It is any ripe
The personage for knowing this technology all without departing from the spirit and scope of the present invention, carries out modifications and changes to above-described embodiment.Cause
This, institute is complete without departing from the spirit and technical ideas disclosed in the present invention by those of ordinary skill in the art such as
At all equivalent modifications or change, should be covered by the claims of the present invention.