CN103237007A - Method and device for updating media files - Google Patents

Method and device for updating media files Download PDF

Info

Publication number
CN103237007A
CN103237007A CN2013100948739A CN201310094873A CN103237007A CN 103237007 A CN103237007 A CN 103237007A CN 2013100948739 A CN2013100948739 A CN 2013100948739A CN 201310094873 A CN201310094873 A CN 201310094873A CN 103237007 A CN103237007 A CN 103237007A
Authority
CN
China
Prior art keywords
lastest imformation
shared medium
server
described server
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
CN2013100948739A
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN2013100948739A priority Critical patent/CN103237007A/en
Publication of CN103237007A publication Critical patent/CN103237007A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Between Computers (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for updating media files, and relates to the field of DLNA (digital living network alliance). The method used in a terminal includes: receiving update information comprising a delete list used for indicating shared media files deleted in the server side sent by a server; and deleting locally-saved caching data of the deleted shared media files according to the delete list. In an embodiment of the invention, a strategy of recording various changes of the shared media files is abandoned, instead, the deleted shared media files are recorded independently in the delete list, and therefore, update processes are simplified, and update efficiency is greatly improved. Further, the caching data are saved, so that plenty of browsing time is saved each time when a DMC (digital micro-circuit) is reconnected to a DMS (database management system), and the updating efficiency is improved.

Description

Media file update method and device
Technical field
The embodiment of the invention relates to the DLNA technical field, especially relates to media file update method and device.
Background technology
Along with development of computer, digital device in the people family is more and more, the carrier of media information (as photo, music, video recording etc.) is also just more and more abundanter, is experiencing from the TV to the computer, from the computer to the mobile phone, transition such as from the mobile phone to the panel computer again.In order to make people can enjoy the various media informations of different digital equipment, DLNA DLNA(Digital Living Network Alliance expediently) arise at the historic moment.DLNA is initiated by 17 tame international giants such as Intel, IBM, Sony, Microsoft, Philip, 145 members have been had now, be intended to by formulating the interoperability standard, long-range overall architecture being provided, realize one and make the network platform that really has interoperability between the digital devices such as personal computer and consumer-elcetronics devices, make that each digital device in the family can carry out the media entertainment exchanging visit anywhere or anytime.
In DLNA, function according to digital device, defined media server (DMS, Digital Media Server), media play/controller (DMP/DMC, DMC:Digital Media Controller Digital Media controller, DMP:Digital Media Player digital media player) logical device such as, ginseng is shown in Table 1.As all representing with DMC below DMP/DMC(this paper of terminal) be connected to after the DMS, need obtain that DMS goes up the relevant information of shared medium file and carry out buffer memory in this locality, multiple attribute informations such as the title of media file, size, path, duration for example, in order to carry out displaying, broadcast or the propelling movement etc. of media file, its process can be referring to shown in Figure 1.This process says the file directory that can comprise equipment declaration and service declaration, browsing media server simply, obtain media file and step such as play in this locality.
Table 1
Figure 2013100948739100002DEST_PATH_IMAGE001
In the prior art, when the shared medium file on the DMS changes, what adopt is LastChange incremental update scheme: based on the base-line data of a shared medium file, DMS notes all changes situation of described relatively all shared medium files of base-line data, comprise and increase shared file (ADD), modification shared file (MODIFY, as attributes such as revised file names), deletion shared file (DEL) etc., these data that will note are then given DMC as new data notification more.The inventor finds in realizing process of the present invention, in this scheme owing in the DMS side any variation of media file is all noted, not only Ji Lu content is very numerous, the more important thing is, step when utilizing these data to upgrade is also very complicated, for example, need the strategy of browsing when resolving these more new data is determined to upgrade be that catalogue browsing or single are browsed, concrete, can there be how many files to change to determine that it still is that single file upgrades that file upgrades in the file by judging, if the ratio that changes reaches certain limit (as 50%), will adopt the file update mode, browse the All Files under this document folder, otherwise will browse the file that this document folder is modified down alternately one by one by each.As seen, prior art has been stipulated the comparatively complicated update strategy of a cover, need note all changes during record, needs during renewal repeatedly to judge, repeatedly just can finish alternately and once upgrade operation, implements comparatively difficulty in the historical facts or anecdotes border, and update efficiency is also low.
In addition, the inventor finds also that in realizing process of the present invention in the prior art, DMC reconnects to after the DMS at every turn, all can browse the shared medium file on the DMS automatically.If the media file number is more, this will continue the long time so, and can cause during this period of time that CPU usage rises violently, the equipment speed of service is slack-off, and this process all can be carried out after DMC reaches the standard grade at every turn, and the waste plenty of time, it is relatively poor to cause the user to experience.
Summary of the invention
In view of this, the purpose of the embodiment of the invention provides media file update method and device, to solve the lower problem of media data update efficiency among the DLNA.
On the one hand, the embodiment of the invention discloses a kind of media file update method, described method is used for terminal, and described method comprises:
The lastest imformation that reception server sends, described lastest imformation comprise the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end;
Data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes;
Described method also comprises, after the lastest imformation that described reception server sends:
According to the difference of described current system variation label information with the local system variation label information of preserving, the data cached renewal of carrying out except deletion of the shared medium file that this locality is preserved.
Preferably, described method also comprises:
When disconnecting with described server, preserve the data cached of shared medium file on the described server in this locality.
Preferably, described method also comprises:
When being connected to described server, judge described server whether described terminal off period restart and described server on the shared medium file whether variation took place;
If do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.
Preferably, describedly judge that whether described server restarts at described terminal off period, comprising:
By obtaining reboot flag information current on the described server, judge whether described server restarts at described terminal off period, described reboot flag information is used for distinguishing each startup of described server.
Preferably, describedly judge that whether the shared medium file on the described server variation took place, and comprising:
By obtaining the current system variation label information of described server end, judge whether the shared medium file on the described server variation took place, described system variation label information is updated when the shared medium file of described server end on described server changes.
On the other hand, the embodiment of the invention also discloses a kind of media file update method, described method is used for server end, and described method comprises:
When the shared medium file is deleted, be recorded in the deletion tabulation being used to indicate the deleted information of described media file;
Send lastest imformation to the terminal that is connected on the described server, described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
Preferably, described to the terminal transmission lastest imformation that is connected on the described server, comprising:
Periodically send lastest imformation to described terminal, and/or,
Update request according to described terminal sends lastest imformation to described terminal.
Preferably, described method also comprises:
Restarting back renewal reboot flag information, described reboot flag information is used for distinguishing each startup of described server at every turn.
On the one hand, the embodiment of the invention also discloses a kind of media file update device again, described device is used for terminal, and described device comprises:
The lastest imformation receiving element is used for the lastest imformation that reception server sends, and described lastest imformation comprises the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end;
Data updating unit is used for data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes;
Described data updating unit also is used for, and according to described current system variation label information and the difference of the local system variation label information of preserving, the data cached of shared medium file except deletion that this locality is preserved upgrades.
Preferably, described device also comprises:
Data cached preservation unit is used for when with described server disconnection, preserves the data cached of shared medium file on the described server in this locality.
Preferably, described device also comprises:
The update request transmitting element comprises:
Restart judgment sub-unit, be used for when being connected to described server, judging whether described server restarts at described terminal off period;
The file change judgment sub-unit is used for judging whether the shared medium file on the described server variation took place when being connected to described server;
Update request sends subelement, be used for receiving described judged result of restarting judgment sub-unit and described file change subelement, if do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.
Preferably, describedly restart judgment sub-unit and comprise:
Reboot flag information is obtained subelement, is used for obtaining the current reboot flag information of described server, and described reboot flag information is used for distinguishing each startup of described server;
Restart and judge the execution subelement, be used for judging according to described reboot flag information whether described server restarts at described terminal off period.
Preferably, described file change judgment sub-unit comprises:
The system variation label information obtains subelement, is used for obtaining the current system variation label information of described server end, and described system variation label information is updated when the shared medium file of described server end on described server changes;
File change is judged the execution subelement, is used for judging according to described system variation label information whether the shared medium file on the described server variation took place.
On the one hand, the embodiment of the invention also discloses a kind of media file update device again, described device is used for server end, and described device comprises:
The lastest imformation record cell is used for when the shared medium file is deleted, is recorded in the deletion tabulation being used to indicate the deleted information of described media file;
The lastest imformation transmitting element is used for sending lastest imformation to the terminal that is connected on the described server, and described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
Preferably,
Described lastest imformation transmitting element comprises:
Cycle timing subelement is used for carrying out the periodicity timing;
First lastest imformation sends subelement, is used for sending lastest imformation according to described periodicity property time-count cycle ground to described terminal; And/or described lastest imformation transmitting element comprises:
Described lastest imformation transmitting element comprises:
Update request receives subelement, is used for receiving the update request of described terminal;
Second lastest imformation sends subelement, is used for sending lastest imformation according to the update request of described terminal to described terminal.
Preferably, described device also comprises:
The reboot flag updating block is used for restarting back renewal reboot flag information at every turn, and described reboot flag information is used for distinguishing each startup of described server.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the schematic diagram of basic reciprocal process between DMP and the DMS in the explanation prior art;
Fig. 2 is the flow chart of the explanation embodiment of the invention one method;
Fig. 3 is the flow chart of the explanation embodiment of the invention two methods;
Fig. 4 is the explanation embodiment of the invention three networking schematic diagrames;
Fig. 5 is the schematic diagram of the processing that the DMS side is done when changing appears in the shared medium file in the explanation embodiment of the invention three;
Fig. 6 be in the explanation embodiment of the invention three DMS be connected DMC on the DMS always and upgrade signalling diagram when mutual;
Fig. 7 be in the explanation embodiment of the invention three DMS with reconnect to DMC on the DMS and upgrade signalling diagram when mutual;
Fig. 8 is the explanation embodiment of the invention four schematic representation of apparatus;
Fig. 9 is the explanation embodiment of the invention five schematic representation of apparatus.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
For complete understanding the present invention, mentioned numerous concrete details in the following detailed description, but it should be appreciated by those skilled in the art that the present invention can need not these details and realizes.In other embodiments, be not described in detail known method, process, assembly and circuit, in order to avoid unnecessarily cause embodiment fuzzy.
Embodiment one
Fig. 2 is the flow chart of the embodiment of the invention one method.Present embodiment discloses a kind of media file update method, and described method is used for terminal, and described method comprises:
The lastest imformation that S201, reception server send, described lastest imformation comprise the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end.Concrete, DMC receives the lastest imformation that DMS sends, and this lastest imformation comprises the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described DMS end.
The concrete form embodiment of the invention of described deletion tabulation is not limited; so long as this deletion tabulation can indicate server end by which shared medium file deleted get final product, these forms that can use herein all do not deviate from spirit of the present invention and protection range.
In present embodiment and the present invention some other embodiment, preferred:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.In addition, every described record can also comprise system variation label information at that time, described system variation label information is updated when the shared medium file of described server end on described server changes, concrete, described system variation label information can comprise a global variable SystemUpdateID, whenever server end has the shared medium file when changing (comprising increase, deletion, modification etc.), this variable is namely from increasing 1.
S202, data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.Concrete, DMC is connected to and can carries out buffer memory to the related data of the shared medium file on the DMS in DMC this locality after DMS goes up, and DMC just can delete the shared medium file cache data of the needs deletion of local cache one by one according to this deletion tabulation after having received described deletion tabulation.
Present embodiment is peeled off out with the work of needs deletion by with upper type, uses the deletion tabulation to realize individually, no longer needs during renewal to do complicated judgement, has improved update efficiency.
In present embodiment and the present invention some other embodiment, preferred:
Described lastest imformation can also comprise current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes; Corresponding described method also comprises, after the lastest imformation that described reception server sends:
According to the difference of described current system variation label information with the local system variation label information of preserving, the data cached renewal of carrying out except deletion of the shared medium file that this locality is preserved.
Concrete, when DMS sends lastest imformation to DMC, except the delete columns off-balancesheet can also comprise current SystemUpdateID value, to carry out the renewal of other shared files except deletion.DMC receives that the current SystemUpdateID of DMS is behind the up-to-date SystemUpdateID, can compare with the local SystemUpdateID value of preserving of this DMC, the data cached of shared medium file except deletion that this locality is preserved according to the difference of the two upgrades, for example, can use the Search order in the DLNA, above new and old two SystemUpdateID values as parameter, are upgraded the data cached of DMC.And the renewal that why can only finish except deletion with new and old two SystemUpdateID is relevant with the mechanism of DLNA, in DLNA, take place once to change SystemUpdateID in arbitrary shared file on the DMS and namely can increase 1 certainly, simultaneously, also can namely be attached on the shared file that changes as property value from the SystemUpdateID value that increases after 1 up-to-date SystemUpdateID, suppose the SystemUpdateID=200 that DMS is current, and the SystemUpdateID=100 that DMC preserves, so in the shared file of those SystemUpdateID=101~200 existing on the DMS namely with respect to the old data cached shared medium file that changes on the DMC, DMC removes to search on the DMS shared medium file of property value between 101 and 200 and can upgrade accordingly.
In present embodiment and the present invention some other embodiment, preferred, described method can also comprise:
When disconnecting with described server, preserve the data cached of shared medium file on the described server in this locality.In the prior art, namely delete after DMC and DMS disconnect data cached, and can continue to preserve after DMC disconnects among the present invention data cached, the following like this number of visits that can reduce when reaching the standard grade again shared medium file on the DMS.
In present embodiment and the present invention some other embodiment, preferred, described method can also comprise:
When being connected to described server, judge described server whether described terminal off period restart and described server on the shared medium file whether variation took place;
If do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.And if server took place to restart, data cached will the calcellation on the terminal so, also just it doesn't matter has upgraded, and needs all the shared medium files on the browser server from the beginning, obtains again that all are data cached.
Further, in present embodiment and the present invention some other embodiment, describedly judge that whether described server restarts at described terminal off period, can comprise:
By obtaining reboot flag information current on the described server, judge whether described server restarts during described terminal withdraws from, described reboot flag information is used for distinguishing each startup of described server.
Concrete, at the DMS end ServiceResetToken variable can be set, when starting, DMS all for this variable generates a unique numeral, starts generate all different at every turn, whether occurred restarting so can be used for judging DMS.And at DMC one end, can when each the disconnection, all preserve the ServiceResetToken value on the DMS at that time, next time is when connecting, and can know by judging on ServiceResetToken that DMC preserves and the DMS that current up-to-date ServiceResetToken is whether consistent whether DMS restarted at this DMC off period.
In present embodiment and the present invention some other embodiment, describedly judge that whether the shared medium file on the described server variation took place, and can also comprise:
By obtaining the current system variation label information of described server side, judge whether the shared medium file on the described server variation took place.
Concrete, at DMC one end, can all preserve the SystemUpdateID value on the DMS at that time when each the disconnection, whether the SystemUpdateID that goes up preservation by this DMC relatively when connecting again and the current up-to-date SystemUpdateID of DMS the identical update request that triggers.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
Embodiment two
This enforcement is corresponding with embodiment one, and difference is that embodiment one stands in the terminal angle to be described, and present embodiment then is to stand in server side to be described.
Fig. 3 is the flow chart of the embodiment of the invention two methods, and present embodiment provides a kind of media file update method, and described method is used for server end, and described method comprises:
S301, when the shared medium file is deleted, be recorded in the deletion tabulation being used to indicate the deleted information of described media file.
S302, send lastest imformation to the terminal that is connected on the described server, described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
In present embodiment and the present invention some other embodiment, preferred:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
In addition, in certain embodiments of the invention, every described record can also for: comprise the identification information of a deleted shared medium file and system variation label information at that time, the shared medium file of described system variation label information on described server is updated when changing.This is because a total deletion tabulation can be arranged on DMS, along with this total deletion tabulation of continuous record may be very long, DMS can send to this DMC as described deletion tabulation according to the situation of a DMC intercepting part from this total deletion tabulation, and can serve as according to intercepting with the system variation label information during intercepting.
In present embodiment and the present invention some other embodiment, preferred:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
In present embodiment and the present invention some other embodiment, preferred, described to the terminal transmission lastest imformation that is connected on the described server, comprising:
Periodically send lastest imformation to described terminal, and/or,
Update request according to described terminal sends lastest imformation to described terminal.
Concrete, DMC can be where necessary, and (when for example finding that relative variation has appearred in shared medium file on the DMS) requires lastest imformation to DMS; And DMS also can periodically send lastest imformation to each terminal that is connected book server, for example DMS can open a timer (as 500ms) when starting, and deletion tabulation and the current SystemUpdateID that records during with this when this timer expiry issues corresponding DMC as lastest imformation then.Described each terminal that is connected book server does not include only the terminal in the firm connection, comprises the terminal that always is connected on the book server yet.
In present embodiment and the present invention some other embodiment, preferred:
Restarting back renewal reboot flag information, described reboot flag information is used for distinguishing each startup of described server at every turn.
Present embodiment corresponds essentially to embodiment one, so relevant part gets final product referring to the part explanation of embodiment one.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
Embodiment three
Present embodiment corresponds to embodiment one, two, be for the ease of understanding the present invention according to concrete scene to further specifying that above-described embodiment is done.
Fig. 4 is the networking schematic diagram in the present embodiment.PC is as DMS, and mobile phone can be used as DMC as DMC and PDA and set-top box both can be used as DMS.At PC a large amount of shared medium files is arranged, after starting terminals such as mobile phone, need browse these media files from PC, show and broadcast.Use present embodiment, when terminals such as mobile phone are restarted or after suspension reconnects, can be carried out local update according to the shared medium file on the PC quickly and efficiently.
At first, in order to reduce record and complexity when upgrading, allow and upgrade become faster simpler, when record, taked following scheme in the present embodiment:
The variation of DMS side shared medium file mainly comprises increases add, revise modify, delete deletion etc., changes for these and handles following (referring to shown in Figure 5) respectively:
When these variations occurring, make SystemUpdateID from increasing 1(SystemUpdateID++);
If increase or revise, then with this value record of SystemUpdateID in the UpdateId of associated documents or file attribute; If deletion then is recorded in the LastDel file.
Wherein LastDel can be an XML file, and form can be as follows:
<objID="Song1"UpdateID="237”/>
<objID="Song2"UpdateID="238”/>
<objID="Song3"UpdateID="239”/>
……
Wherein " Song1 " waits and is filename, the SystemUpdateID value after the value among the UpdateID equals to upgrade at that time.
Then, for the DMC that is connected on the DMS, the interactive operation flow scheme design following (referring to shown in Figure 6) of itself and DMS:
S601, DMS start, and start timer, can be defaulted as 500ms.Next be the standard step among the DLNA such as device discovery, event subscription.
Changing appears in S602, DMS one end file during timing.The variation of shared medium files such as the increase add that described variation is namely above mentioned, modification modify, delete deletion, for example server administrators have deleted some files, or be some other file rename or changed the path, or new copy some files etc. of coming in again.After variation occurring, need:
1) refreshes SystemUpdateID, upgrade the file of appearance variation and the UpdateId of file simultaneously.
2) after variation finishes, the UpdateEventFlag sign of event notice is set.
3) deletion event is recorded among the LastDel.
S603, timer expiry check UpdateEventFlag, if change then send lastest imformation.When timer expiry is the 500ms expiration, by checking during the UpdateEventFlag sign can be known whether file change has taken place, then can send lastest imformation to terminal if taken place to change.This lastest imformation can comprise for the LastDel of deletion and be used for the SystemUpdateID of other renewals.
The local old SystemUpdateID that preserves of the new SystemUpdateID that S604, basis get access to and DMC sends the Search request command, is changed to file and the file that changes or increase to upgrade those.Obtain the new data that server end returns.
S605, parsing LastDel delete the data of having deleted at server end in this locality.
This programme does not need complicated logic decision, only needs to resolve LastDel, resolves one and handles one, can finish deletion and upgrade, and just can finish other renewals and add last Search.
Sequencing the present invention between above S604 and the S605 step does not limit, and S605 also can be before S604, perhaps S604 and S605 can be in no particular order, carry out simultaneously.
When DMC and DMS disconnected, the measure of taking was:
One, preserve three variablees at DMC:
ServiceResetToken;
SystemUpdateID;
The unique identification of UUID:DMS equipment.
Its two, on DMC, do not delete the data cached of this locality for the shared medium file of DMS, but preserve.
At this DMC off period, DMS still continues to record LastDel.In fact, DMS can add up deletion information always and be recorded in a total deletion tabulation as in the HwLastDel file, and intercepts relevant portion at different terminals from HwLastDel and send to them respectively as LastDel.Also can add aging mechanism for preventing that HwLastDel is long in addition, namely delete some records early among the HwLastDel.
At this DMC off period, DMS also can change the value of ServiceResetToken because of restarting, and upgrades the UpdateId property value of SystemUpdateID and associated documents or file according to the variation of shared file.The unique numeral that generates when wherein ServiceResetToken is the DMS startup, each startup is all different.
At last, when this DMC is connected to DMS again, owing to preserved original data cachedly on the DMC, so no longer need from the beginning to browse DMS, get final product but only carry out incremental update.Conceptual design following (referring to shown in Figure 7):
S701, DMC reach the standard grade, and find DMS equipment, obtain UUID.
S702, in local data base, search this UUID, if any proof then the data cached of this DMS arranged, otherwise browse automatically.UUID is the unique identification of DMS equipment, if DMC has the UUID of this DMS, shows that then this DMC connected this DMS, and data cached on this DMS arranged, and continues to carry out step of updating downwards; If there is not this UUID, show that then for this DMS of this DMC be brand-new, should directly browse automatically and namely from the beginning browse this DMS, browse according to the execution of the standard step among the DLNA getting final product automatically, the present invention does not relate to.
S703, obtain ServiceResetToken, with the data contrast in the database, if equate that then DMS is not restarted, otherwise browses automatically.This step is used for further judging whether and need upgrading, if the ServiceResetToken of this DMS that preserves the ServiceResetToken that gets access to by request commands such as GetServiceResetToken from current DMS and the DMC local data base is different, prove that then this DMS restarted, original data cached calcellation needs directly to browse namely automatically from the beginning to browse; If the identical execution step of updating downwards that then continues of ServiceResetToken.
S704, obtain the current SystemUpdateID of DMS by request commands such as GetSystemUpdateID, and with database in the SystemUpdateID contrast of preserving.If equate, then represent the DMS file and do not change, directly use DMC local cache data to get final product, do not need to upgrade.If the unequal step of updating of then carrying out downwards.
If the file of S705 DMS one end changes, then can obtain lastest imformation by sending request commands such as GetLastDel.When sending the GetLastDel request to DMS, can attach the SystemUpdateID value that DMC one end is preserved.
The SystemUpdateID value that S706, DMS one end are preserved according to DMC one end is searched the LastDel record that this DMC needs in total deletion tabulation HwLastDelList, return to DMC then.
S707~S708, DMC upgrade according to LastDel and the current SystemUpdateID of DMS.This process and S604, S605 are basic identical, repeat no more.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
Embodiment four
Fig. 8 is the embodiment of the invention four schematic representation of apparatus.Present embodiment and above-described embodiment, especially embodiment one is corresponding, discloses a kind of media file update device, and described device is used for terminal, and described device comprises:
Lastest imformation receiving element 801 is used for the lastest imformation that reception server sends, and described lastest imformation comprises the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end;
Data updating unit 802 is used for data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes;
Described data updating unit 802 also is used for, and according to described current system variation label information and the difference of the local system variation label information of preserving, the data cached of shared medium file except deletion that this locality is preserved upgrades.
Preferably, described device also comprises:
Data cached preservation unit is used for when with described server disconnection, preserves the data cached of shared medium file on the described server in this locality.
Preferably, described device also comprises:
The update request transmitting element comprises:
Restart judgment sub-unit, be used for when being connected to described server, judging whether described server restarts at described terminal off period;
The file change judgment sub-unit is used for judging whether the shared medium file on the described server variation took place when being connected to described server;
Update request sends subelement, be used for receiving described judged result of restarting judgment sub-unit and described file change subelement, if do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.
Preferably, describedly restart judgment sub-unit and comprise:
Reboot flag information is obtained subelement, is used for obtaining the current reboot flag information of described server, and described reboot flag information is used for distinguishing each startup of described server;
Restart and judge the execution subelement, be used for judging according to described reboot flag information whether described server restarts at described terminal off period.
Preferably, described file change judgment sub-unit comprises:
The system variation label information obtains subelement, is used for obtaining the current system variation label information of described server end, and described system variation label information is updated when the shared medium file of described server end on described server changes;
File change is judged the execution subelement, is used for judging according to described system variation label information whether the shared medium file on the described server variation took place.
For device embodiment, because it corresponds essentially to method embodiment, so relevant part gets final product referring to the part explanation of method embodiment.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills namely can understand and implement under the situation of not paying creative work.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
Embodiment five
Fig. 9 is the embodiment of the invention five schematic representation of apparatus.Present embodiment and above-described embodiment, especially corresponding with embodiment two and embodiment four, a kind of media file update device is disclosed, described device is used for server end, and described device comprises:
Lastest imformation record cell 901 is used for when the shared medium file is deleted, is recorded in the deletion tabulation being used to indicate the deleted information of described media file;
Lastest imformation transmitting element 902 is used for sending lastest imformation to the terminal that is connected on the described server, and described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
Preferably:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
Preferably:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
Preferably,
Described lastest imformation transmitting element comprises:
Cycle timing subelement is used for carrying out the periodicity timing;
First lastest imformation sends subelement, is used for sending lastest imformation according to described periodicity property time-count cycle ground to described terminal; And/or described lastest imformation transmitting element comprises:
Described lastest imformation transmitting element comprises:
Update request receives subelement, is used for receiving the update request of described terminal;
Second lastest imformation sends subelement, is used for sending lastest imformation according to the update request of described terminal to described terminal.
Preferably, described device also comprises:
The reboot flag updating block is used for restarting back renewal reboot flag information at every turn, and described reboot flag information is used for distinguishing each startup of described server.
For device embodiment, because it corresponds essentially to method embodiment, so relevant part gets final product referring to the part explanation of method embodiment.Device embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of module to realize the purpose of present embodiment scheme according to the actual needs.Those of ordinary skills namely can understand and implement under the situation of not paying creative work.
The embodiment of the invention has been abandoned the strategy that the many variations with the shared medium file all records, changed the way that the many variations indifference is treated, but deletion action is handled separately, specially deleted shared medium file is recorded in the deletion tabulation, that can unify according to the deletion tabulation, direct deletion when upgrading like this, no longer need to carry out complicated browse and judge, thereby simplified renewal process, improved update efficiency greatly.
In addition, the embodiment of the invention is also preserved data cached, can save a large amount of browsing times after DMC reconnects to DMS at every turn, has improved update efficiency.
The present invention can describe in the general context of the computer executable instructions of being carried out by computer, for example program module.Usually, program module comprises the routine carrying out particular task or realize particular abstract data type, program, object, assembly, data structure etc.Also can in distributed computing environment (DCE), put into practice the present invention, in these distributed computing environment (DCE), be executed the task by the teleprocessing equipment that is connected by communication network.In distributed computing environment (DCE), program module can be arranged in the local and remote computer-readable storage medium that comprises memory device.
One of ordinary skill in the art will appreciate that all or part of step that realizes in the said method execution mode is to instruct relevant hardware to finish by program, described program can be stored in the computer read/write memory medium, here alleged storage medium, as: ROM, RAM, magnetic disc, CD etc.
Also need to prove, in this article, relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or in proper order between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.Do not having under the situation of more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
The above is preferred embodiment of the present invention only, is not for limiting protection scope of the present invention.Used specific case herein and principle of the present invention and execution mode have been carried out lock stated, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., all be included in protection scope of the present invention.

