[summary of the invention]
Based on this, be necessary to provide a kind of playlist information synchronous method, guarantee the unrestricted playlist information of obtaining.
In addition, be also necessary to provide a kind of for the synchronous server of playlist information, guarantee the unrestricted playlist information of obtaining.
A playlist information synchronous method, comprises the following steps:
A. log in client, upload local playlist information to server;
B. whether more local playlist information is identical with the playlist information on server, if different, playlist information on return service device is to local, if identical, return information not, if the playlist information of uploading described in not existing on server, deletes the playlist information of this ground.
Preferably, in step B, adopt more local playlist information timestamp to come comparison whether identical with the playlist information timestamp on server, and according to comparative result, this locality is operated accordingly, and upgrade the playlist information timestamp on local and server.
Preferably, described method also comprises step C: according to retouching operation, upgrade local playlist information, and the local playlist information after upgrading is uploaded onto the server, and upgrade the playlist information timestamp on local and server.
Preferably, step C specifically comprises the following steps:
C1. to the operation of modifying of local playlist information;
C2. amended local playlist information and the local playlist information of last time uploading the modification of failure are merged, and send upload request to server;
If C3. ask successfully, carry out upload operation, and upgrade the playlist information timestamp on local and server, if ask unsuccessfully, this less important local playlist information of uploading is put into unsuccessfully to queue.
Preferably, step C also comprises step:
C4. whether interpretation exits upload operation;
If C5. exit upload operation, whether the local playlist information after the renewal that judges whether not uploaded in addition and user attempt uploading, and if so, carry out upload operation, if not, finish;
C6. judge that whether upload operation is successful, if so, finish, if not, return to step C5.
Preferably, described method also comprises the amended local playlist information of uploading is temporarily stored in buffer area and/or by the playlist information on pending server and is temporarily stored in buffer area.
For the synchronous server of playlist information, described server comprises:
Communication module, for receiving the local playlist information of uploading;
Processing module, for the playlist information on the server of local playlist information and memory module storage is compared, if different, playlist information on server is turned back to this locality by described communication module, if identical, return information not, if there is not the playlist information of uploading on server, deletes the playlist information of this ground;
Memory module, for the playlist information on storage server and play content information.
Preferably, described processing module compares by the playlist information timestamp on local playlist information timestamp and server, according to comparative result, this locality is operated accordingly again, and upgrade the playlist information timestamp on local and server.
Preferably, described processing module receives by described communication module the request of revising rear local playlist information of uploading, and receives the amended local playlist information of uploading.
Preferably, described server also comprises staticize module, after the advertised information of processing for the staticize sending according to described processing module and the modification of uploading, local playlist information generates the playlist information of staticize, and the playlist information timestamp in update server, described processing module is upgraded local playlist information timestamp.
Preferably, described server further comprises cache module, for not storing the playlist information of uploading and/or the pending staticize playlist information of described processing module of described memory module into.
Above-mentioned playlist information synchronous method and for the synchronous server of playlist information, employing compares the playlist information on local playlist information and server, and according to comparative result, when both are different, upgrade local playlist information, realized the unrestricted playlist information of obtaining.
In addition, whether both are identical, simple and convenient to adopt timestamp comparison; Employing is uploaded onto the server after local playlist information is revised, and has guaranteed the real-time update of the playlist information on server.
[embodiment]
As shown in Figure 1, a kind of playlist information synchronous method, comprises the following steps:
Step S10, logs in client, uploads local playlist information to server.User logs in after client, and the playlist information that this locality is all is uploaded onto the server by http agreement or Transmission Control Protocol, if upload failure, stops user further to use, and again uploads local all playlist information.Wherein, playlist information comprises list name and timestamp etc., the sign that timestamp is playlist information, the time of recording played list information final updating.In the present embodiment, playlist information can be the list of songs information in music box, or the song the favorites list information in music collection.In addition, use client to log in the mode of player more, can directly adopt the registration account number of player to log in, or by logging in MSN, by the MSN entrance associated with player, log in player again, or log in by the interrelational form of other and player.Reduced like this threshold logging in, allowed user better experience.
Step S20, whether more local playlist information is identical with the playlist information on server, according to different comparative results, performs step respectively S210, step S220 and step S230.
Step S210, if different, the playlist information on return service device is to local.
Step S220, if there is not the playlist information of uploading on server, deletes the playlist information of this ground.
Step S230, if identical, return information not.
Concrete: the playlist information of preserving on the local playlist information of uploading and server to be compared, according to comparative result, this locality is operated accordingly.When both are different, the playlist information on server is turned back to this locality, and from server, pull play content information according to the playlist information timing (time is by default) of returning, when user is being switched to the synchronously list of player, client can show pulling mutual in local playlist, pull failure, the continuation that does not affect this this locality player list is used, and can continue to attempt synchronous down loading updating or next time to start player and upgrade; When both are identical, may be synchronously to complete before user last time exits, local playlist information has been up-to-date data, does not need to upgrade; The playlist information that does not have this locality to upload on server, directly deletes the playlist information of this ground.
In one embodiment, playlist information on more local playlist information and server, can pass through the timestamp of more local playlist information and the timestamp of the playlist information on server, judge that whether both are identical, and upgrade the timestamp of the playlist information on local and server.Fairly simple like this convenience.In addition, if the timestamp of the playlist information on server is early than the timestamp of local playlist information, this situation occurs in some data of server also in buffer queue is processed, now server can descend photos and sending messages by client, to continue to use the playlist information of local storage, can again not upload playlist information again.In addition, play content information can be music Information on Collection, and this Information on Collection comprises collection Basic Information Table, collection timestamp table and collection list of songs etc.In Information on Collection, store the song of music storehouse and steal chain song, the mode that song adopts type to add identification code identifies.Player information also can be music box song information, and this music box song information comprises the staticize list information that is stored on server, music box total time stamp table and user operation records table.
As shown in Figure 2, step S30, upgrades local playlist information according to retouching operation, and the local playlist information after upgrading is uploaded onto the server.In one embodiment, in client, local playlist information is carried out to additions and deletions and change operation, record playlist information and timestamp after renewal, and on this playlist information and timestamp are uploaded onto the server.As shown in Figure 3, specifically comprise the steps:
Step S300, to the operation of modifying of local playlist information.On local client, revise playlist information, comprise to local playlist information increase, deletion and change etc.For example, in the list of songs of music player, increase song, or delete song from existing list, or song title is changed, the order of songs in list is changed etc.
Step S301, merges amended local playlist information and the local playlist information of last time uploading the modification of failure, and sends upload request to server.In an embodiment, local playlist information and the local playlist information of last time uploading the modification of failure are merged at protocol layer, then to server, send upload request.
Step S302, judges that whether upload request is successful, if so, performs step S303, if not, and execution step S304.
Step S303, carries out upload operation.
Step S304, puts into unsuccessfully queue by this less important local playlist information of uploading.When next user operates again by the playlist information request upload operation of this time.
Step S305, judges whether to exit upload operation, if not, returns to step S300, if so, performs step S306.
Step S306, whether the local playlist information after the renewal that judges whether not uploaded in addition and user attempt uploading, and if so, perform step S307, if not, finish.
Step S307, carries out upload operation.
Step S308, judges that whether upload operation is successful, if so, finishes, and if not, returns to step S305.
Above-mentioned playlist information synchronous method also comprises the step that the amended local playlist information of uploading is temporarily stored in buffer area and/or the playlist information on pending server is temporarily stored in to buffer area, like this playlist information of uploading is temporarily stored in to buffer area, data are difficult for losing, by the temporary buffer area of the playlist information on pending server, the processing module on server is obtained deal with data from buffer area and is made processing speed faster.
In one embodiment, as shown in Figure 4, a kind of for the synchronous server of playlist information, comprise communication module 10, processing module 20, memory module 30.Wherein,
Communication module 10 is for receiving the local playlist information of uploading.Wherein, playlist information comprises list name and timestamp etc., the sign that timestamp is playlist information, the time of recording played list information final updating.In the present embodiment, playlist information can be the list of songs information in music box, or the song the favorites list information in music collection.
Processing module 20 compares the playlist information on the server of storage in the local playlist information of obtaining and memory module 30, if different, the playlist information on server is turned back to this locality by communication module 10.When identical, return information not.If there is not playlist information on server, expression user operates and has deleted playlist information, deletes the playlist information of this ground.In one embodiment, processing module 20 can also judge by playlist information timestamp on more local playlist information timestamp and server, and whether both are identical.
In memory module 30, storage is the playlist information of server.In one embodiment, memory module 30 is also stored play content information.This play content information can be music Information on Collection or music box song information.This music Information on Collection comprises collection Basic Information Table, collection timestamp table and collection list of songs etc.In Information on Collection, store the song of music storehouse and steal chain song, the mode that song adopts type to add identification code identifies.In addition, in music Information on Collection, music number is a lot, can amplify granularity, and wherein each the favorites list is a data-base recording.This play content information also can be music box song information, and this music box song information comprises the staticize list information that is stored on server, music box total time stamp table and user operation records table.
In one embodiment, as shown in Figure 5, this server also comprises staticize module 40.Staticize module 40, for playlist information is processed according to the storage mode on server, generates the playlist information of staticize, then stores.Wherein, communication module 10 receives the request of uploading the local playlist information of user after client is modified, and this upload request is transferred to processing module 20.Processing module 20 is according to factors such as user behavior and servers, determine and receive upload request, start to receive amended local playlist information, and the advertised information that the amended local playlist information of transmission docking receipts is carried out staticize processing is to staticize module 40.The local playlist information that 40 pairs of staticize modules receive is processed the playlist information that generates staticize, and record generates the timestamp of the playlist information of staticize, and the playlist information of staticize generating and the update of time stamp of record, in memory module 30, and are transferred to processing module 20 by timestamp.Processing module on server 20 is transferred to local client by communication module 10 by timestamp like this, upgrades the timestamp of local playlist information, has realized like this server and has synchronizeed with local data.
In one embodiment, this server also comprises downloading service module and cache module (not shown).Downloading service module arrives this locality for the playlist information on Download Server and playlist information timestamp, also for downloading and playing content information, arrives local.Cache module is not for storing the playlist information of the staticize on the pending server of the playlist information of uploading of memory module 30 and/or processing module 20 into.Cache module, by by the playlist information of not processing in time of uploading, guarantees not losing of data.In addition, it is slower that processing module 20 is directly called the playlist information speed of staticize from memory module, by the playlist information of need staticize to be processed is temporarily stored in cache module, allow processing module 20 reading out data from cache module, speed is accelerated.
Above-mentioned playlist information synchronous method and for the synchronous server of playlist information, employing compares the playlist information on local playlist information and server, and according to comparative result, when both are different, upgrade local playlist information, realized the unrestricted playlist information of obtaining.
In addition, whether both are identical, simple and convenient to adopt timestamp comparison; Employing is uploaded onto the server after local playlist information is revised, and has guaranteed the real-time update of the playlist information on server; Playlist information on pending server is temporarily stored in buffer area, makes processing speed faster.
The above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.