CN108647092A - Cloud storage method, cloud platform and computer readable storage medium - Google Patents
Cloud storage method, cloud platform and computer readable storage medium Download PDFInfo
- Publication number
- CN108647092A CN108647092A CN201810435170.0A CN201810435170A CN108647092A CN 108647092 A CN108647092 A CN 108647092A CN 201810435170 A CN201810435170 A CN 201810435170A CN 108647092 A CN108647092 A CN 108647092A
- Authority
- CN
- China
- Prior art keywords
- storage
- memory node
- node
- stored
- data
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/5038—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
- G06F9/505—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the load
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1097—Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2209/00—Indexing scheme relating to G06F9/00
- G06F2209/50—Indexing scheme relating to G06F9/50
- G06F2209/5021—Priority
Abstract
The invention discloses a kind of cloud storage method, this method includes:When receiving data storage request, the priority of data to be stored is determined, and obtain the running state information of each memory node of cloud platform in current period;According to the running state information of each memory node, the storage capacity of each memory node is determined;According to the storage capacity of the priority of the data to be stored and each memory node, the target storage node for storing the data to be stored is determined.The invention also discloses a kind of cloud platform and computer readable storage mediums.The present invention disclosure satisfy that user demand, and realize that, to ensure the high efficiency of cloud storage, the user experience is improved to the rational and efficient use of cloud platform storage node resource.
Description
Technical field
The present invention relates to cloud storage technical field more particularly to a kind of cloud storage method, cloud platform and computer-readable deposit
Storage media.
Background technology
Cloud storage (Online Storage) is a kind of network on-line storage pattern, i.e., data is stored in cloud platform,
And cloud platform is deployed in large-scale server cluster, the clustered node for being responsible for data storage in cloud platform is known as memory node.
Common cloud storage method is to be stored in each memory node successively, when previous memory node can not store data
When, then storage is renewed in the latter memory node relaying, this mode cannot carry out data storage according to user demand, and can not
Ensure the high efficiency of cloud storage.
Invention content
The main purpose of the present invention is to provide a kind of cloud storage method, cloud platform and computer readable storage medium, purports
Meeting user demand, and realizing the rational and efficient use to cloud platform storage node resource, to ensure the efficient of cloud storage
Property, promote user experience.
To achieve the above object, the present invention provides a kind of cloud storage method, the method includes:
When receiving data storage request, the priority of data to be stored is determined, and obtain cloud platform in current period
The running state information of each memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determines and waited for described in storage
Store the target storage node of data.
Optionally, the running state information includes hardware status information and the stored number of tasks of waiting, the basis
The step of running state information of each memory node, the storage capacity for determining each memory node includes:
According to the hardware status information of each memory node, first of each memory node based on hardware condition is determined
Storage capacity;
According to the stored number of tasks of the waiting of each memory node, determine that each memory node is based on carrying condition
The second storage capacity;
According to first storage capacity of each memory node and the second storage capacity, depositing for each memory node is determined
Energy storage power.
Optionally, the hardware status information includes CPU usage, memory usage and network resource utilization, described
Hardware status information includes CPU usage, memory usage and network resource utilization, the institute according to each memory node
The step of stating hardware status information, determining the first storage capacity of each memory node based on hardware condition include:
According to the CPU usage, memory usage and the network resource utilization of each memory node and pre-designed
Formula is calculated, first storage capacity of each memory node based on hardware condition is calculated.
Optionally, the stored number of tasks of the waiting according to each memory node, determines each memory node
Based on carrying condition the second storage capacity the step of include:
Determine the average time of the single store tasks of cloud platform storage node cluster-based storage;
According to the stored number of tasks of waiting of the average time and each memory node of the single store tasks of the storage,
Calculate the pre- stand-by period of each memory node;
According to the pre- stand-by period of each memory node, each memory node second depositing based on carrying condition is determined
Energy storage power.
Optionally, the step of average time of the determining single store tasks of cloud platform storage node cluster-based storage wraps
It includes:
Each period to be calculated before determining current period;
Obtain the store tasks sum that cloud platform storage node cluster is completed within each period to be calculated;
Calculate single store tasks deadline of the cloud platform storage node cluster within each period to be calculated;
The average value for calculating the single store tasks deadline, is individually deposited as cloud platform storage node cluster-based storage
The average time of storage task.
Optionally, described according to the priority of the data to be stored and the storage capacity of each memory node, really
Surely the step of target storage node for storing the data to be stored includes:
According to the storage capacity of each memory node, the priority of each memory node is set, and is waited for according to described
The priority of the priority and each memory node of data is stored, determines the target storage section for storing the data to be stored
Point.
Optionally, the priority of each memory node is arranged in the storage capacity according to each memory node, and
According to the priority of the priority of the data to be stored and each memory node, determines and store the data to be stored
The step of target storage node includes:
The storage capacity of each memory node is compared with default storage capacity range respectively;
The memory node that storage capacity is higher than to default storage capacity range higher limit is determined as high priority storage to be selected
Node set;
The memory node that storage capacity is within the scope of default storage capacity is determined as middle priority memory node to be selected
Set;
The memory node that memory node processing capacity is less than to default storage capacity lower range limit is determined as low priority
Memory node set to be selected;
According to the priority of the data to be stored, according to preset rules, from the memory node collection to be selected of each priority
Matched memory node set to be selected is determined in conjunction, and chooses memory node from the matched memory node set to be selected,
As the target storage node for storing the data to be stored.
Optionally, the pre- stand-by period according to each memory node determines that the task of each memory node is held
Before the step of loading capability, including:
The pre- stand-by period of each memory node is compared with default stand-by period threshold value respectively;
The memory node that the pre- stand-by period is exceeded to default stand-by period threshold value, as invalid storage node.
In addition, to achieve the above object, the present invention also provides a kind of cloud platform, the cloud platform includes:Memory, processing
Device and it is stored in the cloud storage program that can be run on the memory and on the processor, the cloud storage program is described
Processor realizes following steps when executing:
When receiving data storage request, the priority of data to be stored is determined, and obtain cloud platform in current period
The running state information of each memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determines and waited for described in storage
Store the target storage node of data.
In addition, to achieve the above object, it is described computer-readable the present invention also provides a kind of computer readable storage medium
Cloud storage program is stored on storage medium, the cloud storage program realizes following steps when being executed by processor:
When receiving data storage request, the priority of data to be stored is determined, and obtain cloud platform in current period
The running state information of each memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determines and waited for described in storage
Store the target storage node of data.
The present invention is when receiving data storage request, it is first determined and user is the priority set by data to be stored,
And based on the running state information of each memory node of cloud platform in current period, determine the storage capacity of each memory node,
Storage data to be stored memory node is determined according to the priority of data to be stored and the storage capacity of each memory node, not only
It meets the needs of users, and realizes the rational and efficient use to cloud platform storage node resource, to effectively improve cloud storage
Speed, the user experience is improved.
Description of the drawings
Fig. 1 is the terminal structure schematic diagram for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of cloud storage method method first embodiment of the present invention;
Fig. 3 is the first refinement flow diagram of cloud storage method method first embodiment of the present invention;
Fig. 4 is the second refinement flow diagram of cloud storage method method first embodiment of the present invention;
Fig. 5 is that the third of cloud storage method method first embodiment of the present invention refines flow diagram;
Fig. 6 is the flow diagram of cloud storage method method second embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:When receiving data storage request, data to be stored is determined
Priority, and obtain the running state information of each memory node of cloud platform in current period;According to the institute of each memory node
Running state information is stated, determines the storage capacity of each memory node;According to the priority of the data to be stored and each deposit
The storage capacity of node is stored up, determines the target storage node for storing the data to be stored.
As shown in Figure 1, the terminal structure schematic diagram for the hardware running environment that Fig. 1, which is the embodiment of the present invention, to be related to.
Terminal of the embodiment of the present invention is cloud platform.
As shown in Figure 1, the terminal may include:Processor 1001, such as CPU, communication bus 1002, user interface
1003, network interface 1004, memory 1005.Wherein, communication bus 1002 is for realizing the connection communication between these components.
User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface
1003 can also include standard wireline interface and wireless interface.Network interface 1004 may include optionally that the wired of standard connects
Mouth, wireless interface (such as WI-FI interfaces).Memory 1005 can be high-speed RAM memory, can also be stable memory
(non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor
1001 storage device.
It will be understood by those skilled in the art that the restriction of the not structure paired terminal of terminal structure shown in Fig. 1, can wrap
It includes than illustrating more or fewer components, either combines certain components or different components arrangement.
As shown in Figure 1, as may include operating system, net in a kind of memory 1005 of computer readable storage medium
Network communication module, Subscriber Interface Module SIM and cloud storage program.
In terminal shown in Fig. 1, network interface 1004 is mainly used for connecting background server, is carried out with background server
Data communicate;User interface 1003 is mainly used for connecting client (user terminal), with client into row data communication;And processor
1001 can be used for calling the cloud storage program stored in memory 1005, and execute following operation:
When receiving data storage request, the priority of data to be stored is determined, and obtain cloud platform in current period
The running state information of each memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determines and waited for described in storage
Store the target storage node of data.
Further, the running state information includes hardware status information and the stored number of tasks of waiting, processor
1001 can call the cloud storage program stored in memory 1005, also execute following operation:
According to the hardware status information of each memory node, first of each memory node based on hardware condition is determined
Storage capacity;
According to the stored number of tasks of the waiting of each memory node, determine that each memory node is based on carrying condition
The second storage capacity;
According to first storage capacity of each memory node and the second storage capacity, depositing for each memory node is determined
Energy storage power.
Further, the hardware status information includes CPU usage, memory usage and network resource utilization, place
Reason device 1001 can call the cloud storage program stored in memory 1005, also execute following operation:
According to the CPU usage, memory usage and the network resource utilization of each memory node and pre-designed
Formula is calculated, first storage capacity of each memory node based on hardware condition is calculated.
Further, processor 1001 can call the cloud storage program stored in memory 1005, also execute following behaviour
Make:
Determine the average time of the single store tasks of cloud platform storage node cluster-based storage;
According to the stored number of tasks of waiting of the average time and each memory node of the single store tasks of the storage,
Calculate the pre- stand-by period of each memory node;
According to the pre- stand-by period of each memory node, each memory node second depositing based on carrying condition is determined
Energy storage power.
Further, processor 1001 can call the cloud storage program stored in memory 1005, also execute following behaviour
Make:
Each period to be calculated before determining current period;
Obtain the store tasks sum that cloud platform storage node cluster is completed within each period to be calculated;
Calculate single store tasks deadline of the cloud platform storage node cluster within each period to be calculated;
The average value for calculating the single store tasks deadline, is individually deposited as cloud platform storage node cluster-based storage
The average time of storage task.
Further, processor 1001 can call the cloud storage program stored in memory 1005, also execute following behaviour
Make:
According to the storage capacity of each memory node, the priority of each memory node is set, and is waited for according to described
The priority of the priority and each memory node of data is stored, determines the target storage section for storing the data to be stored
Point.
Further, processor 1001 can call the cloud storage program stored in memory 1005, also execute following behaviour
Make:
The storage capacity of each memory node is compared with default storage capacity range respectively;
The memory node that storage capacity is higher than to default storage capacity range higher limit is determined as high priority storage to be selected
Node set;
The memory node that storage capacity is within the scope of default storage capacity is determined as middle priority memory node to be selected
Set;
The memory node that memory node processing capacity is less than to default storage capacity lower range limit is determined as low priority
Memory node set to be selected;
According to the priority of the data to be stored, according to preset rules, from the memory node collection to be selected of each priority
Matched memory node set to be selected is determined in conjunction, and chooses memory node from the matched memory node set to be selected,
As the target storage node for storing the data to be stored.
Further, processor 1001 can call the cloud storage program stored in memory 1005, also execute following behaviour
Make:
The pre- stand-by period of each memory node is compared with default stand-by period threshold value respectively;
The memory node that the pre- stand-by period is exceeded to default stand-by period threshold value, as invalid storage node.
Based on the hardware configuration of above-mentioned terminal, each embodiment of cloud storage method of the present invention is proposed.
With reference to Fig. 2, cloud storage method first embodiment of the present invention provides a kind of cloud storage method, the method includes:
Step S10 determines the priority of data to be stored when receiving data storage request, and obtains current period
The running state information of the interior each memory node of cloud platform;
In the embodiment of the present invention, cloud platform can receive the data storage request of user's transmission, and the data that user sends are deposited
Storage request carries data to be stored priority corresponding with its.Wherein, the corresponding priority of data to be stored is that user is touching
It is set when sending out data storage request, for example, the priority limit that can set of user is 1~100, numerical value is smaller, table
Show that the priority of data to be stored is lower.Cloud platform determines the priority of data to be stored when receiving data storage request,
Numerical priority value is divided into low priority less than 40 data to be stored, numerical priority value is between 40-80 and waits depositing
Storage data are divided into middle priority, and the data to be stored by numerical priority value higher than 80 is divided into high priority.It needs to illustrate
It is that the embodiment of the present invention is not construed as limiting the division range for dividing the priority set when the storage request of user's trigger data.Together
When, cloud platform obtains the running state information of each memory node of cloud platform in current period.In embodiments of the present invention, Yun Ping
Platform can receive the running state information that each memory node is sent at interval of time T, which includes storage
Hardware status information of the node in current period and the stored number of tasks of waiting, hardware status information are including but not limited to each
CPU usage, memory usage and network resource utilization etc. of a memory node in current period.
Step S20 determines the storage energy of each memory node according to the running state information of each memory node
Power;
Later, cloud platform determines the storage of each memory node according to the running state information of each memory node
Ability.Specifically, may include with reference to Fig. 3, step S20:
Step S21 determines that each memory node is based on hardware item according to the hardware status information of each memory node
First storage capacity of part;
Step S22 determines that each memory node is based on according to the stored number of tasks of the waiting of each memory node
Second storage capacity of carrying condition;
Step S23 determines each storage according to first storage capacity of each memory node and the second storage capacity
The storage capacity of node.
In embodiments of the present invention, (it is defined as first in combination with storage capacity of each memory node based on hardware condition
Storage capacity) and storage capacity (being defined as the second storage capacity) based on carrying condition weigh the storage energy of each memory node
Power.For each memory node, first storage capacity of the memory node based on hardware condition can be according to the hardware of memory node
Status information determines, for example, can be provided based on CPU usage of the memory node in current period, memory usage and network
Source utilization rate is determined.Specifically, may include with reference to Fig. 4, step S21:
Step S210, according to the CPU usage, memory usage and the network resource utilization of each memory node,
And default calculation formula, calculate first storage capacity of each memory node based on hardware condition.
In embodiments of the present invention, corresponding weighted value is arranged in the hardware status information that can be directed to memory node.By CPU
Weight a corresponding to occupancy1It indicates;By the weight a corresponding to memory usage2It indicates;By network resource utilization institute
Corresponding weight a3It indicates, and a1+a2+a3=1.It is previously provided in the embodiment of the present invention and calculates memory node based on hardware
The formula of first storage capacity of condition, as follows:
A=a1x1+a2x2+a3x3
Wherein, A indicates first storage capacity of the memory node based on hardware condition;
x1Indicate CPU usage, x2Indicate memory usage, x3Indicate network resource utilization.
Certainly, if the hardware status information of memory node further includes other because of the period of the day from 11 p.m. to 1 a.m, and so on, hardware shape can be directed to
A weighted value is arranged in each factor of state information, then, first storage capacity of the memory node based on hardware condition calculates
Formula is:
A=a1x1+a2x2+a3x3+…+anxn
Wherein, x1、x2、x3...xnEach factor of hardware status information is indicated respectively;
a1、a2、a3...anIndicate the corresponding weight size of each factor of hardware status information, and a1+a2+a3+...+an=
1。
CPU usage, memory usage and network resource utilization as a result, based on each memory node and above-mentioned
The first storage capacity calculation formula based on hardware condition, you can it is corresponding based on hardware to calculate separately any one memory node
First storage capacity of condition, to obtain first storage capacity of each memory node based on hardware condition.
In embodiments of the present invention, second storage capacity of each memory node based on carrying condition can be according to memory node
The stored number of tasks of waiting determine.Specifically, may include with continued reference to Fig. 4, step S22:
Step S220 determines the average time of the single store tasks of cloud platform storage node cluster-based storage;
Step S221 is stored according to the waiting of the average time and each memory node of the single store tasks of storage
Number of tasks, calculate the pre- stand-by period of each memory node;
Step S222 determines that each memory node is based on carrier strip according to the pre- stand-by period of each memory node
Second storage capacity of part.
In example of the present invention, cloud platform can also receive each being completed for memory node transmission and deposit at interval of time T
Store up total task number.The store tasks that cloud platform can be completed before current period in each cycle T according to memory node cluster
Sum determines the average time of the single store tasks of cloud platform storage node cluster-based storage.Based on cloud platform storage node cluster
The stored number of tasks of waiting of the average time and any one memory node that store single store tasks, you can calculate arbitrary
If a memory node stores the time that current data to be stored is needed to wait for, if it is current to define the storage of any one memory node
The time that data to be stored is needed to wait for is the pre- stand-by period, and the calculation formula for calculating the pre- stand-by period is as follows:
Tw=mt
Wherein, TwIndicate the pre- stand-by period;
M indicates the stored number of tasks of the waiting of any one memory node;
T indicates the average time of the single store tasks of cloud platform storage node cluster-based storage.
It is directed to each memory node as a result, based on being averaged for the cloud platform storage single store tasks of node cluster-based storage
Time and the stored number of tasks of waiting and the calculation formula of above-mentioned pre- stand-by period, can be calculated the memory node
The pre- stand-by period, in this way, can be obtained each memory node corresponding pre- stand-by period.Later, each storage can be directed to save
Corresponding weighted value is arranged in the point corresponding pre- stand-by period, for indicating second storage of each memory node based on carrying condition
Ability.Further, the first storage capacity by any one memory node based on hardware condition and the based on carrying condition
After two storage capacities sum up calculating, you can determine the storage capacity of the memory node.It should be noted that respective weights value
Concrete numerical value size, can pre-set, can also be determined and adjust according to actual conditions, the embodiment of the present invention is to this
It is not construed as limiting.
Step S30, according to the storage capacity of the priority of the data to be stored and each memory node, determination is deposited
Store up the target storage node of the data to be stored.
Wherein, step S30 may include:
The priority of each memory node, and root is arranged according to the storage capacity of each memory node in step S31
According to the priority of the data to be stored and the priority of each memory node, the mesh for storing the data to be stored is determined
Mark memory node.
Specifically, may include with reference to Fig. 5, step S31:
The storage capacity of each memory node is compared with default storage capacity range respectively by step S310;
Step S311, the memory node that storage capacity is higher than to default storage capacity range higher limit are determined as high priority
Memory node set to be selected;
It is to be selected to be determined as middle priority by step S312 for the memory node that storage capacity is within the scope of default storage capacity
Memory node set;
Step S313, the memory node that memory node processing capacity is less than to default storage capacity lower range limit are determined as
Low priority memory node set to be selected;
Step S314, according to the priority of the data to be stored, according to preset rules, to be selected from each priority is deposited
It stores up and determines matched memory node set to be selected in node set, and choose and deposit from the matched memory node set to be selected
Node is stored up, as the target storage node for storing the data to be stored.
In embodiments of the present invention, cloud platform can pre-set a storage capacity range, based on the range and each
The storage capacity of memory node divides priority for each memory node.Specifically, cloud platform is obtaining each memory node
After storage capacity, the storage capacity of each memory node is compared with default storage capacity range respectively, by storage capacity
Memory node higher than default storage capacity range higher limit is determined as high priority memory node set to be selected, by storage capacity
Memory node within the scope of default storage capacity is determined as middle priority memory node set to be selected, and memory node is handled
The memory node that ability is less than default storage capacity lower range limit is determined as low priority memory node set to be selected.
It later, can be according to the priority of data to be stored, according to preset rule, from the to be selected of each priority
Matched memory node set to be selected is determined in memory node set, and storage is chosen from matched memory node set to be selected
Node, as the target storage node for storing the data to be stored.For example, if the priority of data to be stored is high preferential
Grade then randomly chooses a memory node as the storage data to be stored from high priority memory node set to be selected
Target storage node;If the priority of data to be stored be middle priority, therefrom in priority memory node set to be selected with
Machine selects a memory node as the target storage node for storing the data to be stored;If the priority of data to be stored is
It is described to be stored as storing then to randomly choose a memory node from low priority memory node set to be selected for low priority
The target storage node of data.In this way, realizing that the priority of data to be stored is matched with the storage capacity of memory node, no
It only meets the needs of users, and realizes the rational and efficient use to cloud platform storage node resource, to improve cloud storage
Speed.
The embodiment of the present invention is when receiving data storage request, it is first determined user is excellent set by data to be stored
First grade, and based on the running state information of each memory node of cloud platform in current period, determine the storage of each memory node
Ability determines storage data to be stored storage section according to the priority of data to be stored and the storage capacity of each memory node
Point, not only meets the needs of users, and realizes the rational and efficient use to cloud platform storage node resource, to effectively improve cloud
The speed of storage, the user experience is improved, and the user experience is improved.
Further, with reference to Fig. 5, cloud storage method second embodiment of the present invention provides a kind of cloud storage method, based on upper
Embodiment shown in Fig. 2 is stated, step S220 may include:
Step S2200, each period to be calculated before determining current period;
Step S2201 obtains the storage that cloud platform storage node cluster is completed within each period to be calculated and appoints
Business sum;
Step S2202 calculates single storage of the cloud platform storage node cluster within each period to be calculated and appoints
It is engaged in the deadline;
Step S2203 calculates the average value of the single store tasks deadline, as cloud platform storage node cluster
Store the average time of single store tasks.
In embodiments of the present invention, in order to calculate the pre- stand-by period of each memory node, cloud platform storage section need to be determined
The average time of the point single store tasks of cluster-based storage.Specifically, cloud platform can receive each storage at interval of time T
The completed store tasks sum that node is sent.In order to reduce calculation amount, the performance of cloud platform is not influenced, it is not necessary to based on current
All periods before period, to determine the average time of the single store tasks of cloud platform storage node cluster-based storage, the present invention
Embodiment before choosing current period the arbitrary n period as the period to be calculated, and n >=2.For in the period to be calculated
Any one cycle Ti, cloud platform storage node cluster is primarily based in TiThe total task number M of interior completion calculates TiAnd the ratio of M
Value to get to cloud platform storage node cluster in TiInterior single store tasks deadline ti, cloud platform can be obtained as a result, and deposit
Single store tasks deadline of the node cluster within each period to be calculated is stored up, single store tasks is then calculated and completes
The average value of time, the average time as the single store tasks of cloud platform storage node cluster-based storage.
In the present embodiment, the sum of the store tasks based on the completion in each period before current period, can be true
The average time of the single store tasks of cloud platform storage node cluster-based storage is determined, it is possible thereby to calculate the pre- etc. of each memory node
The time is waited for, so that it is determined that the storage capacity based on carrying condition of each memory node.
Further, cloud storage method 3rd embodiment of the present invention provides a kind of cloud storage method, based on shown in above-mentioned Fig. 2
Embodiment, before step S222, may include:
The pre- stand-by period of each memory node is compared with default stand-by period threshold value respectively by step S223;
The pre- stand-by period is exceeded the memory node of default stand-by period threshold value, as invalid storage node by step S224.
In embodiments of the present invention, when the pre- stand-by period of cloud platform storage node is long, illustrate that the memory node is negative
It carries heavier, in order to avoid influencing the performance of the memory node, ensures the timely storage of data to be stored, the embodiment of the present invention can be with
Pre-set stand-by period threshold value.Cloud platform, respectively will be each after each memory node corresponding pre- stand-by period is calculated
The pre- stand-by period of a memory node is compared with default stand-by period threshold value.When for the pre- stand-by period beyond default wait for
Between threshold value memory node, illustrate that present load is heavier, not as processing the data to be stored memory node to be considered.It needs
Illustrate, stand-by period threshold value can be flexibly arranged according to actual conditions, and the embodiment of the present invention is not construed as limiting this.
In embodiments of the present invention, by the way that stand-by period threshold value is arranged, and when pre- waiting that each memory node is corresponding
Between be compared with stand-by period threshold value, it is possible to prevente effectively from the memory node that cloud platform chooses heavier loads waits depositing as storing
Store up the memory node of data.
In addition, the embodiment of the present invention also proposes a kind of computer readable storage medium,
Cloud storage program is stored on computer readable storage medium of the present invention, the cloud storage program is executed by processor
Shi Shixian is operated as follows:
When receiving data storage request, the priority of data to be stored is determined, and obtain cloud platform in current period
The running state information of each memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determines and waited for described in storage
Store the target storage node of data.
The specific embodiment of computer readable storage medium of the present invention and above-mentioned each embodiment of cloud storage method are essentially identical,
Therefore not to repeat here.
It should be noted that herein, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that process, method, article or system including a series of elements include not only those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including this
There is also other identical elements in the process of element, method, article or system.
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical scheme of the present invention substantially in other words does the prior art
Going out the part of contribution can be expressed in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, computer, clothes
Be engaged in device, air conditioner or the network equipment etc.) execute method described in each embodiment of the present invention.
It these are only the preferred embodiment of the present invention, be not intended to limit the scope of the invention, it is every to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of cloud storage method, which is characterized in that the method includes:
When receiving data storage request, the priority of data to be stored is determined, and it is each to obtain cloud platform in current period
The running state information of memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determine that storage is described to be stored
The target storage node of data.
2. cloud storage method as described in claim 1, which is characterized in that the running state information includes hardware status information
With the stored number of tasks of waiting, the running state information according to each memory node determines each memory node
Storage capacity the step of include:
According to the hardware status information of each memory node, first storage of each memory node based on hardware condition is determined
Ability;
According to the stored number of tasks of the waiting of each memory node, the of each memory node based on carrying condition is determined
Two storage capacities;
According to first storage capacity of each memory node and the second storage capacity, the storage energy of each memory node is determined
Power.
3. cloud storage method as claimed in claim 2, which is characterized in that the hardware status information includes CPU usage, interior
Utilization rate and network resource utilization are deposited, the hardware status information according to each memory node determines each storage
The step of the first storage capacity of the node based on hardware condition includes:
According to the CPU usage, memory usage and the network resource utilization of each memory node, and default calculating is public
Formula calculates first storage capacity of each memory node based on hardware condition.
4. cloud storage method as claimed in claim 2, which is characterized in that the waiting quilt according to each memory node
The number of tasks of storage, determine each memory node based on carrying condition the second storage capacity the step of include:
Determine the average time of the single store tasks of cloud platform storage node cluster-based storage;
According to the stored number of tasks of waiting of the average time and each memory node of the single store tasks of storage, calculate
The pre- stand-by period of each memory node;
According to the pre- stand-by period of each memory node, second storage energy of each memory node based on carrying condition is determined
Power.
5. cloud storage method as claimed in claim 4, which is characterized in that the determining cloud platform storage node cluster-based storage list
The step of average time of a store tasks includes:
Each period to be calculated before determining current period;
Obtain the store tasks sum that cloud platform storage node cluster is completed within each period to be calculated;
Calculate single store tasks deadline of the cloud platform storage node cluster within each period to be calculated;
The average value for calculating the single store tasks deadline, as cloud platform storage node cluster-based storage, individually storage is appointed
The average time of business.
6. cloud storage method as described in claim 1, which is characterized in that the priority according to the data to be stored and
The storage capacity of each memory node, the step of determining the target storage node for storing the data to be stored include:
According to the storage capacity of each memory node, the priority of each memory node is set, and according to described to be stored
The priority of the priority of data and each memory node determines the target storage node for storing the data to be stored.
7. cloud storage method as claimed in claim 6, which is characterized in that the storage energy according to each memory node
The priority of each memory node is arranged in power, and according to described in the priority of the data to be stored and each memory node
Priority, the step of determining the target storage node for storing the data to be stored include:
The storage capacity of each memory node is compared with default storage capacity range respectively;
The memory node that storage capacity is higher than to default storage capacity range higher limit is determined as high priority memory node to be selected
Set;
The memory node that storage capacity is within the scope of default storage capacity is determined as middle priority memory node set to be selected;
Memory node processing capacity is less than to the memory node of default storage capacity lower range limit, and to be determined as low priority to be selected
Memory node set;
According to the priority of the data to be stored, according to preset rules, from the memory node set to be selected of each priority
It determines matched memory node set to be selected, and memory node is chosen from the matched memory node set to be selected, as
Store the target storage node of the data to be stored.
8. cloud storage method as claimed in claim 4, which is characterized in that the pre- waiting according to each memory node
Time, determine each memory node based on carrying condition the second storage capacity the step of before, including:
The pre- stand-by period of each memory node is compared with default stand-by period threshold value respectively;
The memory node that the pre- stand-by period is exceeded to default stand-by period threshold value, as invalid storage node.
9. a kind of cloud platform, which is characterized in that the cloud platform includes:It memory, processor and is stored on the memory
And the cloud storage program that can be run on the processor, following step is realized when the cloud storage program is executed by the processor
Suddenly:
When receiving data storage request, the priority of data to be stored is determined, and it is each to obtain cloud platform in current period
The running state information of memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determine that storage is described to be stored
The target storage node of data.
10. a kind of computer readable storage medium, which is characterized in that be stored with cloud storage on the computer readable storage medium
Program, the cloud storage program realize following steps when being executed by processor:
When receiving data storage request, the priority of data to be stored is determined, and it is each to obtain cloud platform in current period
The running state information of memory node;
According to the running state information of each memory node, the storage capacity of each memory node is determined;
According to the storage capacity of the priority of the data to be stored and each memory node, determine that storage is described to be stored
The target storage node of data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810435170.0A CN108647092A (en) | 2018-05-08 | 2018-05-08 | Cloud storage method, cloud platform and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810435170.0A CN108647092A (en) | 2018-05-08 | 2018-05-08 | Cloud storage method, cloud platform and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108647092A true CN108647092A (en) | 2018-10-12 |
Family
ID=63749526
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810435170.0A Withdrawn CN108647092A (en) | 2018-05-08 | 2018-05-08 | Cloud storage method, cloud platform and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108647092A (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110708369A (en) * | 2019-09-25 | 2020-01-17 | 深圳市网心科技有限公司 | File deployment method and device for equipment nodes, scheduling server and storage medium |
CN113986116A (en) * | 2021-09-07 | 2022-01-28 | 广东珠江智联信息科技股份有限公司 | Distributed storage system and data management method based on distributed storage system |
CN114003175A (en) * | 2021-11-02 | 2022-02-01 | 青岛海信日立空调系统有限公司 | Air conditioner and control system thereof |
CN115048225A (en) * | 2022-08-15 | 2022-09-13 | 四川汉唐云分布式存储技术有限公司 | Distributed scheduling method based on distributed storage |
CN115085900A (en) * | 2022-08-22 | 2022-09-20 | 四川汉唐云分布式存储技术有限公司 | Homomorphic encryption method based on distributed storage |
-
2018
- 2018-05-08 CN CN201810435170.0A patent/CN108647092A/en not_active Withdrawn
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110708369A (en) * | 2019-09-25 | 2020-01-17 | 深圳市网心科技有限公司 | File deployment method and device for equipment nodes, scheduling server and storage medium |
CN110708369B (en) * | 2019-09-25 | 2022-09-16 | 深圳市网心科技有限公司 | File deployment method and device for equipment nodes, scheduling server and storage medium |
CN113986116A (en) * | 2021-09-07 | 2022-01-28 | 广东珠江智联信息科技股份有限公司 | Distributed storage system and data management method based on distributed storage system |
CN114003175A (en) * | 2021-11-02 | 2022-02-01 | 青岛海信日立空调系统有限公司 | Air conditioner and control system thereof |
WO2023077700A1 (en) * | 2021-11-02 | 2023-05-11 | 青岛海信日立空调系统有限公司 | Air conditioner and control system therefor |
CN114003175B (en) * | 2021-11-02 | 2024-02-06 | 青岛海信日立空调系统有限公司 | Air conditioner and control system thereof |
CN115048225A (en) * | 2022-08-15 | 2022-09-13 | 四川汉唐云分布式存储技术有限公司 | Distributed scheduling method based on distributed storage |
CN115048225B (en) * | 2022-08-15 | 2022-11-29 | 四川汉唐云分布式存储技术有限公司 | Distributed scheduling method based on distributed storage |
CN115085900A (en) * | 2022-08-22 | 2022-09-20 | 四川汉唐云分布式存储技术有限公司 | Homomorphic encryption method based on distributed storage |
CN115085900B (en) * | 2022-08-22 | 2022-11-29 | 四川汉唐云分布式存储技术有限公司 | Homomorphic encryption method based on distributed storage |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108563500A (en) | Method for scheduling task, cloud platform based on cloud platform and computer storage media | |
CN108647092A (en) | Cloud storage method, cloud platform and computer readable storage medium | |
CN108628674A (en) | Method for scheduling task, cloud platform based on cloud platform and computer storage media | |
Qi et al. | A QoS-aware virtual machine scheduling method for energy conservation in cloud-based cyber-physical systems | |
CN102306095B (en) | Application management method and terminal | |
CN105122876B (en) | Communication system | |
CN107682443A (en) | Joint considers the efficient discharging method of the mobile edge calculations system-computed task of delay and energy expenditure | |
Van Wissen et al. | ContextDroid: an expression-based context framework for Android | |
CN111694663B (en) | Load balancing method, device and system for server cluster | |
CN102611735A (en) | Load balancing method and system of application services | |
CN110058924A (en) | A kind of container dispatching method of multiple-objection optimization | |
CN102262567A (en) | Virtual machine scheduling decision system, platform and method | |
CN103931262B (en) | A kind of data dispatching method and equipment | |
CN105580407A (en) | Network resource deployment method and device | |
CN103918325A (en) | Determination of ue location in a cell | |
CN108055701B (en) | Resource scheduling method and base station | |
CN111176840B (en) | Distribution optimization method and device for distributed tasks, storage medium and electronic device | |
CN102195890B (en) | Internet application dispatching method based on cloud computing | |
CN106997351A (en) | A kind of caching resource management method and system and device | |
CN105491150A (en) | Load balance processing method based on time sequence and system | |
Tian et al. | User preference-based hierarchical offloading for collaborative cloud-edge computing | |
Kan et al. | QoS-aware mobile edge computing system: Multi-server multi-user scenario | |
Meng et al. | Achieving energy efficiency through dynamic computing offloading in mobile edge-clouds | |
CN103501509A (en) | Method and device for balancing loads of radio network controller | |
CN105208607B (en) | Dispatching method, device and the mobile terminal of terminal network data transmission |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20181012 |