CN108122062B - Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set - Google Patents
Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set Download PDFInfo
- Publication number
- CN108122062B CN108122062B CN201611089360.9A CN201611089360A CN108122062B CN 108122062 B CN108122062 B CN 108122062B CN 201611089360 A CN201611089360 A CN 201611089360A CN 108122062 B CN108122062 B CN 108122062B
- Authority
- CN
- China
- Prior art keywords
- product
- resources
- evaluation model
- resource
- preferred
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/06—Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
- G06Q10/063—Operations research, analysis or management
- G06Q10/0631—Resource planning, allocation, distributing or scheduling for enterprises or organisations
- G06Q10/06312—Adjustment or analysis of established resource schedule, e.g. resource or task levelling, or dynamic rescheduling
Landscapes
- Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Operations Research (AREA)
- Game Theory and Decision Science (AREA)
- Development Economics (AREA)
- Marketing (AREA)
- Educational Administration (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application provides a method for allocating resources in a product set, which comprises the following steps: acquiring the distributable quantity of the set resource specification of each product in the product set; establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification; acquiring the specification and the number of the distributed objects; and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects. The application also provides a method for establishing the evaluation model of the product and the resources in the product set. The method does not generate specification fragments when the resources are allocated, and is low in complexity and good in instantaneity in the calculation process.
Description
Technical Field
The application relates to the technical field of resource allocation, in particular to a method for allocating resources in a product set. The application also relates to an allocation device of resources in a product set. The application also relates to a method of establishing an assessment model of a resource in a product, a device for establishing an assessment model of a resource in a product, a method of establishing an assessment model of a resource in a product set and a device for establishing an assessment model of a resource in a product set.
Background
With the continuous development of cloud computing, a plurality of cloud servers with different specifications can be operated on a single server by virtue of a virtualization technology. When providing the virtual cloud server service, firstly, the remaining allocable amount of resources with different specifications in a single server needs to be evaluated, and then, in combination with the specific requirements of an allocated object (a virtual cloud server), how to specifically allocate the resources in the server (i.e., how to generate the virtual cloud server) can be determined. For example, a server with resource specifications of 16 processor cores and 16GB memories respectively can allocate resources to produce one cloud server with 16 core and 16GB memories, or two cloud servers with 8 core and 8GB memories, or one cloud server with 8 core and 8GB memories and two cloud servers with 4 core and 4GB memories, without generating allocation fragments and wasting specification resources.
Servers providing virtual cloud server services are usually managed in units of server clusters, and one server cluster may contain thousands of single servers with different resource specifications. When a cloud server of a particular resource specification is allocated, it is often necessary to evaluate the remaining amount of resources to compute the entire cluster of servers to determine whether and how to optimize the allocation of resources to that cloud server.
In the evaluation scheme of the prior art, each server in the server cluster may produce all the resource specifications of the cloud server, for example, from 1 core 1G memory to 32 core 32GB memory, and the resources of each server are added, so as to determine the allocable resources in the server cluster. At this time, each server in the cluster server needs to perform division calculation to obtain the production quantity of each cloud server specification, then sum all the servers under the cluster, and then obtain the comprehensive evaluation of the allocable resources of the cluster server.
In the prior art, when a cloud server is clustered, a method is adopted to determine whether the number of allocable resources meets the requirement of the production cloud server. If the comprehensive evaluation of the allocable resources of the cluster servers determines that the allocable resources of the servers in the server cluster can support the production of the cloud servers with the required specifications, one of the servers meeting the requirements is randomly selected for production. After production is finished, the remaining amount of each cloud server specification resource also needs to be recalculated.
The prior art has the following disadvantages:
for the resource evaluation of the server cluster, the calculation complexity is high, and the real-time performance is difficult to ensure. A cluster is often composed of thousands of single servers, and the production specification of cloud servers often exceeds hundreds; one server cluster is used for resource assessment once, which usually involves about one hundred thousand division operations, and has high calculation complexity and low resource assessment efficiency. Moreover, cloud server production, release, migration, etc. can cause dynamic changes to server cluster resources.
Randomly allocating the resources of a cluster is prone to resource waste. Since the cloud server computing and storage resources within the cluster are shared. For example, the server has the physical resources of 8-core 8G memory, and theoretically, two cloud servers with 4-core and 4G memory, one cloud server with 4-core and 8G memory and one cloud server with 8-core and 8G memory can be produced. However, if a cloud server with 4 cores and 8G memory is produced, the server cannot produce servers with other specifications, and 4 cores of resources are fragmented, so that server resources are wasted.
Disclosure of Invention
The application provides a resource allocation method in a product set, a resource allocation device of the product set, a method for establishing an evaluation model of resources in a product, a device for establishing an evaluation model of resources in a product, a method for establishing an evaluation model of resources in the product set, a device for establishing an evaluation model of resources in the product set and an electronic device, so as to solve the problems that when the resources of the existing product set are allocated, the evaluation calculation complexity is high, the real-time performance is difficult to guarantee, and the resource specification fragments are wasted due to unreasonable resource allocation.
The application provides a method for allocating resources in a product set, which comprises the following steps:
acquiring the distributable quantity of the set resource specification of each product in the product set;
establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification;
acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification;
and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
Optionally, the unit values of each set resource specification in the evaluation model are integers raised to the power.
Optionally, the preferred allocation specification is the maximum set resource specification that does not generate resource specification waste after allocating resources to the allocated target.
Optionally, the step of allocating the resources in the product set to the allocated object according to the specification and the quantity of the allocated object according to the evaluation model of the resources in the product set includes:
and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resources in the product set to the allocated object according to the preferred allocation specification.
Optionally, the step of allocating the resources in the product set to the allocated object according to the specification and the quantity of the allocated object according to the evaluation model of the resources in the product set includes:
if the specification of the allocated object is different from the preferred allocation specification, allocating resources in the product set to the allocated object according to the preferred allocation specification which is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
Optionally, after executing the step of allocating the resource in the product set to the allocated object according to the preferred allocation specification if the specification of the allocated object is the same as the preferred allocation specification, or after executing the step of allocating the resource in the product set to the allocated object according to the preferred allocation specification which is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set if the specification of the allocated object is different from the preferred allocation specification, the following steps are executed:
if the number of the allocated objects exceeds the preferred allocation number of the allocated preferred allocation specification, allocating resources in the product set to the allocated objects according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the specification of the allocated objects in the evaluation model of the product set, aiming at the part of the allocated objects exceeding the preferred allocation number.
Optionally, the preferred distribution specification closest to the specification of the distributed object in the evaluation model of the product set is determined by using a euclidean distance formula.
Optionally, the step of establishing an evaluation model for evaluating resources in the product set according to the assignable number of the set resource specification of each product includes:
aggregating and adding the evaluation models of the resources in the products to establish the evaluation model for evaluating the resources in the product set.
Optionally, the specification value of the evaluation model in the dimension of the set resource specification is a power of 2.
Optionally, the evaluation model of the resource in the product is established by performing the following steps:
respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits;
respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimensions to generate preferred distribution coordinates;
and aggregating the generated preferred allocation coordinates to establish the evaluation model of the resources in the product.
Optionally, the paired bit values are paired in the dimension of each set resource specification.
Optionally, the step of establishing the evaluation model of the resources in the product by using the generated preferred allocation coordinates of the set includes:
and marking the number of the generated preferred distribution coordinates on each preferred distribution coordinate in the evaluation model.
Optionally, the step of establishing the evaluation model of the resources in the product by using the generated preferred allocation coordinates of the set includes:
determining the preferred distribution specification corresponding to the preferred distribution coordinate according to the preferred distribution coordinate;
aggregating the determined preferred allocation specifications into the assessment model of the resources of the product.
Optionally, the number of the set resource specifications is two.
Optionally, the step of respectively obtaining digit values after the non-zero digits in the binary digits according to the sequence from the high order to the low order, and respectively taking paired digit values located in the same order as coordinate values corresponding to the set resource specification dimensions, and establishing a preferred allocation coordinate in the evaluation model of the resource in the product includes:
searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
continuously searching a next non-zero digit in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
returning to continue to find a next non-zero number in the binary digits before each non-zero number in the binary digits is found; and establishing a preferred distribution coordinate in a two-dimensional table evaluation model of the resource of the product by respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate.
Optionally, the product is a single server, and the set resource specification is a processor core and a memory.
The application provides an allocation device of resources in a product set, comprising:
a resource allocable quantity acquiring unit, configured to acquire an allocable quantity of a set resource specification of each product in the product set;
the resource evaluation model unit is used for establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification;
an acquisition allocated object specification and quantity unit for acquiring the specification and quantity of allocated objects; the specification of the allocated object corresponds to the set resource specification;
and allocating resource units according to the evaluation model, wherein the resource units are used for allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects according to the evaluation model of the resources in the product set.
Optionally, the unit values of each set resource specification in the evaluation model are integers raised to the power.
Optionally, the preferred allocation specification is the maximum set resource specification that does not generate resource specification waste after allocating resources to the allocated target.
Optionally, the allocating resource units according to the evaluation model includes:
and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resource in the product set to the allocated object according to the preferred allocation specification.
Optionally, the allocating resource units according to the evaluation model includes:
and a specification non-simultaneous resource allocation unit for allocating, if the specification of the allocated object is different from the preferred allocation specification, a resource in the product set to the allocated object in accordance with the preferred allocation specification that is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
Optionally, after the resource units are allocated when the triggering criteria are the same or the resource units are allocated when the criteria are different, the following units are triggered:
and allocating a resource unit for allocating the resource in the product set to the allocated object according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the specification of the allocated object in the evaluation model of the product set, if the number of the allocated object exceeds the allocated preferred allocation quantity of the preferred allocation specification, aiming at the part of the allocated object exceeding the allocated preferred allocation quantity.
Optionally, the preferred distribution specification closest to the specification of the distributed object in the evaluation model of the product set is determined by using a euclidean distance formula.
Optionally, the unit for establishing an evaluation model of resources in the product set is configured to:
and triggering and establishing an evaluation model unit of resources in the product aiming at each product, and aggregating and adding the obtained evaluation models of the resources in each product to establish the evaluation model for evaluating the resources in the product set.
Optionally, the specification value of the evaluation model in the dimension of the set resource specification is a power of 2.
Optionally, the unit for establishing an evaluation model of resources in a product includes:
converting the allocable quantity into a binary unit, and respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits;
a preferred distribution coordinate generating unit, configured to obtain digit values after non-zero digits in the binary digits according to a sequence from a high digit to a low digit, and generate preferred distribution coordinates by using paired digit values located in the same sequence as coordinate values corresponding to the set resource specification dimensions;
and the set optimal distribution coordinate unit is used for generating the optimal distribution coordinates in a set mode and establishing the evaluation model of the resources in the product.
Optionally, the paired bit values are paired in the dimension of each set resource specification.
Optionally, the set preferably assigns a coordinate unit, including:
a number unit for labeling the preferred allocated coordinates, which is used for labeling the generated number of the preferred allocated coordinates on each of the preferred allocated coordinates in the evaluation model.
Optionally, the set preferably assigns a coordinate unit, including:
a preferred allocation specification determining unit, configured to determine the preferred allocation specification corresponding to the preferred allocation coordinate according to the preferred allocation coordinate;
and the preferred distribution specification aggregation unit is used for aggregating the determined preferred distribution specification and adding the evaluation model of the resource of the product.
Optionally, the number of the set resource specifications is two.
Optionally, the generating a preferred assigned coordinate unit includes:
determining a first preferred allocation coordinate unit, which is used for searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
determining a next preferred allocated coordinate unit for continuing to find a next non-zero number in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
a determining triggering condition unit for returning to trigger the determining of the next preferred allocated coordinate unit before each non-zero number in the binary digits is found.
Optionally, the product is a single server, and the set resource specification is a processor core and a memory.
The application provides a method for establishing an evaluation model of resources in a product, which comprises the following steps:
acquiring the distributable quantity of the set resource specification of the product;
respectively converting the acquired distributable number into binary digits;
respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimensions to generate preferred distribution coordinates of the product resources;
collecting the generated optimal distribution coordinates, and establishing an evaluation model of resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
The application provides a device for establishing an evaluation model of resources in a product, which comprises the following steps:
the device comprises a unit for acquiring the distributable quantity of the set resource specification, a unit for acquiring the distributable quantity of the set resource specification of the product and a unit for acquiring the distributable quantity of the set resource specification of the product;
a unit for converting the allocable number into binary digits, for converting the acquired allocable number into binary digits respectively;
a preferred distribution coordinate generating unit, configured to obtain digit values after non-zero digits in the binary digits according to a sequence from a high digit to a low digit, and generate preferred distribution coordinates of the product resources by using paired digit values located in a same sequence as coordinate values corresponding to the set resource specification dimensions;
the evaluation model unit is used for collecting the generated optimal distribution coordinates and establishing an evaluation model of the resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
The application provides a method for establishing an evaluation model of resources in a product set, which comprises the following steps:
for each product in the product set, executing the method for establishing the evaluation model of the resources in the product to obtain an evaluation model corresponding to the resources in each product;
and aggregating and adding the obtained evaluation models of the resources in the products to establish the evaluation models of the resources in the product set.
The application provides a device for establishing an evaluation model of resources in a product set, which comprises the following steps:
an evaluation model unit for obtaining resources in products, configured to trigger, for each product in the product set, the device for establishing an evaluation model for resources in products to obtain an evaluation model for resources in each product;
and establishing an evaluation model unit of the resources in the product set, wherein the evaluation model unit is used for aggregating and adding the obtained evaluation models of the resources in the products to establish the evaluation model of the resources in the product set.
The present application further provides an electronic device, comprising:
a display;
a processor;
a memory for storing a program for allocating resources in a collection of products, which when read and executed by the processor performs the following operations: acquiring the distributable quantity of the set resource specification of each product in the product set; establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification; acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification; and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
Compared with the prior art, the method has the following advantages:
according to the method and the device, the resource multidimensional data model of a single product and a product set is generated according to the specification characteristics of the product, a large amount of calculation can be omitted, the resource multidimensional data model can be directly used for evaluating the distributable resource states of various specifications of the product set, the complexity of the calculation process is low, and the real-time performance is good;
according to the technical scheme, the maximum specification allocable resources can be found out, production is scientifically scheduled in a mode that the maximum specification does not waste product resources as far as possible, and the problem of resource waste can be effectively reduced.
Drawings
FIG. 1 is a schematic diagram of an embodiment of a method for allocating resources in a product set according to a first embodiment of the present application;
FIG. 2 is a schematic diagram of a two-dimensional table of an evaluation model of resources in a product set according to a first embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of an apparatus for allocating resources in a product set according to a second embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of a method for modeling an assessment of a resource in a product according to a third embodiment of the present application;
FIG. 5 is a schematic diagram of an embodiment of an apparatus for modeling an assessment of a resource in a product according to a fourth embodiment of the present application;
FIG. 6 is a schematic diagram of an embodiment of a method for establishing an evaluation model of resources in a product set according to a fifth embodiment of the present application;
FIG. 7 is a schematic diagram of an embodiment of an apparatus for modeling an assessment of a resource in a product set according to a sixth embodiment of the present application;
fig. 8 is a schematic diagram of an embodiment of an electronic device according to a seventh embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The present application provides a method for allocating resources in a product set, a device for allocating resources in a product set, a method for creating an evaluation model of resources in a product, a device for creating an evaluation model of resources in a product, a method for creating an evaluation model of resources in a product set, a device for creating an evaluation model of resources in a product set, and an electronic device, and embodiments of the present application are described in detail below with reference to the accompanying drawings in order.
Please refer to fig. 1, which is a flowchart illustrating an embodiment of a method for allocating resources in a product set according to a first embodiment of the present application. The method for allocating the resources in the product set comprises the following steps:
step S101: and acquiring the distributable quantity of the set resource specification of each product in the product set.
And acquiring the distributable quantity of the set resource specification of all the set member products in the product set.
The resources in the product set are the sum of the resources in all the products in the product set. Products include, but are not limited to, physical or virtual devices that can serve a particular purpose; resources in a product include, but are not limited to, computing resources, storage resources, logic resources, and the like. For example, in this embodiment, the product is a single server, the product set is a server cluster, and the resources in the product and the product set are computing and storage resources that can provide a virtual cloud server.
The resource specification is set as a preset measurement specification unit of the resource in the product, the content of which can be the component parts, components or other factors closely related to the product, and the like, and the resource specification can be used for evaluating main indexes representing the property, the performance or other relevant products of the product. For example, in the present embodiment, the resource specification is set as a processor core and a memory. The allocable quantity of the set resource specification of a product is the remaining quantity of resources available for allocation on the specific set resource specification of the product.
For example, in this embodiment, the product set is a cluster of 5 servers, and this step is to obtain the remaining allocatable numbers of processor cores and memories of all 5 servers in the server cluster, where the numbers are 20 cores and 12GB for the server 1, 16 cores and 12GB for the server 2, 8 cores and 16GB for the server 3, 16 cores and 16GB for the server 4, and 4 cores and 2GB for the server 5, respectively.
Step S103: establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification;
according to the acquired distributable quantity of the set resource specification of each product, an evaluation model for evaluating the resources in the product set can be established.
The evaluation model may be multi-latitudinal, the specific latitude of which depends on the number of the set resource specifications of the product, and the unit values of the respective set resource specifications in the evaluation model are integers raised to the power. For example, in the embodiment, if there are two resource specifications set for the server, the evaluation model of the server and the server cluster is two-dimensional, and the unit values of the two-dimensional evaluation model on the processor core and the memory are all powers of 2, i.e. 1, 2, 4, 8, 16 and 32 (2)0,21,22,23,24And 25) And the like.
Preferably, the allocation specification is a set resource specification which is the largest in which no waste of the resource specification occurs after the resource is allocated to the allocated target. The preferred allocation specification corresponds to a specific coordinate point in the evaluation model, and this coordinate point may also be referred to as an exclusive unit, and a coordinate value on the set resource specification is the preferred allocation specification. The preferred allocation specification indicates that the resource corresponding to the specification is allocated, and the resource specification is maximally utilized, so that the resource specification fragments are not generated, and the resource allocation of other specifications is not influenced. For example, in this embodiment, the allocable number of the processor cores and the memory of the server 5 is 4 cores and 2GB, and after the processor cores and the memory are allocated to 12 cores and 2GB cloud servers, a resource specification fragment of 2 cores is generated. Therefore, this specification for the core 2GB of the server 5, 2 is not a preferred allocation specification. For another example, 8 cores and 16GB of the server 3 can produce a cloud server with the maximum specification of 8 cores and 16GB memory without wasting any resources; of course, it is also possible to produce smaller sized cloud servers, e.g., 2 cloud servers of 4 cores and 8GB, again without generating resource-sized pieces. For the servers 3, 8 cores 16GB and 4 cores 8GB are the preferred distribution specifications.
The preferred dispense amount corresponds to the preferred dispense specification, i.e. the preferred dispense amount is the amount of resources in the product for which the preferred dispense specification is specified. For example, the preferred allocation number for the preferred allocation specification of the server 3,4 core 8GB is 2.
The assessment model can determine a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification. The evaluation model evaluates the assignable status of the product and the resources in the product set according to the preferred allocation specification and the preferred allocation quantity, and the essence of the evaluation model is a multi-dimensional table in which the exclusive cell coordinate points corresponding to the preferred allocation specification are collected. .
For example, in this embodiment, this step is to establish a two-dimensional table evaluation model for evaluating resources in the server and the server cluster; in the two-dimensional table evaluation model, a total of 6 exclusive units (coordinate points) are owned by 5 servers, i.e., a is (2,1), B is (2,2), C is (3,4), D is (4,3), E is (4,3), and F is (4, 4); referring to fig. 2, the 6 coordinate points are summarized to form fig. 2- (2). The preferred allocation specifications and preferred allocation quantities corresponding to the exclusive units are respectively as follows: 1 for 4 core processor 2GB, 1 for 4 core processor 4GB, 1 for 8 core processor 16GB, 2 for 16 core processor 8GB, and 1 for 16 core processor 16 GB.
The following describes in detail the method of establishing an assessment model of a product and resources in a product collection. A method of establishing an evaluation model of resources in a product is first described.
Step S103-1: and respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits.
Firstly, the distributable quantity of the set resource specification of the product is obtained and is respectively converted into a secondary system number.
For example, in this embodiment, the allocable number of the acquired processor in the server 1 is 20 cores, and the allocable number of the memory is 12 GB; the allocable number of processors and memory of the server indicates that 20 core processors and 12GB of memory can be used to produce the cloud server. The 20 core processor and 12GB memory of the server are converted into binary numbers, and the converted results are 010100 for the processor and 001100 for the memory, respectively.
Step S103-3: and respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimension to generate an optimal distribution coordinate.
And according to the sequence from high order to low order, respectively obtaining the numerical value of the digit of the binary digit after the non-zero digit from each binary digit corresponding to each set resource specification, and respectively using the numerical value of the digit at the same sequence position as the coordinate value of the corresponding dimension to generate the corresponding optimal distribution coordinate.
The preferred allocation coordinate is a coordinate point of the preferred allocation specification corresponding to the set resource specification in the multidimensional evaluation model, for example, the abscissa of the preferred allocation coordinate generated in this embodiment corresponds to the processor, and the ordinate corresponds to the memory.
The numerical value of the number of digits of the binary digit following the non-zero digit refers to a numerical value of the total number of digits of the binary digit, which is also included after the digit of the non-zero digit, from the upper order to the lower order.
For example, in the present embodiment, in the binary digit 010100 corresponding to the processor, from the high order to the low order, the number of bits included after the first non-zero digit 1 is obtained is 4, and the number of bits included after the second non-zero digit 1 is obtained is 2; in the binary digit 001100 corresponding to the memory, from the high order to the low order, the number of bits included after the first non-zero digit 1 is obtained is 3, and the number of bits included after the second non-zero digit 1 is obtained is 2; respectively taking the numerical values of the digits in the same sequence position as coordinate values, namely taking a first digit numerical value 4 of a processor and a first digit numerical value 3 of a memory in the same sequence position as an abscissa 4 and an ordinate 3; taking the second digit numerical value 2 of the processor and the second digit numerical value 2 of the memory in the same order as an abscissa 2 and an ordinate 2; so that 2 preferred assignment coordinates (4,3) and (2,2) can be produced as shown in fig. 2- (1).
When the above steps are performed to establish an evaluation model of a product, the specification values in the set resource specification dimension are all required to be 2 to the power of 0, for example, 20,21,22,23,24,25The same is true of the processor and memory specifications in this embodiment.
Meanwhile, the paired digit numerical values require pairing in the dimension of each set resource specification; for unpaired values in the same order, no preferred assigned coordinates are generated. In the two-dimensional evaluation model, if one setting component with the same sequence can find a digit value and the other component cannot find the digit value, one of an abscissa and an ordinate is obtained; at this time, the complete optimal distribution coordinate cannot be generated, and the next step is directly performed without any processing for generating the optimal distribution coordinate. For example, in this embodiment, if the binary number of the processor is 010110, in which three non-zero values appear, and the binary number of the memory is 001100, in which only two non-zero values appear, then no processing is performed on the third non-zero value of the processor in the same order.
If the number of the resource specifications is set to be two, that is, the dimension of the corresponding evaluation model is 2, the following preferred method can be adopted for executing the step to generate the preferred distribution coordinate:
step S103-3-1: searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
step S103-3-3: continuously searching a next non-zero digit in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
step S103-3-5: returning to continue to find a next non-zero number in the binary digits before each non-zero number in the binary digits is found; and establishing a preferred distribution coordinate in a two-dimensional table evaluation model of the resource of the product by respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate.
Steps S103-3-1 to S103-3-5 adopt a mode of finding one by one a pair of assignable number digit values of the set resource specification of the same rank. Firstly, searching a first non-zero digit in two binary digits with set resource specification conversion from high order to low order; using the found digit numerical value after the first non-zero number of one set resource specification and the found digit numerical value after the first non-zero number of the other set resource specification as paired values respectively serving as a value of a horizontal coordinate and a value of a vertical coordinate to generate a preferred distribution coordinate;
continuously searching a next non-zero digit in the binary digits; respectively taking the digit numerical value after the found next non-zero digit of one set resource specification and the digit numerical value after the found next non-zero digit of the other set resource specification as the values of the abscissa and the ordinate to generate an optimal distribution coordinate;
selecting any one of the two set resource specifications to set the resource specification, and returning to execute the step S103-3-3 until all the pair values are found before all the non-zero digits in the binary digits of the set resource specification are found.
For example, in this embodiment, the binary number of the processor is 010100 and the binary number of the memory is 001100; the preferable steps are as follows: firstly, searching a first non-zero digit in binary digits of a processor and a memory, namely 1 of a second bit in 010100 and 1 of a third bit in 001100 from high order to low order; finding out the digit numerical value after the first non-zero digit of the processor, namely 0100 which is calculated after 1 of the second digit and has 4 bits in total, wherein the digit numerical value is 4; and finding out a digit value after the first non-zero digit of the memory, namely 3 bits in total of 100 bits which are calculated after 1 of the third bit, wherein the digit value is 3; generating a preferred assigned coordinate (4,3) as the values of the abscissa and the ordinate, respectively;
continuously searching a next non-zero digit in the binary digits; finding the digit value 2 after the next non-zero digit of the processor and the digit value 2 after the next non-zero digit of the memory; generating a preferred assigned coordinate (2,2) as the values of the abscissa and the ordinate, respectively;
selecting any one of the two set resource specifications to set the resource specification, and judging whether all non-zero digits in the binary digits of the processor are found out if the processor is selected; at this time, 2 non-zero digits in the binary digits of the processor are found out, and the condition of returning to continue to find the digit value after the next non-zero digit is not met, thus ending the preferred step.
Step S103-5: and aggregating the generated preferred allocation coordinates to establish the evaluation model of the resources in the product.
And collecting the generated optimal distribution coordinates to form coordinate sets corresponding to the dimensions of the set resource specification, putting the coordinate sets into a coordinate graph system corresponding to the dimensions of the set resource specification, and establishing the evaluation model of the resources in the product.
When a two-dimensional evaluation model is adopted, all the generated optimal distribution coordinates are the optimal distribution coordinates to be generated in a set mode, and all the optimal distribution coordinates are marked to corresponding table units on the two-dimensional table evaluation model; in view of the graph, that is, the same origin is shared, in order to convert the coordinate system into the two-dimensional table, the optimal assigned coordinates in the original coordinate system respectively correspond to the cells in the two-dimensional table.
For example, the rows in the two-dimensional evaluation model of this embodiment correspond to processors, and the columns correspond to memories; the unit of the row is the core number, and the unit of the column is GB; line 1 is 20I.e., 1 core processor, line 2 is a 2 core processor, line 3 is a 4 core processor, and so on; column 1 is 20I.e., 1GB memory, column 2 is 21I.e. 2GB memory, column 3 is 22I.e. 4GB memory, and so on. The generated preferred assigned coordinates (4,3) and (2,2) are aggregated, i.e., a two-dimensional evaluation model of the corresponding server 1 is established.
When establishing an evaluation model of resources in a product, the following preferred steps can also be executed:
step S103-5-3: and marking the number of the generated preferred distribution coordinates on each preferred distribution coordinate in the evaluation model.
Marking the number of the preferred distribution coordinates in the corresponding evaluation model according to the generated preferred distribution coordinates; if one preferred assigned coordinate does not coincide with the other preferred assigned coordinate, marking 1 on the preferred assigned coordinate; if the preferred allocation coordinates are overlapped, namely the generated preferred allocation coordinates are located at the same coordinate position, the number of the overlapped preferred allocation coordinates is marked on the preferred allocation coordinates.
And the coordinate values of the dimensions of the preferred distribution coordinates respectively correspond to the specification power of the set resource specification, and the preferred distribution coordinates can be marked in the corresponding evaluation model according to the power relation.
For example, in the present embodiment, the preferred allocation of the rendezvous server 1Coordinates (4,3) and (2,2), and when generating a two-dimensional evaluation model as a resource in a product, it is preferable to assign the coordinates (4,3) to indicate that the row is 24I.e. processor 16 core simultaneous column is 23Namely 8GB of memory, corresponding to 16 cores and 8GB in the two-dimensional table, the cell in the 5 th row and 4 th column is marked with the number 1 in this cell; preferably, the assigned coordinate (2,2) indicates that the row is 22I.e. processor 4 core simultaneous column is 22I.e. 4GB of memory, in a two-dimensional table corresponding to 4 cores and 4GB, the cell of row 3 and column 3 is marked with the number 1 in this cell. At this time, a two-dimensional table as an evaluation model of resources in a product is obtained, and 2 cells on the table have the number 1, which are the cell of the 5 th row and the 4 th column and the cell of the 3 rd row and the 3 rd column, respectively. Assuming that another preferred assignment coordinate (2,2) is also generated at this time, when a cell in the 3 rd row and 3 rd column of the two-dimensional table is labeled, numeral 2 is labeled to indicate that the cell corresponds to the 2 preferred assignment coordinates.
The small diagram labeled (1) at the upper left corner in fig. 2 shows a two-dimensional table generated as an evaluation model of resources in the server after the set optimal assignment coordinates are completed in the present embodiment.
When establishing an evaluation model of resources in a product, the following preferred steps can also be executed:
step S103-5-1: determining the preferred distribution specification corresponding to the preferred distribution coordinate according to the preferred distribution coordinate; aggregating the determined preferred allocation specifications to incorporate the assessment model for resources in the product.
When the evaluation model is established, the preferred distribution specifications corresponding to the preferred distribution coordinates can be determined according to the preferred distribution coordinates, and the determined preferred distribution specifications are collected and added into the evaluation model.
After this preferred step, there is a set of preferred allocation coordinates and preferred allocation specifications in the evaluation model. In this way, when resource allocation is performed, the preferred allocation coordinates or the preferred allocation specification can be conveniently selected for the next calculation.
After establishing the evaluation model of the resources in the product, the evaluation model of the resources in the product set may be established:
step S103-7: aggregating and adding the evaluation models of the resources in the products to establish the evaluation model for evaluating the resources in the product set.
And aggregating and adding all the evaluation models of the resources in the products to form an evaluation model serving as the resources in the product set. When a plurality of evaluation models are aggregated, the number of coincident preferred assigned coordinates needs to be also aggregated.
For example, in this embodiment, 5 two-dimensional evaluation model tables of 5 servers in the server cluster are all aggregated and added to one two-dimensional evaluation model table, as shown in fig. 2- (2), to obtain an evaluation model as a resource in the server cluster.
Step S105: acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification.
The allocated object is an allocated object of a resource in a product. In this embodiment, the allocated object is a virtual cloud server. The specification of the allocated object is in one-to-one correspondence with the set resource specification, and the specification value of the allocated object is also in correspondence with the set resource specification and is a power of an integer.
For example, in the present embodiment, the specification of the allocated objects is the cpu core and the memory, and the unit values thereof are both powers of 2. Assume that the specific specification of the allocated target virtual cloud server in this embodiment is 8 core processors and 4GB memories, and the number is 2.
Step S107: and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
And according to the established evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the acquired specification and number of the allocated objects.
In this step, the optimal allocation specification most suitable for allocating resources to the allocated objects is determined by using the established evaluation model, and resource allocation is performed. How the allocation is specifically performed will be described in detail in the sub-step of this step.
Step S107-1: and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resources in the product set to the allocated object according to the preferred allocation specification.
If the specification of the allocated object is the same as the preferred allocation specification in the evaluation model, the resource may be allocated to the allocated object according to the preferred allocation specification (i.e., the specification of the allocated object).
Because the specification of the allocated object is the optimal allocation specification which does not generate resource specification fragment waste, the specification can be directly adopted to allocate the resources.
For example, in the present embodiment, assuming that 1 cloud server with a specification of 4 core processors 2GB memory is allocated, and the specification of the cloud server is the same as that of the preferred allocation specification of 4 core processors 2GB memory in the evaluation model, resources of 4 core processors 2GB memory (corresponding to the server 5) can be directly allocated to the cloud server.
Step S107-3: if the specification of the allocated object is different from the preferred allocation specification, allocating resources in the product set to the allocated object according to the preferred allocation specification which is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
If the assigned object's specification and the preferred assignment specification in the evaluation model are not the same, then resources may be assigned to the assigned object in accordance with a preferred assignment specification that is greater than the assigned object's specification and that is closest to the assigned object's specification in the evaluation model.
In the case where the specification of the assigned object and the preferred assignment specification in the evaluation model are not the same, the coordinate point corresponding to the specification of the assigned object in the evaluation model is not an exclusive cell. In this case, it is necessary to specify an exclusive cell closest to the coordinate point corresponding to the allocated object, and allocate the resource to the allocated object in accordance with the preferred allocation specification corresponding to the exclusive cell.
The preferred distribution specification closest to the specification of the distributed object in the evaluation model of the product set is determined by using a euclidean distance formula, and since the preferred distribution specification corresponds to the coordinate point in the evaluation model, the distances between the coordinate point in the evaluation model corresponding to the specification of the distributed object and the coordinate points corresponding to other preferred distribution specifications can be calculated by using the euclidean distance formula, and the preferred distribution specification corresponding to the coordinate point with the shortest distance is the closest preferred distribution specification. In a two-dimensional evaluation model, the formula is directly applied; in an evaluation model of more than three dimensions, this formula may be applied by geometric methods (e.g., determining the shortest distance between two coordinate points in a three-dimensional evaluation model).
The preferred allocation specification determined in this step needs to be determined to be larger than the specification of the allocated object, otherwise, resources cannot be allocated. This is reflected in the evaluation mode, i.e. the determination of the optimal allocation specification within the specified area.
For example, in this embodiment, as shown in fig. 2- (3), if the specification of the cloud server to be allocated is 8GB of memory of the core processor 4, and there is no optimal allocation specification identical to the specification, the coordinate point corresponding to the optimal allocation specification and closest to the specification of the cloud server may be found, that is, the coordinate point corresponding to the optimal allocation specification is found to the lower right of the coordinate point (3,2) in fig. 2- (3), and it is finally determined that the closest coordinate point is (3,4) and corresponds to the optimal allocation specification of the 8GB of memory of the core processor 16, and the resource of the server (i.e., the server 2) corresponding to the optimal allocation specification stored in the 8GB of the core processor 16GB may be allocated to the cloud server.
After performing step S107-1 or S107-3 to allocate resources to the allocated objects, the following preferred steps may also be performed:
step S107-5: if the number of the allocated objects exceeds the allocated preferred allocation number of the preferred allocation specification, allocating resources in the product set to the allocated objects according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the allocated object specification in the evaluation model of the product set, for the part of the allocated objects exceeding the allocated preferred allocation number.
If the number of allocated objects exceeds the preferred allocation number of the allocated preferred allocation specification, resources may be allocated to the allocated objects according to a preferred allocation specification that is greater than the allocated preferred allocation specification and closest to the allocated objects' specification in the evaluation model of the product set for the allocated objects that exceed the preferred allocation number.
For example, in the present embodiment, it is assumed that 2 cloud servers whose allocated objects are 2GB memories whose specification is 4 core processors 2GB are allocated with resources (corresponding to the server 5) of 14 core processors 2GB memory, and then resources may be allocated to the remaining 1 cloud server in accordance with 8GB memories, which is the closest preferred allocation specification, of 8 core processors 16GB memories, which is larger than the allocated preferred allocation specification 4 core processors 2GB memory.
Please refer to fig. 3, which is a schematic diagram of an embodiment of an apparatus for allocating resources in a product set according to a second embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to the description of the first embodiment for relevant points. The device embodiments described below are merely illustrative.
The application provides an allocation device of resources in a product set, comprising:
a resource allocable quantity acquiring unit 201, configured to acquire an allocable quantity of a set resource specification of each product in the product set;
an evaluation model unit 203 for establishing resources in a product set, configured to establish an evaluation model for evaluating resources in the product set according to the assignable number of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification;
an acquire allocated object specification and quantity unit 205 for acquiring the specification and quantity of allocated objects; the specification of the allocated object corresponds to the set resource specification;
and a resource allocation unit 207 according to an evaluation model, configured to allocate the resources in the product set to the allocated objects according to the specification and the number of the allocated objects according to the evaluation model of the resources in the product set.
Optionally, the unit values of each set resource specification in the evaluation model are integers raised to the power.
Optionally, the preferred allocation specification is the maximum set resource specification that does not generate resource specification waste after allocating resources to the allocated target.
Optionally, the allocating resource units according to the evaluation model includes:
and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resource in the product set to the allocated object according to the preferred allocation specification.
Optionally, the allocating resource units according to the evaluation model includes:
and a specification non-simultaneous resource allocation unit for allocating, if the specification of the allocated object is different from the preferred allocation specification, a resource in the product set to the allocated object in accordance with the preferred allocation specification that is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
Optionally, after the resource units are allocated when the triggering criteria are the same or the resource units are allocated when the criteria are different, the following units are triggered:
and allocating a resource unit for allocating the resource in the product set to the allocated object according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the specification of the allocated object in the evaluation model of the product set, if the number of the allocated object exceeds the allocated preferred allocation quantity of the preferred allocation specification, aiming at the part of the allocated object exceeding the allocated preferred allocation quantity.
Optionally, the preferred distribution specification closest to the specification of the distributed object in the evaluation model of the product set is determined by using a euclidean distance formula.
Optionally, the unit for establishing an evaluation model of resources in the product set is configured to:
and triggering and establishing an evaluation model unit of resources in the product aiming at each product, and aggregating and adding the obtained evaluation models of the resources in each product to establish the evaluation model for evaluating the resources in the product set.
Optionally, the specification value of the evaluation model in the dimension of the set resource specification is a power of 2.
Optionally, the unit for establishing an evaluation model of resources in a product includes:
converting the allocable quantity into a binary unit, and respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits;
a preferred distribution coordinate generating unit, configured to obtain digit values after non-zero digits in the binary digits according to a sequence from a high digit to a low digit, and generate preferred distribution coordinates by using paired digit values located in the same sequence as coordinate values corresponding to the set resource specification dimensions;
and the set optimal distribution coordinate unit is used for generating the optimal distribution coordinates in a set mode and establishing the evaluation model of the resources in the product.
Optionally, the paired bit values are paired in the dimension of each set resource specification.
Optionally, the set preferably assigns a coordinate unit, including:
a number unit for labeling the preferred allocated coordinates, which is used for labeling the generated number of the preferred allocated coordinates on each of the preferred allocated coordinates in the evaluation model.
Optionally, the set preferably assigns a coordinate unit, including:
a preferred allocation specification determining unit, configured to determine the preferred allocation specification corresponding to the preferred allocation coordinate according to the preferred allocation coordinate;
and the preferred distribution specification aggregation unit is used for aggregating the determined preferred distribution specification and adding the evaluation model of the resource of the product.
Optionally, the number of the set resource specifications is two.
Optionally, the generating a preferred assigned coordinate unit includes:
determining a first preferred allocation coordinate unit, which is used for searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
determining a next preferred allocated coordinate unit for continuing to find a next non-zero number in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
a determining triggering condition unit for returning to trigger the determining of the next preferred allocated coordinate unit before each non-zero number in the binary digits is found.
Optionally, the product is a single server, and the set resource specification is a processor core and a memory.
Please refer to fig. 4, which is a schematic diagram illustrating an embodiment of a method for modeling an evaluation of a resource in a product according to a third embodiment of the present application. Since this embodiment is substantially similar to the first embodiment, it is relatively simple to describe, and the relevant points can be referred to the partial description of the first embodiment. The method embodiments described below are merely illustrative.
The application provides a method for establishing an evaluation model of resources in a product, which comprises the following steps:
step S301: acquiring the distributable quantity of the set resource specification of the product;
step S303: respectively converting the acquired distributable number into binary digits;
step S305: respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimensions to generate preferred distribution coordinates;
step S307: collecting the generated optimal distribution coordinates, and establishing an evaluation model of resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
Please refer to fig. 5, which is a schematic diagram of an apparatus for modeling an evaluation of a resource in a product according to a fourth embodiment of the present application. Since the apparatus embodiments are substantially similar to the method embodiments, they are described in a relatively simple manner, and reference may be made to some of the descriptions of the method embodiments for relevant points. The device embodiments described below are merely illustrative.
The application provides a device for establishing an evaluation model of resources in a product, which comprises the following steps:
an allocable quantity acquiring unit 401 for acquiring an allocable quantity of the set resource specification of the product;
a unit 403 for converting allocable numbers into binary digits, configured to convert the acquired allocable numbers into binary digits, respectively;
a generating preferred allocation coordinate unit 405, configured to obtain digit values after non-zero digits in the binary digits according to an order from a high digit to a low digit, and generate preferred allocation coordinates of the product resources by using paired digit values located in the same sequence as coordinate values corresponding to the set resource specification dimensions;
an evaluation model unit 407 for establishing resources in the product, configured to assemble the generated preferred allocation coordinates, and establish an evaluation model for the resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
Please refer to fig. 6, which is a schematic diagram illustrating an embodiment of a method for modeling an evaluation of a resource in a product set according to a fifth embodiment of the present application. Since this embodiment is substantially similar to the first embodiment, it is relatively simple to describe, and the relevant points can be referred to the partial description of the first embodiment. The method embodiments described below are merely illustrative.
The application provides a method for establishing an evaluation model of resources in a product set, which comprises the following steps:
step S501: executing the method for establishing the evaluation model of the resources in the products according to the third embodiment for each product in the product set to obtain an evaluation model corresponding to the resources in each product;
step S503: and aggregating and adding the obtained evaluation models of the resources in the products to establish the evaluation models of the resources in the product set.
Please refer to fig. 7, which is a schematic diagram of an embodiment of an apparatus for modeling an evaluation of a resource in a product set according to a sixth embodiment of the present application. Since this embodiment is substantially similar to the first embodiment, it is relatively simple to describe, and the relevant points can be referred to the partial description of the first embodiment. The device embodiments described below are merely illustrative.
The application provides a device for establishing an evaluation model of resources in a product set, which comprises the following steps:
an evaluation model unit 601 for obtaining resources in products, configured to trigger, for each product in the product set, the apparatus for building an evaluation model of resources in products according to claim 34 to obtain an evaluation model corresponding to resources in each product;
an evaluation model unit 603 for establishing resources in the product set, configured to aggregate and add the obtained evaluation models for the resources in each product, and establish an evaluation model for the resources in the product set.
Please refer to fig. 8, which is a schematic diagram of an electronic device according to a seventh embodiment of the present application. Since this embodiment is substantially similar to the first embodiment, it is relatively simple to describe, and the relevant points can be referred to the partial description of the first embodiment. The electronic device embodiments described below are merely illustrative.
37. An electronic device, comprising:
a display 701;
a processor 703;
a memory 705 for storing a program for allocating resources in a product collection, which when read and executed by the processor 703 performs the following operations: acquiring the distributable quantity of the set resource specification of each product in the product set; establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the assessment model is capable of determining a preferred allocation specification for a resource in the product set and a preferred allocation quantity corresponding to the preferred allocation specification; acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification; and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
Although the present application has been described with reference to the preferred embodiments, it is not intended to limit the present application, and those skilled in the art can make variations and modifications without departing from the spirit and scope of the present application, therefore, the scope of the present application should be determined by the claims that follow.
In a typical configuration, a computing device includes one or more processors (processors), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
1. Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory computer readable media (transient media), such as modulated data signals and carrier waves.
2. As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Claims (37)
1. A method for allocating resources in a product set, comprising:
acquiring the distributable quantity of the set resource specification of each product in the product set;
establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the evaluation model can determine a preferred allocation specification of resources in the product set and a preferred allocation quantity corresponding to the preferred allocation specification, the preferred allocation specification corresponds to an exclusive unit in a multi-dimensional table of the evaluation model, and a coordinate value of the exclusive unit on the set resource specification is the preferred allocation specification;
acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification;
and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
2. The method according to claim 1, wherein the unit values of the respective set resource specifications in the evaluation model are integers raised to the power.
3. The method according to claim 1, wherein the preferred allocation specification is the largest set resource specification that does not waste resource specification after allocating resource to the allocated object.
4. The method according to claim 1, wherein the step of assigning the resources in the product set to the assigned objects according to the specification and the quantity of the assigned objects based on the evaluation model of the resources in the product set comprises:
and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resources in the product set to the allocated object according to the preferred allocation specification.
5. The method according to claim 4, wherein the step of assigning the resources in the product set to the assigned objects according to the specification and the quantity of the assigned objects based on the evaluation model of the resources in the product set comprises:
if the specification of the allocated object is different from the preferred allocation specification, allocating resources in the product set to the allocated object according to the preferred allocation specification which is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
6. The method according to claim 5, wherein after the step of allocating the resource in the product set to the allocated object according to the preferred allocation specification if the specification of the allocated object is the same as the preferred allocation specification is performed, or after the step of allocating the resource in the product set to the allocated object according to the preferred allocation specification that is larger than the specification of the allocated object and is closest to the specification of the allocated object in an evaluation model of the product set is performed if the specification of the allocated object is different from the preferred allocation specification, the following steps are performed:
if the number of the allocated objects exceeds the preferred allocation number of the allocated preferred allocation specification, allocating resources in the product set to the allocated objects according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the specification of the allocated objects in the evaluation model of the product set, aiming at the part of the allocated objects exceeding the preferred allocation number.
7. The method according to claim 5 or 6, wherein the preferred allocation specification that is closest to the specification of the allocated object in the evaluation model of the product set is determined by using a Euclidean distance formula.
8. The method according to claim 1, wherein the step of creating an evaluation model for evaluating the resources in the product set according to the assignable quantity of the set resource specification of each product comprises:
aggregating and adding the evaluation models of the resources in the products to establish the evaluation model for evaluating the resources in the product set.
9. The method of claim 8, wherein the evaluation model has a specification value of 2 to the power of 2 in the dimension of the set resource specification.
10. The method of claim 9, wherein the model for evaluating the resources in the product is created by performing the following steps:
respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits;
respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimensions to generate preferred distribution coordinates;
and aggregating the generated preferred allocation coordinates to establish the evaluation model of the resources in the product.
11. The method of claim 10, wherein the paired bit values are paired in each dimension of the set resource specification.
12. The method according to claim 10, wherein the step of establishing the evaluation model of the resources in the product by the preferred allocation coordinates generated by the set comprises:
marking the number of the generated preferred allocation coordinates on each of the preferred allocation coordinates in the evaluation model.
13. The method according to claim 10, wherein the step of establishing the evaluation model of the resources in the product by the preferred allocation coordinates generated by the set comprises:
determining the preferred distribution specification corresponding to the preferred distribution coordinate according to the preferred distribution coordinate;
aggregating the determined preferred allocation specifications into the assessment model of the resources of the product.
14. The method according to claim 10 or 13, wherein the number of the set resource specifications is two.
15. The method according to claim 14, wherein the step of establishing the preferred allocation coordinates in the evaluation model of the resources in the product by respectively obtaining digit values after non-zero digits in the binary digits in an order from high order to low order and respectively using paired digit values located in the same order as coordinate values corresponding to the set resource specification dimensions comprises:
searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
continuously searching a next non-zero digit in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
returning to continue to find a next non-zero number in the binary digits before each non-zero number in the binary digits is found; and establishing a preferred distribution coordinate in a two-dimensional table evaluation model of the resource of the product by respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate.
16. The method as claimed in claim 15, wherein the product is a single server, and the set resource specification is a processor core and a memory.
17. An apparatus for allocating resources in a product set, comprising:
a resource allocable quantity acquiring unit, configured to acquire an allocable quantity of a set resource specification of each product in the product set;
the resource evaluation model unit is used for establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the evaluation model can determine a preferred allocation specification of resources in the product set and a preferred allocation quantity corresponding to the preferred allocation specification, the preferred allocation specification corresponds to an exclusive unit in a multi-dimensional table of the evaluation model, and a coordinate value of the exclusive unit on the set resource specification is the preferred allocation specification;
an acquisition allocated object specification and quantity unit for acquiring the specification and quantity of allocated objects; the specification of the allocated object corresponds to the set resource specification;
and allocating resource units according to the evaluation model, wherein the resource units are used for allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects according to the evaluation model of the resources in the product set.
18. The apparatus according to claim 17, wherein the unit values of each set resource specification in the evaluation model are integers raised to the power.
19. The apparatus of claim 17, wherein the preferred allocation specification is the largest set resource specification that does not waste resource specifications after allocating resources to the allocated target.
20. The apparatus of claim 17, wherein the allocating resource units according to the evaluation model comprises:
and if the specification of the allocated object is the same as the preferred allocation specification, allocating the resource in the product set to the allocated object according to the preferred allocation specification.
21. The apparatus of claim 20, wherein the allocating resource units according to the evaluation model comprises:
and a specification non-simultaneous resource allocation unit for allocating, if the specification of the allocated object is different from the preferred allocation specification, a resource in the product set to the allocated object in accordance with the preferred allocation specification that is larger than the specification of the allocated object and is closest to the specification of the allocated object in the evaluation model of the product set.
22. The apparatus of claim 21, wherein after the unit of resources is allocated when the specification is the same or when the specification is different, the following units are triggered:
and allocating a resource unit for allocating the resource in the product set to the allocated object according to the preferred allocation specification which is larger than the allocated preferred allocation specification and is closest to the specification of the allocated object in the evaluation model of the product set, if the number of the allocated object exceeds the allocated preferred allocation quantity of the preferred allocation specification, aiming at the part of the allocated object exceeding the allocated preferred allocation quantity.
23. The apparatus according to claim 21 or 22, wherein the preferred allocation specification closest to the specification of the allocated object in the evaluation model of the product set is determined by using a euclidean distance formula.
24. The apparatus for allocating resources in a product set according to claim 17, wherein the unit for establishing an evaluation model of the resources in the product set is configured to:
and triggering and establishing an evaluation model unit of resources in the product aiming at each product, and aggregating and adding the obtained evaluation models of the resources in each product to establish the evaluation model for evaluating the resources in the product set.
25. The apparatus of claim 24, wherein the evaluation model has a specification value of a power of 2 in the dimension of the set resource specification.
26. The apparatus for allocating resources in a product set according to claim 25, wherein the means for establishing an evaluation model of resources in a product comprises:
converting the allocable quantity into a binary unit, and respectively converting the allocable quantity of the set resource specification of the obtained product into binary digits;
a preferred distribution coordinate generating unit, configured to obtain digit values after non-zero digits in the binary digits according to a sequence from a high digit to a low digit, and generate preferred distribution coordinates by using paired digit values located in the same sequence as coordinate values corresponding to the set resource specification dimensions;
and the set optimal distribution coordinate unit is used for generating the optimal distribution coordinates in a set mode and establishing the evaluation model of the resources in the product.
27. The apparatus of claim 26, wherein said paired bit values are paired in each dimension of said set resource specification.
28. The apparatus for allocating resources in a product set according to claim 26, wherein said set preferably allocates coordinate units, comprising:
a number unit for labeling the preferred allocated coordinates, which is used for labeling the generated number of the preferred allocated coordinates on each preferred allocated coordinate in the evaluation model.
29. The apparatus for allocating resources in a product set according to claim 26, wherein said set preferably allocates coordinate units, comprising:
a preferred allocation specification determining unit, configured to determine the preferred allocation specification corresponding to the preferred allocation coordinate according to the preferred allocation coordinate;
and the preferred distribution specification aggregation unit is used for aggregating the determined preferred distribution specification and adding the evaluation model of the resource of the product.
30. The apparatus according to claim 26 or 29, wherein the number of the set resource specifications is two.
31. The apparatus for allocating resources in a product set according to claim 30, wherein said generating a preferred allocation coordinate unit comprises:
determining a first preferred allocation coordinate unit, which is used for searching a first non-zero digit in the binary digits according to the sequence from high order to low order; respectively taking the found digit numerical value after the first non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
determining a next preferred allocated coordinate unit for continuing to find a next non-zero number in the binary digits; respectively taking the found digit numerical value after the next non-zero digit of the set resource specification as the values of the abscissa and the ordinate, and establishing an optimal distribution coordinate in a two-dimensional table evaluation model of the resource of the product;
a determining triggering condition unit for returning to trigger the determining of the next preferred allocated coordinate unit before each non-zero number in the binary digits is found.
32. The apparatus of claim 31, wherein the product is a single server, and the set resource specification is a processor core and a memory.
33. A method of modeling an assessment of a resource in a product, comprising:
acquiring the distributable quantity of the set resource specification of the product;
respectively converting the acquired distributable number into binary digits;
respectively acquiring digit numerical values behind non-zero digits in the binary digits according to the sequence from high digits to low digits, and respectively taking paired digit numerical values in the same sequence as coordinate values corresponding to the set resource specification dimensions to generate preferred distribution coordinates of the product resources;
collecting the generated optimal distribution coordinates, and establishing an evaluation model of resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
34. An apparatus for modeling an assessment of a resource in a product, comprising:
the device comprises a unit for acquiring the distributable quantity of the set resource specification, a unit for acquiring the distributable quantity of the set resource specification of the product and a unit for acquiring the distributable quantity of the set resource specification of the product;
a unit for converting the allocable number into binary digits, for converting the acquired allocable number into binary digits respectively;
a preferred distribution coordinate generating unit, configured to obtain digit values after non-zero digits in the binary digits according to a sequence from a high digit to a low digit, and generate preferred distribution coordinates of the product resources by using paired digit values located in a same sequence as coordinate values corresponding to the set resource specification dimensions;
the evaluation model unit is used for collecting the generated optimal distribution coordinates and establishing an evaluation model of the resources in the product; the latitude of the evaluation model corresponds to the set resource specification.
35. A method for modeling an assessment of a resource in a product collection, comprising:
performing, for each product in the set of products, the method of establishing an assessment model of resources in a product of claim 33 to obtain an assessment model corresponding to resources in each of the products;
and aggregating and adding the obtained evaluation models of the resources in the products to establish the evaluation models of the resources in the product set.
36. An apparatus for modeling an assessment of a resource in a product collection, comprising:
an evaluation model unit for obtaining resources in products, configured to trigger, for each product in the product set, the apparatus for establishing an evaluation model for resources in products according to claim 34, so as to obtain an evaluation model for resources in each product;
and establishing an evaluation model unit of the resources in the product set, wherein the evaluation model unit is used for aggregating and adding the obtained evaluation models of the resources in the products to establish the evaluation model of the resources in the product set.
37. An electronic device, comprising:
a display;
a processor;
a memory for storing a program for allocating resources in a collection of products, which when read and executed by the processor performs the following operations: acquiring the distributable quantity of the set resource specification of each product in the product set; establishing an evaluation model for evaluating the resources in the product set according to the allocable quantity of the set resource specification of each product; the dimension of the evaluation model corresponds to the set resource specification; the evaluation model can determine a preferred allocation specification of resources in the product set and a preferred allocation quantity corresponding to the preferred allocation specification, the preferred allocation specification corresponds to an exclusive unit in a multi-dimensional table of the evaluation model, and a coordinate value of the exclusive unit on the set resource specification is the preferred allocation specification; acquiring the specification and the number of the distributed objects; the specification of the allocated object corresponds to the set resource specification; and according to the evaluation model of the resources in the product set, allocating the resources in the product set to the allocated objects according to the specification and the quantity of the allocated objects.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611089360.9A CN108122062B (en) | 2016-11-30 | 2016-11-30 | Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201611089360.9A CN108122062B (en) | 2016-11-30 | 2016-11-30 | Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108122062A CN108122062A (en) | 2018-06-05 |
CN108122062B true CN108122062B (en) | 2021-11-26 |
Family
ID=62227391
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201611089360.9A Active CN108122062B (en) | 2016-11-30 | 2016-11-30 | Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108122062B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102741860A (en) * | 2009-12-22 | 2012-10-17 | 赛布拉有限公司 | Methods and systems for recording and recalling events |
CN103023963A (en) * | 2012-10-31 | 2013-04-03 | 浪潮集团有限公司 | Method for optimal distribution of cloud storage resources |
WO2013151454A1 (en) * | 2012-04-06 | 2013-10-10 | Google Inc. | Hosted application sandboxing |
CN104407925A (en) * | 2014-12-10 | 2015-03-11 | 中国电信集团系统集成有限责任公司 | Dynamic resource distribution method |
CN105099951A (en) * | 2015-07-27 | 2015-11-25 | 中国联合网络通信集团有限公司 | Resource scheduling method and management equipment |
CN105843670A (en) * | 2016-03-22 | 2016-08-10 | 浙江大学 | Cloud platform based virtual cluster deployment and integration method |
-
2016
- 2016-11-30 CN CN201611089360.9A patent/CN108122062B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102741860A (en) * | 2009-12-22 | 2012-10-17 | 赛布拉有限公司 | Methods and systems for recording and recalling events |
WO2013151454A1 (en) * | 2012-04-06 | 2013-10-10 | Google Inc. | Hosted application sandboxing |
CN103023963A (en) * | 2012-10-31 | 2013-04-03 | 浪潮集团有限公司 | Method for optimal distribution of cloud storage resources |
CN104407925A (en) * | 2014-12-10 | 2015-03-11 | 中国电信集团系统集成有限责任公司 | Dynamic resource distribution method |
CN105099951A (en) * | 2015-07-27 | 2015-11-25 | 中国联合网络通信集团有限公司 | Resource scheduling method and management equipment |
CN105843670A (en) * | 2016-03-22 | 2016-08-10 | 浙江大学 | Cloud platform based virtual cluster deployment and integration method |
Also Published As
Publication number | Publication date |
---|---|
CN108122062A (en) | 2018-06-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10152501B2 (en) | Rollover strategies in a n-bit dictionary compressed column store | |
JP5932043B2 (en) | Volatile memory representation of non-volatile storage set | |
CN103853618B (en) | Resource allocation method with minimized cloud system cost based on expiration date drive | |
US10680975B2 (en) | Method of dynamic resource allocation for public clouds | |
TWI780065B (en) | Method, apparatus and system for resource scheduling | |
US9996391B2 (en) | Parallel computer system, method of controlling parallel computer system, and recording medium | |
CN103455531A (en) | Parallel indexing method supporting real-time biased query of high dimensional data | |
CN109299190A (en) | The method and device of the metadata dealt with objects in distributed memory system | |
CN108241531A (en) | A kind of method and apparatus for distributing resource for virtual machine in the cluster | |
TW201702870A (en) | Method and system for allocating resources for virtual hosts | |
CN108121601A (en) | A kind of application resource dispatching device and method based on weight | |
JP2023064082A (en) | Method of constructing three-dimensional map in high-definition map, apparatus, device, and storage medium | |
CN115994197A (en) | GeoSOT grid data calculation method | |
CN103092886B (en) | A kind of implementation method of data query operation, Apparatus and system | |
CN109683917A (en) | For the method for being deployed in application server, equipment and medium will to be applied | |
CN108122062B (en) | Method and device for allocating resources in product set and establishing product and evaluation model of resources in product set | |
CN111475279B (en) | System and method for intelligent data load balancing for backup | |
CN105867848B (en) | A kind of information processing method and hard disk mould group | |
CN104503924A (en) | Area distribution method and device of tiered storage system | |
CN111125157B (en) | Query data processing method and device, storage medium and processor | |
CN111182006A (en) | Method and device for mapping physical cluster into cloud computing resource | |
CN113722415B (en) | Point cloud data processing method and device, electronic equipment and storage medium | |
CN107656697B (en) | Method and device for operating data on storage medium | |
CN107180017B (en) | Sample serialization method and device | |
WO2022110196A1 (en) | Data processing method, apparatus, and system |
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 | ||
REG | Reference to a national code |
Ref country code: HK Ref legal event code: DE Ref document number: 1256086 Country of ref document: HK |
|
GR01 | Patent grant | ||
GR01 | Patent grant |