Summary of the invention
The present invention just is being based on the problems referred to above, has proposed a kind of new data synchronization technology, can keep in same system the data between each server synchronous.
In view of this, the present invention proposes a kind of data synchronous system, comprise management server and a plurality of mirror image server, also comprise: the first transmitting element, when the arbitrary mirror image server in described a plurality of mirror image servers receives user's data writing instruction, the data that the user write to described arbitrary mirror image server are sent to described management server; Interface is searched unit, controls described management server and according to pre-defined rule, described data is processed, and obtains the result data, controls the interface that described management server is searched other mirror image servers in described a plurality of mirror image server simultaneously; The second transmitting element, when finding the interface of described other mirror image servers, control the data template of described management server according to described other mirror image servers of storage, be the data that meet described other mirror image server call formats by the format conversion of result data, and be sent to described other mirror image servers by described interface.
In this technical scheme, data in can a plurality of mirror image servers that data format is different all send to management server, carry out format conversion by management server, and by Data dissemination to a plurality of mirror image servers, thereby keep the data between a plurality of mirror image servers synchronous.
In technique scheme, preferably, also comprise: template storage unit, according to the data format of each mirror image server in described a plurality of mirror image servers, generates the data template corresponding with described each mirror image server, and is stored.
In this technical scheme, because the form of the data of storing in each mirror image server is different, field is different, and valid data are different, therefore management server will be stored respectively the data template that each mirror image server is corresponding, then is the mirror image server distributing data according to corresponding data template.
In technique scheme, preferably, also comprise: the outcome record unit, record the transmission result of described management server.
In this technical scheme, when management server is the mirror image server distributing data, record successfully receives the mirror image server of these data, thereby make management server can clearly grasp the data message of storing in each mirror image server, thereby, when mirror image server is arranged to management server acquisition request data, can from the mirror image server of storing these data, get corresponding data.
In technique scheme, preferably, described interface is distributed to described a plurality of mirror image server by described management server.
In this technical scheme, mirror image server can be filed an application to management server, request registration is under management server, after management server receives and applies for and agree the application for registration of mirror image server, can be the mirror image server distribution interface, by the interface of distributing, receive from the data of mirror image server and distribute the data from other mirror image servers to mirror image server.
According to another aspect of the invention, a kind of method of data synchronization also is provided, be applied to data synchronous system, described data synchronous system comprises management server and a plurality of mirror image server, comprise: step 202, when the arbitrary mirror image server in described a plurality of mirror image servers receives user's data writing instruction, the data that the user write to described arbitrary mirror image server are sent to described management server; Step 204, control described management server and according to pre-defined rule, described data processed, and obtains the result data, controls the interface that described management server is searched other mirror image servers in described a plurality of mirror image server simultaneously; Step 206, when finding the interface of described other mirror image servers, control the data template of described management server according to described other mirror image servers of storage, be the data that meet described other mirror image server call formats by the format conversion of result data, and be sent to described other mirror image servers by described interface.
In this technical scheme, data in can a plurality of mirror image servers that data format is different all send to management server, carry out format conversion by management server, and by Data dissemination to a plurality of mirror image servers, thereby keep the data between a plurality of mirror image servers synchronous.
In technique scheme, preferably, described step 206 comprises: according to the data format of each mirror image server in described a plurality of mirror image servers, generate the data template corresponding with described each mirror image server, and stored.
In this technical scheme, because the form of the data of storing in each mirror image server is different, field is different, and valid data are different, therefore management server will be stored respectively the data template that each mirror image server is corresponding, then is the mirror image server distributing data according to corresponding data template.
In technique scheme, preferably, also comprise: step 208, record the transmission result of described management server.
In this technical scheme, when management server is the mirror image server distributing data, record successfully receives the mirror image server of these data, thereby make management server can clearly grasp the data message of storing in each mirror image server, thereby, when mirror image server is arranged to management server acquisition request data, can from the mirror image server of storing these data, get corresponding data.
In technique scheme, preferably, described interface is distributed to described a plurality of mirror image server by described management server.
In this technical scheme, mirror image server can be filed an application to management server, request registration is under management server, after management server receives and applies for and agree the application for registration of mirror image server, can be the mirror image server distribution interface, by the interface of distributing, receive from the data of mirror image server and distribute the data from other mirror image servers to mirror image server.
Embodiment
In order more clearly to understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, in the situation that do not conflict, the application's embodiment and the feature in embodiment can combine mutually.
A lot of details have been set forth in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not subject to the restriction of following public specific embodiment.
Fig. 1 shows the block diagram of data synchronous system according to an embodiment of the invention.
As shown in Figure 1, data synchronous system 100 according to an embodiment of the invention, described data synchronous system 100 comprises management server and a plurality of mirror image server, also comprise: the first transmitting element 102, when the arbitrary mirror image server in described a plurality of mirror image servers receives user's data writing instruction, the data that the user write to described arbitrary mirror image server are sent to described management server; Interface is searched unit 104, controls described management server and according to pre-defined rule, described data is processed, and obtains the result data, controls the interface that described management server is searched other mirror image servers in described a plurality of mirror image server simultaneously; The second transmitting element 106, when finding the interface of described other mirror image servers, control the data template of described management server according to described other mirror image servers of storage, be the data that meet described other mirror image server call formats by the format conversion of result data, and be sent to described other mirror image servers by described interface.
In this technical scheme, data in can a plurality of mirror image servers that data format is different all send to management server, carry out format conversion by management server, and by Data dissemination to a plurality of mirror image servers, thereby keep the data between a plurality of mirror image servers synchronous.
In technique scheme, preferably, also comprise: template storage unit 108, according to the data format of each mirror image server in described a plurality of mirror image servers, generates the data template corresponding with described each mirror image server, and is stored.
In this technical scheme, because the form of the data of storing in each mirror image server is different, field is different, and valid data are different, therefore management server will be stored respectively the data template that each mirror image server is corresponding, then is the mirror image server distributing data according to corresponding data template.
In technique scheme, preferably, also comprise: outcome record unit 110, record the transmission result of described management server.
In this technical scheme, when management server is the mirror image server distributing data, record successfully receives the mirror image server of these data, thereby make management server can clearly grasp the data message of storing in each mirror image server, thereby, when mirror image server is arranged to management server acquisition request data, can from the mirror image server of storing these data, get corresponding data.
In technique scheme, preferably, described interface is distributed to described a plurality of mirror image server by described management server.
In this technical scheme, mirror image server can be filed an application to management server, request registration is under management server, after management server receives and applies for and agree the application for registration of mirror image server, can be the mirror image server distribution interface, by the interface of distributing, receive from the data of mirror image server and distribute the data from other mirror image servers to mirror image server.
Fig. 2 shows the flow chart of method of data synchronization according to an embodiment of the invention.
As shown in Figure 2, method of data synchronization according to an embodiment of the invention, be applied to data synchronous system, comprise: step 202, when the arbitrary mirror image server in described a plurality of mirror image servers receives user's data writing instruction, the data that the user write to described arbitrary mirror image server are sent to described management server; Step 204, control described management server and according to pre-defined rule, described data processed, and obtains the result data, controls the interface that described management server is searched other mirror image servers in described a plurality of mirror image server simultaneously; Step 206, when finding the interface of described other mirror image servers, control the data template of described management server according to described other mirror image servers of storage, be the data that meet described other mirror image server call formats by the format conversion of result data, and be sent to described other mirror image servers by described interface.
In this technical scheme, data in can a plurality of mirror image servers that data format is different all send to management server, carry out format conversion by management server, and by Data dissemination to a plurality of mirror image servers, thereby keep the data between a plurality of mirror image servers synchronous.
In technique scheme, preferably, described step 206 comprises: according to the data format of each mirror image server in described a plurality of mirror image servers, generate the data template corresponding with described each mirror image server, and stored.
In this technical scheme, because the form of the data of storing in each mirror image server is different, field is different, and valid data are different, therefore management server will be stored respectively the data template that each mirror image server is corresponding, then is the mirror image server distributing data according to corresponding data template.
In technique scheme, preferably, also comprise: step 208, record the transmission result of described management server.
In this technical scheme, when management server is the mirror image server distributing data, record successfully receives the mirror image server of these data, thereby make management server can clearly grasp the data message of storing in each mirror image server, thereby, when mirror image server is arranged to management server acquisition request data, can from the mirror image server of storing these data, get corresponding data.
In technique scheme, preferably, described interface is distributed to described a plurality of mirror image server by described management server.
In this technical scheme, mirror image server can be filed an application to management server, request registration is under management server, after management server receives and applies for and agree the application for registration of mirror image server, can be the mirror image server distribution interface, by the interface of distributing, receive from the data of mirror image server and distribute the data from other mirror image servers to mirror image server.
Fig. 3 shows the schematic diagram of method of data synchronization according to an embodiment of the invention.
As shown in Figure 3, arbitrary mirror image server in a plurality of mirror image servers, such as mirror image server A, while receiving user's data writing instruction, the data that the user is write are sent to management server, management server is processed data according to pre-defined rule, obtain the result data, whether the interface of other mirror image servers is arranged in seeking system simultaneously, when finding the interface of other mirror image servers, such as mirror image server B and mirror image server C, according to the mirror image server B of storage and the data template of mirror image server C, by the format conversion of result data, be the data that meet mirror image server B and mirror image server C call format, and the data after conversion are sent in the database of its server by mirror image server B and mirror image server C interface, thereby realize mirror image server A, data between mirror image server B and mirror image server C are synchronous.Certainly, also there are other a plurality of mirror image servers in system, can complete according to top method the synchronous of data between a plurality of mirror image servers, and the data that are not limited only between mirror image server A, mirror image server B and mirror image server C are synchronous.
More than be described with reference to the accompanying drawings technical scheme of the present invention, by technical scheme of the present invention, when the form of each server stores data is different in system, also can have realized the synchronous of data between server.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.