CN1928858A - Method for media document management based on UPnP network - Google Patents

Method for media document management based on UPnP network Download PDF

Info

Publication number
CN1928858A
CN1928858A CN 200510094298 CN200510094298A CN1928858A CN 1928858 A CN1928858 A CN 1928858A CN 200510094298 CN200510094298 CN 200510094298 CN 200510094298 A CN200510094298 A CN 200510094298A CN 1928858 A CN1928858 A CN 1928858A
Authority
CN
China
Prior art keywords
file
catalogue
target
mentioned
index file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200510094298
Other languages
Chinese (zh)
Inventor
任康熙
安成俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LG Electronics Kunshan Computer Co Ltd
Original Assignee
LG Electronics Kunshan Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by LG Electronics Kunshan Computer Co Ltd filed Critical LG Electronics Kunshan Computer Co Ltd
Priority to CN 200510094298 priority Critical patent/CN1928858A/en
Publication of CN1928858A publication Critical patent/CN1928858A/en
Pending legal-status Critical Current

Links

Images

Abstract

The related directory information management method in UPnP-based network comprises: 1. once starting the media server, cancelling current directory file and index file, and determining the root memory; 2. acquiring the secondary memory and item information as well as target ID; 3. generating and storing corresponding directory file; 4. preparing index file for storage. This invention can reduce memory number.

Description

