Summary of the invention
The embodiment of the invention provides a kind of method of data synchronization, equipment and systems, to reduce the occupancy of network bandwidth.
In a first aspect, being applied to physical machine, for different type the embodiment of the invention provides a kind of method of data synchronization
Service the corresponding sampling period is respectively configured;The described method includes:
When reaching the target type service corresponding sampling period, the number transmitted needed for the target type service is acquired
According to;
The data of the required transmission are divided at least one data block;
Determine the first data block not being transmitted across at least one described data block, the second data having been transmitted through
Block, and determine the second data directory of the first data directory of first data block, second data block;
By first data block, first data directory and second data directory, it is sent to data center, with
The data center is set to store at least one described data block.
Preferably,
Before the data of the required transmission are divided at least one data block, further comprise: public using first
Formula computation partition length;
First formula includes:
Wherein, k (Si) for characterizing SiCorresponding partition length;SiI-th of the service provided for characterization platform;
period(si) for characterizing to SiThe sampling period of configuration;status(si) for characterizing siState change particle size;λ
It is known constant for indicating impact factor;Defatult_size is used for the default-length of characterize data block;
The data of the required transmission are divided at least one data block, comprising: the partition length is utilized, it will be required
The data of transmission are divided at least one described data block;
And/or
By first data block, first data directory and second data directory, it is sent to data center
Later, further comprise: each data block at least one described data block and at least one described data block is corresponding
Data directory be locally stored;
And/or
The first data block for not being transmitted across at least one data block described in the determination, second had been transmitted through
Data block, comprising:
Determine corresponding first check code of each data block in each data block being locally stored;
Calculate corresponding second check code of each data block at least one described data block;
According to second check code, first check code is traversed;Described the in first check code will be located at
The corresponding data block of two check codes is as second data block, second verification that will be not located in first check code
The corresponding data block of code is as first data block.
Preferably, corresponding second check code of each data block at least one data block described in the calculating, comprising:
Each data block pair at least one described data block is calculated using the second formula, third formula and the 4th formula
The second check code answered;
Second formula includes:
The third formula includes:
4th formula includes:
Adler32 (1, k)=A (1, k)+216B(1,k);
Wherein, Adler32 (1, k) is for characterizing the second check code;A (1, k) is for characterizing the first intermediate parameters, B (1, k)
For characterizing the second intermediate parameters;Data [j] is used to characterize the corresponding data of j-th of byte in current data block;M is used for table
Levy known constant;K is for characterizing the byte number that the current data block includes.
Second aspect, the embodiment of the invention also provides a kind of method of data synchronization, are applied to data center, comprising:
It is corresponding to obtain the first data block, first data block for target type service that present physical machine is sent
Corresponding second data directory of first data directory, the second data block;Wherein, first data block is the present physical machine
The data block not being transmitted across, second data block are the data block that the present physical machine has been transmitted through;
According to each third data block for including in the data copy being locally stored and each described third data block
Corresponding third data directory, and according to second data directory, determine second data block;
Store first data block and second data block.
Preferably, further comprise: to first data block and second data block of storage, carrying out following target
The data copy of quantity replicates:
Wherein, number, which is used to characterize, carries out data copy duplication to first data block and second data block
The destination number;Request_dead_lock is for characterizing multi-user's request to first data block and second number
The quantity of service block is caused according to the data contention of block;All_request is corresponding simultaneously for characterizing the target type service
Send out amount of access;A is known constant for characterizing scale factor;Init_size is used for the initialization quantity of characterize data copy.
The third aspect, the embodiment of the invention also provides a kind of physical machines, comprising:
Configuration unit, for the corresponding sampling period to be respectively configured for different types of service;
Acquisition unit, for acquiring the target type service when reaching the target type service corresponding sampling period
The data of required transmission;
Division unit, for the data of the required transmission to be divided at least one data block;
Determination unit, for determining the first data block not being transmitted across at least one described data block, having transmitted
The second data block crossed, and determine the second data of the first data directory of first data block, second data block
Index;
Transmission unit, for sending first data block, first data directory and second data directory
To data center, so that the data center stores at least one described data block.
Preferably,
Further comprise: computing unit, for utilizing the first formula computation partition length;
First formula includes:
Wherein, k (si) for characterizing siCorresponding partition length;siI-th of the service provided for characterization platform;
period(si) for characterizing to siThe sampling period of configuration;status(si) for characterizing siState change particle size;λ
It is known constant for indicating impact factor;Defatult_size is used for the default-length of characterize data block;
The division unit is specifically used for utilizing the partition length, by the data of required transmission be divided into it is described at least
One data block;
And/or
Further comprise: storage unit, at least one data block by described in and at least one described data block
The corresponding data directory of each data block is locally stored;
And/or
The determination unit, comprising:
Determining module, for determining corresponding first check code of each data block in each data block being locally stored;
Computing module, for calculating corresponding second check code of each data block at least one described data block;
Spider module, for traversing first check code according to second check code;First verification will be located at
The corresponding data block of second check code in code will be not located in first check code as second data block
The corresponding data block of second check code is as first data block.
Fourth aspect, the embodiment of the invention also provides a kind of data centers, comprising:
Acquiring unit, for obtain the transmission of present physical machine for target type service the first data block, described the
Corresponding first data directory of one data block, corresponding second data directory of the second data block;Wherein, first data block is
The data block that the present physical machine be not transmitted across, second data block are the number that the present physical machine has been transmitted through
According to block;
Determination unit, for according to each third data block for including in the data copy that is locally stored and each
The corresponding third data directory of the third data block, and according to second data directory, determine second data
Block;
Storage unit, for storing first data block and second data block.
Preferably, further comprise: copied cells, for first data block and second data to storage
Block carries out the data copy duplication of following destination number:
Wherein, number, which is used to characterize, carries out data copy duplication to first data block and second data block
The destination number;Request_dead_lock is for characterizing multi-user's request to first data block and second number
The quantity of service block is caused according to the data contention of block;All_request is corresponding simultaneously for characterizing the target type service
Send out amount of access;A is known constant for characterizing scale factor;Init_size is used for the initialization quantity of characterize data copy.
5th aspect, the embodiment of the invention also provides a kind of data synchronous systems, comprising: in data described above
The heart and at least one physical machine described above.
The embodiment of the invention provides a kind of method of data synchronization, equipment and systems, in the number of the required transmission to acquisition
When according to being transmitted, by being divided at least one data block to the data of required transmission, by least one data block not
Once the first data block being transmitted across and its first data directory, the corresponding second data rope of the second data block having been transmitted through
Draw, be transferred to data center, without transmitting the second data block, so as to reduce the data volume in transmission process, in turn
The occupancy of network bandwidth can be reduced.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art
Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, being applied to physical machine, for inhomogeneity the embodiment of the invention provides a kind of method of data synchronization
The corresponding sampling period is respectively configured in the service of type;This method may comprise steps of:
Step 101: when reaching the target type service corresponding sampling period, acquiring and passed needed for the target type service
Defeated data.
Some new datas may be generated at regular intervals in each physical machine, whenever these generate new datas it
Afterwards, it needs to store these data.Wherein, some data require real-time, some data do not want real-time
It asks, therefore, it is necessary to the real-times to data to judge.
In the present embodiment, can be respectively configured to different types of service the sampling period, to be directed to different types of clothes
Business carries out data acquisition and transmission, to realize the classification storage to service.
Step 102: the data of the required transmission are divided at least one data block.
In order to reduce the occupancy of network bandwidth, the data transmitted needed for needing are divided at least one data block.For example,
The data of required transmission are 1M, and the data of the required transmission can be divided into 10 data blocks.
Step 103: determining the first data block not being transmitted across at least one described data block, have been transmitted through
Second data block, and determine the second data directory of the first data directory of first data block, second data block.
In the present embodiment, the data block for being transferred to data center can be stored in physical machine.And pass through object
Each data block that reason machine was locally stored have been transmitted through determines which has been transmitted through at least one data block,
Which was not transmitted across.
Step 104: by first data block, first data directory and second data directory, being sent to number
According to center, so that the data center stores at least one described data block.
In order to reduce the occupancy of network bandwidth, the first data block not being transmitted across can be only transmitted, and for
The second data block being transmitted across can not have to transmission, and only corresponding second data directory of the second data block need to be transferred in data
The heart, thereby may be ensured that network occupancy compared with the existing technology reduces the network occupancy of the second data block.
According to above-described embodiment scheme, when the data of the required transmission to acquisition are transmitted, by required transmission
Data be divided at least one data block, the first data block and its first being not transmitted across at least one data block
Data directory, corresponding second data directory of the second data block having been transmitted through, are transferred to data center, without transmission
Second data block so as to reduce the data volume in transmission process, and then can reduce the occupancy of network bandwidth.
In an embodiment of the invention, the division of the data to required transmission can be realized in the following way: into one
Step includes: to utilize the first formula computation partition length;
First formula includes:
Wherein, k (si) for characterizing siCorresponding partition length;siI-th of the service provided for characterization platform;
period(si) for characterizing to siThe sampling period of configuration;status(si) for characterizing siState change particle size;λ
It is known constant for indicating impact factor;Defatult_size is used for the default-length of characterize data block;Wherein, in the clothes
In the case that the type of business determines, status (si) it is known parameter.Wherein, the setting of the defatult_size be in order to
Guarantee finally determining minimum default-length of partition length.
Wherein, which can be with byte number, for example, 10 bytes;It is also possible to specific space hold amount, example
Such as, 100KB.
The data of the required transmission are divided at least one data block, comprising: the partition length is utilized, it will be required
The data of transmission are divided at least one described data block.
For example, k (si) it is 10 bytes, the data of required transmission are 100 bytes, then can be by the required transmission
Data are divided into 10 data blocks, 10 bytes of each data block.
For another example, k (si) it is 10 bytes, the data of required transmission are 99 bytes, then can be by the required transmission
Data are divided into 10 data blocks, 10 bytes of each data block in preceding 9 data blocks, and last 1 data block is 9 words
Section.
In an embodiment of the invention, in first data block, first data directory and the second data rope
After data center is given in initiation, when in order to guarantee to carry out transmission of data blocks next time, it is possible to reduce the data number of blocks of transmission,
It can be sent to after data center by first data block, first data directory and second data directory,
Further comprise: by the corresponding number of each data block at least one described data block and at least one described data block
It is locally stored according to index.
In an embodiment of the invention, it can be determined as follows at least one described data block and not transmit
The first data block crossed, the second data block having been transmitted through, comprising:
Determine corresponding first check code of each data block in each data block being locally stored;
Calculate corresponding second check code of each data block at least one described data block;
According to second check code, first check code is traversed;Described the in first check code will be located at
The corresponding data block of two check codes is as second data block, second verification that will be not located in first check code
The corresponding data block of code is as first data block.
Wherein, the calculation of corresponding first check code of each data block in each data block being locally stored, with
The calculation of corresponding second check code of each data block is identical at least one data block.
For example, at least one data block includes 10 data blocks, it is respectively as follows: data block 1, data block 2, data block
3 ..., data block 10, corresponding second check code of each data block be respectively as follows: A1, A2, A3 ..., A10.Assuming that
It include the check code of A1, A2 and A3 in the first check code being locally stored, then data block 1, data block 2 and data can be determined
Block 3 is the data block having been transmitted through, data block 4, data block 5, data block 6 ... data block 10 is the number not being transmitted across
According to block.
In an embodiment of the invention, each data at least one data block can be calculated in the following way
Corresponding second check code of block, the technical approach may include:
Each data block pair at least one described data block is calculated using the second formula, third formula and the 4th formula
The second check code answered;
Second formula includes:
The third formula includes:
4th formula includes:
Adler32 (1, k)=A (1, k)+216B(1,k);
Wherein, Adler32 (1, k) is for characterizing the second check code;A (1, k) is for characterizing the first intermediate parameters, B (1, k)
For characterizing the second intermediate parameters;Data [j] is used to characterize the corresponding data of j-th of byte in current data block;M is used for table
Levy known constant;K is for characterizing the byte number that the current data block includes.
In the second check code being calculated according to above-mentioned calculation, if be calculated according to above-mentioned calculation
Two check codes are all different with the first check code being locally stored, then show different second check code corresponding second
Data block is not transmitted across centainly;If identical as the first check code being locally stored, show identical second check code pair
The second data block answered may have been transmitted through, it is also necessary to unique check value is utilized, for example, MD5 value, is further verified,
If identical using the further check results of MD5 value, show that corresponding second data block of second check code has been transmitted through, it is no
Then, it is not transmitted across.
In an embodiment of the invention, can also by directly by unique check value in a manner of calculate the second check code, with
Determine the first data block and the second data block.
Referring to FIG. 2, being applied to data center the embodiment of the invention also provides a kind of method of data synchronization, comprising:
Step 201: obtaining the first data block for target type service, first data that present physical machine is sent
Corresponding first data directory of block, corresponding second data directory of the second data block;Wherein, first data block is described works as
The data block that preceding physical machine be not transmitted across, second data block are the data block that the present physical machine has been transmitted through.
Step 202: according to each third data block for including in the data copy being locally stored and each described
The corresponding third data directory of three data blocks, and according to second data directory, determine second data block.
The data copy of each data block is locally stored in data center, wherein data copy is a kind of raising data visit
Ask the general technology of efficiency, Fault Tolerance, load balance ability.It not only include each third data block in data copy,
It further include the corresponding third data directory of each third data block, by being searched and the second data rope in third data directory
Draw identical data directory, and determine corresponding data block using the identical data directory, which is
The second data block having been transmitted through.
Step 203: storing first data block and second data block.
In the present embodiment, service S can also be setiThe threshold value of corresponding data volume, for example, the threshold value is 100, at this
When the data block number that service includes reaches 100, by the corresponding data block storage of the service into cloud storage.
Further, data center is arrived the data storage for needing real-time by judging demand of the data to real-time
In real-time data base, the data for not needing real-time are stored into common database.
In an embodiment of the invention, unreasonable due to the number of data copy, it is likely to result in the storage of platform
Pressure wastes a large amount of memory space, therefore, can be determined as follows the number of data copy, further comprise: is right
First data block and second data block of storage carry out the data copy duplication of following destination number:
Wherein, number, which is used to characterize, carries out data copy duplication to first data block and second data block
The destination number;Request_dead_lock is for characterizing multi-user's request to first data block and second number
The quantity of service block is caused according to the data contention of block;All_request is corresponding simultaneously for characterizing the target type service
Send out amount of access;A is known constant for characterizing scale factor;Init_size is used for the initialization quantity of characterize data copy.
Below by taking the platform for providing service is PAAS platform as an example, which includes at least a physical machine and data
Center is interacted between physical machine and data center by wherein one, detailed to carry out to the data synchronization process of realization
Illustrate, referring to FIG. 3, this method may comprise steps of:
Step 301: the corresponding sampling period is respectively configured for different types of service in physical machine.
Some new datas may be generated at regular intervals in each physical machine, whenever these generate new datas it
Afterwards, it needs to store these data.
Assuming that including 4 kinds of service types, these four service types are carried out with configuration as shown in table 1 below:
Table 1:
Service type |
Sampling period/time (s) |
Class1 |
60 |
Type 2 |
180 |
Type 3 |
300 |
Type 4 |
90 |
In the present embodiment, different acquisition units can be utilized respectively, respectively for aforementioned four type service into
The acquisition of row data, each acquisition unit, according to the sampling period configured in above-mentioned table 1, whenever the arrival corresponding sampling period
When, execute the acquisition to the respective type service data.
In the present embodiment, user also needs to register monitoring information to the Agent of data center, such as monitor control index, monitoring
Object, monitor mode etc..
In order to provide preferable scalability, the Agent in physical machine provides the mode of two kinds of extensions: the first is logical
The mode for crossing script calling transmits monitoring script to Agent by user, calls script to run monitoring module, acquisition clothes by Agent
Business status information.The second way is the API by calling Agent, is extended equally to it and can achieve acquisition service shape
The purpose of state information.
Step 302: when reaching the target type service corresponding sampling period, acquiring and passed needed for the target type service
Defeated data.
In the present embodiment, it may include more virtual machines in physical machine, Agent can be configured on each virtual machine
Acquisition and processing to data may be implemented in agency, Agent agency.
Step 303: according to service type computation partition length.
In the present embodiment, following formula (1) computation partition length can be passed through:
Wherein, k (si) for characterizing siCorresponding partition length;siI-th of the service provided for characterization platform;
period(si) for characterizing to siThe sampling period of configuration;status(si) for characterizing siState change particle size;λ
It is known constant for indicating impact factor;Defatult_size is used for the default-length of characterize data block.
Wherein, in the case where the type of the service determines, status (si) it is known parameter.
Wherein, the setting of the defatult_size is to guarantee that the minimum default of the partition length finally determined is long
Degree.For example, the smallest default length is 5 bytes.
Step 304: using the partition length calculated, the data of required transmission being divided into m data block.
Assuming that the m data block that the data transmitted needed for target type is serviced mark off is as follows:Wherein,
Step 305: obtaining each data block being locally stored.
The each data block and each data block pair of data center are had transmitted in being locally stored for physical machine
The data directory answered.
Step 306: determining corresponding first check code of each data block in each data block being locally stored.
Step 307: using the calculation of the first check code, calculating each data block in m data block corresponding the
Two check codes, and the first data block that do not transmitted in m data block and is determined according to the first check code and the second check code
The second data block through transmitting.
In the present embodiment, it in order to guarantee the consistency of check code, needs to count using the calculation of the first check code
Calculate the second check code.
Wherein, which can be the unique check value for directly calculating each data block, which can
Think MD5 value.For example, corresponding second check code of m data block are as follows: A1, A2, A3 ..., Am.What is be locally stored
It include: A1, A2 and A3 in first check code, then it is determined that data block 1, data block 2 and data block 3 are the data having been transmitted through
Block, by data block 1, data block 2 and data block 3 be used as the second data block, by data block 4, data block 5, data block 6 ..., number
According to block m as the first data block not being transmitted across.
Since the calculation of unique check value is complex, the used time is longer, therefore, can calculate in the following way
Two check codes:
In an embodiment of the invention, each data at least one data block can be calculated in the following way
Corresponding second check code of block, the calculation may include:
Corresponding second verification of each data block in m data block is calculated using formula (2), formula (3) and formula (4)
Code;
Adler32 (1, k)=A (1, k)+216B(1,k) (4)
Wherein, Adler32 (1, k) is for characterizing the second check code;A (1, k) is for characterizing the first intermediate parameters, B (1, k)
For characterizing the second intermediate parameters;Data [j] is used to characterize the corresponding data of j-th of byte in current data block;M is used for table
Levy known constant;K is for characterizing the byte number that the current data block includes.
In the second check code being calculated according to above-mentioned calculation, if be calculated according to above-mentioned calculation
Second check code is all different with the first check code being locally stored, then shows different second check code corresponding
Two data blocks are not transmitted across centainly;Assuming that corresponding second check code of m data block be respectively as follows: A1, A2, A3 ..., Am.
A1, A2, A3 are respectively positioned in the first check code being locally stored, then, A4, A5, A6 ..., Am be not transmitted across, can be by number
According to block 4, data block 5, data block 6 ..., data block m be determined as the second data block.
If identical as the first check code being locally stored, show corresponding second data block of identical second check code
It may have been transmitted through, it is also necessary to unique check value is utilized, for example, MD5 value, is further verified.To data block 1, data
Block 2 and the needs of data block 3 are further verified, and data block 1, data block 2 and the corresponding MD5 value of data block 3 are calculated, with
And the corresponding MD5 value of three data blocks that the first check code being locally stored is A1, A2 and A3 is calculated, if corresponding data
The MD5 value of block is identical, then shows that the data block has been transmitted through;Otherwise, which was not transmitted across.For example, A1, A2 and A3
It has been transmitted through, data block 1, data block 2 and data block 3 is determined as the first data block.
Step 308: determining corresponding first data directory of the first data block, and determine the second data block corresponding second
Data directory.
Wherein, first data directory needs are generated according to the first data block.
Second data directory can be determined according to the index being locally stored.
Step 309: by the first data block, the first data directory and the second data directory, being sent to data center, and by
One data block and the first data directory are locally stored.
In order to reduce the occupancy of network bandwidth, the first data block not being transmitted across can be only transmitted, and for
The second data block being transmitted across can not have to transmission, and only corresponding second data directory of the second data block need to be transferred in data
The heart, thereby may be ensured that network occupancy compared with the existing technology reduces the network occupancy of the second data block.
In the present embodiment, data center is sent in first data block, the first data directory and the second data directory
When later, in order to guarantee to carry out transmission of data blocks next time, it is possible to reduce the data number of blocks of transmission may further include:
The corresponding data directory of each data block in an at least data block and at least one data block is locally stored.
Wherein, the data of storage can also include the first data block and the corresponding timestamp of the second data block.
In the present embodiment, the first data block, the first data directory and the second data directory can also be compressed, and
Compressed data packet is sent to data center.
Step 310: data center using include in the data copy of storage each third data block, each third number
According to the corresponding third data directory of block, and according to the second data directory, determine the second data block.
Since the second data block has been transmitted across to data center, it is stored with the second data block in the data center
With the second data directory.
Wherein it is possible to obtain the second data block by data copy.
The data copy of each data block is locally stored in data center, wherein data copy is a kind of raising data visit
Ask the general technology of efficiency, Fault Tolerance, load balance ability.It not only include each third data block in data copy,
It further include the corresponding third data directory of each third data block, by being searched and the second data rope in third data directory
Draw identical data directory, and determine corresponding data block using the identical data directory, which is
The second data block having been transmitted through.
Step 311: according to threshold value corresponding to the service of the target type of setting, determining first data block and second
Whether the number of data block is greater than the threshold value, if more than, then by first data block and the storage of the second data block into cloud storage,
If being not more than, by first data block and the storage of the second data block into real-time data base.
Further, service S can also be setiThe threshold value of corresponding data volume, for example, the threshold value is 100, in the service
Including data block number reach 100 when, by the service corresponding data block storage into cloud storage.
Step 312: data copy duplication is carried out to the first data block and the second data block.
The number of data copy it is unreasonable, be likely to result in the storage pressure of platform, waste a large amount of memory space, because
This, can be determined as follows the number of data copy:
The quantity of the data copy can be determined by following formula (5):
Wherein, number, which is used to characterize, carries out data copy duplication to first data block and second data block
The destination number;Request_dead_lock is for characterizing multi-user's request to first data block and second number
The quantity of service block is caused according to the data contention of block;All_request is corresponding simultaneously for characterizing the target type service
Send out amount of access;A is known constant for characterizing scale factor;Init_size is used for the initialization quantity of characterize data copy.
Referring to FIG. 4, may include: the embodiment of the invention also provides a kind of physical machine
Configuration unit 401, for the corresponding sampling period to be respectively configured for different types of service;
Acquisition unit 402, for when reaching the target type service corresponding sampling period, acquiring the target type clothes
The data transmitted needed for business;
Division unit 403, for the data of the required transmission to be divided at least one data block;
Determination unit 404, for determining the first data block not being transmitted across at least one described data block, having passed
Second data block of defeated mistake, and determine the second number of the first data directory of first data block, second data block
According to index;
Transmission unit 405 is used for first data block, first data directory and second data directory,
It is sent to data center, so that the data center stores at least one described data block.
In an embodiment of the invention, it may further include: computing unit, for utilizing the first formula computation partition
Length;
First formula includes:
Wherein, k (si) for characterizing siCorresponding partition length;siI-th of the service provided for characterization platform;
period(si) for characterizing to siThe sampling period of configuration;status(si) for characterizing siState change particle size;λ
It is known constant for indicating impact factor;Defatult_size is used for the default-length of characterize data block;
The division unit is specifically used for utilizing the partition length, by the data of required transmission be divided into it is described at least
One data block;
In an embodiment of the invention, it may further include: storage unit, at least one data by described in
The corresponding data directory of each data block is locally stored in block and at least one described data block;
In an embodiment of the invention, the determination unit, comprising:
Determining module, for determining corresponding first check code of each data block in each data block being locally stored;
Computing module, for calculating corresponding second check code of each data block at least one described data block;
Spider module, for traversing first check code according to second check code;First verification will be located at
The corresponding data block of second check code in code will be not located in first check code as second data block
The corresponding data block of second check code is as first data block.
Referring to FIG. 5, may include: the embodiment of the invention also provides a kind of data center
Acquiring unit 501, for obtaining the first data block, described for target type service of present physical machine transmission
Corresponding first data directory of first data block, corresponding second data directory of the second data block;Wherein, first data block
For the data block that the present physical machine be not transmitted across, the second data block present physical machine is had been transmitted through
Data block;
Determination unit 502, for according to each third data block for including in the data copy that is locally stored and each
The corresponding third data directory of a third data block, and according to second data directory, determine second number
According to block;
Storage unit 503, for storing first data block and second data block.
In an embodiment of the invention, it may further include: copied cells, for first data to storage
Block and second data block carry out the data copy duplication of following destination number:
Wherein, number, which is used to characterize, carries out data copy duplication to first data block and second data block
The destination number;Request_dead_lock is for characterizing multi-user's request to first data block and second number
The quantity of service block is caused according to the data contention of block;All_request is corresponding simultaneously for characterizing the target type service
Send out amount of access;A is known constant for characterizing scale factor;Init_size is used for the initialization quantity of characterize data copy.
Referring to FIG. 6, may include: any of the above-described described the embodiment of the invention also provides a kind of data synchronous system
Data center 50 and at least one any of the above-described described physical machine 40.
In conclusion each embodiment of the present invention at least may be implemented it is following the utility model has the advantages that
1, in embodiments of the present invention, when the data of the required transmission to acquisition are transmitted, by required transmission
Data be divided at least one data block, the first data block and its first being not transmitted across at least one data block
Data directory, corresponding second data directory of the second data block having been transmitted through, are transferred to data center, without transmission
Second data block so as to reduce the data volume in transmission process, and then can reduce the occupancy of network bandwidth.
2, in embodiments of the present invention, the Agent agency in physical machine can provide flexible extension function, and user can be with
By way of Interface Expanding or script language calling, the data monitoring acquisition of Agent agency is dynamically extended.With
Family does not need to be modified entire plateform system because customizing service is introduced.
3, in embodiments of the present invention, service-oriented more copy data storage strategies are guaranteeing the visit of data real-time storage
On the basis of asking, the redundancy quantity of data copy is not only reduced, and improves the concurrently access degree of system.
The contents such as the information exchange between each unit, implementation procedure in above-mentioned apparatus, due to implementing with the method for the present invention
Example is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, and details are not described herein again.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity
Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation
Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non-
It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements,
It but also including other elements that are not explicitly listed, or further include for this process, method, article or equipment institute
Intrinsic element.In the absence of more restrictions, the element limited by sentence " including a 〃 ", not
There is also other identical factors in the process, method, article or apparatus that includes the element for exclusion.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light
In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention
Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention,
Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.