Summary of the invention
The main technical problem to be solved in the present invention is, provides the method for data synchronization in a kind of interactive television and system, the data syn-chronization realized in interactive television that can be faster more stable.
For solving the problems of the technologies described above, present invention employs following technical scheme:
A method of data synchronization in interactive television, comprising:
Set up index server, on described index server, resource allocation provides the resource indexing information of equipment;
Resource indexing information described in synchronized update is changed according to the resource on described resource providing device.
In a kind of embodiment of the method for the invention, described resource indexing information comprises the resource index file of described resource providing device, or the index of the resource index file of described resource providing device.
In a kind of embodiment of the method for the invention, change resource indexing information described in synchronized update according to the resource on described resource providing device to comprise: resource index file and the monitoring own resource of resource providing device generating indexes own resource change, and upgrade described resource index file when resource changes and pass to described index server.
In a kind of embodiment of the method for the invention, when described resource change to resource content upgrade time, then again detect the resource that this carries out content update after delay predetermined time.
In a kind of embodiment of the method for the invention, described resource providing device comprises resource providing server and client node.
In a kind of embodiment of the method for the invention, described resource comprises electronic programming forms data.
Present invention provides the data synchronous system in a kind of interactive television, comprise: the index server being configured with the resource indexing information of resource providing device, described index server is for changing resource indexing information described in synchronized update according to the resource on described resource providing device.
In a kind of embodiment of system of the present invention, described resource providing device comprises resource providing server and client node.
Present invention also offers a kind of method utilizing above-mentioned data synchronous system to realize data syn-chronization, comprising:
Client is to index server request resource index information;
The resource providing device request resource at the resource indexing information place that client returns to index server.
In a kind of embodiment of said method, resource indexing information comprises the resource index file of described resource providing device, or the index of the resource index file of described resource providing device.
In a kind of embodiment of said method, the resource indexing information that client returns according to index server comprises to the resource providing device request resource of correspondence:
Client is to index server request resource index file;
The resource providing device request resource index file at the resource index file place that client returns to index server;
The resource index file that client returns according to described resource providing device, to resource providing device request resource.
The present invention provides the resource indexing information of equipment also can change synchronized update resource indexing information according to the resource of resource providing device by setting up index server with resource allocation, thus Resource Server can be utilized to obtain resource place fast, can sooner, the more stable data syn-chronization realized in interactive television.
Embodiment
By reference to the accompanying drawings the present invention is described in further detail below by embodiment.
Method of data synchronization in the IPTV of the embodiment of the present invention, mainly by setting up index server, on index server, resource allocation provides the resource indexing information of equipment; Then change resource indexing information described in synchronized update according to the resource on resource providing device.In embodiments of the present invention, resource providing device, not only comprises resource providing server, also comprises client node.Resource providing server and client node can be one or more.
Fig. 1 illustrates the data synchronous system built according to the method for data synchronization of the IPTV of the embodiment of the present invention, in Fig. 1, resource providing device is for resource providing server, resource providing server comprises management by synchronization server DTS_S_SM and content source server DTS_S_SP, index server DTS_S_RM, being used for resource allocation provides the resource indexing information of server (DTS_S_SM and DTS_S_SP).Client DTS_C is to index server DTS_S_RM request resource index information; And the resource providing device request resource at the resource indexing information place that backward index server returns.
Resource indexing information, in this example, comprises the resource index file of resource providing device, or the index of the resource index file of resource providing device.Namely can be that directly on index server, resource allocation provides the resource index file of equipment, also can the resource index file of each self-configuring of each resource providing device self, then, index server is set up the index of these resource index files.
When utilizing above-mentioned data synchronous system to carry out data syn-chronization, client sends content query requests to index server, request resource index information, index server response inquiry request, return the resource providing server and client node list with request content to client, client is to resource providing server or client node request media content.
It should be noted that, client and client node are in fact all clients, other clients outside the client of client node and request content, distinguish the two role with " client " and " client node " two concepts herein.At this, refer to the client of request content with " client ", refer to other clients that can provide resource to client with " client node ", namely client both can to resource providing server request resource, also can to client node request resource.
Be described for the resource index file of each self-configuring of resource providing device self below.In the example of fig. 1, resource providing server comprises management by synchronization server DTS_S_SM and content source server DTS_S_SP.Management by synchronization server DTS_S_SM is deployed on the valut of resource providing server, ensure that the file update (comprising file increase, file erase, up-to-date) on valut can detect in time, and generate the index file of current monitor catalogue, and then content of announcement source server DTS_S_SP.
Management by synchronization server DTS_S_SM comprises following functions:
When A, startup, scanning needs the catalogue of monitoring, index All Files information, generating indexes file.
B, monitoring assigned catalogue (such as utilizing the mechanism of (SuSE) Linux OS), when monitored catalogue generation file update, produce index upgrade signal.
C, index upgrade signal produce after, then start the scanning to respective directories, generate new index file.
D, comparison according to new and old index, judge file update (file increase, up-to-date, file erase etc.), be recorded in new index file.
When judging file update according to new and old index file, if there is up-to-date, or when having newly-increased file, need again to scan the catalogue occurring to upgrade, have the file of renewal for those, if be consistent when file size and last scanning, can judge that file does not upgrade for this reason, if file size changes, show that file content upgrades, then need delay predetermined time to rescan, so as to judge upgrade file whether update all completes.
Content source server DTS_S_SP resolves index file, and for the content in index file, notifies index server one by one, and on index server, set up the index of index file, and carries out the synchronized update of resource indexing information.
Resource providing device can to the segmentation of all content requests, and burst provides correct file content response, namely comprises providing index file, and providing each medium content file described in index file.
When there being new client terminal start-up, first logging in index server, registering, and reporting the state of self, resource information.To set up corresponding resource indexing information in index server, by index server unified management client, thus client can be carried out resource as client node and provided.Resource provides, mainly refer to as client provides the content file of the media content containing client-requested, client can obtain various content file from resource providing server or client node, if and the content file of resource providing server or client node there occurs renewal, also namely there occurs resource to change, then client also carries out the renewal of content file by logging in index server, client can first to index server request index file, after confirming that content file upgrades according to index file, ask the content file upgraded again, the main flow of client logs index server request content comprises:
A, client logs;
B, client are to the up-to-date index file of index server inquiry request;
C, index server return the resource providing server of the index file that existence is asked and the address list of client node to client;
D, client send request index messages to the resource providing server or client node that there is the index file of asking;
E, resource providing server or client node return the index file of request to client;
After F, client obtain index file, resolve index file.
G, client, according to index file, ask the content file upgraded.
Further comprising the steps in step G:
G1, client are to index server inquiry request content file;
G2, index server return the resource providing server of the content file that existence is asked or the address list of client node;
G3, client send request content-message to the resource providing server or client node that there is the content file of asking;
G4, resource providing server or client node return the content file of request to client.
As shown in Figure 2, resource providing server sets up the process of index on index server, and its detailed implementation step is as follows:
1, DTS_S_SM generating indexes file, when receiving file update signal, carries out index file renewal.
2, DTS_S_SM detects that file increases, and deletes or after content update, according to old index file, generates new file index list, and stored in new index file.
3, DTS_S_SM notifies that DTS_S_SP reaches the standard grade.
4, DTS_S_SP resolves the new index file generated in step 2, and verify the legitimacy of each file in index file, for each file wherein, send message to DTS_S_RM, each file in notice index file is reached the standard grade, and also namely illustrates that each file of index file index can provide service to index server.
5, index server DTS_S_RM receives the message that DTS_S_SP sends, in internal memory, set up index, can correctly return results during client-requested, returns acknowledge message to DTS_S_SP simultaneously.
6, the message comprising index file name is sent to index server DTS_S_RM by DTS_S_SP, and index server DTS_S_RM builds up index for index file.
7, similarly, for EPG, the placard of other resource providing devices, the information such as emergency data, adopt above-mentioned steps, build up index at index server DTS_S_RM.
After index server DTS_S_RM builds up index, the content file of index file index then can provide service to client, for resource providing server, its DTS_S_SP, when content file is distributed to client, provides the mode of data to be consistent with other client nodes.
The present invention by setting up index server, and correspondingly carries out the synchronized update of resource indexing information with the resource change of resource providing device, sooner, more stably can realize the data syn-chronization in IPTV.
Above content is in conjunction with concrete execution mode further description made for the present invention, can not assert that specific embodiment of the invention is confined to these explanations.For general technical staff of the technical field of the invention, without departing from the inventive concept of the premise, some simple deduction or replace can also be made, all should be considered as belonging to protection scope of the present invention.