Detailed description of the invention
In below describing, in order to illustrate rather than in order to limit, it is proposed that such as particular system structure, technologyEtc detail, in order to thoroughly cut and understand the embodiment of the present invention.But, those skilled in the art shouldClear, the other embodiments do not have these details also can realize the present invention.In other situations,Omit the detailed description to well-known system, device, circuit and method, in order to avoid unnecessary detailsHinder description of the invention.
In order to technical solutions according to the invention are described, illustrate below by specific embodiment.
Refer to Fig. 1, obtain the realization stream of the method for movie film for the intelligent terminal that the embodiment of the present invention providesJourney, it mainly comprises the steps that
In step S101, after detecting that storage device accesses intelligent terminal, it is judged that described storage deviceWhether binding publisher's cinema server, if judged result is "Yes", then step S103, if judgingResult is "No", then step S102.
In the present embodiment, first detect whether described storage device has accessed intelligent terminal, when detectingAfter stating storage device access intelligent terminal, then judge whether described storage device binds publisher's cinema server.
It is understood, however, that described storage device can be the VKey of similar Ukey, as i.e. inserted i.e.The USB flash disk pulling out, can store the media of download, and be built-in with the account information of encryption.
In step s 102, when judging described storage device unbound publisher cinema server, then willDescribed storage device binds publisher's cinema server.
In embodiments of the present invention, Sharepreferences is passed through in the title of described storage device and pathSend to described publisher's cinema server after preservation, so that the binding publisher's movie theatre service of described storage deviceDevice.Wherein, SharePreferences is used to store a kind of mechanism of some easy configuration information, usesMap data structure stores data, stores in the way of key-value pair, uses XML format to store dataIn described storage device.
Concrete it may be that can register when TV movie theatre functional application loadsACTION_MEDIA_MOUNTED broadcasts, and can receive when storage device is insertedACTION_MEDIA_MOUNTED broadcasts, and after receiving broadcast, can obtain the storage device of insertionPath, according to the configuration information sharedpreferences that this locality preserves can know this storage device whether withPublisher's cinema server is bound, and as unbound, then using publisher's cinema server URL as Key, depositsThe path of storage equipment is saved in locally configured information SharePreferences as Value.Key and ValueOne_to_one corresponding, then be considered as binding success.
In step s 103, when judging that described storage device has bound publisher's cinema server, then toDescribed publisher's cinema server sends the request message of the film that the institute that downloads movies play the same day.
In embodiments of the present invention, when judging that described storage device has bound publisher's cinema server, swashLive TV movie theatre function, and amplify icon for pointing out user's now TV movie theatre function to use, TV is formerFilm interface changes to TV movie theatre interface.Intelligent terminal starts thread, to described publisher's cinema serverSend the solicited message of the film that caching cinema play the same day.
As one embodiment of the present invention, when judging that described storage device has bound publisher's movie theatre serviceDevice, in addition it is also necessary to whether intelligent terminal described further is in holding state or idle condition (making of processorWith rate be less than preset value, such as 30%), if it is judged that be in holding state or idle condition, then toDescribed publisher's cinema server sends the request message of the film that the institute that downloads movies play the same day.The present embodimentFree time can be utilized to cache film, do not affect user and watch TV;And do not squeeze the normal of use userBandwidth uses, and utilizes remaining bandwidth to carry out film caching.
In step S104, receive described publisher's cinema server according to described solicited message issueThe film that cinema play the same day, and by described film caching to described storage device;
In step S105, when the user receiving described intelligent terminal watches the shadow that cinema play the same dayDuring the solicited message of piece, from described storage device, read and play the film that described cinema play the same day.
In embodiments of the present invention, when the storage device accessing described intelligent terminal has multiple, and the institute accessingWhen having all unbound publisher's cinema server of storage device, recall and show the storage device binding page, andShow all storage devices accessing in intelligent terminal in the form of a list, to point out user to set described storageStandby binding publisher's cinema server.When receiving user and selecting some or multiple storage device, intelligenceTerminal obtains the path (Path) of the storage device selected by user, and this path forms StatFs object:StatFs stat=new StatFs (path.getPath ()).
Further, after user selects storage device, also include:
Judge whether the storage device selected by user meets downloading request, when the storage device selected by userMeet downloading request, then by selected storage device binding publisher's cinema server, otherwise continue toThe storage device that user reselects.
As another embodiment of the present invention: when the storage device accessing described intelligent terminal has multiple, and connectDuring all unbound publisher's cinema server of all storage devices entering, which storage of intelligent terminal automatic decisionEquipment meets downloading request, when only one of which meets the storage device of downloading request, automatically by satisfied downloadThe storage device binding publisher's cinema server requiring;When the storage device meeting downloading request has multiple,Then by the sequencing identifying, the storage device recognizing first binds publisher's cinema server.
In embodiments of the present invention, the storage device selected by the described user of judgement whether meet downloading request canTo include:
Calculate the memory space value of storage device;
The memory space value of the storage device calculating is compared with the threshold value preset;
When the memory space value of described storage device is more than or equal to the threshold value preset, then judge that described storage setsFor meeting downloading request, otherwise judge that described storage device is unsatisfactory for downloading request.
For example, the calculating of memory space value: SIZE (statfs.getBlockSize ()) * obtaining block is emptyThe quantity (statfs.getAvailableBlocks ()) of not busy Block);Storage device is ntfs file systemWhen support more than 4g file.Only when idle memory space is more than 10g, and support the big file of more than 4gShi Caineng binds.
As a preferred embodiment of the present invention, when described storage device is the storage device with multiple subregion,And during the unbound publisher's cinema server of described storage device, be then that unit shows by subregion, and connectReceive the subregion that user selects, determine whether whether selected subregion meets downloading request, if it is judged thatMeet downloading request, then by selected partition bindings publisher's cinema server.If it is judged that be unsatisfactory forDownloading request, then continue to the subregion that user reselects.
Further, whether the subregion selected by the described user of judgement meets downloading request and may include that
The memory space value of subregion selected by user for the calculating;
Described memory space value is compared with the threshold value preset;
If greater than or be equal to preset threshold value, then judge that described subregion meets downloading request.
As another preferred embodiment of the present invention, when described storage device is the storage device with multiple subregion,And during the unbound publisher's cinema server of described storage device, which subregion of intelligent terminal automatic decision meetsThe subregion meeting downloading request, when only one of which meets the subregion of downloading request, is tied up by downloading request automaticallyDetermine publisher's cinema server;When the subregion meeting downloading request has multiple, then by the sequencing identifying,Partition bindings publisher's cinema server that first is recognized.It is understood, however, that do not limitIn above-mentioned condition, all any modification, equivalent and improvement made within the spirit and principles in the present inventionDeng should be included within the scope of the present invention.
The intelligent terminal that the embodiment of the present invention is described below in detail to be provided obtains the operation stream of the method for movie filmJourney:
Whether detection intelligent terminal has storage device to access, when having detected that storage device accesses,The number of storage device is shown on the navigation bar of Launcher.Then judge whether storage device binds publisherCinema server, when storage device unbound publisher cinema server, then points out user unbound, electricitySeeing image institute function is unavailable, now, guides user to enter the storage device binding page, and in the form of a listShow that storage device to be bound selects for user.When storage device binding publisher's movie theatre clothes that user selectsAfter business device, in the situation that network normally connects, send URL request, by HttpURLConnection toDescribed publisher's cinema server sends request film information, resolves and obtains publisher's cinema server feedbackPlay film list the same day, described list was saved in List set, and start to download according to described listCorresponding film, in the film caching extremely described storage device that will download.When intelligent terminal user needs viewingDuring the film that cinema play the same day, from described storage device, read and play described cinema play the same dayFilm.
Should be understood that the size of the sequence number of each step in above-described embodiment is not meant to the priority of execution sequence,The execution sequence of each process should determine with its function and internal logic, and should be to the enforcement of the embodiment of the present inventionProcess constitutes any restriction.
Referring to Fig. 2, the structure for the system of the intelligent terminal acquisition movie film of embodiment of the present invention offer is shownIt is intended to.For convenience of description, illustrate only the part related to the embodiment of the present invention.
The system that described intelligent terminal obtains movie film includes: binding judge module the 101st, binding module is the 102nd,Request message transmission module the 103rd, cache module 104 and reading playing module 105.Described intelligent terminalThe system obtaining movie film can be software unit, hardware cell or the soft or hard being built in intelligent terminalThe unit that part combines.
Binding judge module 101, for after detecting storage device access intelligent terminal, it is judged that described depositWhether storage equipment binds publisher's cinema server;
Binding module 102, judges described storage device unbound publisher cinema server, then for working asDescribed storage device is bound publisher's cinema server;
For working as, request message transmission module 103, judges that described storage device has bound publisher's movie theatre clothesBusiness device, then send the request message of the film that the institute that downloads movies play the same day to described publisher's cinema server;
Cache module 104, for receiving what described publisher's cinema server issued according to described solicited messageThe film play on cinema same day, and by described film caching to described storage device;
Read playing module 105, broadcast the same day for watching cinema as the user receiving described intelligent terminalDuring the solicited message of the film put, from described storage device, read and play what described cinema play the same dayFilm.
Further, described request message transmission module 103 includes:
For working as, standby judging unit 1031, judges that described storage device has bound publisher's movie theatre serviceDevice, then determine whether whether described intelligent terminal is in holding state or idle condition;
Request message sending unit 1032, for judging described intelligence when described standby judging unit 1031Terminal is in holding state or idle condition, then send, to described publisher's cinema server, the institute that downloads moviesThe request message of the film that the same day plays.
Further, the system of described intelligent terminal acquisition movie film also includes:
Receiver module 106, has multiple for working as the storage device accessing described intelligent terminal, and the institute accessingWhen having all unbound publisher's cinema server of storage device, receive user from all storage devices accessingSelect at least one storage device;
Downloading request judge module 107, for judging that whether satisfied download of storage device selected by user is wantedAsk;
Described binding module 102, specifically for judging selected by user when described downloading request judge moduleStorage device meet downloading request, then by selected storage device binding publisher's cinema server.
Further, described downloading request judge module 107 includes:
Computing unit 1071, for calculating the memory space value of storage device;
Comparing unit 1072, for carrying out the memory space value of the storage device calculating with the threshold value presetRelatively;
Identifying unit 1073, for when the memory space value that the comparative result of described comparing unit is storage deviceMore than or equal to the threshold value preset, then judge that described storage device meets downloading request.
Further, described binding module 102, specifically for leading to the title of described storage device and pathCross after Sharepreferences preserves and send to described publisher's cinema server.
In sum, the embodiment of the present invention is by accessing to storage device in intelligent terminal, and deposits describedStorage apparatus bound publisher's cinema server, intelligent terminal request publisher's cinema server sends to be play the same dayFilm information, the film information caching that intelligent terminal will receive is in described storage device.When intelligence is wholeWhen end subscriber needs the film watching cinema's broadcasting on the same day, directly read from storage device, and pass through intelligenceUser's viewing can be shown to by terminal screen.Use the present invention provide intelligent terminal obtain movie film method andSystem, intelligent terminal can automatically obtain the film list that cinema play the same day, and download when network idleIt is cached in storage device for user's viewing, so that intelligent terminal user just may be viewed by electricity in the very first timeThe film of movie theatre broadcasting on the same day, allows user can enjoy the super clear film with cinema's synchronization at home, greatlyImprove Consumer's Experience, there is stronger usability and practicality.
Those skilled in the art is it can be understood that arrive, for convenience of description and succinctly, only more thanState each functional unit, the division of module is illustrated, in actual application, and can be as desired by upperState function distribution to be completed by different functional units, module, will the internal structure of described system be divided into notSame functional unit or module, to complete all or part of function described above.Each work(in embodimentEnergy unit, module can be integrated in a processing unit, it is also possible to be that unit is individually physically present,Also can be integrated in a unit with two or more unit, above-mentioned integrated unit both can use firmlyThe form of part realizes, it would however also be possible to employ the form of SFU software functional unit realizes.In addition, each functional unit, mouldThe specific name of block, also only to facilitate mutually distinguish, is not limited to the protection domain of the application.OnState the specific works process of unit in system, module, be referred to the corresponding process in preceding method embodiment,Do not repeat them here.
Those of ordinary skill in the art are it is to be appreciated that combine respectively showing of the embodiments described herein descriptionThe unit of example and algorithm steps, can come with the combination of electronic hardware or computer software and electronic hardwareRealize.These functions perform with hardware or software mode actually, depend on the application-specific of technical schemeAnd design constraint.Each can specifically should be used for using different methods to realize by professional and technical personnelDescribed function, but this realize it is not considered that beyond the scope of this invention.
In embodiment provided by the present invention, it should be understood that disclosed system and method, Ke YitongCross other mode to realize.For example, system embodiment described above is only schematically, for example,Described module or the division of unit, be only a kind of logic function and divide, actual can have when realizing otherDividing mode, for example multiple unit or assembly can in conjunction with or be desirably integrated into another system, or someFeature can be ignored, or does not performs.Another point, shown or discussed coupling each other or direct couplingClose or communication connection can be that the INDIRECT COUPLING of device or unit or communication connect, permissible by some interfacesIt is electrical, machinery or other form.
The described unit illustrating as separating component can be or may not be physically separate, asThe parts that unit shows can be or may not be physical location, i.e. may be located at a place, orAlso can be distributed on multiple NE.Can select therein some or all of according to the actual needsUnit realizes the purpose of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit,Also can be that unit is individually physically present, it is also possible to two or more unit are integrated in a unitIn.Above-mentioned integrated unit both can use the form of hardware to realize, it would however also be possible to employ SFU software functional unitForm realizes.
If described integrated unit realizes using the form of SFU software functional unit and as independent production marketing orDuring use, can be stored in a computer read/write memory medium.Based on such understanding, the present inventionPart that prior art is contributed by the technical scheme of embodiment substantially in other words or this technical schemeCompletely or partially can embody with the form of software product, this computer software product is stored in one and depositsIn storage media, including some instructions are with so that a computer equipment (can be personal computer, serviceDevice, or the network equipment etc.) or processor (processor) perform each embodiment institute of the embodiment of the present inventionState all or part of step of method.And aforesaid storage medium includes: USB flash disk, portable hard drive, read-only depositReservoir (ROM, Read-Only Memory), random access memory (RAM, Random AccessMemory), the various medium that can store program code such as magnetic disc or CD.
Embodiment described above only in order to technical scheme to be described, is not intended to limit;Although referenceThe present invention has been described in detail by previous embodiment, it will be understood by those within the art that: itsStill can the technical scheme described in foregoing embodiments modify, or special to wherein portion of techniquesLevy and carry out equivalent;And these modifications or replacement, do not make the essence of appropriate technical solution depart from thisThe spirit and scope of bright embodiment each embodiment technical scheme.