CN103440182A - Adaptive allocation method and device and adaptive replica consistency method - Google Patents

Adaptive allocation method and device and adaptive replica consistency method Download PDF

Info

Publication number
CN103440182A
CN103440182A CN2013104146258A CN201310414625A CN103440182A CN 103440182 A CN103440182 A CN 103440182A CN 2013104146258 A CN2013104146258 A CN 2013104146258A CN 201310414625 A CN201310414625 A CN 201310414625A CN 103440182 A CN103440182 A CN 103440182A
Authority
CN
China
Prior art keywords
file
allocated
copy
temperature
time point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013104146258A
Other languages
Chinese (zh)
Inventor
任涛
陈蜀宇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chongqing University
Original Assignee
Chongqing University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chongqing University filed Critical Chongqing University
Priority to CN2013104146258A priority Critical patent/CN103440182A/en
Publication of CN103440182A publication Critical patent/CN103440182A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention provides an adaptive allocation method and device and an adaptive replica consistency method. According to the adaptive allocation method, file heat of a file to be allocated at each time point can be calculated in real time, and the file heat degree value and a preset threshold at each time point can be judged; if the file heat degree value is larger than the threshold, the frequency, which is accessed by a user, of the file to be allocated is high, and in order to guarantee the user access efficiency, a replica strong consistency algorithm is allocated for the file to be allocated; if the file heat is smaller than the threshold, the frequency, which is accessed by the user, of the file to be allocated is low, and in order to avoid the waste of system resources, a replica eventual consistency algorithm is allocated for the file to be allocated. The aims of adaptively allocating proper replica consistency algorithms for different files, saving the network bandwidth and improving the overall performance can be fulfilled, and the problems that the system resources are wasted or the user access efficiency is low because only one replica consistency algorithm is used in all the files in the conventional distributed system are solved.

Description

