CN116010075A - Resource allocation method and device and computer readable storage medium - Google Patents

Resource allocation method and device and computer readable storage medium Download PDF

Info

Publication number
CN116010075A
CN116010075A CN202111235925.0A CN202111235925A CN116010075A CN 116010075 A CN116010075 A CN 116010075A CN 202111235925 A CN202111235925 A CN 202111235925A CN 116010075 A CN116010075 A CN 116010075A
Authority
CN
China
Prior art keywords
resource
value
resources
attractive force
gravitation
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
CN202111235925.0A
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.)
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Suzhou Software Technology Co Ltd
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 China Mobile Communications Group Co Ltd, China Mobile Suzhou Software Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202111235925.0A priority Critical patent/CN116010075A/en
Priority to PCT/CN2022/118108 priority patent/WO2023065882A1/en
Publication of CN116010075A publication Critical patent/CN116010075A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention discloses a resource allocation method and device and a computer readable storage medium, wherein the consumption value of at least one resource used by at least one use object is counted; determining a resource heat value of each use object for each resource through the consumption value of each resource in at least one resource; wherein the resource heat value characterizes the extent to which the resource is consumed; according to the resource heat value of each resource, determining a resource gravitation value and a gravitation direction value between every two resources; and carrying out dynamic resource allocation according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources. The method provides objective parameter indexes such as resource heat, gravitation value, gravitation direction and the like, so that the platform dynamically allocates resources according to the characteristics of the platform; and an attraction model is introduced to establish an association relation between the resources, so that when a single resource is allocated, the related resources can be allocated together, and the overall resource utilization rate is improved.

Description