Media file management method based on the UPnP network
Technical field
The invention relates to home network, promptly about a kind of media file management method based on the UPnP network.
Background technology
UPnP TMIn (hereinafter referred to as " UPnP ") technology that to be being intended to of proposing recently couple together multiple mini-plant (device) by network one of them.
So-called UPnP is exactly a kind of based on the internet standard technology such as TCP/IP, HTTP and XML, with PnP (Plug and Play, plug and play) function expands to whole network, the network equipments such as various household electrical appliance, the network printer, gateway are connected in the network, especially the technology on the home network.
In current UPnP AV structure, comprise media server (MS:MediaServer) that reference mark (CP:Control Point), the content (content) useful to home network store and the Media Render (MR) that content is provided by home network.
Above-mentioned media server has the function that stores and take care of media information, also has according to the reference mark request simultaneously, informs the function of media information or transfer medium file.
The information that above-mentioned Media Render utilizes above-mentioned media server to provide is play actual medium.
In the above description, media server utilizes CDS (Content DirectoryService), direct communication between execution and the medium, and be defined in each operation (Action) and incident (Event) in this process, but in fact because it does not participate in management of media file in which way, so each operation and incident are handled according to application program (application) fully.
Usually, the method that realizes above-mentioned CDS roughly can be divided into two kinds.
First kind is the method for utilizing particular profile structure on the storer.This method reads the media file information that is stored in the Storage Media exactly from storer (Memory), and the disposal route of carrying out the physical medium file management on storer.This method, on storer, register and use the data structure of all media files, when on the media file medium time without any information change, owing to need not to carry out the I/O operation of file medium fully, processing speed is than very fast, in addition, because the processing on the storer makes things convenient for manyly than file processing, therefore for certain metadata (Metadata) is taken care of, do not need to carry out other work of treatment, only need be revised a little current data structure and get final product.
Second kind is media information not to be stored in the storer separately, whenever when relative clients receives the specific operation request there, directly reads relevant information from Storage Media, and makes the method for response (response) data.The characteristics of this method are, do not formulate the data structure of any administrative purposes on storer, and when when the client receives order, visit has the medium of related data, obtains actual information.It has and need not to handle on storer, reduce the use amount of storer, the advantage of being convenient to realize is in addition owing to directly obtain information from the physical medium file, therefore also have when using the memory data structure, need not to append and refresh or advantage such as synchronous operation.
But, the existing first method of on storer, using the particular profile structure, under the very many situations of the medium number of current storage metadata information very many or file, the use amount of storer also can increase thereupon.Therefore this method can not adopt the embedded system to the storer sensitivity.
And, existing in Storage Media the direct second method of media file, file system itself does not store the desired metadata of UPnP CDS, if store the information of appending except that basic document information, just must generation other recorded information.Owing to handle target (Object) the ID form on basis owing to also be to be independent of filename usually as CDS, therefore just need Write once information recording, so when handling, will carry out the I/O operation of high load capacity continually, will cause processing speed relatively slow like this, the problem that treatment effeciency is lower.
Summary of the invention
The present invention is in order to solve the defective of conventional art, a kind of media file management method based on the UPnP network has been proposed, so that under the limited situation of memory span, by catalogue meta file and the index file in the using system, thereby reduce the use amount of storer, remedy the inefficient shortcoming of prior art.
The present invention based on directory information management method in based on the network of UPnP, has comprised with the next stage to achieve these goals:
Phase one, after media server is activated, existing catalogue meta file and index file is deleted, and root container (Root Container) is confirmed;
Subordinate phase is obtained above-mentioned container and project (Item) information that container is the next, and determines the Target id corresponding with it successively;
Phase III generates the catalogue meta file corresponding with above-mentioned Target id, and with its storage;
The quadravalence section is made into index file with above-mentioned each Target id, and it is stored.
The stage of above-mentioned definite Target id comprises following process:
Utilize hash (Hash) function, obtain the process of Target id character string;
To whether having the process of confirming with the corresponding index file of above-mentioned character string;
To the path that comprises in the above-mentioned index file of having confirmed to exist and the Target id consistent process that compares whether;
If the result of above-mentioned comparison is inconsistent, just increase the value of Target id, and turn back to the process whether above-mentioned index file of affirmation exists the stage again;
If the result of above-mentioned comparison does not exist for unanimity or index file, then current target ID is defined as the process of final goal ID.
In addition, the present invention to achieve these goals, catalogue in based on the network of UPnP (Contents) management of information method comprised with the next stage:
Phase one, confirm whether the client has sent the directory information request;
Whether subordinate phase after the client has sent above-mentioned directory information request, is retrieved existing with the corresponding index file of request target ID;
Phase III,, confirm just whether the path (path) that is comprised in this index file existed on real system if above-mentioned index file exists;
The quadravalence section, if above-mentioned path exists on real system really, judging that whether it is necessary or not upgrades the catalogue meta file;
Five-stage is necessary the catalogue meta file is upgraded if be judged as in the above-mentioned stage, just delete existing catalogue meta file, generates new catalogue meta file, and provides it to the client.
The present invention is in the process that realizes media server CDS, only under the situation that media information takes place to change, upgrade, there is no need periodically to confirm whether need to upgrade, even in renewal process, also just to confirming whether need to upgrade with the file of the corresponding quantity of number of container.Can reduce system loading like this, increase work efficiency.Promptly, the present invention has only when change takes place the media information that writes down in the Storage Media, just carry out renewal process, therefore with check that periodically whether continuing method for updating compares, reduced load, even be necessary periodically to whether upgrading when confirming, also needn't check All Files, after comparing the update time with container and catalogue meta file, only the file with the corresponding quantity of container number is upgraded, therefore make work efficiency be improved.
In addition, the present invention is owing to use the catalogue meta file that generates in advance, and this method that directly generates XML when sending request as the client is compared, and its operating efficiency is higher, and only the pure metamessage that has nothing to do with file system stored.
Description of drawings
Fig. 1 is the formation synoptic diagram of the media file management device of the embodiment of the invention.
Fig. 2 is index file and catalogue meta file structural representation.
Fig. 3 is the synoptic diagram of index file and catalogue meta file.
Fig. 4 is the operation precedence diagram of media file information generative process in the embodiments of the invention.
Fig. 5 is an operation synoptic diagram of determining the Target id process among Fig. 4.
Fig. 6 is the operation synoptic diagram of media file information updating process in the embodiments of the invention.
* accompanying drawing major part symbol description *
110: media storage device 120: the index file generating apparatus
130: catalogue meta file generating apparatus 140: index file treating apparatus
150: catalogue meta file pick-up unit 160: catalogue meta file updating device
170: the index file updating device
Embodiment
With reference to the accompanying drawings the present invention is elaborated.
The present invention utilizes catalogue meta file and index file, media file information and Target id is managed, to having the above-mentioned catalogue meta file of structure and being described as follows of index file as shown in Figure 2.
At first, the catalogue meta file is present in respectively in the specific media container (Container, directory).In fact it is to be stored with the filename that is similar to upnp.met.Internal format is according to XML basically, browses to be similar to that form that (Browse) operate pairing response (response) form is stored.
Therefore, in the present invention, send as the client under the situation of request such as actual browse operation, reference and the corresponding catalogue meta file of having made, therefore when the client sends request, compare with the mode of direct information extraction from media file, reduced I/O operational ton and calculated amount, improved the speed of handling.
In addition, index file is the standard of CDS operation requests (request) the institute corresponding objects of access customer, and in the CDS of reality operation, Target id is corresponding with index file name.The path of actual container or project (Item) is stored in the index file.Index file can be divided into types such as audio frequency, video, image as the case may be, can be stored in each catalogue.At this moment, pairing Target id of media file (Item) and the pairing Target id of catalogue (Container) are distinguished storage usually.Project (Item) is though index file has only stored Actual path, and actual path, sub Container and Target id and file destination (Item Object) ID in the container index file logging.When media file information changed, the renewal of index file information need be with reference to said additional information.
Owing to most CDS operation is that benchmark is realized with the Target id, so index file is first process object of carrying out according to client requests.
Fig. 1 is the pie graph of media file management device in the embodiment of the invention.As shown in the figure, the media file management device of the embodiment of the invention is made of media storage device 110, index file generating apparatus 120, catalogue meta file generating apparatus 130, index file treating apparatus 140, catalogue meta file pick-up unit 150, catalogue meta file updating device 160 and index file updating device 170.
Above-mentioned media storage device 110 is arranged on media server (MS) inside, is used to read media article, and sends it to index file generating apparatus 120 and catalogue meta file generating apparatus 130.
Above-mentioned catalogue meta file generating apparatus 130 is used to generate the catalogue meta file, and meanwhile, above-mentioned index file generating apparatus 120 generates index file.
The file of above-mentioned generation is to carry out CDS to serve necessary file.
As shown in Figure 1, UPnP operational processes device has comprised index file treating apparatus 140, catalogue meta file pick-up unit 150, catalogue meta file updating device 160 and index file updating device 170.
Above-mentioned index file treating apparatus 140 is after the client sends the browse operation request, from media storage device 110, extract index file, according to whether existing catalogue meta file is existed judge then, and index file is sent in catalogue meta file pick-up unit 150 and the catalogue meta file updating device 170.
Above-mentioned catalogue meta file pick-up unit 150 can communicate each other with catalogue meta file updating device 160.
Above-mentioned catalogue meta file updating device 160 will be sent to index file updating device 170 through the catalogue meta file that upgrades.
Above-mentioned index file updating device 170 generates new index file, and by index file treating apparatus 140, it is stored in the media storage device 110.
With reference to Fig. 2 to Fig. 6, the running and the action effect thereof of the embodiment of the invention with said structure described.
At first, the response process to the browse operation of UPnP CDS describes.Supposed that Target id=" 0015 " corresponding Browse Direct Children sends the situation of request here.
At first, if the client has sent the request of browse operation, the pairing index file of Target id is searched for.At this moment, Target id is according to container situation and directory scenario, and its processing procedure is also different.
When the Target id of importing is under the situation of container, after the visit index file relevant, read the content of associated documents with 0015, obtain the information of actual container.If when Target id is project, in the information of physical record, only selects the directory name except that filename, and obtain as relevant information.
Then, in relevant container, (upnp.met) searches for to the catalogue meta file.
When the catalogue meta file does not exist, perhaps under the situation that internal file information was updated, will upgrade relevant upnp.met file.
Next, obtained required upnp.met file by said process after, will respond to this content.
In the process of carrying out aforesaid operations, from the capacity of I (input)/O (output), when the number sum of the Item of special container and sub Container is decided to be " N ", in processing procedure, do not carry out medium more under the news, " N " is O (2) just.
Promptly, in existing second method, all items (Item), subContainer at associated vessel carry out the I/O operation, make it reach O (N), but the present invention reads twice I/O operation of reading with the catalogue meta file owing to only carried out index file, therefore compare in the past, efficient is just improved.
In addition, media server carries out that the following pairing Target id of all information of required CDS root container is determined, the catalogue meta file generates and operation such as index file generation when initial the startup, with reference to the operation synoptic diagram of Fig. 4, this process is described.
At first, when media server starts, if current catalogue meta file or the index file of existing, with its deletion (S400).
Then, from root container (Object ID=0), (recursive) search that circulates is selected (S401) to each container.
Then, utilize project (Item) and information of container in the associated vessel, make the catalogue meta file, utilize hash function to determine Target id,, be stored in (S402, S403) in the separate storage location the form of Target id with index file.
By said method, after handling all sub Container, finished the preparation of CDS service.
Fig. 5 is an operation synoptic diagram of determining the Target id process among Fig. 4.With reference to Fig. 5, the Target id in the said process is determined that method carries out following explanation.
Use hash function, obtain correlated digital, and convert it to text formatting again, it is defined as Target id, to determine the pairing Target id of pathname (S500) of relevant item or container.At this, using hash function is because need not in independent file or storer Target id information to be kept, managed.
But owing to hash (Hash) might clash on characteristic, so whether determined Target id confirms (S501) with index file form physical presence in the said process.
At this moment, if there is index file, confirm (S502) to the routing information that comprised in the relative index file and current target ID be whether identical.
If determine that the result is that routing information is inconsistent, just increase the digital value (S503) of a Target id.
Come back to the process of confirming that index file exists then, carry out aforesaid operations repeatedly.
When carrying out said process, even the pairing index file of current definite Target id does not exist, perhaps have the relative index file, as long as the routing information that is comprised in this index file is inconsistent with the Target id of determining at present, just the Target id that will determine at present is chosen as final objective ID.
, directly from medium, do not obtain media file information, and independent store information, can the method for carrying out reference when the client sends request, the item that should be noted that be realize synchronously with the physical medium file.This is because when the media information of medium changed, the information of change should be reflected, could send correct information to client.
That is, optimal situation is, can give the UPnP media server with correction, deletion, the interpolation communication of all records of producing in the Storage Media, but in fact can be subjected to the restriction on the system performance.
Therefore, need a kind ofly can carry out method for updating to catalogue meta file and index file effectively.
Fig. 6 is the operation synoptic diagram of media file information updating process in the embodiments of the invention.With reference to Fig. 6, the synchronizing process of browse operation is described.
At first, when receiving operation, the pairing index file of related objective ID is searched for, checked whether it exists (S600, S601) from the customers' place.
At this moment, if there is index file, just read this file, and the path (path) that obtains realistic objective is (S602).If do not have index file in the said process (S601), just handle as wrong (Error).
Then, whether the destination path that obtains in the said process is present in the real system, confirms (S603).
If confirm in the said process (S603) that destination path is not present in the real system, just with the index file deletion relevant, as fault processing (S604) with related objective ID.At this moment, if Target id is equivalent to and container rather than project, index file has just possessed container index file structure as shown in Figure 3, even when the deletion index file, also can follow the trail of its file inside, with the next container and the pairing index file Delete All of project goal id information.
Then,, be present in the real system, upgrade checking process (S605) just carry out the catalogue meta file as the path of confirming target if in said process (S603).Promptly, if in associated vessel, there is not the catalogue meta file, perhaps the change time (modification time) with container and catalogue meta file compares, and judges that existing catalogue meta file information is former old information, just the catalogue meta file is upgraded.
At this moment, if there is current catalogue meta file (S607), will read and write down the relative index file delete (S608) of the Target id of this content.
Therefore, under the non-existent situation of current directory meta file, perhaps have current catalogue meta file, but deleted after its inner index file, the information in the collection container regenerates catalogue meta file (S609).At this moment, also generate together at inner relative index file.
After finishing said process, the catalogue meta file is just realized synchronous regime with the information of actual storage in medium.Therefore, after having read this meta file and having carried out operations necessary, corresponding information will be sent to client (S606).