Self-adapting distribution method and device, self-adaptation copy consistency method
Technical field
The present invention relates to the distributed system field, relate in particular to a kind of self-adapting distribution method and device, self-adaptation copy consistency method.
Background technology
The numerous file of kind is arranged in distributed system, file comprises the various data of user's needs, the user can access or revised file in needs, so that file can adapt to user's needs, in use for the reliability that guarantees file and the fast access of file, can store several parts of backup files with a file, backup file is called the copy of original in distributed system, after original is damaged, the user can also access copy, thereby has guaranteed that the data in the original can not lose.
When the user upgrades original, the user only can upgrade original, in order to make copy and original, is consistent, and in distributed system, adopts copy strong consistency algorithm and copy final consistency algorithm that original and copy are consistent.Below introduce in detail above-mentioned two kinds of methods: copy strong consistency algorithm is for when original is updated, and copies all in system upgrade by network simultaneously, and in system, all copies of original are all consistent; Copy final consistency algorithm does not need all copies of original to be consistent, and when having access to certain copy, this copy just carries out corresponding renewal.
Although copy strong consistency algorithm can make the user access during copy fast access to latest data, but can consume a large amount of network bandwidth resources because upgrade frequently, although final consistency has reduced the consumption of the network bandwidth, increased the delay of access, reduce access efficiency.Therefore two copy consistency algorithms cut both ways.
Only be provided with a kind of copy consistency algorithm in distributed system, i.e. copy strong consistency algorithm or final consistency algorithm.If in distributed system be copy strong consistency algorithm, system all can be carried out copy strong consistency algorithm for all file updates so, access less file for the user, carry out the strong consistency algorithm and can waste system resource, if in system be the final consistency algorithm, access more file for the user, can cause the access efficiency of file to reduce.
Therefore, in distributed system, be the different suitable copy consistency algorithms of file allocation, improve again overall performance in order to save the network bandwidth, be to need now the problem solved.
Summary of the invention
The invention provides a kind of self-adapting distribution method and device, self-adaptation copy consistency method, can be embodied as the suitable copy consistency algorithm of the adaptive distribution of different files in self-adapting distribution method, and can not only save the network bandwidth but also improve overall performance.
In order to realize above purpose, the invention provides following technology contents:
A kind of self-adapting distribution method comprises:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, it within described i the time interval, is described file allocation copy final consistency algorithm to be allocated.
Preferably, file temperature during i time point of described calculating file to be allocated comprises:
Calculate the interval temperature in i-1 the time interval, described i-1 the time interval is the time period between i-1 time point and i time point;
File temperature when the interval temperature in the file temperature during by i-1 time point and described i-1 the time interval builds i time point of described file to be allocated.
Preferably, the interval temperature in described i-1 the time interval of calculating comprises:
Within i-1 the time interval, utilize i time point and user's access time difference, be less than 1 the each access temperature of accessing described file to be allocated of exponential function calculating user by the truth of a matter;
Within i-1 the time interval, the access temperature of the described file to be allocated of the each access of user is superposeed, obtained the interval temperature in i-1 the time interval.
Preferably, the interval temperature in described i-1 the time interval of calculating comprises:
F ( k ) = ( 1 p ) t i - t ( i - 1 ) k ;
S i - 1 = Σ k = 1 N F ( k ) ;
Wherein, the access temperature that function F (k) is the k time described file to be allocated of access of user;
Function S i-1for described file to be allocated in the interval in i-1 time interval temperature;
T ibe i time point;
T (i-1) ktime point for user's the k time described file to be allocated of access within i-1 the time interval;
P is natural number and P >=2.
Preferably, file temperature during i time point of described calculating file to be allocated comprises:
H i(f)=ωS i-1+(1-ω)H i-1(f),H 0(f)=0
Wherein, H i(f) the file temperature while being i time point of described file to be allocated;
H i-1(f) the file temperature while being i-1 time point of described file to be allocated;
ω is for meaning the interval temperature S in the i-1 time interval i-1at H i(f) shared weight in calculating.
Preferably, file temperature during i time point of described calculating file to be allocated comprises:
Adopt the user to access the number of times of described file to be allocated before i time point, the file temperature while building i time point of described file to be allocated.
A kind of self-adaptation copy consistency algorithm, be applied to the copy consistency system, described system comprises: centralized control unit, for receiving the request of user writable file, a plurality of file units that are associated with described centralized control unit, described file unit comprises primary copy, for keeping synchronizeing with original, with described primary copy, be associated from copy, comprising:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, within described i the time interval, be described file allocation copy final consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy final consistency algorithm;
Receive user's request of access within i the time interval;
The type of judgement user's access copy;
If primary copy is directly accessed primary copy;
If from copy, judge the copy consistency agreement of described file to be allocated;
If copy strong consistency algorithm, directly access is described from copy;
If copy final consistency algorithm is described after copy according to the primary copy renewal, access described from copy.
Preferably, be applied to the copy consistency system, described system comprises: centralized control unit, for receiving the request of user writable file, a plurality of file units that are associated with described centralized control unit, described file unit comprises primary copy, for keeping synchronizeing with original, with described primary copy, be associated from copy, comprising:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, within described i the time interval, be described file allocation copy final consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy final consistency algorithm;
Receive user's update request within i the time interval;
Judge the copy consistency agreement of described file to be allocated;
If copy strong consistency algorithm, directly upgrade primary copy and all from copy;
If copy final consistency algorithm, upgrade primary copy.
A kind of self-adaptation distributor comprises:
Computing unit, the file temperature when calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Whether judging unit, be greater than predetermined threshold value for judging described file temperature;
The first allocation units, if be greater than described predetermined threshold value for described file temperature, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
The second allocation units, if be less than described predetermined threshold value for described file temperature, are described file allocation copy final consistency algorithm to be allocated within described i the time interval.
The invention provides a kind of self-adapting distribution method, calculate in real time in the method the file temperature of each time point of file to be allocated, and the size of file temperature and predetermined threshold value while judging each time point, mean that file to be allocated frequency accessed by the user is high if be greater than threshold value, for the efficiency that guarantees that the user accesses, it is file allocation copy strong consistency algorithm to be allocated, mean that file to be allocated frequency accessed by the user is low if be less than threshold value, in order not waste system resource, it is file allocation copy final consistency algorithm to be allocated.
Self-adapting distribution method provided by the invention, file temperature during i time point of calculating that can be real-time, and the file temperature during by i time point predicts i the file temperature in the time interval, in order to be the copy consistency algorithm that file allocation is suitable within i the time interval.The present invention can be real-time the file temperature that calculates file to be allocated, according to current file temperature to be allocated in file temperature prediction future, and real-time be the copy consistency algorithm that file allocation to be allocated is suitable, the present invention can be embodied as the purpose of the suitable copy consistency algorithm of the adaptive distribution of different files, and can not only save the network bandwidth but also improve overall performance, solved files all in existing distributed system and can only use a kind of copy consistency algorithm, the system resource waste caused or the low problem of user's access efficiency.
The accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, below will the accompanying drawing of required use in embodiment or description of the Prior Art be briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
The process flow diagram that Fig. 1 is the disclosed self-adapting distribution method of the embodiment of the present invention;
Fig. 2 is time point schematic diagram in the disclosed self-adapting distribution method of the embodiment of the present invention;
The process flow diagram that Fig. 3 is the disclosed another self-adapting distribution method of the embodiment of the present invention;
Fig. 4 calculates the process flow diagram of the file temperature of i time point in the disclosed self-adapting distribution method of the embodiment of the present invention;
The structural representation that Fig. 5 is the disclosed self-adaptation distributor of the embodiment of the present invention;
The structural representation that Fig. 6 is the disclosed copy consistency system of the embodiment of the present invention;
The structural representation that Fig. 7 is the disclosed another copy consistency system of the embodiment of the present invention;
The process flow diagram that Fig. 8 is the disclosed self-adaptation copy consistency of embodiment of the present invention algorithm;
The process flow diagram that Fig. 9 is the disclosed another self-adaptation copy consistency algorithm of the embodiment of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
As shown in Figure 1, the invention provides a kind of embodiment of self-adapting distribution method, comprising:
Self-adapting distribution method provided by the invention, be applied to the centralized control unit in existing distributed system, centralized control unit is the distributed system core, is used to the distribution copy consistency algorithm of file to be allocated, and receives user's request of access or update request.
Step S101: the file temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the access situation of described file to be allocated;
In distributed system, under ideal situation, should be: accessing for the user file to be allocated that temperature is high be that the file to be allocated that the file temperature is high should distribute copy strong consistency algorithm, can improve user's access efficiency like this, accessing lower grade file to be allocated for the user is that the lower grade file to be allocated of file should distribute copy final consistency algorithm, can reduce like this waste of system resource.
But because the height of file to be allocated temperature accessed by the user is not unalterable, be that the file temperature of file temperature to be allocated in distributed system is not changeless, it can change with user's demand, if within a period of time, the user needs constantly access file to be allocated, within this time period, the file temperature of file to be allocated is high, in a period of time after having accessed file to be allocated, do not need to access file to be allocated, within this period, file temperature to be allocated is low, the real-time calculating file to be allocated of the present invention is by user's access situation, it is the temperature of file to be allocated.
For the temperature of real-time calculation document, the present invention will the time be divided into different time points by certain time interval, and as shown in Figure 2, the present embodiment be take time interval τ as example, will be divided into the 0th time point t the time 0, the 1st time point t 1, the 2nd time point t 2... i-1 time point t i-1, i time point t i, i+1 time point t i+1..., the 0th time point t 0with the 1st time point t 1between be the 0th time interval, the 1st time point t 1with the 2nd time point t 2between be the 1st time interval ... the like, i-1 time point t i-1with i time point t ibetween be i-1 the time interval, i time point t iwith i+1 time point t i+1between be i the time interval.
File temperature when the present invention adopts centralized control unit to calculate i time point of file to be allocated, after calculating the file temperature of file to be allocated, enter step S102.
Step S102: judge whether described file temperature is greater than predetermined threshold value;
The file temperature of centralized control unit during by i time point and the size of predetermined threshold value are contrasted, if file temperature during i time point is greater than predetermined threshold value, mean that the current file temperature of file to be allocated is higher, frequency accessed by the user is higher, enters step S103; If file temperature during i time point is less than predetermined threshold value, mean that the current file temperature of file to be allocated is lower, frequency accessed by the user is lower, enters step S104.
Step S103: be described file allocation copy strong consistency algorithm to be allocated within i the time interval;
If described file temperature is greater than described predetermined threshold value, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
If the file temperature of file to be allocated when i time point is higher, predict that the file temperature of file to be allocated within i the time interval in future is also higher, therefore in order not affect the access efficiency of user within i the time interval, within i the time interval, be therefore file allocation copy strong consistency algorithm to be allocated.
Step S104: be described file allocation copy final consistency algorithm to be allocated within described i the time interval;
If described file temperature is less than described predetermined threshold value, it within described i the time interval, is described file allocation copy final consistency algorithm to be allocated.If the file temperature of file to be allocated when i time point is lower, predict that the file temperature of file to be allocated within i the time interval in future is also lower, therefore in order not waste the Internet resources of system, within i the time interval, be therefore file allocation copy final consistency algorithm to be allocated.
The invention provides a kind of self-adapting distribution method, calculate in real time in the method the file temperature of each time point of file to be allocated, and the size of file temperature and predetermined threshold value while judging each time point, mean that file to be allocated frequency accessed by the user is high if be greater than threshold value, for the efficiency that guarantees that the user accesses, it is file allocation copy strong consistency algorithm to be allocated, mean that file to be allocated frequency accessed by the user is low if be less than threshold value, in order not waste system resource, it is file allocation copy final consistency algorithm to be allocated.
Self-adapting distribution method provided by the invention, file temperature during i time point of calculating that can be real-time, and the file temperature during by i time point predicts i the file temperature in the time interval, in order to be the copy consistency algorithm that file allocation is suitable within i the time interval.The present invention can be real-time the file temperature that calculates file to be allocated, according to current file temperature to be allocated in file temperature prediction future, and real-time be the copy consistency algorithm that file allocation to be allocated is suitable, the present invention can be embodied as the purpose of the suitable copy consistency algorithm of the adaptive distribution of different files, and can not only save the network bandwidth but also improve overall performance, solved files all in existing distributed system and can only use a kind of copy consistency algorithm, the system resource waste caused or the low problem of user's access efficiency.
Self-adapting distribution method provided by the invention, can be applied in the cloud storage, for the copy in the cloud storage provides adaptive consistency algorithm.The cloud storage is in the conceptive extension of cloud computing and a development new concept out, refer to by functions such as cluster application, gridding technique 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.When the core of cloud computing system computing and processing is the store and management of mass data, just need a large amount of memory device of configuration in cloud computing system, cloud computing system just is transformed into a cloud storage system so, so cloud storage is one, take the cloud computing system that the data store and management is core.
As shown in Figure 3, the present invention provides again a kind of embodiment that the invention provides self-adapting distribution method, comprising:
Step S201: the file temperature while calculating i time point of file to be allocated;
File temperature when the present invention adopts centralized control unit to calculate i time point of file to be allocated, the account form of file temperature has multiple, and it is example that the method for following two kinds of calculation document temperatures is take in the present invention:
The first: adopt the user to access the number of times of described file to be allocated before i time point, the file temperature while building i time point of described file to be allocated.
File temperature when calculating i time point, adopt user's access times in each time interval before i time point, builds the file temperature of file to be allocated, and access times multifile temperature is high, and it is low that access times are hanged down the file temperature.
But the file temperature that adopts access times to build file to be allocated is had to some shortcomings: as long as the access times before i time point are identical, the temperature of file to be allocated is just identical, but in fact, user before i time point accesses the difference of document time point to be allocated, also can cause the file temperature difference of file to be allocated.For example: in user's access times under consistent prerequisite, if user's time point access times far away at i time point of distance are few, the time point near at i time point of distance accessed often, the file temperature of file to be allocated can increase, otherwise the file temperature of file to be allocated descends, therefore i time point before user's access times can accurately not determine the file temperature of current file to be allocated.
In order to solve the first method shortcoming, judge accurately the temperature that file to be allocated is current, as shown in Figure 4, the invention provides second method:
Step S301: within i-1 the time interval, utilize i time point and user's access time difference, be less than 1 the each access temperature of accessing described file to be allocated of exponential function calculating user by the truth of a matter;
Concrete, the wherein user's access of take is example, calculates i time point and user's access time difference, difference substitution one truth of a matter is less than in 1 exponential function and obtains functional value, the access temperature of accessing functional value as this user.Calculate as stated above successively the access temperature of the each access of user file to be allocated.
Because in the present embodiment with i time point and user's access time difference, as argument of function, because the time point of the each access of user file to be allocated is inconsistent, therefore the access temperature of the each access of user file to be allocated is inconsistent, i time point fixed in the present embodiment, if the Time interval of user access from i time point away from, i time point and user's access time difference is larger, difference substitution to the truth of a matter is less than to the functional value obtained in 1 exponential function less, if therefore i time point of user's access time distance is nearer, the functional value obtained is larger, be the access temperature larger, can calculate accurately so the each access temperature of user.Step S302: within i-1 the time interval, the access temperature of the described file to be allocated of the each access of user is superposeed, obtain the interval temperature in i-1 the time interval.
Be located at user in i-1 the time interval and accessed file to be allocated N time, according to above-mentioned steps, calculated N access temperature, adopt the mode of stack by the summation of N access temperature, obtain the interval temperature of user within i-1 the time interval.
Step S303: the file temperature during by i-1 time point and the interval temperature in described i-1 the time interval, the file temperature while building i time point of described file to be allocated.
The file temperature that file temperature during i-1 time point and the interval temperature in i-1 the time interval are sued for peace while obtaining i time point of file to be allocated.File temperature when file temperature during i-1 time point is i-2 time point and the interval temperature in i-2 the time interval are sued for peace and are obtained.
The access temperature computing method that provide due to the present embodiment, can calculate accurately according to the time of access file to be allocated the temperature of each access file to be allocated, obtain the temperature of file to be allocated by the stack of the carrying out to each access temperature, asynchronism(-nization) due to access file to be allocated, so temperature difference calculated, even it is consistent to access the frequency of file to be allocated, as long as the asynchronism(-nization) of each access, the temperature of file to be allocated is difference, so temperature computing method provided by the invention, under can the access frequency same case before i time point, calculate accurately file to be allocated temperature accurately, solved due to the identical problem of the identical file temperature to be allocated of access frequency.
On the basis of time point shown in Fig. 2, adopt formula table to be shown second method:
If the file temperature of the 0th time point is 0:H 0(f)=0;
The user who calculates the 0th time interval accesses temperature at every turn,
Figure BDA0000381194430000111
perhaps adopt
Figure BDA0000381194430000112
wherein k is the k time access of user file to be allocated, t 0kfor the time of the k time access file to be allocated of user;
Calculate the interval temperature in the 0th time interval:
Figure BDA0000381194430000113
The file temperature of calculating the 1st time point is: H 1(f)=ω S 0+ (1-ω) H 0(f);
The like, the file temperature that calculates i-1 time point is H i-1(f);
The user who calculates i-1 the time interval accesses temperature at every turn:
Figure BDA0000381194430000114
perhaps adopt F ( k ) = ( 1 p ) λ ( t i - t ( i - 1 ) k ) ;
Calculate the interval temperature in i-1 the time interval:
The file temperature of calculating i time point is: H i(f)=ω S i-1+ (1-ω) H i-1(f);
Wherein, the access temperature that function F (k) is the k time described file to be allocated of access of user;
Function S i-1for described file to be allocated in the interval in i-1 time interval temperature;
T ibe i time point, λ is one and dynamically adjusts the factor, can dynamically be adjusted by the slip-stick artist;
T (i-1) ktime point for user's the k time described file to be allocated of access within i-1 the time interval;
P is natural number and P >=2;
H i(f) the file temperature while being i time point of described file to be allocated;
H i-1(f) the file temperature while being i-1 time point of described file to be allocated;
ω is for meaning the interval temperature S in the i-1 time interval i-1at H i(f) shared weight in calculating.
In the present embodiment, ω means the shared weight of interval temperature in the i-1 time interval, and the temperature value impact that the interval temperature that the ω value is larger means the i-1 time interval is treated allocate file is larger, otherwise less.Due to the file temperature basis of the file to be allocated of this algorithm File the historical temperature of file, thereby make file temperature to be allocated can keep certain stability, reduced the impact of the interval temperature undulatory property in the i-1 time interval; On the other hand, by being a larger weight of interval temperature setting in the i-1 time interval, the impact of file temperature that the interval temperature that means the i-1 time interval is treated allocate file is larger, reduce historical temperature and treat the interference of allocate file temperature, thereby accurate response goes out the true temperature of file to be allocated.
As shown in Figure 5, the present invention also provides a kind of self-adaptation distributor, comprising:
Computing unit 100, the file temperature when calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Whether judging unit 200, be greater than predetermined threshold value for judging described file temperature;
The first allocation units 300, if be greater than described predetermined threshold value for described file temperature, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
The second allocation units 400, if be less than described predetermined threshold value for described file temperature, are described file allocation copy final consistency algorithm to be allocated within described i the time interval.
As shown in Figure 6, the invention provides a kind of copy consistency system, described system comprises:
Centralized control unit 500, for receiving the request of user writable file;
A plurality of file units 600 that are associated with described centralized control unit 500;
Described file unit 600 comprises primary copy 601, for keeping synchronizeing with original;
With described primary copy, be associated from copy 602.
Centralized control unit 500, for receiving the request of user writable file, comprise the update request of reading file access request and written document.The present embodiment File unit 600, be the unit that comprises each copy of file, in the present embodiment, copy comprises primary copy and from copy, and primary copy is for keeping synchronize with original, from copy for carrying out according to primary copy and under the support of copy consistency algorithm synchronously.
Concrete, after centralized control unit receives user's read-write requests, can select that copy more can facilitate according to existing copy selection algorithm judgement user, feeding back to the copy that the user need to access after through calculating, primary copy or from copy.For example: the user is the some files of access in cloud storage, and centralized control unit can be according to user's position, and being judged that the user accesses that copy can be than faster, thereby are applicable to user's copy in can the storage of feedback user cloud.
Then generally there is single primary copy in system, and single primary copy easily becomes the single failure point, and in order to address this problem, as shown in Figure 7, the present invention provides again a kind of copy consistency system, and described system comprises:
Centralized control unit 700;
File unit 800, described file unit 800 comprises primary copy 801, from primary copy 802, a plurality of from copy 803.
In native system each primary copy have an inclusion information and primary copy on all four from primary copy.Unrestricted from the number of copy, can dynamically adjust according to the load of system.After primary copy breaks down, can take over the task of primary copy from primary copy like this, thereby the system of assurance data is normally moved.
As shown in Figure 8, on the basis of Fig. 6 or system shown in Figure 7, the invention provides a kind of self-adaptation copy consistency algorithm, this self-adaptation copy consistency algorithm can be applied to, in the cloud storage, comprising:
Step S401: the file temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Step S402: judge whether described file temperature is greater than predetermined threshold value;
Step S403: if described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, revise the copy consistency agreement, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
Step S404: if described file temperature is less than described predetermined threshold value, within described i the time interval, being described file allocation copy final consistency algorithm to be allocated, is copy final consistency algorithm by the copy consistency protocol modification of described file to be allocated;
Step S405: the request of access that receives the user within i the time interval;
Step S406: the type of judgement user's access copy;
Step S407: if primary copy is directly accessed primary copy;
Step S408: if from copy, judge the copy consistency agreement of described file to be allocated;
Step S409: if copy strong consistency algorithm, directly access is described from copy;
Step S410: if copy final consistency algorithm is described after copy according to the primary copy renewal, access described from copy.
Above-mentioned steps is after the copy consistency algorithm of determining file to be allocated, manner of execution when if the user accesses file to be allocated, in the system shown in Fig. 6, not from primary copy, so, after the user breaks down in primary copy, this document can not be used with regard to damaged.But, in the system shown in Fig. 7, when the user accesses primary copy, if mistake appears in primary copy, system meeting automatic transfer, to from primary copy, guarantees user's access efficiency.
As shown in Figure 9, on the basis of Fig. 5 or system shown in Figure 6, the invention provides a kind of self-adaptation copy consistency algorithm, this self-adaptation copy consistency algorithm can be applied to, in the cloud storage, comprising:
Step S501: the file temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Step S502: judge whether described file temperature is greater than predetermined threshold value;
Step S503: if described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
Step S504: if described file temperature is less than described predetermined threshold value, within described i the time interval, being described file allocation copy final consistency algorithm to be allocated, is copy final consistency algorithm by the copy consistency protocol modification of described file to be allocated;
Step S505: the update request that receives the user within i the time interval;
Step S506: the copy consistency agreement that judges described file to be allocated;
Step S507: if copy strong consistency algorithm directly upgrades primary copy and all from copy;
Step S508: if copy final consistency algorithm upgrades primary copy.
Above-mentioned steps is after the copy consistency algorithm of determining file to be allocated, manner of execution when if the user upgrades file to be allocated, in the system shown in Fig. 6, do not have from primary copy, therefore upgrade primary copy when upgrading, comprise from primary copy in the system shown in Fig. 7, when upgrading primary copy, need to upgrade from primary copy, after primary copy breaks down, system meeting automatic transfer, to from primary copy, guarantees user's access efficiency like this.
If the described function of the present embodiment method usings that the form of SFU software functional unit realizes and during as production marketing independently or use, can be stored in a computing equipment read/write memory medium.Understanding based on such, the part that the embodiment of the present invention contributes to prior art or the part of this technical scheme can embody with the form of software product, this software product is stored in a storage medium, comprise that some instructions are with so that a computing equipment (can be personal computer, server, mobile computing device or the network equipment etc.) carry out all or part of step of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), the various media that can be program code stored such as random access memory (RAM, Random Access Memory), magnetic disc or CD.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is and the difference of other embodiment that between each embodiment, same or similar part is mutually referring to getting final product.
To the above-mentioned explanation of the disclosed embodiments, make professional and technical personnel in the field can realize or use the present invention.Multiple modification to these embodiment will be apparent for those skilled in the art, and General Principle as defined herein can be in the situation that do not break away from the spirit or scope of the present invention, realization in other embodiments.Therefore, the present invention will can not be restricted to these embodiment shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.

