A kind of Linux set-top box realizes the system and method for cloud storage agencyTechnical field
The present invention relates to CS (Cloud Storage, cloud storage) technical fields, in particular to a kind of Linux machine topBox realizes the system and method for cloud storage agency.
Background technique
IPTV, i.e. Interactive Internet TV are a kind of using broadband cable net, collect internet, multimedia, communication etc.Multiple technologies are in one;The technology of a variety of interactive services including DTV is provided to domestic consumer.IPTV machine topBox can provide the user with more broadcast modes such as program request, time shift, while also support picture browsing, audio and video playing etc. a variety ofAbility.
CS, i.e. cloud storage refer to through functions such as cluster application, grid or distributed file systems, will be in networkA large amount of various types of storage equipment gather collaboratives work by application software, common externally offer data store withOne system of business access function.As the wide area network of cloud form is as internet, cloud storage does not refer to for userSome specific equipment, and refer to the aggregate being made of many storage equipment and server.User usesCloud storage is not equipment to be stored using some, but use a kind of entire data access service of cloud storage system bring.Compared with traditional storage equipment, cloud storage is not only a hardware, but a network equipment, storage equipment, server,The complication system that application software, public access interface, the access multiple portions such as net and client-side program form.Each section is to depositStorage equipment is core, externally provides data storage and business access service by application software.
The structural model of cloud storage system can from bottom to top be divided into 4 layers:
(1) accumulation layer: accumulation layer is the most basic part of cloud storage.
(2) basic management layer: basic management layer is most difficult to realize in the most crucial part of cloud storage and cloud storagePart.
(3) application-interface layer: application-interface layer is the most flexible and changeable part of cloud storage.
(4) access layer: any one authorized user can log in cloud storage system by the public application interface of standardSystem enjoys cloud storage service.
CSA (Cloud Storage Agent), i.e. cloud storage agency, are a kind of to answer with what the access layer of cloud storage interactedWith technology, user can be come by using cloud storage agency using cloud storage service.
Currently, the page of the existing IPTV set top box generally by browser access cloud storage platform.This mode only needsCommon browser software is wanted, versatility is preferable.But this mode can only carry out letter to the resource on cloud storage platformSingle upload is downloaded, checks and is deleted etc. and operates, and not can be carried out the operation of richer multiplicity, especially cannot directly be played itIn the multimedia resources such as video, audio, picture.And general user storage to cloud storage platform resource mostly be video, audio,The multimedia resources such as picture, existing IPTV network machine top box are not able to satisfy such demand of user.
Summary of the invention
In view of the deficiencies in the prior art, the purpose of the present invention is to provide a kind of Linux set-top boxes to realize that cloud is depositedThe system and method for storing up agency, can make Linux set-top box have the ability by using cloud storage service, can directly playThe multimedia resources such as video therein, audio, picture.
To achieve the above objectives, the present invention provides the system that a kind of Linux set-top box realizes cloud storage agency, including with it is mutualCloud storage service platform is arranged in the Linux set-top box of connected network communication, interconnection net side, and it includes multimedia resource that cloud storage platform, which provides,The Resources list of file, the interior setting cloud storage proxy module of Linux set-top box, FUSE module and virtual resource list are virtual to provideSource list is mapping of the Resources list of interconnection net side in Linux set-top box, and the cloud storage proxy module is deposited in cloud in advanceService platform registration is stored up, for the Resources list to be mapped as institute by FUSE module with after the success of cloud storage service platform authenticationIt states virtual resource list, corresponding multimedia resource file is downloaded from the virtual resource list by http protocol, and delayIt is stored to the memory of Linux set-top box;Player is for calling the file system of Linux to check and select in virtual resource listMultimedia resource file, and multimedia resource file is taken out from the memory of Linux set-top box, it is sent into hardware decoder decodingAfterwards, audio, video to display equipment are exported;The set-top box is for providing order line or graphic interface software for user's operationFile in the virtual resource list, in error, prompt mistake to user, record code and error reason and discharges errorThe software resource and be shown to out error codes and reason in Linux STB terminal output interface that stage position occupiesHair personnel debug positioning.
Based on the above technical solution, the multimedia resource file includes video, audio and picture, the FUSEModule is located in linux kernel.
The present invention also provides a kind of Linux set-top boxes to realize cloud storage Proxy Method, comprising steps of S1. cloud storage is acted on behalf ofModule is registered in cloud storage service platform in advance;S2. after cloud storage proxy module and cloud storage service platform authentication are successful, pass throughThe Resources list is mapped as virtual resource list by FUSE module, judges whether virtual resource list maps success, if user canTo operate the file in the virtual resource list by the order line of set-top box or the graphic interface software of set-top box;If it is not, user is given by Linux set-top box prompt mistake, it can be with record code and error reason, while discharging the error stageError codes and reason are shown to developer's tune in Linux STB terminal output interface by the software resource that position occupiesOrder position for a trial;S3. player accesses virtual resource list, and selection needs the multimedia resource file that plays, cloud storage proxy server fromCorresponding multimedia resource file is downloaded in the Resources list of cloud storage service platform, and is cached to the memory of Linux set-top box,And then it plays.
Based on the above technical solution, in the S2, after the starting of cloud storage proxy module, it is flat to read cloud storage serviceThe configuration information of platform, authenticating address, the user name of cloud storage agency, user password including cloud storage service platform.
Based on the above technical solution, in the S2, cloud storage proxy module is taken by http protocol to cloud storageBusiness platform initiates certification request, and after authenticating successfully, cloud storage service platform returns to the Resources list in xml form and acts on behalf of to cloud storageModule.
Based on the above technical solution, in the S2, virtual resource list includes the file under catalogue and catalogueFolder and file.
Based on the above technical solution, in the S3, player calls the file system of Linux to check virtual resourceList.
Based on the above technical solution, in the S3, cloud storage proxy server passes through http protocol from cloud storage servicePlatform downloads corresponding multimedia resource file.
Based on the above technical solution, in the S3, player reads multimedia from the memory of Linux set-top boxResource file, after being sent into hardware decoder decoding, output audio, video to display equipment.
Based on the above technical solution, if there is mistake in the step, mistake is prompted by Linux set-top boxTo user, while discharging the software resource that error stage position occupies.
The beneficial effects of the present invention are:
1, storage content amount is big.Linux set-top box limited storage space itself, but pass through cloud storage proxy module and FUSEThe almost limitless memory space of cloud storage service platform can be mapped to Linux set-top box local, without increasing Linux by moduleTop-set hardware storage.
2, storage content is not by region time restriction.User can at any time, any place that can access internet, leads toIt crosses computer, plate or mobile phone etc. and uploads resource file to cloud storage service platform;These texts of Linux set-top box energy real time accessPart, and can play the audio-video document in device.
Detailed description of the invention
Fig. 1 is that Linux set-top box of the present invention realizes the system of cloud storage agency and the configuration diagram of internet;
Fig. 2 is that Linux set-top box of the present invention realizes cloud storage Proxy Method flow chart;
Fig. 3 is that Linux set-top box passes through cloud storage proxy module to cloud storage service platform authentication and the flow chart of mapping;
Fig. 4 is the process of the audio-video document on player plays cloud storage service platform.
Specific embodiment
Invention is further described in detail with reference to the accompanying drawings and embodiments.
As shown in Figure 1, the system that Linux set-top box of the present invention realizes cloud storage agency, including what is communicated with interconnection net sideCloud storage service platform is arranged in Linux set-top box, interconnection net side, and cloud storage platform provides the Resources list, includes in the Resources listMultimedia resource file, such as: video, audio, picture etc..Cloud storage proxy module, FUSE are set in the Linux set-top box(Filesystem in Userspace, user's space file system) module and virtual resource list, virtual resource list are mutualMapping of the Resources list of networking side in Linux set-top box, cloud storage proxy module are used for through the FUSE in linux kernelModule carries out the mapping, under the catalogue that the Resources list is mapped as in the file system of set-top box (for example, tmp/fuse)File or file, user then can by the order line (for example, shell station command: ls-l tmp/fuse) of set-top box orThe graphic interface software of person's set-top box operates these files or file, including more in player selection virtual resource listMedia resource file plays.
As shown in Fig. 2, Linux set-top box realizes cloud storage Proxy Method, comprising steps of
S1. cloud storage proxy module is registered in cloud storage service platform in advance, that is, passes through the internet logins sides such as webpage noteVolume.
S2. after cloud storage proxy module and cloud storage service platform authentication are successful, the Resources list is reflected by FUSE moduleIt penetrates as virtual resource list.
S3. player accesses virtual resource list, and selection needs the multimedia resource file that plays, cloud storage proxy server fromCorresponding multimedia resource file is downloaded in the Resources list of cloud storage service platform, and is cached to the memory of Linux set-top box,And then it plays.
As shown in figure 3, to cloud storage service platform authentication and being reflected for Linux set-top box in S2 by cloud storage proxy moduleThe process penetrated:
Cloud storage proxy module starting in S21.Linux set-top box, reads matching for interconnection net side cloud storage service platformConfidence breath, authenticating address, user name, the user password of cloud storage agency including cloud storage service platform etc..
S22. cloud storage proxy module initiates certification request to cloud storage service platform by http protocol, judges that certification is askedThe no success of Seeking Truth, if so, into S23;If it is not, into S24.
S23. cloud storage proxy module is by http protocol, to cloud storage service platform request the Resources list, if success, intoEnter S25;If failure, into S28.
S24. multiple certification request is re-initiated, is retried in the present embodiment three times, judges whether to authenticate successfully, if so, intoEnter S23;If it is not, into S28.
S25. cloud storage service platform returns to the Resources list in xml form and gives cloud storage proxy module, and cloud storage acts on behalf of mouldThe Resources list is mapped as virtual resource list by the FUSE module in linux kernel by block, and virtual resource list includes catalogue,And file and file under catalogue.
S26 judges whether virtual resource list maps success, if so, into S27;If it is not, into S28;The reason of failureIncluding user's operation not, can not find catalogue or file, or only partial list or file etc..
S27. user can by the order line (for example, shell station command: ls-l tmp/fuse) of set-top box orThe graphic interface software of set-top box operates the file or file.
S28. user is given by Linux set-top box prompt mistake, can be released simultaneously with record code and error reasonError codes and reason are shown to exploitation in Linux STB terminal output interface by the software resource that wrong stage position occupiesPersonnel debug positioning.
As shown in figure 4, in S3, the process of the audio-video document on player plays cloud storage service platform are as follows:
The player of S31.Linux set-top box starts, and accesses virtual resource list by the file system of Linux, includingFile or file under catalogue.
S32. judge whether access succeeds, if so, into S33;If it is not, into S35.
S33. the media resource file that player selection needs to play, cloud storage proxy module is by http protocol, from cloudCorresponding multimedia resource file (such as video, audio, picture) is downloaded in the Resources list of storage service platform, is cached toIn the memory of Linux set-top box.
S34. player takes out multimedia resource file from the memory of Linux set-top box, is sent into hardware decoder decodingAfterwards, audio, video to display equipment are exported.
S35. it sends errored response event and gives player graphical interaction interface, while being discharged into what error stage position occupiedSoftware resource, and user is given by Linux set-top box prompt mistake.
The present invention is not limited to the above-described embodiments, for those skilled in the art, is not departing fromUnder the premise of the principle of the invention, several improvements and modifications can also be made, these improvements and modifications are also considered as protection of the inventionWithin the scope of.The content being not described in detail in this specification belongs to the prior art well known to professional and technical personnel in the field.