Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposedBody details understands the embodiment of the present invention to cut thoroughly.However, it will be clear to one skilled in the art that there is no these specificThe present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricityThe detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Referring to Fig. 1, the implementation process of the method for movie film is obtained for intelligent terminal provided in an embodiment of the present invention, masterWant the following steps are included:
In step s101, after detecting storage equipment access intelligent terminal, judge whether the storage equipment bindsPublisher's cinema server thens follow the steps S103 if judging result is "Yes", if judging result is "No", thens follow the stepsS102。
In the present embodiment, first detect whether the storage equipment has accessed intelligent terminal, when detecting the storageAfter equipment accesses intelligent terminal, then judge whether the storage equipment binds publisher's cinema server.
It is understood, however, that the VKey that the storage equipment can be similar Ukey can such as the USB flash disk of plug and pullTo store the media of downloading, and it is built-in with the account information of encryption.
In step s 102, when judging the unbound publisher's cinema server of storage equipment, then by the storageApparatus bound publisher's cinema server.
In embodiments of the present invention, after the title of the storage equipment and path being saved by SharepreferencesIt is sent to publisher's cinema server, so that storage apparatus bound publisher's cinema server.Wherein,SharePreferences is a kind of mechanism for storing some easy configuration information, stores number using Map data structureAccording to being stored in a manner of key-value pair, stored data into the storage equipment using XML format.
The specific can be that it is wide to register ACTION_MEDIA_MOUNTED in the load of TV movie theatre functional applicationIt broadcasts, ACTION_MEDIA_MOUNTED broadcast can be received when storing equipment insertion, after receiving broadcast, insertion can be obtainedStorage device path, according to the configuration information sharedpreferences locally saved can know this storage equipment whetherIt is bound with publisher's cinema server, it is such as unbound, then using publisher's cinema server URL as Key, store the path of equipmentIt is saved in and is locally configured in information SharePreferences as Value.Key and Value is corresponded, then is considered as and is bound intoFunction.
In step s 103, when judging that the storage equipment bound publisher's cinema server, then to the distributionQuotient's cinema server sends the request message of the film played on the day of downloading cinema.
In embodiments of the present invention, when judging that the storage equipment bound publisher's cinema server, TV is activatedMovie theatre function, and amplify icon TV movie theatre function is available at this time for prompting user, TV original film interface is changed to electricitySeeing image institute interface.Intelligent terminal starts thread, and Xiang Suoshu publisher's cinema server sends the shadow played on the day of caching cinemaThe solicited message of piece.
As a preferred embodiment of the present invention, when judging that the storage equipment has bound publisher's cinema server, alsoNeed intelligent terminal described further whether be in standby or idle state (utilization rate of processor be less than preset value,Such as 30%), it if it is judged that being in standby or idle state, then sends and downloads to publisher's cinema serverThe request message of the film played on the day of cinema.The present embodiment can use free time to cache film, not influence userWatch TV;And do not squeeze and used with the normal bandwidth of user, film caching is carried out using remaining bandwidth.
In step S104, receives publisher's cinema server and worked as according to the cinema that the solicited message issuesIts film played, and the film is cached into the storage equipment;
In step s105, the request of the film played on the day of the user for receiving the intelligent terminal watches cinemaWhen information, is read from the storage equipment and play the film played on the day of the cinema.
In embodiments of the present invention, when the storage equipment for accessing the intelligent terminal has all storages that are multiple, and accessingEquipment unbound publisher's cinema server when, recall and show the storage apparatus bound page, and show in the form of a listAll storage equipment in intelligent terminal are accessed, to prompt user by storage apparatus bound publisher's cinema server.WhenWhen receiving user and selecting some or multiple storage equipment, intelligent terminal obtains the path of the selected storage equipment of user(Path), and by this path StatFs object: StatFs stat=new StatFs (path.getPath ()) is formed.
Further, after user selects storage equipment, further includes:
Judge whether the selected storage equipment of user meets downloading request, under the selected storage equipment of user meetsIt carries and requires, then by selected storage apparatus bound publisher's cinema server, otherwise continue to that user reselects is depositedStore up equipment.
As another embodiment of the present invention: when the storage equipment for accessing the intelligent terminal has institutes that are multiple, and accessingHave storage equipment unbound publisher's cinema server when, intelligent terminal judge automatically which storage equipment meet downloading wantsIt asks, when only one meets the storage equipment of downloading request, the storage apparatus bound publisher of downloading request will be met automaticallyCinema server;When the storage equipment for meeting downloading request has multiple, then by the sequencing of identification, first is recognizedStorage apparatus bound publisher's cinema server.
In embodiments of the present invention, described to judge whether the selected storage equipment of user meets downloading request and can wrapIt includes:
Calculate the memory space value of storage equipment;
The memory space value of calculated storage equipment is compared with preset threshold value;
When the memory space value of the storage equipment is greater than or equal to preset threshold value, then storage equipment satisfaction is determinedOtherwise downloading request determines that the storage equipment is unsatisfactory for downloading request.
For example, the calculating of memory space value: obtaining SIZE (statfs.getBlockSize ()) * free time of blockThe quantity (statfs.getAvailableBlocks ()) of Block);It stores when equipment is ntfs file system and supports 4g or moreFile.Only when idle memory space is greater than 10g, and support to bind when the big file of 4g or more.
As a preferred embodiment of the present invention, when the storage equipment is the storage equipment with multiple subregions, and instituteIt is then that unit is shown, and receives point of user's selection by subregion when stating the storage unbound publisher's cinema server of equipmentArea, further judges whether selected subregion meets downloading request, if it is judged that meet downloading request, then it will be selectedPartition bindings publisher's cinema server.If it is judged that being unsatisfactory for downloading request, then point that user reselects is continued toArea.
Further, described to judge whether the selected subregion of user meets downloading request and may include:
Calculate the memory space value of the selected subregion of user;
The memory space value is compared with preset threshold value;
If it is greater than or equal to preset threshold value, then determine that the subregion meets downloading request.
As another preferred embodiment of the present invention, when the storage equipment is the storage equipment with multiple subregions, and instituteWhen stating the storage unbound publisher's cinema server of equipment, which subregion intelligent terminal, which judges automatically, meets downloading request, when onlyWhen having a subregion for meeting downloading request, partition bindings publisher's cinema server of downloading request will be met automatically;When fullWhen the subregion of sufficient downloading request has multiple, then by the sequencing of identification, partition bindings publisher's shadow that first is recognizedInstitute's server.It is understood, however, that it is not limited to above-mentioned condition, it is done within the spirit and principles of the present inventionAny modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention.
The operating process that intelligent terminal provided in an embodiment of the present invention obtains the method for movie film is described below in detail:
Whether detection intelligent terminal has storage equipment access, when having detected storage equipment access, Launcher'sThe number of storage equipment is shown on navigation bar.Then judge to store whether equipment binds publisher's cinema server, when storage is setWhen standby unbound publisher's cinema server, then prompt user unbound, TV movie theatre function is unavailable, at this point, guidance userInto the storage apparatus bound page, and show that storage equipment to be bound is selected for user in the form of a list.When user selectsStorage apparatus bound publisher's cinema server after, the case where network normally connects, send URL request, pass throughHttpURLConnection sends request film information to publisher's cinema server, and parsing obtains publisher's movie theatre clothesThe same day for device feedback of being engaged in plays film list, the list is stored in List set, and start to download according to the listCorresponding film caches the film of downloading into the storage equipment.On the day of intelligent terminal user needs to watch cinemaWhen the film of broadcasting, is read from the storage equipment and play the film played on the day of the cinema.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each processExecution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limitIt is fixed.
Referring to Fig. 2, obtaining the structural schematic diagram of the system of movie film for intelligent terminal provided in an embodiment of the present invention.ForConvenient for explanation, only parts related to embodiments of the present invention are shown.
The system that the intelligent terminal obtains movie film includes: binding judgment module 101, binding module 102, request messageSending module 103, cache module 104 and reading playing module 105.The system that the intelligent terminal obtains movie film can be withIt is the unit of the software unit being built in intelligent terminal, hardware cell either software and hardware combining.
Judgment module 101 is bound, for judging that the storage equipment is after detecting storage equipment access intelligent terminalNo binding publisher's cinema server;
Binding module 102, for when judging the unbound publisher's cinema server of storage equipment, then being deposited describedStore up apparatus bound publisher cinema server;
Request message sending module 103 judges that the storage equipment has bound publisher's cinema server for working as, thenThe request message of the film played on the day of downloading cinema is sent to publisher's cinema server;
Cache module 104, the film issued for receiving publisher's cinema server according to the solicited messageThe film played on the day of institute, and the film is cached into the storage equipment;
Playing module 105 is read, the shadow for playing on the day of the user for receiving the intelligent terminal watches cinemaWhen the solicited message of piece, is read from the storage equipment and play the film played on the day of the cinema.
Further, the request message sending module 103 includes:
Standby judging unit 1031, for when judging that the storage equipment has bound publisher's cinema server, then intoOne step judges whether the intelligent terminal is in standby or idle state;
Request message transmission unit 1032, for judging that the intelligent terminal is in when the standby judging unit 1031Standby mode or idle state then send asking for the film played on the day of downloading cinema to publisher's cinema serverSeek message.
Further, the system that the intelligent terminal obtains movie film further include:
Receiving module 106, for having multiple when the storage equipment for accessing the intelligent terminal, and all storages accessed are setWhen standby unbound publisher's cinema server, receives user and at least one storage is selected to set from all storage equipment of accessIt is standby;
Downloading request judgment module 107, for judging whether the selected storage equipment of user meets downloading request;
The binding module 102, specifically for judging the selected storage of user when the downloading request judgment moduleEquipment meets downloading request, then by selected storage apparatus bound publisher's cinema server.
Further, the downloading request judgment module 107 includes:
Computing unit 1071, for calculating the memory space value of storage equipment;
Comparing unit 1072, for the memory space value of calculated storage equipment to be compared with preset threshold value;
Judging unit 1073, for when the comparing unit comparison result be storage equipment memory space value be greater than orEqual to preset threshold value, then determine that the storage equipment meets downloading request.
Further, the binding module 102, specifically for passing through the title of the storage equipment with pathSharepreferences is sent to publisher's cinema server after saving.
In conclusion the embodiment of the present invention is accessed in intelligent terminal by that will store equipment, and by the storage equipmentBind publisher's cinema server, the film information that intelligent terminal plays on the day of requesting publisher's cinema server to send, intelligenceTerminal caches the film information received into the storage equipment.It is broadcast on the day of intelligent terminal user needs to watch cinemaIt when the film put, is directly read from storage equipment, and user's viewing is shown to by intelligent terminal screen.It is mentioned using the present inventionThe intelligent terminal of confession obtains the method and system of movie film, and intelligent terminal can obtain the film column played on the day of cinema automaticallyTable, and downloading is cached to for user's viewing in storage equipment, so that intelligent terminal user is at first in network idleBetween can watch the film played on the day of cinema, allow user that can enjoy the super clear film synchronous with cinema, pole at homeBig the user experience is improved, has stronger usability and practicality.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each functionCan unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by differentFunctional unit, module are completed, i.e., the internal structure of the system is divided into different functional unit or module, more than completingThe all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can alsoTo be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integratedUnit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function listMember, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above systemThe specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosureMember and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actuallyIt is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technicianEach specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceedThe scope of the present invention.
In embodiment provided by the present invention, it should be understood that disclosed system and method can pass through othersMode is realized.For example, system embodiment described above is only schematical, for example, the division of the module or unit,Only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components can be withIn conjunction with or be desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussedMutual coupling or direct-coupling or communication connection can be through some interfaces, the INDIRECT COUPLING of device or unit orCommunication connection can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unitThe component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multipleIn network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unitIt is that each unit physically exists alone, can also be integrated in one unit with two or more units.Above-mentioned integrated listMember both can take the form of hardware realization, can also realize in the form of software functional units.
If the integrated unit is realized in the form of SFU software functional unit and sells or use as independent productWhen, it can store in a computer readable storage medium.Based on this understanding, the technical solution of the embodiment of the present inventionSubstantially all or part of the part that contributes to existing technology or the technical solution can be with software product in other wordsForm embody, which is stored in a storage medium, including some instructions use so that oneComputer equipment (can be personal computer, server or the network equipment etc.) or processor (processor) execute this hairThe all or part of the steps of bright each embodiment the method for embodiment.And storage medium above-mentioned include: USB flash disk, mobile hard disk,Read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magneticThe various media that can store program code such as dish or CD.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned realityApplying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned eachTechnical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modifiedOr replacement, the spirit and model of each embodiment technical solution of the embodiment of the present invention that it does not separate the essence of the corresponding technical solutionIt encloses.