Claims (9)

1. a self-adapting distribution method, is characterized in that, comprising:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, it within described i the time interval, is described file allocation copy final consistency algorithm to be allocated.
2. the method for claim 1, is characterized in that, file temperature during i time point of described calculating file to be allocated comprises:
Calculate the interval temperature in i-1 the time interval, described i-1 the time interval is the time period between i-1 time point and i time point;
File temperature when the interval temperature in the file temperature during by i-1 time point and described i-1 the time interval builds i time point of described file to be allocated.
3. method as claimed in claim 2, is characterized in that, the interval temperature in described i-1 the time interval of calculating comprises:
Within i-1 the time interval, utilize i time point and user's access time difference, be less than 1 the each access temperature of accessing described file to be allocated of exponential function calculating user by the truth of a matter;
Within i-1 the time interval, the access temperature of the described file to be allocated of the each access of user is superposeed, obtained the interval temperature in i-1 the time interval.
4. method as claimed in claim 3, is characterized in that, the interval temperature in described i-1 the time interval of calculating comprises:
F ( k ) = ( 1 p ) t i - t ( i - 1 ) k ;
S i - 1 = Σ k = 1 N F ( k ) ;
Wherein, the access temperature that function F (k) is the k time described file to be allocated of access of user;
Function S i-1for described file to be allocated in the interval in i-1 time interval temperature;
T ibe i time point;
T (i-1) ktime point for user's the k time described file to be allocated of access within i-1 the time interval;
P is natural number and P >=2.
5. method as claimed in claim 4, is characterized in that, file temperature during i time point of described calculating file to be allocated comprises:
H i(f)=ωS i-1+(1-ω)H i-1(f),H 0(f)=0
Wherein, H i(f) the file temperature while being i time point of described file to be allocated;
H i-1(f) the file temperature while being i-1 time point of described file to be allocated;
ω is for meaning the interval temperature S in the i-1 time interval i-1at H i(f) shared weight in calculating.
6. the method for claim 1, is characterized in that, file temperature during i time point of described calculating file to be allocated comprises:
Adopt the user to access the number of times of described file to be allocated before i time point, the file temperature while building i time point of described file to be allocated.
7. a self-adaptation copy consistency algorithm, it is characterized in that, be applied to the copy consistency system, described system comprises: centralized control unit, and for receiving the request of user writable file, a plurality of file units that are associated with described centralized control unit, described file unit comprises primary copy, for keeping synchronizeing with original, with described primary copy, be associated from copy, comprising:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, within described i the time interval, be described file allocation copy final consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy final consistency algorithm;
Receive user's request of access within i the time interval;
The type of judgement user's access copy;
If primary copy is directly accessed primary copy;
If from copy, judge the copy consistency agreement of described file to be allocated;
If copy strong consistency algorithm, directly access is described from copy;
If copy final consistency algorithm is described after copy according to the primary copy renewal, access described from copy.
8. a self-adaptation copy consistency algorithm, it is characterized in that, be applied to the copy consistency system, described system comprises: centralized control unit, and for receiving the request of user writable file, a plurality of file units that are associated with described centralized control unit, described file unit comprises primary copy, for keeping synchronizeing with original, with described primary copy, be associated from copy, comprising:
File temperature while calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Judge whether described file temperature is greater than predetermined threshold value;
If described file temperature is greater than described predetermined threshold value, it within i the time interval, is described file allocation copy strong consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy strong consistency algorithm, described i the time interval is the time period between i time point and i+1 time point;
If described file temperature is less than described predetermined threshold value, within described i the time interval, be described file allocation copy final consistency algorithm to be allocated, by the copy consistency protocol modification of described file to be allocated, be copy final consistency algorithm;
Receive user's update request within i the time interval;
Judge the copy consistency agreement of described file to be allocated;
If copy strong consistency algorithm, directly upgrade primary copy and all from copy;
If copy final consistency algorithm, upgrade primary copy.
9. a self-adaptation distributor, is characterized in that, comprising:
Computing unit, the file temperature when calculating i time point of file to be allocated, described file temperature means that the user accesses the frequency of described file to be allocated;
Whether judging unit, be greater than predetermined threshold value for judging described file temperature;
The first allocation units, if be greater than described predetermined threshold value for described file temperature, within i the time interval, be described file allocation copy strong consistency algorithm to be allocated, described i the time interval is the time period between i time point and i+1 time point;
The second allocation units, if be less than described predetermined threshold value for described file temperature, are described file allocation copy final consistency algorithm to be allocated within described i the time interval.
CN2013104146258A 2013-09-12 2013-09-12 Adaptive allocation method and device and adaptive replica consistency method Pending CN103440182A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013104146258A CN103440182A (en) 2013-09-12 2013-09-12 Adaptive allocation method and device and adaptive replica consistency method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013104146258A CN103440182A (en) 2013-09-12 2013-09-12 Adaptive allocation method and device and adaptive replica consistency method