Resource allocation method and device and computer readable storage medium
Technical Field
The present invention relates to the field of recommendation application systems and algorithms, and in particular, to a resource allocation method and apparatus, and a computer readable storage medium.
Background
With the development of the internet and information technology, cloud computing is one of research hotspots of the internet, and the simplest definition of the cloud is to convert various resources into services for internet users. At present, a dynamic resource allocation system is mainly adopted to allocate resources, and the allocation method not only helps a service provider to realize reasonable resource allocation and integration, but also satisfies the experience quality of the resources on a platform of a user.
However, the prior art focuses on resource allocation by means of a certain characteristic of resources, performance index analysis, user evaluation model and the like, which results in the problem of low overall resource utilization rate to a certain extent
Disclosure of Invention
The embodiment of the invention provides a resource allocation method and device and a computer readable storage medium, which can improve the overall utilization rate of resources when allocating the resources.
The technical scheme of the invention is realized as follows:
the embodiment of the invention provides a resource allocation method, which comprises the following steps:
counting consumption values of at least one resource used by each of at least one use object;
determining a resource heat value of each use object for each resource through the consumption value of each resource in the at least one resource; wherein the resource heat value characterizes the degree to which the resource is consumed;
According to the resource heat value of each resource, determining a resource gravitation value and a gravitation direction value between every two resources;
and carrying out dynamic resource allocation according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
In the above solution, the determining, by using the consumption value of each resource in the at least one resource, a resource heat value of each resource includes:
determining a total value of consumption of each resource by a consumption value of each resource in the at least one resource used by the at least one usage object;
and determining the resource heat value of each resource according to the total consumption value of each resource and the consumption value of each resource used by each use object.
In the above scheme, the determining the resource gravitation value and the gravitation direction value between every two resources according to the resource heat value of each resource includes:
vector sum operation is carried out on the resource heat values of any two resources in the resources, and a joint result after operation is determined;
determining an attractive force value between the two resources according to the combination result and the resource heat value of each of the two resources;
And determining the attractive force direction value between the two resources according to the resource heat value of each of the two resources and the attractive force value between the two resources.
In the above solution, the determining, according to the combination result and the resource heat value of each of the two resources, the attractive force value between the two resources includes:
determining the total resource heat value of the two resources according to the resource heat value of each of the two resources;
and making a difference between the total resource heat value of the two resources and the combined result, and determining the attractive force value between the two resources.
In the above solution, the determining the attractive force direction value between the two resources according to the resource heat value of each of the two resources and the attractive force value between the two resources includes:
and determining the gravitation direction value between the two resources according to the total resource heat value of the two resources and the gravitation value between the two resources.
In the above scheme, the dynamically allocating resources according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources includes:
Sequencing the at least one resource according to the resource heat value of each resource, and determining a sequencing result;
determining a first resource according to the sequencing result; wherein, the first resource is the resource with the largest resource heat value in the resources;
determining a comparison result by comparing the attractive force value and the attractive force direction value between the second resource and the first resource; wherein the second resource is a resource of the at least one resource from which the first resource is removed;
and carrying out dynamic resource allocation based on the first resource and the comparison result.
In the above solution, the determining the comparison result by comparing the attraction value and the attraction direction value between the second resource and the first resource includes:
if the resource gravitation value between each resource in the second resources and the first resource is unequal, distributing each resource in the second resources according to the resource gravitation value of each resource in the second resources;
and if the resource gravitation values between any two of the second resources and the first resources are equal, performing resource allocation according to the resource gravitation direction values between any two of the second resources and the first resources.
In the above scheme, if the attractive force values of the resources between any two of the second resources and the first resource are equal, performing resource allocation according to the attractive force direction values of the resources between any two of the second resources and the first resource, including:
counting a first attractive force direction value between any two resources in the second resources and the first resource;
making a difference between the first gravitation direction value and a second gravitation direction value in the previous time period, and determining a difference result;
if the difference result is negative, the attractive force direction between at least one resource of the two arbitrary resources and the first resource is negative;
if the difference result is positive, the attractive force direction between at least one resource of the two arbitrary resources and the first resource is positive;
and determining resource allocation of any two resources in the second resources according to the positive attractive force or the negative attractive force.
In the above solution, the determining the resource allocation of any two resources in the second resource according to the positive attraction or the negative attraction includes:
if the attractive force direction is forward, the allocation amount allocated to at least one of the two arbitrary resources is in direct proportion to the allocation amount of the first resource;
If the attractive force direction is negative attractive force, the allocation amount of at least one resource in the random resources is inversely proportional to the allocation amount of the first resource;
and if the gravitation directions of any two resources are positive gravitation or negative gravitation, performing resource allocation according to the difference value between the first gravitation direction value and the second gravitation direction value of the previous time period.
In the above scheme, if the attractive force directions of the two arbitrary resources are both positive attractive force or negative attractive force, performing resource allocation according to a difference value between the first attractive force direction value and the second attractive force direction value in the previous time period, including:
if the attractive force direction of any two resources is forward attractive force, the allocation amount of at least one resource allocated to any two resources is in direct proportion to the difference value;
and if the attractive force direction of any two resources is negative attractive force, the allocation amount of at least one resource allocated to the any two resources is inversely proportional to the difference value.
The embodiment of the invention provides a resource allocation device, which comprises a collecting unit, a determining unit and an allocation unit; wherein, the liquid crystal display device comprises a liquid crystal display device,
the statistics unit is used for counting consumption values of at least one resource used by the object to be used;
The determining unit determines a resource heat value of each resource through the consumption value of each resource in the at least one resource; wherein the resource heat value characterizes the degree to which the resource is consumed;
the determining unit is further used for determining a resource gravitation value and a gravitation direction value between every two resources according to the resource heat value of each resource;
and the allocation unit dynamically allocates the resources according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
An embodiment of the present invention provides a resource allocation apparatus, including:
a memory for storing executable data instructions;
and the processor is used for realizing the resource allocation method according to the embodiment of the invention when executing the executable instructions stored in the memory.
The present embodiment provides a computer readable storage medium, which stores executable instructions for implementing a resource allocation method according to an embodiment of the present invention when the executable instructions cause a processor to execute the executable instructions.
The embodiment of the invention provides a resource allocation method and device and a computer readable storage medium, wherein the method comprises the following steps: collecting the dependent or consumed value of each resource in a period of time; determining a heat value of each resource through the depended or consumed value of each resource; wherein the resource heat value is a representation value of the degree to which each resource is dependent or consumed; and after the heat value of each resource is determined, determining the gravitation and the direction among the resources according to the heat value of each resource. By adopting the implementation scheme, objective parameter indexes such as the heat degree, the gravitation value and the gravitation direction of the resource are proposed from an objective angle, and the situation that the platform dynamically allocates the resource according to the characteristics of the resource or the performance index of the resource is used as the dynamic allocation algorithm parameter is avoided. Furthermore, an attraction model is introduced in the scheme, and an association relation is established among the resources, so that when a single resource is allocated, the related resources can be allocated together, and the overall resource utilization rate is improved.
Drawings
Fig. 1 is a schematic flow chart of a resource allocation method according to an embodiment of the present invention;
fig. 2 is a second flowchart of a resource allocation method according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating a resource allocation method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of vector sum operation of two types of resources according to an embodiment of the present invention;
fig. 5 is a flow chart diagram of a resource allocation method according to an embodiment of the present invention;
fig. 6 is a flowchart of a resource allocation method according to an embodiment of the present invention;
fig. 7 is a flowchart illustrating a resource allocation method according to an embodiment of the present invention;
fig. 8 is a flow chart of a resource allocation method according to an embodiment of the present invention;
fig. 9 is a schematic flow diagram eight of a resource allocation method according to an embodiment of the present invention;
fig. 10 is a schematic structural diagram of a resource allocation device according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of a resource allocation device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without making any inventive effort are within the scope of the present invention.
In order to better understand the aspects of the present invention, the present invention will be described in further detail with reference to the accompanying drawings and detailed description. Fig. 1 is a schematic flow chart of a resource allocation method according to an embodiment of the present invention, and will be described with reference to the steps shown in fig. 1.
S101, counting consumption values of at least one resource used by at least one use object respectively.
The embodiment of the invention is suitable for a scene that the resource allocation device determines the consumed amount of the resource by using the object.
In the embodiment of the invention, the consumption value of each resource can be counted by using the object, specifically, when the consumption value of the resource is calculated, the number of the object is definitely used first, the object using the resource is screened, and the sum of the consumption of the resource by each screened object is carried out to calculate the total consumed amount of the resource.
In the embodiment of the invention, the data is obtained by monitoring the flow, the background analyzes the visitor information in the data, and the record of the visitor application resource is used for determining.
In embodiments of the present invention, the resource may be provided by a device that provides the resource on an underlying basis.
In the embodiment of the invention, the resources can be hardware resources such as server equipment (CUP, memory and disk), storage equipment (disk array), network equipment (router, switch and load balancing) and software resources such as operating system, integrated development environment IDE, database, web server, middleware and cache.
In the embodiment of the invention, the use object can be a user of a public cloud management platform.
It can be understood that in the embodiment of the invention, the consumption of all the resources used by the object of use is counted through the background record, the total consumption of all the resources is further calculated, the total consumption of the resources can be used for defining the demand of each resource in a current period of time, and a precondition is provided for the allocation of the resources in the future.
S102, determining a resource heat value of each use object for each resource through the consumption value of each resource in at least one resource.
The embodiment of the invention is suitable for a scene that the resource heat value of each resource is determined after the resource allocation device obtains the consumed value of each resource.
In the embodiment of the invention, the consumption value of each resource and the value of any one of all the using objects using the resource are obtained, and then the resource heat value of each resource is calculated based on the two values.
In the embodiment of the invention, the resource heat value represents the degree to which the resource is consumed, and when the resource heat is higher, more resources of the type need to be allocated appropriately.
It can be understood that in the embodiment of the invention, the resource heat value of each resource is calculated according to the consumption value of each resource, and which type of resource needs to be allocated more is determined by the resource heat value of each resource, so that the dynamic allocation efficiency of the resource allocation device is improved.
S103, determining a resource gravitation value and a gravitation direction value between every two resources according to the resource heat value of each resource.
The embodiment of the invention is suitable for a scene that the resource allocation device determines the gravitation value and the gravitation direction value between any two resources in all resources after obtaining the resource heat value of each resource.
In the embodiment of the invention, after the resource heat value of each resource is obtained, in order to avoid the isolation consideration between the resources, the resource gravitation value and the gravitation direction value between any two resources are determined through each obtained resource heat value, so that the dynamic allocation of the resources can be carried out from the whole angle.
In the embodiment of the invention, the gravity value represents the size of the area covered by the resource heat values of the two resources.
In the embodiment of the invention, the gravitation direction value can be used for representing the relativity among the resources, and whether the heat value among the resources tends to be the same or different is judged through the gravitation direction value of the resources. In resource allocation, the allocation relationship between resources is limited by whether the resources are homopolar or heteropolar.
It can be understood that in the embodiment of the invention, the resource gravitation value and the gravitation direction value between any two resources are calculated according to the resource heat value of each resource, and the correlation between the resources can be judged according to the gravitation value and the gravitation direction value of the resources, so that when a single resource is allocated, the correlated resources can be allocated together, and the utilization rate of the whole resource of the resource allocation device is improved.
S104, carrying out dynamic resource allocation according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
The embodiment of the invention is suitable for a scene of dynamically distributing each resource after the resource heat value of each resource is determined and the interrelation among the resources is obtained.
In the embodiment of the invention, after the resource heat value of each resource, the resource gravitation value and the gravitation direction value of any two resources are obtained, the resources are dynamically allocated according to the heat value of each resource and the correlation between the heat values of the resources.
It can be understood that in the embodiment of the invention, after the resource heat value of each resource and the resource gravitation value and gravitation direction value of any two resources are obtained, the resources are dynamically allocated according to the heat value and the correlation between the resources, so that when a single resource is allocated, the related resources can be allocated together, and the utilization rate of the whole resource of the resource allocation device is improved.
In some embodiments, referring to fig. 2, fig. 2 is a second flowchart of a resource allocation method according to an embodiment of the present invention, S102 shown in fig. 2 may be implemented by S1021 to S1022, and each step will be described in connection with the description.
S1021, determining the total consumption value of each resource through the consumption value of each resource in at least one resource used by at least one use object.
In some embodiments of the present invention, it is applicable to a scenario in which, after determining that each resource is used by each use object, a total value of each resource consumption is obtained based on an amount of each resource consumed by each use object.
In some embodiments of the present invention, the background record of the resource allocation device may obtain the situation that each usage object applies for the used resource, through these records, the value that each resource is consumed by any one usage object may be obtained, and the total value that the resource is consumed may be determined by adding the amounts of a certain resource consumed by a certain usage object.
For example, assuming that when calculating the number of virtual machines consumed in a certain specification in a public platform within a certain time, the user number U of the platform is determined first, and if U is 8, the user statistics usage amount is a vector (2,2,0,0,2,0,0,2), the vector specifically represents that the 1 st user consumes 2 virtual machines, the second user consumes 2 virtual machines, the 3 rd user consumes 0 virtual machines, and so on, then it can be calculated that n=8 virtual machines are consumed in total within a period of time.
For example, when there is a value consumed within a certain period of time in the computing platform, the number of users does not become 8, the user statistics usage is (200,1000,0,0,500,4000,0,2492), the vector is specifically represented as 200MB of 1 st user consumed memory, 1000MB of second user consumed memory, 0MB of 3 rd user consumed memory, and so on, and finally it can be calculated that the total memory is consumed for 2 times 3 G。
It will be appreciated that in some embodiments of the invention, by using the amount of resources consumed by the subject to calculate the total amount of resources consumed, the total amount of resources consumed may be used to determine the current demand for each resource over a period of time, providing a precondition for the allocation of resources at a later time.
S1022, determining the resource heat value of each resource according to the total consumption value of each resource and the consumption value of each resource used by each use object.
In some embodiments of the present invention, the method is applicable to a scenario in which after a resource allocation device determines a consumption value of a resource, a resource popularity value is determined based on the consumption value of the resource.
In some embodiments of the present invention, when calculating a resource heat value of a certain resource, it is first clear which usage objects apply for the use of the resource, the amount of each usage object consuming the resource is counted, after determining the total consumption of the resource, division operation is performed on any usage object and the total consumption value of the resource, the proportion of the usage object to the total consumption value of the resource is calculated, and finally the resource heat value of the resource is calculated by summing the proportion of each usage object to the total consumption value of the resource.
Illustratively, each resource heat value may be derived by the following formula (1).
Figure BDA0003317663210000091
Wherein X represents a resource; n (N) u A value representing the consumption of the resource by a certain one of the users; CA (X) represents the resource hotness value of the resource; n represents the total value that the resource is consumed.
For example, when a resource heat value of a certain specification of virtual machine in a computing platform in a certain period of time is obtained by S1021, the amount of consumption of the virtual machine by each user in the certain period of time is (2,2,0,0,2,0,0,2), and the total amount of consumed virtual machine is 8, and then the total amount of consumed virtual machine is substituted into formula (1), so as to obtain the resource heat value of the virtual machine, specifically:
Figure BDA0003317663210000101
X represents a virtual machine, and the calculation of the above formula can obtain that the resource heat value of the virtual machine is 0.602.
When X represents the memory, the above calculation can obtain that the resource heat value of the memory is 0.376.
In some embodiments of the present invention, the resource popularity value characterizes how much of the resource is consumed, i.e., more such resources need to be allocated appropriately when the resource popularity is high.
It can be understood that in the embodiment of the present invention, the resource heat value of each resource is calculated according to the consumption value of each resource, and which type of resource needs to be allocated more can be determined according to the resource heat value of the resource, thereby improving the dynamic allocation efficiency.
In some embodiments, referring to fig. 3, fig. 3 is a flowchart illustrating a third resource allocation method provided in an embodiment of the present invention, S103 shown in fig. 3 may be implemented by S1031 to S1033, and each step will be described in connection with the description.
S1031, carrying out vector sum operation on resource heat values of any two resources in the resources, and determining a joint result after operation.
In some embodiments of the present invention, the method is applicable to a scenario in which a resource allocation device obtains resource heat values of any two resources and then determines a joint result between the two resources.
In some embodiments of the present invention, after obtaining resource heat values of any two resources, vector sum operation is performed on the resource heat values of the two resources, a combination result after operation is determined, and based on the combination result, preconditions are provided for calculating an attraction value and an attraction direction value between the two resources later.
For example, when calculating the joint result of the heat value between the virtual machine and the memory, the amount of each user consuming the virtual machine is obtained first: (2,2,0,0,2,0,0,2) the amount of consumed memory is: and (200,1000,0,0,500,4000,0,2492), when the resource heat values of the two resources are subjected to vector sum operation, the corresponding bit numbers of the two vectors are maximized, the joint result after operation is determined to be (200,1000,0,0,500,4000,0,2492), and then the joint result is substituted into a formula to obtain a result.
S1032, determining the attractive force value between the two resources according to the joint result and the resource heat value of each of the two resources.
In some embodiments of the present invention, the method is applicable to a scenario in which after a resource allocation device obtains heat values of two resources, an attractive force value between the resources is determined.
In some embodiments, after the resource heat value and the joint result of the two resources are obtained, the resource heat value of the two resources is subjected to addition operation, an operation result is determined, the operation result and the joint result are subjected to subtraction operation, and an attractive force value between the two resources is determined.
Illustratively, in calculating the attractive force value between two resources, the attractive force value between the virtual machine and the memory can be derived by the following formula (2).
G(XY)=CA(X)+CA(Y)-CA(XY) (2)
Wherein G (XY) is the attractive force value between any two resources, and C (Y) represents the resource heat value of the resource Y; CA (XY) represents a resource X statistical vector
Figure BDA0003317663210000111
Statistical vector with resource Y>
Figure BDA0003317663210000112
Vector sum operation to get the combined result +.>
Figure BDA0003317663210000113
Illustratively, CA (XY) may be derived from equation (1), 0.376, by substituting the values calculated by S1022 and S1031 into equation (3) below:
G(XY)=0.602+0.376-0.376=0.602
g (XY) represents that the attractive force between the virtual machine and the memory is 0.602.
In some embodiments, the result of the operation indicates the total area size covered by the two resources.
In some embodiments, the difference between the result of the operation and the combined result may be expressed as removing the region where the two resources overlap from the total region size, as shown in fig. 4. In fig. 4, CA (X) represents the heat value of the resource X, CA (Y) represents the heat value of the resource Y, the total heat value of the resource X and the resource Y is represented as the total area covered by the two circles in fig. 4, CA (XY) is the joint result obtained by vector sum operation of the resource X statistical vector and the resource Y statistical vector, as shown by the hatched portion in fig. 4; since the hatched portion is repeatedly calculated, the attractive force value between the resource X and the resource Y should be actually the total area CA (X) +ca (Y) covered by two circles minus the area CA (XY) of the hatched portion.
It can be appreciated that in some embodiments of the present invention, the attractive force value of two resources is determined by the resource heat value of each resource and the joint result between the two resources, and the correlation between the resources is determined based on the attractive force value, so that when the resources are allocated, the related resources are allocated together, and the overall resource utilization rate is improved.
S1033, determining the attractive force direction value between the two resources according to the resource heat value of each of the two resources and the attractive force value between the two resources.
In some embodiments of the present invention, the method is applicable to a scenario in which the resource allocation device obtains the resource heat value and the attraction value of each resource and then determines the attraction direction value.
In some embodiments, when calculating the attractive force direction value between two resources, firstly acquiring the resource heat value of the two resources, and summing the two resource heat values to acquire the total resource heat value of the two resources; and performing division operation based on the determined attractive force value between the two resources and the total resource heat value between the two resources, and determining the attractive force direction value between the two resources.
Illustratively, the attractive force direction value between the virtual machine and the memory can be calculated by the following formula (3).
Figure BDA0003317663210000121
Wherein, the liquid crystal display device comprises a liquid crystal display device,
Figure BDA0003317663210000122
g (XY) is the attractive force value between any two resources, which is the attractive force direction value between any two resources.
Illustratively, when calculating the attractive force direction value between the virtual machine and the memory, substituting the values obtained by S1032 and S1022 into formula (3) yields:
Figure BDA0003317663210000123
as can be seen from the above calculation result, the attractive force direction value between the virtual machine and the memory is 0.616.
It can be appreciated that in some embodiments of the present invention, the attractive force direction value of two resources is determined by the resource heat value of each resource and the attractive force value between the two resources, and the interrelation between the resources is determined based on the attractive force direction value, so that when the resources are allocated, the related resources are allocated together, and the overall resource utilization is improved.
In some embodiments, referring to fig. 5, fig. 5 is a flowchart of a resource allocation method provided in the embodiment of the present invention, S104 shown in fig. 5 may be implemented by S1041 to S1044, and each step will be described in connection with the description.
S1041, sorting at least one resource according to the resource heat value of each resource, and determining a sorting result.
In some embodiments of the present invention, the method is applicable to a scenario in which after a resource allocation device obtains a resource popularity value of each resource, a relationship between the popularity value and the resource popularity value of each resource is determined.
In some embodiments of the present invention, after the resource popularity value of each resource is determined, each resource is ordered from large to small according to the resource popularity value.
In some embodiments of the present invention, the data may be sorted according to sorting algorithms such as fast sorting, insert sorting, merge sorting, and bubble sorting, and embodiments of the present invention are not limited.
It can be understood that in the embodiment of the invention, the resources are ordered according to the resource heat value, and the allocation amount of each resource is determined according to the ordering result, so that the dynamic allocation efficiency of the resources is improved.
S1042, determining a first resource according to the sorting result; the first resource is the resource with the largest resource heat value in the resources.
In some embodiments of the present invention, the resource allocation apparatus is adapted to obtain, after obtaining the ranking result of each resource, a scenario in which the allocated amount of the resource is the largest based on the ranking result.
In some embodiments of the present invention, after the ordering result is obtained, the resource with the largest resource heat value in the resources is determined.
For example, the resources to be allocated on the platform are a virtual machine, a memory and a hard disk, the heat values of the virtual machine and the memory are obtained by S1022 and are respectively 0.602 and 0.376, the heat value of the hard disk is calculated by the formula (1) to be 0.301, the heat values of the three resources are ordered from big to small, and the heat value is the largest for the virtual machine, and the heat value is the smallest for the hard disk, so that the first resource is the virtual machine.
In some embodiments of the present invention, a resource with a maximum resource popularity value among the resources may indicate that the allocation of the resource is higher than other resources.
It can be understood that in the embodiment of the invention, the resource allocation device selects the resource with the largest resource heat value in the resources according to the resource heat value, and the resource heat value of the resource confirms that the demand of the resource is the largest, so that the allocation amount allocated to the resource is the largest, and the dynamic allocation efficiency of the resource is improved.
S1043, comparing the gravitation value and the gravitation direction value between the second resource and the first resource to determine a comparison result; the second resource is a resource after the first resource is removed from at least one resource.
In some embodiments of the present invention, the method is applicable to a scenario in which the resource allocation device obtains the attraction value and the attraction direction value between the second resource and the first resource, and then feeds back the comparison result.
In some embodiments of the present invention, the resource with the greatest resource heat value has been clarified, and the allocation amount of the second resource is ordered by comparing the attractive force value and the attractive force direction value between the second resource and the first resource. It can be understood that in the embodiment of the invention, after the resource with the largest heat value is obtained, the correlation between the second resource and the resource with the largest heat value is determined through the gravitation value and the gravitation direction value, so that when the resource with the largest heat value is allocated, the related resources are allocated together, and the overall resource utilization rate is improved.
S1044, performing dynamic resource allocation based on the first resource and the comparison result.
In some embodiments of the present invention, the method and the apparatus are applicable to a scenario in which a resource allocation apparatus dynamically allocates a resource based on a first resource and a final comparison result after the first resource and the final comparison result are acquired.
In some embodiments of the present invention, the allocation of the first resources is determined first, then the correlation between the resources in the second resources and the first resources is determined based on the final comparison, and then each of the second resources is allocated.
It can be understood that in the embodiment of the present invention, the dynamic allocation of resources is performed based on the first resources and the comparison result, so that when the resources with the largest heat value are allocated, the related resources are allocated together, thereby improving the overall resource utilization rate.
In some embodiments, referring to fig. 6, fig. 6 is a flowchart of a resource allocation method provided by the embodiment of the present invention, as shown in fig. 6, comparing a gravitation value and a gravitation direction value between a second resource and a first resource to obtain a comparison result, where the method mainly includes the following steps:
and S201, if the resource gravitation values of each of the second resources and the first resources are not equal, distributing each of the second resources according to the resource gravitation value of each of the second resources.
In some embodiments of the present invention, the resource allocation apparatus is adapted to allocate each resource after obtaining the attractive force value between each resource in the second resources and the first resource.
In some embodiments of the present invention, after comparing the resource attraction value between each of the second resources and the first resource, if the resource attraction values between each of the second resources and the first resource are not equal, it is proved that the allocation amounts of each of the second resources are different, the resources are allocated according to the attraction values.
It may be appreciated that in some embodiments of the present invention, when the resource attractive value between each of the second resources and the first resource is obtained by calculation, the resource is allocated according to the attractive value of each of the second resources. By the allocation mode, when the resources with the maximum heat value are allocated, the related resources are allocated together, and the overall resource utilization rate is improved.
S202, if the resource attractive force values between any two of the second resources and the first resources are equal, resource allocation is carried out according to the resource attractive force direction values between any two of the second resources and the first resources.
In some embodiments of the present invention, the resource allocation apparatus is adapted to allocate each resource after obtaining the attractive force value between each resource in the second resources and the first resource.
In some embodiments of the present invention, after comparing the resource attraction value between each of the second resources and the first resource, if the resource attraction values between any two of the second resources and the first resource are equal, it is necessary to determine the resource attraction direction value between any two of the second resources and the first resource, and determine the allocation amount allocated to each of the second resources according to the attraction direction value.
Exemplary, S1032 shows that the attractive force between the virtual machine and the memory is 0.602, and the attractive force between the virtual machine and the hard disk is also calculated by formula (2), which is 0.602; the attractive force value between the virtual machine and the memory is equal to the attractive force value between the hard disk and the virtual machine, so that the attractive force direction values among the resources are required to be compared for resource allocation.
It may be appreciated that in some embodiments of the present invention, after obtaining that there are at least two resources in the second resource that are equal to the attractive force value between the first resource, the allocation amount allocated to the resources that are equal to the attractive force value is determined by calculating the attractive force direction value between the resources that are equal to the attractive force value in the second resource and the first resource. By the allocation mode, when the resources with the maximum heat value are allocated, the related resources are allocated together, and the overall resource utilization rate is improved.
In some embodiments, referring to fig. 7, fig. 7 is a flowchart of a resource allocation method provided by the embodiment of the present invention, as shown in fig. 7, when the attractive force values of any two resources in the second resources are equal to the attractive force value of the first resource, the resource allocation is performed according to the attractive force direction value of the resource between any two resources in the second resources and the first resource, and mainly includes the following steps:
s301, counting a first attractive force direction value between any two resources in the second resources and the first resource.
In some embodiments of the present invention, the resource allocation device is adapted to a scenario in which after the resource allocation device determines that the resource attraction value between any two resources in the second resource and the first resource is equal, the resource is allocated based on the resource attraction direction value between any two resources in the second resource and the first resource.
In some embodiments of the present invention, after obtaining that there are at least two attractive force values between the second resource and the first resource are equal, it is necessary to count first attractive force direction values between the at least two resources and the first resource in the second resource to determine an allocation amount allocated to the resource.
In some embodiments of the present invention, the statistics may be the gravity direction values calculated by S1033.
It can be understood that the resource allocation amount allocated to the resources with equal attraction value in the second resources is determined according to the attraction direction value of the resources between any two resources in the second resources and the first resources. When the gravitation values of the resources are equal, the resources are compared through the gravitation direction values of the resources, the allocation amount of each resource is defined, and the overall resource utilization rate is improved.
S302, making a difference value between the first gravitation direction value and the second gravitation direction value in the previous time period, and determining a difference result.
In some embodiments of the present invention, the method is applicable to a scenario in which the resource allocation device obtains the gravitation direction values of different time periods, and determines the difference result based on the gravitation direction values of different time periods.
In some embodiments of the present invention, the first attraction value and the second attraction value are subtracted, and the dynamic allocation of the resources is performed according to the difference result obtained after the subtraction.
TABLE 1 resource attraction direction value relationship mapping table
Illustratively, table 1 is a relationship mapping table of resource attraction direction values:
gravity value First attractive force direction value Second attractive force direction value Difference value
Hard disk and virtual machine 0.667 0.733 -0.056
Virtual machine and memory 0.616 0.501 0.115
As can be seen from Table 1 above, the difference in direction of attraction between the hard disk and the virtual machine is-0.056, and the difference in direction of attraction between the virtual machine and the memory is 0.115.
In some embodiments of the present invention, the second gravitational direction value is the gravitational direction value obtained by the calculation method of S1033 in the previous cycle.
It can be understood that in some embodiments of the present invention, the difference result is calculated according to the attraction direction values in different time periods, and the resources are compared according to the difference result between the attraction direction values, so as to determine the allocation of each resource, thereby improving the overall resource utilization rate.
And S303, if the difference result is negative, the attractive force direction between at least one resource in any two resources and the first resource is negative.
In some embodiments of the present invention, the method is applicable to a scenario in which the resource allocation device determines, after obtaining the difference result, a direction of attraction between a resource with equal attraction value and the first resource based on the difference result.
In some embodiments of the present invention, after the difference result of the gravitation direction values in different time periods is obtained, if the difference result is negative, the gravitation direction between at least one resource and the first resource in any two resources is negative.
Illustratively, as shown in table 1 above, a difference between the hard disk and the virtual machine of-0.056 indicates that the direction of attraction between the hard disk and the virtual machine is negative.
In some embodiments of the present invention, the negative attraction may be expressed as a tendency of the resource heat value of two resources to diverge.
It can be understood that in some embodiments of the present invention, by obtaining that the attractive force direction values of the resources in different time periods are negative, determining the attractive force direction between any two resources in the second resource and the first resource, and by determining the attractive force direction between the resources, the correlation between the resources is determined, thereby improving the overall resource utilization rate.
S304, if the difference result is positive, the attractive force direction between at least one resource in any two resources and the first resource is positive.
In some embodiments of the present invention, the method is applicable to a scenario in which the resource allocation device determines, after obtaining the difference result, a direction of attraction between a resource with equal attraction value and the first resource based on the difference result.
In some embodiments of the present invention, after the difference result of the gravitation direction values in different time periods is obtained, the gravitation direction between the resources is determined according to the difference result, and if the gravitation direction is positive, the gravitation direction between the resources is proved to be positive.
Illustratively, as shown in table 1 above, a difference between the virtual machine and the memory of 0.115 indicates that the direction of attraction between the virtual machine and the memory is forward.
In some embodiments of the invention, the forward attraction may be expressed as a tendency of the resource heat values of two resources to be equal.
It can be understood that in some embodiments of the present invention, the attractive force direction between any two resources in the second resource and the first resource is determined by obtaining the attractive force direction values of the resources in different time periods as positive, and the correlation between the resources is determined by the attractive force direction between the resources, so that the overall resource utilization rate is improved.
S305, determining resource allocation of any two resources in the second resources according to the positive attractive force or the negative attractive force.
In some embodiments of the present invention, the resource allocation apparatus is adapted to a scenario in which the resource allocation apparatus allocates the resource after acquiring a gravitational direction between the resource in the second resource and the first resource.
In some embodiments of the present invention, after the attractive force direction between the first resource and any two resources with equal attractive force values in the second resource is obtained, any two resources in the second resource are allocated according to whether the attractive force direction is positive or negative.
It can be appreciated that in some embodiments of the present invention, the correlation between the resources is determined according to the attractive force direction between any two resources in the second resources and the first resources, so that the overall resource utilization rate is improved.
In some embodiments, referring to fig. 8, fig. 8 is a flow chart seven of a resource allocation method provided by the embodiment of the present invention, as shown in fig. 8, determining resource allocation of any two resources in the second resource according to positive attraction or negative attraction, and mainly includes the following steps:
s401, if the attractive force direction is forward, the allocation amount of at least one resource allocated to any two resources is in direct proportion to the allocation amount of the first resource;
in some embodiments of the present invention, the method and the apparatus are applicable to a scenario in which a resource is allocated after a resource allocation apparatus determines a direction of gravitational force.
In some embodiments of the present invention, after the attractive force direction between any two resources in the second resources and the first resources is obtained, if the attractive force direction is positive, it indicates that in the second resources, at least one allocation amount of the resources is proportional to the allocation amount of the first resources, and when the first resources are allocated, the allocation amount of the resources proportional to the first resources also needs to be dynamically increased.
For example, as shown in table 1 above, if the direction of attraction between the virtual machine and the memory is forward, the allocation amount of the memory is increased correspondingly when the memory is allocated. It can be appreciated that in some embodiments of the present invention, the resources are allocated according to the attractive force direction between any two of the second resources and the first resource, so that when a single resource is allocated, the related resources are allocated together, thereby improving the overall resource utilization rate.
S402, if the attractive force direction is negative attractive force, the allocation amount of at least one resource in any resources is inversely proportional to the allocation amount of the first resource;
in some embodiments of the present invention, the method and the apparatus are applicable to a scenario in which a resource is allocated after a resource allocation apparatus determines a direction of gravitational force.
In some embodiments of the present invention, after the attractive force direction between any two resources in the second resources and the first resources is obtained, if the attractive force direction is negative, it indicates that in the second resources, at least one allocation amount of the resources is inversely proportional to the allocation amount of the first resources, and when the first resources are allocated, the allocation amount of the resources inversely proportional to the first resources also needs to be dynamically reduced.
For example, as shown in table 1 above, if the direction of attraction between the hard disk and the virtual machine is negative, the allocation amount of the hard disk is reduced when the virtual machine is allocated. It can be appreciated that in some embodiments of the present invention, the resources are allocated according to the attractive force direction between any two of the second resources and the first resource, so that when a single resource is allocated, the related resources are allocated together, thereby improving the overall resource utilization.
And S403, if the gravitation directions of any two resources are positive gravitation or negative gravitation, performing resource allocation according to the difference value between the first gravitation direction value and the second gravitation direction value of the previous time period. In some embodiments of the present invention, the method and the apparatus are applicable to a scenario in which a resource is allocated after a resource allocation apparatus determines a direction of gravitational force.
In some embodiments, S403 may be derived from S4031 to S4032 by the following steps:
s4031, if the attractive force direction of any two resources is forward attractive force, the allocation amount of at least one resource allocated to the any two resources is in direct proportion to the difference value;
s4032, if the attractive force direction of the arbitrary two resources is negative attractive force, the allocation amount of at least one resource allocated to the arbitrary two resources is inversely proportional to the difference value.
In some embodiments of the present invention, when the attractive force direction values between any two resources with equal attractive force values and the first resource are both positive or both negative, it is indicated that when the first resource is allocated, the allocation amount of the resources with the attractive force direction being positive/negative with respect to the first resource should be properly increased/decreased, and specifically, the increase/decrease range of each resource should be determined according to the difference value between the first attractive force direction value and the second attractive force direction value of the previous time period. The larger the difference of the resources is, the more resources are allocated relatively if the directions of the gravities are all positive, and the smaller the allocation amount of the resources is, the larger the difference of the resources is, if the directions of the gravities are all negative.
It can be understood that in some embodiments of the present invention, when the attractive force directions between any two resources in the second resources and the first resources are the same, a difference value needs to be further calculated, and when the resources are allocated according to the difference value so that a single resource is allocated, related resources are allocated together, thereby improving the overall resource utilization rate.
In order to further embody the purposes of the present invention, an exemplary application of the embodiments of the present invention in a practical application scenario will be described below.
Fig. 9 is a schematic flow chart eight of a resource allocation method according to an embodiment of the present invention.
Taking public cloud management platform as an example, the method mainly comprises the following steps:
1. the consumption value of at least one resource used by each of the at least one usage object is counted.
The consumption value of each resource can be counted by determining the number of the objects to be used, screening the objects using the resource, and summing the screened amounts of the resources consumed by each object to be used to calculate the total amount of the consumed resources.
2. And judging whether the consumption value of the resource changes or not, wherein the consumption value of the resource changes along with the change of a user.
3. When the platform obtains that the resource is applied for use by the existing user or the new user, the consumption value of the resource is changed, namely, the consumption value of the resource is updated.
4. And determining the resource heat value of each use object for each resource through the consumption value of each resource in at least one resource.
Determining, by the consumption value of each of the at least one resource, a resource heat value for each of the usage objects for each of the resources includes:
4.1, determining the total consumption value of each resource through the consumption value of each resource in at least one resource used by at least one using object.
And 4.2, determining the resource heat value of each resource according to the total consumption value of each resource and the consumption value of each resource used by each use object.
When calculating the heat value of the resource, the consumed value and the consumed total value of each user need to be defined; the popularity value of the resource is determined by the value consumed by each user and the total value consumed.
5. And determining a resource gravitation value and a gravitation direction value between every two resources according to the resource heat value of each resource.
According to the resource heat value of each resource, determining the resource gravitation value and the gravitation direction value between every two resources, including:
And 5.1, carrying out vector sum operation on the resource heat values of any two resources in the resources, and determining the joint result after operation.
And 5.2, determining the attractive force value between the two resources according to the joint result and the resource heat value of each of the two resources.
And 5.3, determining the attractive force direction value between the two resources according to the resource heat value of each of the two resources and the attractive force value between the two resources.
6. And carrying out dynamic resource allocation according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
The resource dynamic allocation is carried out according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources, which comprises the following steps:
and 6.1, sequencing at least one resource according to the resource heat value of each resource, and determining a sequencing result.
6.2, determining a first resource according to the sequencing result; the first resource is the resource with the largest resource heat value in the resources.
6.3, determining a first resource according to the sequencing result; the first resource is the resource with the largest resource heat value in the resources.
6.4, comparing the gravitation value and the gravitation direction value between the second resource and the first resource to determine a comparison result; the second resource is a resource after the first resource is removed from at least one resource.
After the resource allocation device finishes the work of each resource original data, the resources are required to be ordered according to the heat value, and the resources are dynamically allocated in sequence according to the heat value. When the resource is dynamically allocated, the dynamic adjustment of the resource allocation is required according to the gravitation value and the gravitation direction value, and if the gravitation value of the resource Y is larger than the gravitation value of the resource Z when the resource X is dynamically allocated, the resource Y is larger than the allocated resource Z when the resource X is allocated; if the attractive force value of the resource Y is equal to the attractive force value of the resource Z, but the attractive force direction values of the resource X and the resource Y are increased and the attractive force direction values of the resource X and the resource Y are decreased, the resource Y is increased and the allocated resource Z is relatively decreased when the resource is allocated.
It can be understood that when the cloud management platform allocates the resources, the resource heat value of each resource is calculated first, and the resource with the largest resource heat value is selected to give more allocation amount. And then calculating the gravitation value and the gravitation direction value between the residual resource and the resource with the largest resource heat value, determining the correlation between the residual resource and the resource with the largest resource heat value according to the gravitation value and the gravitation direction value, and finally converting the single dynamic resource allocation into the allocation of the resources together when the resources are dynamically allocated, thereby improving the utilization rate of the whole resources.
Based on the method of the foregoing embodiment, the embodiment of the present application further provides a resource allocation device, as shown in fig. 10, and fig. 10 is a schematic structural diagram of the resource allocation device provided in the embodiment of the present application, where the device includes: a statistics unit 1001, a determination unit 1002, and an allocation unit 1003; the statistics unit 1001 is configured to count consumption values of at least one resource used by a usage object; the determining unit 1002 determines a resource popularity value of each resource by using the consumption value of each resource in the at least one resource; wherein the resource heat value characterizes the degree to which the resource is consumed; the determining unit 1003 is further configured to determine a resource gravity value and a gravity direction value between every two resources according to the resource heat value of each resource; and the allocation unit dynamically allocates the resources according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
Based on the method of the foregoing embodiment, the embodiment of the present application further provides a resource allocation device, as shown in fig. 11, fig. 11 is a schematic structural diagram of the resource allocation device provided in the embodiment of the present application, where the device includes: a processor 1101 and a memory 1102; the memory 1101 stores one or more programs executable by the processor, which when executed, perform by the processor 1102 any of the resource allocation methods of the embodiments described above.
Based on the resource allocation method of the above embodiment, the present application further provides a computer readable storage medium, where one or more programs are stored, the one or more programs may be executed by one or more processors, and when the programs are executed by the processors, the resource allocation method as disclosed in the present embodiment is implemented.
It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of a hardware embodiment, a software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, magnetic disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The foregoing description is only of the preferred embodiments of the present invention, and is not intended to limit the scope of the present invention.

