Multi-stage data node updates synchro system and method
Technical field
The present invention relates to the data synchronization technology field, in particular to a kind of multi-stage data node updates synchro system and a kind of multi-stage data node updates synchronous method.
Background technology
The cloud storage is in cloud computing (cloud computing) conceptive extension and development new ideas out, refer to by functions such as cluster application, grid or distributed file systems, a large amount of various dissimilar memory devices in network are gathered to collaborative work by application software, a system of data storage and Operational Visit function externally is provided jointly.Wherein most important is exactly that by physical location, relatively near server provides the rapid data service by building the data image of multi-layer, and the problem of existence is exactly the problem such as synchronous of the consistency of Data Update in each mirror image server and renewal.
The data that multiple spot distributes are synchronous, particularly, in the situation of multistage distribution, the impact between data permission interacts, and makes the synchronous complexity of data between multistage node sharply increase, particularly, along with service needed increases service node dynamically, the system configuration difficulty increases.
The partial service system is under actual application environment, the operation of the overwhelming majority is completed by inquiry and read operation, and upgrade and newly-increased operation, be distributed in a sub-operation system, typically for example in the area medical information system, be in hospital, the operation system independent process business separately independently such as outpatient service, storehouse, medicament, but patient information need to be arrived by synchronous query.In mechanisms such as central hospital, general hospital, Community Health Stations, patient data just need to synchronously be processed, so that inquiry.
Existing medical information, need a large amount of data processing rule of customization meet above-mentioned requirements, and, for increasing, adjusting back end, need to carry out a large amount of configuration efforts to rule, complex disposal process and easily makeing mistakes.
Therefore, need a kind of new data synchronization technology, the patient data in a plurality of operation systems synchronously can be processed, and can be increased easily and adjust back end, be convenient to user's query calls.
Summary of the invention
The present invention just is being based on the problems referred to above, has proposed a kind of data synchronization technology, the patient data in a plurality of operation systems synchronously can be processed, and can be increased easily and adjust back end, is convenient to user's query calls.
In view of this, the present invention proposes a kind of multi-stage data node updates synchro system, comprise: volatile data base is set up unit, while for receiving at a plurality of mirror image servers, upgrading instruction, control described a plurality of mirror image server and set up respectively volatile data base, and the data of renewal are stored to volatile data base; Merge control unit, the mirror image server for control in same one-level is incited somebody to action respectively the data of volatile data base separately and is merged; Upgrade control unit, upgrade respectively the data of the database of the described mirror image server in same one-level for the data according to after merging, wherein, the described mirror image server in same one-level is the mirror image server with common father node, or there is no the mirror image server of father node; Whether judging unit, exist father node for judging the described mirror image server in same one-level, if exist, by the transfer of data after described merging to mirror image server corresponding to described father node.
In this technical scheme, mirror image server can generate temporary library by the data after upgrading, and the data in the database of mirror image server at the same level can be merged after contrast, again the data (being the data of update all) after merging are committed to superior node, thereby realize the data synchronization updating between the multi-stage data node, in multilevel hierarchy data management zoneization information system application, can improve the data aggregate speed, reduce operand, and can shorten synchronizing cycle, upgrade and synchronous speed thereby improve the area medical information patient information.After the merging of data, the data after merging can be kept to mirror image server, and volatile data base is deleted in completing volatile data base.
In technique scheme, preferably, also comprise: the history data store unit is stored to respectively in corresponding historical data base for the data of the database by described a plurality of mirror image servers.
In this technical scheme, be stored to historical data base by the data by the mirror image server database, the user can inquire about required historical data in historical data base, has avoided the historical data in the data updating process to lose.
In technique scheme, preferably, also comprise: the edition data setting unit, the number of times be updated for the data according to described database arranges edition data, and described edition data and the data in corresponding historical data base are carried out to association store; Query unit, for when receiving the historical query instruction, determine corresponding historical data base according to the edition data in described historical query instruction.
In this technical scheme, when the data by the mirror image server database are stored to historical data base, the data that can also be storage according to update times arrange corresponding version, are convenient to the user according to the corresponding historical data of version querying.
In technique scheme, preferably, described merging control unit is for controlling the described mirror image server in same one-level, each mirror image server obtains respectively the data template in other mirror image servers, and according to described each mirror image server the described data template of Data Update in corresponding volatile data base; Described renewal control unit upgrades respectively volatile data base separately for controlling described other servers according to data template after upgrading.
In this technical scheme, because the data structure of storing in each mirror image server is not identical, i.e. data template difference, such as outpatient service HIS(hospital information system) patient information of mirror image server storage is " name: Zhang San; Sex: man; Age: 30 ", the patient information of storing with its mirror image server of admissions office in same one-level is " name: Zhang San; Sex: man; Birthday: 1982.09.28 ", outpatient service HIS mirror image server can obtain the data template of admissions office's mirror image server so, by the information updating in this template, is then " name: Zhang San; Sex: man; Age: 30; Birthday: 1982.09.28 ", and be sent to the in-patient service device, the in-patient service device upgrades the volatile data base of oneself according to the data template after upgrading, and then completes the renewal with the database of the mirror image server of outpatient service HIS mirror image server peer.
In technique scheme, preferably, also comprise: data delete unit, the data that are complementary for deleting volatile data base that described each server is corresponding and described data template.
In this technical scheme, in volatile data base, only retain the data of upgrading, the data identical with available data can be deleted.
According to another aspect of the invention, also proposed a kind of multi-stage data node updates synchronous method, having comprised: step 202, when a plurality of mirror image servers receive the renewal instruction, control described a plurality of mirror image server and set up respectively volatile data base, and the data of renewal are stored to volatile data base; Step 204, the mirror image server of control in same one-level respectively will be separately data in volatile data base merged, and upgrade respectively the data in the database of the described mirror image server in same one-level according to the data after merging, wherein, the described mirror image server in same one-level is the mirror image server with common father node, or there is no the mirror image server of father node; Step 206, judge whether the described mirror image server in same one-level exists father node, if exist, by the transfer of data after described merging to mirror image server corresponding to described father node.
In this technical scheme, mirror image server can generate temporary library by the data after upgrading, and the data in the database of mirror image server at the same level can be merged after contrast, again the data (being the data of update all) after merging are committed to superior node, thereby realize the data synchronization updating between the multi-stage data node, in multilevel hierarchy data management zoneization information system application, can improve the data aggregate speed, reduce operand, and can shorten synchronizing cycle, upgrade and synchronous speed thereby improve the area medical information patient information.After the merging of data, the data after merging can be kept to mirror image server, and volatile data base is deleted in completing volatile data base.
In technique scheme, preferably, described step 202 also comprises: the data in the database of described a plurality of mirror image servers are stored to respectively in corresponding historical data base.
In this technical scheme, be stored to historical data base by the data by the mirror image server database, the user can inquire about required historical data in historical data base, has avoided the historical data in the data updating process to lose.
In technique scheme, preferably, also comprise: the number of times be updated according to the data in described database arranges edition data, and described edition data and the data in corresponding historical data base are carried out to association store, when receiving the historical query instruction, according to the edition data in described historical query instruction, determine corresponding historical data base.
In this technical scheme, when the data by the mirror image server database are stored to historical data base, the data that can also be storage according to update times arrange corresponding version, are convenient to the user according to the corresponding historical data of version querying.
In technique scheme, preferably, described step 204 comprises: in the described mirror image server in same one-level, each mirror image server obtains respectively the data template in other mirror image servers, and according to described each mirror image server the described data template of Data Update in corresponding volatile data base, described other servers upgrade respectively volatile data base separately according to data template after upgrading.
In this technical scheme, because the data structure of storing in each mirror image server is not identical, i.e. data template difference, such as outpatient service HIS(hospital information system) patient information of mirror image server storage is " name: Zhang San; Sex: man; Age: 30 ", the patient information of storing with its mirror image server of admissions office in same one-level is " name: Zhang San; Sex: man; Birthday: 1982.09.28 ", outpatient service HIS mirror image server can obtain the data template of admissions office's mirror image server so, by the information updating in this template, is then " name: Zhang San; Sex: man; Age: 30; Birthday: 1982.09.28 ", and be sent to the in-patient service device, the in-patient service device upgrades the volatile data base of oneself according to the data template after upgrading, and then completes the renewal with the database of the mirror image server of outpatient service HIS mirror image server peer.
In technique scheme, preferably, described step 204 also comprises: delete the data that are complementary with described data template in the volatile data base that described each server is corresponding.
In this technical scheme, in volatile data base, only retain the data of upgrading, the data identical with available data can be deleted.
By above technical scheme, the patient data in a plurality of operation systems synchronously can be processed, and can be increased easily and adjust back end, be convenient to user's query calls.
The accompanying drawing explanation
Fig. 1 shows the block diagram of multi-stage data node updates synchro system according to an embodiment of the invention.
Fig. 2 shows the flow chart of multi-stage data node updates synchronous method according to an embodiment of the invention.
Fig. 3 shows the particular flow sheet of multi-stage data node updates synchronous method according to an embodiment of the invention.
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 multi-stage data node updates synchro system according to an embodiment of the invention.
As shown in Figure 1, multi-stage data node updates synchro system 100 comprises according to an embodiment of the invention: volatile data base is set up unit 102, while for receiving at a plurality of mirror image servers, upgrading instruction, control a plurality of mirror image servers and set up respectively volatile data base, and the data of renewal are stored to volatile data base; Merge control unit 104, the mirror image server for control in same one-level is incited somebody to action respectively the data of volatile data base separately and is merged; Upgrade control unit 106, upgrade respectively the data of the database of the mirror image server in same one-level for the data according to after merging, wherein, the mirror image server in same one-level is the mirror image server with common father node, or there is no the mirror image server of father node; Judging unit 108, whether the mirror image server for judgement in same one-level exists father node, if exist, the transfer of data after merging is to mirror image server corresponding to father node.
Mirror image server can generate temporary library by the data after upgrading, and the data in the database of mirror image server at the same level can be merged after contrast, again the data (being the data of update all) after merging are committed to superior node, thereby realize the data synchronization updating between the multi-stage data node, in multilevel hierarchy data management zoneization information system application, can improve the data aggregate speed, reduce operand, and can shorten synchronizing cycle, upgrade and synchronous speed thereby improve the area medical information patient information.After the merging of data, the data after merging can be kept to mirror image server, and volatile data base is deleted in completing volatile data base.
Preferably, multi-stage data node updates synchro system 100 also comprises according to an embodiment of the invention: history data store unit 110 is stored to respectively in corresponding historical data base for the data of the database by a plurality of mirror image servers.
Be stored to historical data base by the data by the mirror image server database, the user can inquire about required historical data in historical data base, has avoided the historical data in the data updating process to lose.
Preferably, multi-stage data node updates synchro system 100 also comprises according to an embodiment of the invention: edition data setting unit 112, the number of times be updated for the data according to database arranges edition data, and edition data and the data in corresponding historical data base are carried out to association store; Query unit 114, for when receiving the historical query instruction, determine corresponding historical data base according to the edition data in the historical query instruction.
When the data by the mirror image server database are stored to historical data base, the data that can also be storage according to update times arrange corresponding version, are convenient to the user according to the corresponding historical data of version querying.
Preferably, merge control unit 104 for controlling the mirror image server in same one-level, each mirror image server obtains respectively the data template in other mirror image servers, and according to each mirror image server the Data Update data template in corresponding volatile data base; Upgrade control unit 106 and upgrade respectively volatile data base separately for controlling other servers according to data template after upgrading.
Because the data structure of storing in each mirror image server is not identical, i.e. data template difference, such as outpatient service HIS(hospital information system) patient information of mirror image server storage is " name: Zhang San; Sex: man; Age: 30 ", the patient information of storing with its mirror image server of admissions office in same one-level is " name: Zhang San; Sex: man; Birthday: 1982.09.28 ", outpatient service HIS mirror image server can obtain the data template of admissions office's mirror image server so, by the information updating in this template, is then " name: Zhang San; Sex: man; Age: 30; Birthday: 1982.09.28 ", and be sent to the in-patient service device, the in-patient service device upgrades the volatile data base of oneself according to the data template after upgrading, and then completes the renewal with the database of the mirror image server of outpatient service HIS mirror image server peer.
Preferably, multi-stage data node updates synchro system 100 also comprises according to an embodiment of the invention: data delete unit 116, the data that are complementary for deleting volatile data base that each server is corresponding and data template.
In volatile data base, only retain the data of upgrading, the data identical with available data can be deleted.
Fig. 2 shows the flow chart of multi-stage data node updates synchronous method according to an embodiment of the invention.
As shown in Figure 2, multi-stage data node updates synchronous method comprises according to an embodiment of the invention: step 202, when a plurality of mirror image servers receive the renewal instruction, control a plurality of mirror image servers and set up respectively volatile data base, and the data of renewal are stored to volatile data base; Step 204, the mirror image server of control in same one-level respectively will be separately data in volatile data base merged, and upgrade respectively the data in the database of the mirror image server in same one-level according to the data after merging, wherein, mirror image server in same one-level is the mirror image server with common father node, or there is no the mirror image server of father node; Step 206, whether the mirror image server of judgement in same one-level exists father node, if exist, the transfer of data after merging is to mirror image server corresponding to father node.
Mirror image server can generate temporary library by the data after upgrading, and the data in the database of mirror image server at the same level can be merged after contrast, again the data (being the data of update all) after merging are committed to superior node, thereby realize the data synchronization updating between the multi-stage data node, in multilevel hierarchy data management zoneization information system application, can improve the data aggregate speed, reduce operand, and can shorten synchronizing cycle, upgrade and synchronous speed thereby improve the area medical information patient information.After the merging of data, the data after merging can be kept to mirror image server, and volatile data base is deleted in completing volatile data base.
Preferably, step 202 also comprises: the data in the database of a plurality of mirror image servers are stored to respectively in corresponding historical data base.
Be stored to historical data base by the data by the mirror image server database, the user can inquire about required historical data in historical data base, has avoided the historical data in the data updating process to lose.
Preferably, multi-stage data node updates synchronous method also comprises according to an embodiment of the invention: the number of times be updated according to the data in database arranges edition data, and edition data and the data in corresponding historical data base are carried out to association store, when receiving the historical query instruction, according to the edition data in the historical query instruction, determine corresponding historical data base.
When the data by the mirror image server database are stored to historical data base, the data that can also be storage according to update times arrange corresponding version, are convenient to the user according to the corresponding historical data of version querying.
Preferably, step 204 comprises: in the mirror image server in same one-level, each mirror image server obtains respectively the data template in other mirror image servers, and according to each mirror image server the Data Update data template in corresponding volatile data base, other servers upgrade respectively volatile data base separately according to data template after upgrading.
Because the data structure of storing in each mirror image server is not identical, i.e. data template difference, such as outpatient service HIS(hospital information system) patient information of mirror image server storage is " name: Zhang San; Sex: man; Age: 30 ", the patient information of storing with its mirror image server of admissions office in same one-level is " name: Zhang San; Sex: man; Birthday: 1982.09.28 ", outpatient service HIS mirror image server can obtain the data template of admissions office's mirror image server so, by the information updating in this template, is then " name: Zhang San; Sex: man; Age: 30; Birthday: 1982.09.28 ", and be sent to the in-patient service device, the in-patient service device upgrades the volatile data base of oneself according to the data template after upgrading, and then completes the renewal with the database of the mirror image server of outpatient service HIS mirror image server peer.
Preferably, step 204 also comprises: delete the data that are complementary with data template in the volatile data base that each server is corresponding.
In volatile data base, only retain the data of upgrading, the data identical with available data can be deleted.
Fig. 3 shows the particular flow sheet of multi-stage data node updates synchronous method according to an embodiment of the invention.
As shown in Figure 3, multi-stage data node updates synchronous method specifically comprises according to an embodiment of the invention:
Step 302, according to the Data Update synchronic command received, trigger data is synchronous;
Step 304, obtain the information that every one-level needs synchronous node;
Step 306, carry out data with the volatile data base of specified node and synchronize;
Step 308, whether judgement is disposed with the node of one-level, if untreated complete, returns to step 304;
Step 310, if processed complete with the node of one-level, further judge whether convenient each node again, if need, returns to step 304;
Step 312, if do not need traversal, arrange renewal and identify with EOS;
Step 314, according to the data of upgrading complete to data in the synchronous and volatile data base of data in the database of each node synchronously.
More than be described with reference to the accompanying drawings technical scheme of the present invention, consider in correlation technique, for multistage data, distribute, the system configuration difficulty is larger, existing medical information, need a large amount of data processing rule of customization to meet the demands, and for increasing, adjust back end, need to carry out a large amount of configuration efforts to rule, complex disposal process and easily makeing mistakes.By technical scheme of the present invention, patient data in a plurality of operation systems synchronously can be processed, and can increase easily and adjust back end, improve the data aggregate speed, reduce operand, and can shorten synchronizing cycle, upgrade and synchronous speed thereby improve the area medical information patient information, be convenient to user's query calls.
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.