Publications (1)

Publication Number Publication Date
CN103440182A true CN103440182A (en) 2013-12-11

Family

ID=49693873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013104146258A Pending CN103440182A (en) 2013-09-12 2013-09-12 Adaptive allocation method and device and adaptive replica consistency method

Country Status (1)

Country Link
CN (1) CN103440182A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744791A (en) * 2013-12-20 2014-04-23 华为技术有限公司 Memory migration method and device
CN103780426A (en) * 2014-01-13 2014-05-07 南京邮电大学 Consistency maintenance methods for cloud storage data and cloud storage system
CN105488180A (en) * 2015-11-30 2016-04-13 中国建设银行股份有限公司 Data storing method and system
CN105577763A (en) * 2015-12-16 2016-05-11 浪潮(北京)电子信息产业有限公司 Dynamic duplicate consistency maintenance system and method, and cloud storage platform
CN105574153A (en) * 2015-12-16 2016-05-11 南京信息工程大学 Transcript placement method based on file heat analysis and K-means
CN106547859A (en) * 2016-10-21 2017-03-29 杭州朗和科技有限公司 A kind of storage method and device of the data file under multi-tenant data storage system
CN107666516A (en) * 2017-09-20 2018-02-06 重庆邮电大学 A kind of method for ensureing kafka company-data uniformity based on message temperature
CN110855737A (en) * 2019-09-24 2020-02-28 中国科学院软件研究所 Consistency level controllable self-adaptive data synchronization method and system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071372A1 (en) * 2003-09-29 2005-03-31 International Business Machines Corporation Autonomic infrastructure enablement for point in time copy consistency
CN103178989A (en) * 2013-02-18 2013-06-26 中兴通讯股份有限公司 Method and device for calculating visit hotness

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071372A1 (en) * 2003-09-29 2005-03-31 International Business Machines Corporation Autonomic infrastructure enablement for point in time copy consistency
CN103178989A (en) * 2013-02-18 2013-06-26 中兴通讯股份有限公司 Method and device for calculating visit hotness

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RUAY-SHIUNG CHANG ETC: "Adaptable Replica Consistency Service for Data Grids", 《THIRD INTERNATIONAL CONFERENCE ON INFORMATION TECHNOLOGY:NEW GENERATIONS》, 31 December 2006 (2006-12-31) *
李占胜等: "一种对LRFU置换策略的自适应改进", 《计算机工程与应用》, vol. 44, no. 17, 30 September 2008 (2008-09-30), pages 3 *
荣翠芳等: "数据网格中一种均衡性能的副本一致性算法", 《计算机工程与应用》, vol. 46, no. 22, 30 November 2010 (2010-11-30), pages 83 - 87 *

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103744791A (en) * 2013-12-20 2014-04-23 华为技术有限公司 Memory migration method and device
CN103744791B (en) * 2013-12-20 2017-01-11 华为技术有限公司 Memory migration method and device
CN103780426A (en) * 2014-01-13 2014-05-07 南京邮电大学 Consistency maintenance methods for cloud storage data and cloud storage system
CN105488180A (en) * 2015-11-30 2016-04-13 中国建设银行股份有限公司 Data storing method and system
CN105488180B (en) * 2015-11-30 2019-04-26 中国建设银行股份有限公司 A kind of date storage method and system
CN105577763A (en) * 2015-12-16 2016-05-11 浪潮(北京)电子信息产业有限公司 Dynamic duplicate consistency maintenance system and method, and cloud storage platform
CN105574153A (en) * 2015-12-16 2016-05-11 南京信息工程大学 Transcript placement method based on file heat analysis and K-means
CN106547859A (en) * 2016-10-21 2017-03-29 杭州朗和科技有限公司 A kind of storage method and device of the data file under multi-tenant data storage system
CN107666516A (en) * 2017-09-20 2018-02-06 重庆邮电大学 A kind of method for ensureing kafka company-data uniformity based on message temperature
CN110855737A (en) * 2019-09-24 2020-02-28 中国科学院软件研究所 Consistency level controllable self-adaptive data synchronization method and system