Claims (13)

1. A method for resource allocation, comprising:
counting consumption values of at least one resource used by each of at least one use object;
determining a resource heat value of each use object for each resource through the consumption value of each resource in the at least one resource; wherein the resource heat value characterizes the degree to which the resource is consumed;
According to the resource heat value of each resource, determining a resource gravitation value and a gravitation direction value between every two resources;
and carrying out dynamic resource allocation according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
2. The method of claim 1, wherein determining the resource popularity value for each resource from the consumption value for each resource in the at least one resource comprises:
determining a total value of consumption of each resource by a consumption value of each resource in the at least one resource used by the at least one usage object;
and determining the resource heat value of each resource according to the total consumption value of each resource and the consumption value of each resource used by each use object.
3. The method according to claim 1, wherein determining the resource attraction value and the attraction direction value between every two resources according to the resource heat value of each resource comprises:
vector sum operation is carried out on the resource heat values of any two resources in the resources, and a joint result after operation is determined;
determining an attractive force value between the two resources according to the combination result and the resource heat value of each of the two resources;
And determining the attractive force direction value between the two resources according to the resource heat value of each of the two resources and the attractive force value between the two resources.
4. A method according to claim 3, wherein said determining a gravity value between the two resources based on the joint result and the resource heat value of each of the two resources comprises:
determining the total resource heat value of the two resources according to the resource heat value of each of the two resources;
and making a difference between the total resource heat value of the two resources and the combined result, and determining the attractive force value between the two resources.
5. A method according to claim 3, wherein said determining a direction of attraction value between the two resources from the resource heat value of each of the two resources and the attraction value between the two resources comprises:
and determining the gravitation direction value between the two resources according to the total resource heat value of the two resources and the gravitation value between the two resources.
6. A method according to any one of claims 1 to 3, wherein the dynamically allocating resources according to the resource heat value of each resource, the resource attraction value between every two resources, and the attraction direction value comprises:
Sequencing the at least one resource according to the resource heat value of each resource, and determining a sequencing result;
determining a first resource according to the sequencing result; wherein, the first resource is the resource with the largest resource heat value in the resources;
determining a comparison result by comparing the attractive force value and the attractive force direction value between the second resource and the first resource; wherein the second resource is a resource of the at least one resource from which the first resource is removed;
and carrying out dynamic resource allocation based on the first resource and the comparison result.
7. The method of claim 6, wherein the determining the comparison result by comparing the attractive force value and the attractive force direction value between the second resource and the first resource comprises:
if the resource gravitation value between each resource in the second resources and the first resource is unequal, distributing each resource in the second resources according to the resource gravitation value of each resource in the second resources;
and if the resource gravitation values between any two of the second resources and the first resources are equal, performing resource allocation according to the resource gravitation direction values between any two of the second resources and the first resources.
8. The method of claim 7, wherein if the resource attraction value between any two of the second resources and the first resource is equal, performing resource allocation according to the resource attraction direction value between any two of the second resources and the first resource comprises:
counting a first attractive force direction value between any two resources in the second resources and the first resource;
making a difference between the first gravitation direction value and a second gravitation direction value in the previous time period, and determining a difference result;
if the difference result is negative, the attractive force direction between at least one resource of the two arbitrary resources and the first resource is negative;
if the difference result is positive, the attractive force direction between at least one resource of the two arbitrary resources and the first resource is positive;
and determining resource allocation of any two resources in the second resources according to the positive attractive force or the negative attractive force.
9. The method of claim 8, wherein determining the resource allocation of any two of the second resources based on the positive or negative attraction comprises:
If the attractive force direction is forward, the allocation amount allocated to at least one of the two arbitrary resources is in direct proportion to the allocation amount of the first resource;
if the attractive force direction is negative attractive force, the allocation amount of at least one resource in the random resources is inversely proportional to the allocation amount of the first resource;
and if the gravitation directions of any two resources are positive gravitation or negative gravitation, performing resource allocation according to the difference value between the first gravitation direction value and the second gravitation direction value of the previous time period.
10. The method of claim 9, wherein if the attractive force directions of the two resources are positive attractive force or negative attractive force, performing resource allocation according to a difference between the first attractive force direction value and a second attractive force direction value of a previous time period comprises:
if the attractive force direction of any two resources is forward attractive force, the allocation amount of at least one resource allocated to any two resources is in direct proportion to the difference value;
and if the attractive force direction of any two resources is negative attractive force, the allocation amount of at least one resource allocated to the any two resources is inversely proportional to the difference value.
11. A resource allocation device, characterized in that the resource allocation device comprises a statistics unit, a determination unit and an allocation unit; wherein, the liquid crystal display device comprises a liquid crystal display device,
the statistics unit is used for counting consumption values of at least one resource used by the object to be used;
the determining unit determines a resource heat value of each resource through the consumption value of each resource in the at least one resource; wherein the resource heat value characterizes the degree to which the resource is consumed;
the determining unit is further used for determining a resource gravitation value and a gravitation direction value between every two resources according to the resource heat value of each resource;
and the allocation unit dynamically allocates the resources according to the resource heat value of each resource, the resource gravitation value and the gravitation direction value between every two resources.
12. A resource allocation apparatus, characterized in that the resource allocation apparatus comprises:
a memory for storing executable data instructions;
a processor for implementing the method of any one of claims 1 to 10 when executing executable instructions stored in said memory.
13. A computer readable storage medium storing executable instructions for causing a processor to perform the method of any one of claims 1 to 10.
CN202111235925.0A 2021-10-22 2021-10-22 Resource allocation method and device and computer readable storage medium Pending CN116010075A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111235925.0A CN116010075A (en) 2021-10-22 2021-10-22 Resource allocation method and device and computer readable storage medium
PCT/CN2022/118108 WO2023065882A1 (en) 2021-10-22 2022-09-09 Method and apparatus for resource allocation, and computer-readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111235925.0A CN116010075A (en) 2021-10-22 2021-10-22 Resource allocation method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN116010075A true CN116010075A (en) 2023-04-25