Claims (5)

1, a kind of media file management method based on the UPnP network, its feature comprised with the next stage:
Phase one, after media server is activated, existing catalogue meta file and index file is deleted, and the root container is confirmed;
Subordinate phase is obtained above-mentioned container and the project information that container is the next, and determines the Target id corresponding with it successively;
Phase III generates the catalogue meta file corresponding with above-mentioned Target id, and stores;
The quadravalence section is made into index file with above-mentioned each Target id, and stores.
According to claim 1 based on the media file management method of UPnP network, it is characterized in that 2, the stage of above-mentioned definite Target id comprises:
Utilize hash function, obtain the process of Target id character string;
To whether having the process of confirming with the corresponding index file of above-mentioned character string;
Path and the Target id that comprises in the above-mentioned index file of having confirmed to exist compared, confirm the process that both are whether consistent;
If the result of above-mentioned comparison does not exist for unanimity or index file, then current target I D is defined as the process of final goal ID.
3, as described in the claim 2 based on the media file management method of UPnP network, its feature comprises:
If path that is comprised in the index file and current target ID are inconsistent, then increase the value of Target id, and confirm the process whether index file exists.
4, a kind of media file management method based on the UPnP network, its feature comprised with the next stage:
Phase one, confirm whether the client has sent the directory information request;
Whether subordinate phase after the client has sent above-mentioned directory information request, exists and retrieves being requested the corresponding index file of Target id;
Phase III is if above-mentioned index file exists, just whether physical presence is confirmed in system to the path that comprised in its index file;
The quadravalence section, if above-mentioned path physical presence in system, judging then that whether it is necessary or not upgrades the catalogue meta file;
Five-stage is necessary the catalogue meta file is upgraded if be judged as in the above-mentioned stage, just delete existing catalogue meta file, generates new catalogue meta file, and provides it to the client.
5, as described in the claim 4 based on the media file management method of UPnP network, it is characterized in that:
If the catalogue meta file does not exist in container, confirm that perhaps the catalogue meta file is the old catalogue meta file of the time of having passed through, need upgrade the catalogue meta file just be judged as.
CN 200510094298 2005-09-09 2005-09-09 Method for media document management based on UPnP network Pending CN1928858A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200510094298 CN1928858A (en) 2005-09-09 2005-09-09 Method for media document management based on UPnP network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200510094298 CN1928858A (en) 2005-09-09 2005-09-09 Method for media document management based on UPnP network