Similar Documents

Publication Publication Date Title
CN103440182A (en) Adaptive allocation method and device and adaptive replica consistency method
KR101797836B1 (en) Token-based admission control for replicated writes
EP2780799B1 (en) Throttle disk i/o using disk drive simulation model
CN109284068A (en) Data storage management system, method and object
CN104102693A (en) Object processing method and device
CN103778071A (en) Cache space distribution method and device
CN102693164B (en) Equipment and method for preventing buffer overflow
CN109376123A (en) Manage method, distributed memory system and the management node of file
CN109684074A (en) Physical machine resource allocation methods and terminal device
CN106610903A (en) Tiered storage system, storage controller, and method for deduplication and storage tiering
CN104123171A (en) Virtual machine migrating method and system based on NUMA architecture
CN113095781B (en) Temperature control equipment control method, equipment and medium based on edge calculation
US11914894B2 (en) Using scheduling tags in host compute commands to manage host compute task execution by a storage device in a storage system
CN107343023A (en) Resource allocation methods, device and electronic equipment in a kind of Mesos management cluster
CN103905517A (en) Data storage method and equipment
JPWO2014199493A1 (en) Storage system and storage control method
CN102480502B (en) I/O load equilibrium method and I/O server
CN113342477A (en) Container group deployment method, device, equipment and storage medium
CN103631537A (en) Method and device for managing virtual disk
CN113723443A (en) Distributed training method and system for large visual model
US11107037B2 (en) Method and system of sharing product data in a collaborative environment
CN107920129A (en) A kind of method, apparatus, equipment and the cloud storage system of data storage
JP6115575B2 (en) Data set multiplicity changing device, server, data set multiplicity changing method, and computer program
US20230129647A1 (en) Distribution of quantities of an increased workload portion into buckets representing operations
US20160139940A1 (en) Systems and methods for creating virtual machine

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20131211