Claims (24)

1. a media file update method is characterized in that, described method is used for terminal, and described method comprises:
The lastest imformation that reception server sends, described lastest imformation comprise the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end;
Data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.
2. method according to claim 1 is characterized in that:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
3. method according to claim 1 is characterized in that:
Described lastest imformation also comprises current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes;
Described method also comprises, after the lastest imformation that described reception server sends:
According to the difference of described current system variation label information with the local system variation label information of preserving, the data cached renewal of carrying out except deletion of the shared medium file that this locality is preserved.
4. method according to claim 1 is characterized in that, described method also comprises:
When disconnecting with described server, preserve the data cached of shared medium file on the described server in this locality.
5. method according to claim 1 is characterized in that, described method also comprises:
When being connected to described server, judge described server whether described terminal off period restart and described server on the shared medium file whether variation took place;
If do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.
6. method according to claim 5 is characterized in that, describedly judges that whether described server restarts at described terminal off period, comprising:
By obtaining reboot flag information current on the described server, judge whether described server restarts at described terminal off period, described reboot flag information is used for distinguishing each startup of described server.
7. method according to claim 5 is characterized in that, describedly judges that whether the shared medium file on the described server variation took place, and comprising:
By obtaining the current system variation label information of described server end, judge whether the shared medium file on the described server variation took place, described system variation label information is updated when the shared medium file of described server end on described server changes.
8. a media file update method is characterized in that, described method is used for server end, and described method comprises:
When the shared medium file is deleted, be recorded in the deletion tabulation being used to indicate the deleted information of described media file;
Send lastest imformation to the terminal that is connected on the described server, described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
9. method according to claim 8 is characterized in that:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
10. method according to claim 8 is characterized in that:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
11. method according to claim 8 is characterized in that, and is described to the terminal transmission lastest imformation that is connected on the described server, comprising:
Periodically send lastest imformation to described terminal, and/or,
Update request according to described terminal sends lastest imformation to described terminal.
12. method according to claim 8 is characterized in that, described method also comprises:
Restarting back renewal reboot flag information, described reboot flag information is used for distinguishing each startup of described server at every turn.
13. a media file update device is characterized in that, described device is used for terminal, and described device comprises:
The lastest imformation receiving element is used for the lastest imformation that reception server sends, and described lastest imformation comprises the deletion tabulation, and described deletion tabulation is used to indicate out at the deleted shared medium file of described server end;
Data updating unit is used for data cached according to the local described deleted shared medium file of preserving of described delete columns list deletion.
14. device according to claim 13 is characterized in that:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
15. device according to claim 13 is characterized in that:
Described lastest imformation also comprises current system variation label information, and described system variation label information is updated when the shared medium file of described server end on described server changes;
Described data updating unit also is used for, and according to described current system variation label information and the difference of the local system variation label information of preserving, the data cached of shared medium file except deletion that this locality is preserved upgrades.
16. device according to claim 13 is characterized in that, described device also comprises:
Data cached preservation unit is used for when with described server disconnection, preserves the data cached of shared medium file on the described server in this locality.
17. device according to claim 13 is characterized in that, described device also comprises:
The update request transmitting element comprises:
Restart judgment sub-unit, be used for when being connected to described server, judging whether described server restarts at described terminal off period;
The file change judgment sub-unit is used for judging whether the shared medium file on the described server variation took place when being connected to described server;
Update request sends subelement, be used for receiving described judged result of restarting judgment sub-unit and described file change subelement, if do not take place to restart and described server on the shared medium file variation took place, then to described server transmission update request, to obtain described lastest imformation.
18. device according to claim 17 is characterized in that, describedly restarts judgment sub-unit and comprises:
Reboot flag information is obtained subelement, is used for obtaining the current reboot flag information of described server, and described reboot flag information is used for distinguishing each startup of described server;
Restart and judge the execution subelement, be used for judging according to described reboot flag information whether described server restarts at described terminal off period.
19. device according to claim 17 is characterized in that, described file change judgment sub-unit comprises:
The system variation label information obtains subelement, is used for obtaining the current system variation label information of described server end, and described system variation label information is updated when the shared medium file of described server end on described server changes;
File change is judged the execution subelement, is used for judging according to described system variation label information whether the shared medium file on the described server variation took place.
20. a media file update device is characterized in that, described device is used for server end, and described device comprises:
The lastest imformation record cell is used for when the shared medium file is deleted, is recorded in the deletion tabulation being used to indicate the deleted information of described media file;
The lastest imformation transmitting element is used for sending lastest imformation to the terminal that is connected on the described server, and described lastest imformation comprises described deletion tabulation, so that described terminal is upgraded according to described lastest imformation.
21. device according to claim 20 is characterized in that:
Described deletion tabulation comprises one or more record, and every described record comprises the identification information of a deleted shared medium file.
22. device according to claim 20 is characterized in that:
Described lastest imformation also comprises current system variation label information, and the shared medium file of described system variation label information on described server is updated when changing.
23. device according to claim 20 is characterized in that,
Described lastest imformation transmitting element comprises:
Cycle timing subelement is used for carrying out the periodicity timing;
First lastest imformation sends subelement, is used for sending lastest imformation according to described periodicity property time-count cycle ground to described terminal; And/or described lastest imformation transmitting element comprises:
Described lastest imformation transmitting element comprises:
Update request receives subelement, is used for receiving the update request of described terminal;
Second lastest imformation sends subelement, is used for sending lastest imformation according to the update request of described terminal to described terminal.
24. device according to claim 20 is characterized in that, described device also comprises:
The reboot flag updating block is used for restarting back renewal reboot flag information at every turn, and described reboot flag information is used for distinguishing each startup of described server.
CN2013100948739A 2013-03-22 2013-03-22 Method and device for updating media files Pending CN103237007A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013100948739A CN103237007A (en) 2013-03-22 2013-03-22 Method and device for updating media files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013100948739A CN103237007A (en) 2013-03-22 2013-03-22 Method and device for updating media files