Publications (1)

Publication Number Publication Date
CN1928858A true CN1928858A (en) 2007-03-14

Family

ID=37858824

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200510094298 Pending CN1928858A (en) 2005-09-09 2005-09-09 Method for media document management based on UPnP network

Country Status (1)

Country Link
CN (1) CN1928858A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014059859A1 (en) * 2012-10-19 2014-04-24 中兴通讯股份有限公司 Home network content processing method and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014059859A1 (en) * 2012-10-19 2014-04-24 中兴通讯股份有限公司 Home network content processing method and device

Similar Documents

Publication Publication Date Title
US8176061B2 (en) Tracking digital assets on a distributed network
JP5005726B2 (en) Managing media files from multiple sources
CN101692237B (en) Managing media files using metadata injection
US10372748B2 (en) Methods and apparatuses for presenting content
US7359897B2 (en) System and method for document management and retrieval
US8452775B2 (en) Accessing content items in a network based on device capability information
US8665337B2 (en) Image sharing system, image managing server, and control method and program thereof
US20070219953A1 (en) Searching Content Directories
JP5638608B2 (en) Method for accessing file system files according to metadata and apparatus for implementing the method
CN1828599A (en) Ghosted synchronization
US20120095962A1 (en) Aggregating Media Content From Multiple Clients To A Server
EP2015202A1 (en) Method and apparatus for generating electronic content guide
EP1570358A2 (en) Automatic organization of images uploaded to a photo-sharing site
CN101729442A (en) Method and device for realizing content sharing
KR20060117934A (en) Virtual content directory service
US20130219050A1 (en) Cloud service access apparatus, cloud service access method, and cloud service access system
US20070055650A1 (en) Query caching in a system with a content directory service
US20060004822A1 (en) Method and apparatus for moving multi-media file and storage medium storing program for executing the method
US20090150332A1 (en) Virtual file managing system and method for building system configuration and accessing file thereof
JP2010102456A (en) Content providing apparatus, content providing system, content providing method, and user interface program
CN1928858A (en) Method for media document management based on UPnP network
KR20070038665A (en) Distributed file system and operating method thereof
JP2010009087A (en) Content retrieval device and method, and control device
JP2011049981A (en) Image processing apparatus, method of controlling the same, and program
JP4479439B2 (en) Information processing apparatus, information processing method, and computer program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication