Background technology
Along with the fast development of mobile multimedia technology, mobile phone has entered multimedia era.According to the prediction of relevant expert mechanism, by 2008, color screen, embedded digital camera, chord ring all will become the configuration of standard, and mobile multimedia chip and Service Market scale will reach billions of and tens billion of dollars respectively.Many chips for cell phone manufacturer is designed to application module to advanced person's multimedia function successively, implants in the chip solution of mobile phone; Mobile phone production firm researches and develops multimedia function and promote as the major function of mobile phone energetically especially, the multimedia processing capability of mobile phone cannot be mentioned in the same breath, it is increasingly extensive and important that multimedia application becomes, and mobile phone is just developed to the multimedia video recreation center by initial simple voice service.
At present, realize that on mobile phone terminal the scheme of multimedia function mainly contains two kinds: a kind of is the single-chip solution, promptly in the inner multimedia function that realizes of baseband chip.This solution advantage is that integrated level height, cost are lower, low in energy consumption, shortcoming is that capacity, speed, the power consumption Capability Requirement to baseband chip is very high, development difficulty is big, the cycle is longer, lack flexibility when increasing new function, and on function, compare with special-purpose multimedia process chip, be short of to some extent usually.Another kind is a twin-core sheet solution, it is baseband chip+application coprocessor pattern, this scheme is less demanding to baseband chip, adopt the low speed baseband chip of low-power consumption just can realize, but relate to the matching problem of dedicated multimedia chip and miscellaneous part, the interface standard disunity causes the application and development difficulty.
For mobile operator, because above-mentioned two kinds of multimedia implementations all are directly to be based upon on the mobile phone terminal, and the manufacturing cycle of mobile phone terminal is long, cost is higher, and mobile operator to the control of cell phone manufacturer and mobile phone market relative with influence power a little less than, therefore, these two kinds of schemes all can not help mobile operator arrangement multimedia value-added service fast and efficiently to respond vertiginous mobile multimedia market.
Along with the fast development of Internet and digitizing technique, digital contents such as the e-book of online transaction and propagation, electronic newspaper, music, film, picture, recreation and software are more and more.Yet because digitized content is easy to be replicated, revises and propagates, the online digital content of propagating exists a large amount of piracies and impinge issue, makes the owner's of digital content interests be subjected to loss, has dampened them and has used the enthusiasm of extension of network business.Copyright protection to digital content just seems more and more important.Since two thousand; DRM (Digital Rights Management; digital copyright management) technology more and more is subject to people's attention; increasing digital content has realized the value-added service of digital content by the DRM technical protection, and for example e-book is by the DRM system; carry out online spending; perhaps e-book is sold the digital library of DRM protection, made publishing house when publishing the paper book, the sale by e-book obtains more income.The DRM technology is more and more obvious to the influence that publishing business is brought, and aspect the sale of digital contents such as e-book, electronic newspaper, e-magazine, the DRM technology has been given play to important effect.The DRM technology is introduced mobile value-added service, can guarantee that digital content propagates in mobile network, guarantee the interests of content supplier.Mobile DRM has become one of focus of mobile service research in the present global range.Along with the development of 3G mobile technology and OMA DRM, DRM will be further in the application study of mobile field, will occur more mobile DRM system and product on the market.Yet; at moving communicating field,, do not form unified DRM service platform because the DRM realization mechanism that different cell phone manufacturers provide is different; cause operator can not carry out digital copyright protecting effectively, greatly influenced it and promoted the value-added service of digital content.
For the cellphone subscriber, because the update speed of mobile phone is more and more faster, if still on mobile phone terminal, realize multi-media player function, when then the user changes planes, need buy multi-media player function once more on the one hand, on the other hand, but give it up for original still available multimedia function or parts, promptly increase cost, caused the wasting of resources again; And, because the using method and the operating process of the multimedia player of every kind of mobile phone terminal be not quite similar, the user must making time and energy come to be familiar with again and to grasp its using method, both caused the inconvenience in the use, also increased trace utilization cost.If mobile phone terminal has been realized the DRM function, but, equally also can increase use cost and difficulty because the difference of production firm causes its occupation mode also to have nothing in common with each other.
Summary of the invention
The objective of the invention is to change traditional mode that realizes multi-media player function merely by mobile phone terminal, a kind of method that realizes multimedia by SIM card at mobile phone terminal is provided, this method is divided into two parts with the multimedia function of mobile phone terminal and realizes, part of functions wherein, as showing and playing, still realize by mobile phone terminal; Another part function mainly is a decoding function, then transfers in the SIM card and realizes.Simultaneously, the present invention also will provide a kind of new system that is applicable to this method.
To achieve these goals, technical scheme of the present invention is: a kind of by the method for SIM card at mobile phone terminal realization multimedia, may further comprise the steps:
(1) mobile phone terminal is chosen file to be played by file system access and obtain multimedia data file tabulation, and the file path name is passed to SIM card by APDU (Application Protocol Data Unit, Application Protocol Data Unit) instruction type;
(2) data transmission channel between mobile phone terminal and the SIM card and relevant data buffer zone are carried out initialization, send the beginning decoding instruction by mobile phone terminal to SIM card then, SIM card is decoded after receiving the beginning decoding instruction;
(3) mobile phone terminal sends the read data instruction to SIM card, after SIM card receives the read data instruction, decoded multi-medium data basic parameter is mail to mobile phone terminal, mobile phone terminal utilizes the playback equipment of these basic parameter initialization self, and described basic parameter comprises sample rate, sound channel mode, bit-depth etc.;
(4) mobile phone terminal is according to the requirement of playback equipment, with certain speed reading data flow and be sent to playback equipment and play from SIM card.
Above-mentionedly realize that at mobile phone terminal said SIM in the method for multimedia comprises UIM (User Identity Model in SIM in the gsm system, the cdma system by SIM card, subscriber identification module), PIM (Personal Identity Module, personal identifier module) in the PHS system and the USIM (Universal Subscriber Identity Module) in the 3G system.
Above-mentionedly realize in the method for multimedia at mobile phone terminal by SIM card, data transmission channel between mobile phone terminal and the SIM card is divided into signalling path and data channel, signalling path is used to transmit the multimedia control signal, and data channel is used for transmitting multimedia data stream.
Signalling path adopts the host-host protocol of ISO/IEC (International Standards Organization/International Electrotechnical Commission) 7816-3, mode by expansion ISO/IEC 7816 APDU instruction set realizes, is about to multimedia operations and instructs the form that is packaged into ISO/IEC 7816 APDU instruction to transmit; Also can adopt the high speed data transfer bus protocol of one of USB (USB), SD (safe digital card), SDIO (secure digital input and output) or MMC (multimedia card) to realize.
Data channel adopts the high speed data transfer bus protocol of one of USB, SD, SDIO or MMC to realize.
Above-mentionedly realize in the method for multimedia at mobile phone terminal that the processing procedure that SIM card receives behind the beginning decoding instruction in the step (2) is as follows by SIM card:
(a) open selected multimedia file, read frame data and decoding;
(b) separated a frame after, the pcm stream of output was stored among the DATA_buffer of data buffer zone after decoding finished, and multi-medium data basic parameter (as sample rate, sound channel mode, bit-depth etc.) is left among the parameter buffering area PARA_buffer;
(c) special sign is set in order to show whether data buffer zone DATA_buffer is idle; If there is the free time, decoding continues, otherwise decoding suspends.
Above-mentionedly realize that at mobile phone terminal in the method for multimedia, the process of mobile phone terminal play multimedia data is as follows in the step (4) by SIM card:
(i) mobile phone terminal sends to SIM card and reads the pcm stream instruction;
After (ii) SIM card receives the data read instruction, the data among the DATA_buffer of data buffer zone are sent to data channel, the sign with the data buffer zone is changed to idle condition then; If be the decoding halted state this moment, then continue decoding;
(iii) mobile phone terminal receives the data that SIM card sends, and pcm stream is sent to multimedia play equipment;
(iv), then finish to play if the mobile phone terminal reading of data is failed or received the decoding end signal that SIM card sends; Otherwise circulation is carried out above-mentioned process (i) extremely (iii).
Above-mentionedly realize in the method for multimedia at mobile phone terminal by SIM card, the method that realizes multimedia decoding in SIM card is to adopt the mode of soft or hard combination, realize decoding function with software, when realizing decoding function, the decoding algorithm of floating-point is become the decoding algorithm of fixed point with software, simultaneously, quicken to realize wherein complicated calculations with hardware.
Above-mentionedly realize that at mobile phone terminal described multimedia data file can be stored in the SIM card, directly decodes in the method for multimedia in SIM card by SIM card; Also can be stored on mobile phone terminal or its extension storage card, be transferred in the SIM card by signalling path and data channel and decode.
At said method, the present invention proposes a kind of system that realizes multimedia by SIM card at mobile phone terminal, comprise mobile phone terminal and place the interior SIM card of mobile phone terminal, be provided with in the SIM card and be used for multimedia decoder that multimedia data file is decoded and be used to receive the multimedia operational order and control the command analysis device that multimedia decoder carries out corresponding operating, multi-medium data transmits by the data transmission channel between mobile phone terminal and the SIM card.
Data transmission channel between above-mentioned mobile phone terminal and the SIM card comprises the data channel that is used to transmit the signalling path of multimedia control signal and is used for transmitting multimedia data stream.
By the method for SIM card of the present invention, can obtain following beneficial effect at mobile phone terminal realization multimedia:
For mobile operator because lead time of SIM card and cost be much smaller than the lead time and the cost of mobile phone, therefore, by the multi-media player function of customization SIM card, can be low-cost, efficiently, arrangement multimedia value-added service apace; And can also more effectively combine with DRM; form a uniform platform; reinforcement is to content and protection of Intellectual Property Rights; strengthen the control device and the control ability of operator; like this; operator's easier control market development situation, the substantial connection with the user of furthering promotes oneself brand value of services.
For cell phone manufacturer, because not needing increases the multimedia processing capacity for mobile phone, avoided matching problem with the multimedia coprocessor, not only can simplify the structure of mobile phone terminal, reduce the research and development difficulty of mobile phone terminal, and can shorten the construction cycle, reduce development cost, thereby can quickly new product be put on market, attract more user buyer, realize the maximization of market profit;
For the cellphone subscriber, really the function that needs does not reduce, but once investment is enjoyed all the life.In case had the SIM card of band multimedia function, just had lifelong multimedia player,, also do not needed to buy the mobile phone terminal that has the multimedia decoding function even change mobile phone terminal, avoided purchasing the machine cost thereby save for mobile phone terminal increases the multimedia function overlapping investment; And, if multi-media player function is bundled in mobile phone terminal, then the media player using method of various mobile phone terminals and operating process also can be different, like this, cause the user whenever to change mobile phone terminal one time, no matter be new machine or old machine, just must relearn and grasp the using method and the operating process of new media player, bring great inconvenience to use; If multimedia function is placed in the SIM card realizes, then can avoid this phenomenon fully, promptly made things convenient for use, saved time and efforts again, reduced trace utilization cost.And, by in SIM card, realizing various communications protocols (SD, MMC, USB), the user do not need special-purpose intelligent card read/write device in just can reading SIM card partial content or in SIM card, transmit data, be very easy to use.
Embodiment
The present invention is described in further detail below in conjunction with drawings and Examples.
As shown in Figure 1, of the present invention by the system employing user terminal/server framework of SIM card at mobile phone terminal realization multimedia, comprise mobile phone terminal, signalling path, data channel, SIM card four parts.Wherein, mobile phone terminal is as client, sends the order of relevant multimedia operations by signalling path to SIM card, as broadcast, F.F., retreat, circulation etc.; SIM card is as server, receives and resolve the multimedia operations order that is sent by signalling path by mobile phone terminal, and the control multimedia decoder multimedia data file that reads and decode; Signalling path and data channel are as the communication port of mobile phone terminal and SIM card, and main being responsible for transmitted multimedia control command and data flow, and the former is mainly used in low rate data communication, and the latter then is used for high data rate communication.
In addition, the framework that also is applicable to browser/server by SIM card in the system of mobile phone terminal realization multimedia of the present invention.
Client-side program in the above-mentioned mobile phone terminal mainly is a multimedia player, mainly is achieved as follows four functions:
1) provides the broadcast display interface.Do not start and be used to show that all multimedia file tabulations select played file for the user before the decoder, then show selected played file tabulation after the user selects files; After Once you begin decoding and playing, also to show some information (as file attribute, multimedia type, reproduction time length etc.) and content (as the lyrics, lines etc.) simultaneously about in progress file, and playing progress rate/ratio;
2) provide patterned play operation interface.The user both can select played file, also can controls playing state and progress, as F.F., retreat, circulate, play continuously, freely drag broadcasts, in the time ratio play, fixed point broadcast etc.;
3) with user's operational motion, be converted to multimedia control command (sequence), mail to SIM card;
4) output control function, the multimedia data stream that is about to SIM card decoding back output outputs in the multimedia play equipment (as screen, loudspeaker etc.), finishes final playing function.
Signalling path is mainly used in and transmits the multimedia control command, and its data quantity transmitted is less, and is less demanding to real-time.Because what SIM card adopted is the host-host protocol of ISO/IEC 7816-3, its speed is lower, therefore, can be used as signaling transfer protocol uses, mode by expansion ISO/IEC 7816 APDU instruction set realizes, is about to multimedia operations and instructs the form that is packaged into ISO/IEC 7816 APDU instruction to transmit.In addition, also can adopt other data bus protocol, as USB, SD, SDIO, MMC etc., carry out in the mode of file transfer, promptly just the multimedia control command is transmitted after being packaged into file again.
The command analysis device is a server program, is responsible for receiving the multimedia operational order that mobile phone terminal sends, and operates accordingly according to operational order commander and control multimedia decoder.Such as, if what receive is the listed files display command, then from SIM card, the tabulation of all multimedia files is passed to mobile phone terminal; If what receive is play command, then at first select played file according to playlist, start decoding work then; If what receive is command fast forward, then controls and decode again after decoder is skipped the frame number of regulation forward.
The take orders operational order of resolver of multimedia decoder reads multimedia data file (both can be in SIM card, also can in mobile phone terminal) and decoding, then decoded result is sent to mobile phone terminal.The scheme of soft or hard combination and fixed-point computation is adopted in the realization of decoder: realize decoding function with software, when realizing decoding function, the decoding algorithm of floating-point is become the decoding algorithm of fixed point with software, simultaneously, quicken to realize wherein complicated calculations with hardware, take advantage of and the vector multiply-add operation as vector.
The core concept of fixed-point algorithm is to use fixed-point number to replace floating number, and uses fixed-point calculation to replace floating-point operation.Compare with floating-point operation, the fixed-point processing ability of embedded system is strengthened, can support the arithmetic sum logical operation of 32 fixed point integers as ARM 7 TDMI (a kind of general flush bonding processor that Britain ARM company produces), and up to 64 fixed-point multiplications and multiply-add operation, therefore, fixed-point algorithm can improve the decoding performance of embedded system.
Below to realize that on the ARM of ARM company 7 TDMI flush bonding processors MP3 decoding is that example describes.
The soft decoding of the MP3 floating-point of high tone quality needs a large amount of calculating, in general can use floating-point coprocessor (FPU) or (floating-point/fixed point) DSP to finish real-time decoding.But in Embedded Application, FPU/DSP means that a large amount of chip area expenses and system cost increase.Floating-point MP3 decoding algorithm needs a large amount of computing times, is not suitable for using under embedded environment.Therefore the MP3 decoding algorithm of floating-point must be become fixed-point algorithm, enable on an integer kernel, to move.
Floating number can be expressed as fixed-point value by formula (1).Wherein I represents the integer of fixing a point, and influenced by machine word-length; F represents floating number; N
FThe expansion multiple of expression floating number; [] expression rounding operation.Like this, floating-point operation just can be expressed as integer calculations and displacement thereof, just can be expressed as two multiplications of integers and displacement such as the multiplication of two floating numbers, as the formula (2).ARM 7 TDMI instruction set can realize computing and shifting function in a beat, so ARM 7 TDMI processor cores can carry out this class computing efficiently, and fixed-point value calculates and can directly use integer or lint-long integer operational order to realize.
The MP3 decoding algorithm mainly comprises: Huffman decoding, inverse quantization, stereo decoding, reverse sawtooth ripple, IMDCT (Inverse Modified Discrete Cosine Transform, oppositely modified model discrete cosine transform) and subband are synthetic.Except the Huffman decoding, other several subprograms all need complicated floating-point operation.Through fixed point conversion, the MP3 fixed-point algorithm only needs about 20% of original floating-point arithmetic computing time, even like this, still can not realize real-time decoding with the method for pure software.MP3 decoding process and shared CPU time are being analyzed the back discovery, in each module of MP3 decoding, amount of calculation mainly concentrates on inverse quantization sampling, IMDCT and subband synthetic filtering module, and both amounts of calculation are maximum later on, and the CPU time more than 70% is used for the IMDCT and the subband compose operation that carry out at last.Comprised a large amount of multiplication and multiply-add operation during IMDCT and subband are synthetic, its computational speed is directly connected to the decoding speed of MP3 frame, and is very big to the decoding performance influence of MP3.Therefore, adding instruction and 64 lint-long integers for these computings taking advantage of of utilizing then that ARM 7 TDMI processors provide takes advantage of and adds instruction, a large amount of multiplyings are transformed to vector to be taken advantage of to add with vector and takes advantage of two kinds of computings, adopt hardware mode to realize this two kinds of computings, and use lint-long integer to take advantage of to add instruction and rewrite the vector multiplication function.
Data channel is mainly used in and decoded original multimedia data stream is sent to mobile phone terminal directly plays, the data volume of its transmission is bigger, and speed and synchronism require also than higher, therefore, adopt the high speed data bus agreement, wait as USB, SD, SDIO, MMC and to realize, as shown in Figure 2.
Because multimedia data type is many, comprises MP3, MP4, AAC, WMA etc.The present invention is that example is described to play MP3 only.Other data types are according in like manner implementing.
As previously mentioned, must have the data-transmission channel of high bandwidth between mobile phone terminal and SIM card, as data transfer modes such as USB, SD, MMC.If use the USB passage, preferably adopt synchronous transfer module.
For reducing volume of transmitted data and raising the efficiency, suggestion is stored in multimedia file in the SIM card; If be stored in the mobile phone terminal, then can it be imported in the SIM card by signaling/data channel.Because the memory state of two kinds of situations does not have difference in essence for the present invention, so the present invention is that example is described with the situation that multimedia file is stored in the SIM card only.
● workflow
The workflow of multimedia mainly is divided into file selection, decoding initialization, playback equipment initialization, plays four processes as shown in Figure 3.Detailed workflow and realization mechanism such as Fig. 4, shown in Figure 5.
A. file choice phase
Mobile phone terminal is by file system access and obtain the multimedia data file tabulation of storing on the SIM card, chooses file to be played, and correlated results such as file path name are passed to SIM card by APDU instruction type (signalling path).
B. the initialization of decoding
I) data transmission channel between initialization mobile phone terminal and the SIM card and relevant data buffer zone;
II) mobile phone terminal sends the beginning decoding instruction to SIM card;
III) after SIM card receives decoding instruction, carry out following work:
The first, open selected multimedia file, read frame data and decoding;
Second, after having separated a frame, PCM (the Pulse Code Modulation of output after decoding finished, pulse-code modulation) code stream is stored among the DATA_buffer of data buffer zone, the audio frequency basic parameter is left among the parameter buffering area PARA_buffer, and described basic parameter comprises sample rate, sound channel mode and bit-depth;
The 3rd, special sign is set in order to show that whether data buffer zone DATA_buffer is idle, if there is the free time, decodes and continue, otherwise decoding suspends.
C. initialization playback equipment
I) mobile phone terminal sends the instruction of article one read data to data channel;
II) after SIM card receives the instruction of article one read data, the audio frequency basic parameter among the parameter buffering area PARA_buffer is mail to data transmission channel;
III) after mobile phone terminal obtains these audio frequency basic parameters by data channel, utilize their initialization playback equipments (as audio/video devices).
D. playing process
Mobile phone terminal is according to the requirement of playback equipment, reads pcm stream and is sent to playback equipment and plays from data transmission channel with certain speed.Its implementation procedure execution following steps that circulate exactly:
I) mobile phone terminal sends to data channel and reads the pcm stream instruction;
II) after SIM card receives the data read instruction, the data among the DATA_buffer of data buffer zone are sent to data channel, the sign with the data buffer zone is changed to idle condition then; If be the decoding halted state this moment, then continue decoding;
III) mobile phone terminal receives the data that SIM card sends and pcm stream is sent to audio frequency apparatus plays.
IV) if the mobile phone terminal read data is failed or received the decoding end signal that SIM card sends, finish to play.
● realization mechanism
A. data synchronization between mobile phone terminal and SIM card
Data sync between mobile phone terminal and SIM card realizes by checking data buffer zone DATA_buffer " busy not busy " state.If the data buffer zone DATA_buffer free time, then decoding continues; If data buffer zone DATA_buffer is busy, then decoding suspends.
When initial, data buffer zone DATA_buffer is in " free time " state; After starting decoder, the decoding beginning, the output of will decoding writes data buffer zone DATA_buffer.After writing completely, data buffer zone DATA_buffer is in " doing " state.
After the read data instruction of receiving mobile phone, SIM card sends the data among the DATA_buffer of data buffer zone to data channel; Finish if transmit, then data buffer zone DATA_buffer will turn back to " free time " state again.
During specific implementation, can adopt multiple/blocks of data buffering area, as long as also there is idle data buffer zone in the system, decoding continues; Have only all data buffer zones of working as all occupied, when being in " doing " state, decoding just suspends.
B. Play Control realization mechanism
Several classes such as the action type of control multimedia state mainly contains time-out, F.F., retreat, stop.Volume control is realized separately by mobile phone, does not need SIM card to participate in.Detailed Play Control realization mechanism as shown in Figure 5.
I) suspend realization
When the user after mobile phone terminal input suspends play command (as pressing Pause key), mobile phone terminal stops to the SIM card reading of data.SIM card continues decoding, all is filled up to all data buffer zone DATA_buffer, and when being in " doing " state, decoding suspends.
II) F.F., retreat realization
When the user after mobile phone input " F.F. " or " retreating " play command, mobile phone sends the APDU instruction of the expansion that pre-defines to SIM card by signalling path.After SIM card receives instruction, resolve, skip the frame of some as requested forward or backward, promptly move pointer to a new position of file to be decoded, begin decoding then from here.
III) stop to realize
Stop to have following two kinds of situations:
(1) user ceases and desist order to the mobile phone input, and (2) play normal termination.
To (1) kind situation, when the user after mobile phone input is ceased and desisted order, mobile phone is by sending the APDU instruction of predefined expansion to SIM card; SIM card withdraws from decoding program after receiving this instruction; Mobile phone terminal stops to send the read data instruction to data channel simultaneously.
To (2) kind situation, after the SIM card decoding finishes, can put special marking at data buffer zone DATA_buffer, withdraw from decoding program then; During the mobile phone reading of data, behind the discovery special marking, stop to the data channel reading of data, broadcast stops.