Publications (1)

Publication Number Publication Date
CN103237007A true CN103237007A (en) 2013-08-07

Family

ID=48885024

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013100948739A Pending CN103237007A (en) 2013-03-22 2013-03-22 Method and device for updating media files

Country Status (1)

Country Link
CN (1) CN103237007A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103974099A (en) * 2013-12-25 2014-08-06 乐视网信息技术(北京)股份有限公司 Method and system for updating audio-video data
CN107484003A (en) * 2017-07-01 2017-12-15 武汉斗鱼网络科技有限公司 Television listing data Local hydrodynamic unit method, storage medium, electronic equipment and system
CN113949921A (en) * 2021-08-31 2022-01-18 上海二三四五网络科技有限公司 Control method and control device for short video cache cleaning

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945135A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 Method and system for upgrading widget system
CN102404338A (en) * 2011-12-13 2012-04-04 华为技术有限公司 File synchronization method and device
CN102480520A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Media data synchronism method based on differential metadata description structure
CN102932439A (en) * 2012-10-26 2013-02-13 华为终端有限公司 Method and device for synchronizing content

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101945135A (en) * 2010-09-20 2011-01-12 中兴通讯股份有限公司 Method and system for upgrading widget system
CN102480520A (en) * 2010-11-26 2012-05-30 中国科学院声学研究所 Media data synchronism method based on differential metadata description structure
CN102404338A (en) * 2011-12-13 2012-04-04 华为技术有限公司 File synchronization method and device
CN102932439A (en) * 2012-10-26 2013-02-13 华为终端有限公司 Method and device for synchronizing content

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103974099A (en) * 2013-12-25 2014-08-06 乐视网信息技术(北京)股份有限公司 Method and system for updating audio-video data
CN107484003A (en) * 2017-07-01 2017-12-15 武汉斗鱼网络科技有限公司 Television listing data Local hydrodynamic unit method, storage medium, electronic equipment and system
CN107484003B (en) * 2017-07-01 2019-11-15 武汉斗鱼网络科技有限公司 Television listing data Local hydrodynamic unit method, storage medium, electronic equipment and system
CN113949921A (en) * 2021-08-31 2022-01-18 上海二三四五网络科技有限公司 Control method and control device for short video cache cleaning

Similar Documents

Publication Publication Date Title
CN108038114B (en) Path query method, terminal and computer readable storage medium
RU2608668C2 (en) System and method for control and organisation of web-browser cache for offline browsing
CN101512498B (en) The access to the data file be distributed in multiple dissimilar subscriber equipment is provided to user
RU2629448C2 (en) System and method of controlling and organizing web-browser cash
CN100464308C (en) Method and system for updating user vocabulary synchronouslly
CN109426428B (en) Method for providing operation guidance information of terminal and terminal equipment
CN101876983B (en) Method for partitioning database and system thereof
CN102164186B (en) Method and system for realizing cloud search service
CN102761623B (en) Resource self-adaptive joins method for down loading, system, data storage server and communication system
CN101729442A (en) Method and device for realizing content sharing
CN104753966A (en) Resource file inquiry method and system based on server and client caches
CN102368262A (en) Method and equipment for providing searching suggestions corresponding to query sequence
CN101772767A (en) Network repository for metadata
CN103473326A (en) Method and device providing searching advices
CN103324757A (en) Method and device for searching application programs in mobile terminal
CN103139761A (en) Information real-time show method and mobile communication terminal
CN103412900A (en) File downloading treatment method and terminal
CN101924791B (en) Method, device and system for displaying multimedia information
CN103246729A (en) Method and system for processing multi-media files of android mobile terminal
CN103237007A (en) Method and device for updating media files
CN103123651A (en) Method of rapidly searching multiple same-kind paper, device and mobile equipment
CN101483668A (en) Network storage and access method, device and system for hot spot data
CN111143662A (en) Content recommendation method, device and computer storage medium
CN104063377A (en) Information processing method and electronic equipment using same
CN101374307A (en) Method and apparatus for updating digital content information of mobile equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20130807

RJ01 Rejection of invention patent application after publication