Family

ID=86017924

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111235925.0A Pending CN116010075A (en) 2021-10-22 2021-10-22 Resource allocation method and device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN116010075A (en)
WO (1) WO2023065882A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9367355B1 (en) * 2015-01-28 2016-06-14 Yahoo!, Inc. Resource utilization by one or more tasks
US11489731B2 (en) * 2016-09-30 2022-11-01 Salesforce.Com, Inc. Techniques and architectures for efficient allocation of under-utilized resources
CN111435317B (en) * 2019-01-14 2023-04-11 阿里巴巴集团控股有限公司 Data processing method, computing device and storage medium
CN110362400B (en) * 2019-06-17 2022-06-17 中国平安人寿保险股份有限公司 Resource cache allocation method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2023065882A1 (en) 2023-04-27
WO2023065882A9 (en) 2023-06-01

Similar Documents

Publication Publication Date Title
CN109783224B (en) Task allocation method and device based on load allocation and terminal equipment
CN105637925B (en) Dynamic frequency and power resource allocation with refinement tactical management
CN107562531B (en) Data equalization method and device
CN106878415B (en) Load balancing method and device for data consumption
JP2004199561A (en) Computer resource assignment method, resource management server for executing it, and computer system
US20070250629A1 (en) Method and a system that enables the calculation of resource requirements for a composite application
CN110365765A (en) A kind of bandwidth scheduling method and device of cache server
Chatterjee et al. Design and implementation of an improved datacenter broker policy to improve the QoS of a cloud
CN110347515B (en) Resource optimization allocation method suitable for edge computing environment
US8813087B2 (en) Managing a workload in a cluster of computing systems with multi-type operational resources
CN112148492A (en) Service deployment and resource allocation method considering multi-user mobility
CN110233866B (en) Load balancing method and load balancer
WO2015027935A1 (en) Method and device for allocating computational resources
JPWO2010044131A1 (en) RESOURCE ALLOCATION DEVICE, RESOURCE ALLOCATION PROGRAM, RECORDING MEDIUM, AND RESOURCE ALLOCATION METHOD
CN110968424A (en) Resource scheduling method, device and storage medium based on K8s
Kapgate Efficient service broker algorithm for data center selection in cloud computing
CN110149377A (en) A kind of video service node resource allocation methods, system, device and storage medium
US20130166751A1 (en) Distributed resource management systems and methods for resource management thereof
JP2014164425A (en) Information processing apparatus, resource control method, and program
Vishakha Performance Analysis of Cloud Load Balancing Algorithms
CN116010075A (en) Resource allocation method and device and computer readable storage medium
CN110069319B (en) Multi-target virtual machine scheduling method and system for cloud resource management
CN108200185B (en) Method and device for realizing load balance
CN111988388A (en) Flow distribution method and device, electronic equipment and storage medium
CN116546028A (en) Service request processing method and device, storage medium and electronic equipment

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