CN108122062A - The distribution of resource and the method and apparatus for establishing the assessment models of resource in product, product set in product set - Google Patents

The distribution of resource and the method and apparatus for establishing the assessment models of resource in product, product set in product set Download PDF

Info

Publication number
CN108122062A
CN108122062A CN201611089360.9A CN201611089360A CN108122062A CN 108122062 A CN108122062 A CN 108122062A CN 201611089360 A CN201611089360 A CN 201611089360A CN 108122062 A CN108122062 A CN 108122062A
Authority
CN
China
Prior art keywords
resource
product
assessment models
preferred allocation
product set
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.)
Granted
Application number
CN201611089360.9A
Other languages
Chinese (zh)
Other versions
CN108122062B (en
Inventor
于颜硕
邓明鉴
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201611089360.9A priority Critical patent/CN108122062B/en
Publication of CN108122062A publication Critical patent/CN108122062A/en
Application granted granted Critical
Publication of CN108122062B publication Critical patent/CN108122062B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION 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/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • G06Q10/063Operations research, analysis or management
    • G06Q10/0631Resource planning, allocation, distributing or scheduling for enterprises or organisations
    • G06Q10/06312Adjustment 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 kind of distribution method of resource in product set, including:Obtain the setting resource specification of each product in the product set can quantity allotted;According to the setting resource specification of each product can quantity allotted, establish to assess the assessment models of resource in the product set;The dimension of the assessment models is corresponding with the setting resource specification;The assessment models can determine in the product set preferred allocation specification of resource and with the corresponding preferred allocation quantity of the preferred allocation specification;Obtain the specification and quantity for being allocated object;According to the assessment models of resource in the product set, according to the specification and quantity of the allocated object, the resource in the product set is distributed to the allocated object.The application also provides a kind of method for establishing the assessment models of resource in product and product set.The present processes do not generate specification fragment when distributing resource, and the complexity of calculating process is low, real-time is good.

Description

The distribution of resource and commenting for resource in product, product set is established in product set Estimate the method and apparatus of model
Technical field
This application involves resource allocation technical fields, and in particular to the distribution method of resource in product set.The application is also It is related to the distributor of resource in product set.The application further relates to establish the method for the assessment models of resource in product, establishes The device of the assessment models of resource in product establishes the method for the assessment models of resource in product set and establishes product set The device of the assessment models of middle resource.
Background technology
With the continuous development of cloud computing, it can be realized by virtualization technology and more differences are run on single server The Cloud Server of specification.When providing virtual cloud server service, it is necessary first to assess the money of different size in single server The residue in source can quantity allotted, afterwards combine be allocated object (virtual Cloud Server) specific requirements, it may be determined that how Resource (how generating virtual Cloud Server) in specific distribution server.For example, a Taiwan investment source specification is respectively 16 processing The server of device core and 16GB memories in the case where not generating distribution fragment and not wasting specification resource, can at most distribute Resource and produce the Cloud Server of 16 core 16GB memory or the Cloud Server of two 8 core 8GB memories, Huo Zheyi The Cloud Server of 8 core 8GB memories of platform and two 4 core 4GB memories.
The server for providing virtual cloud server service is typically what is be managed in units of server cluster, and one Server cluster may include the single server of thousands of different resource specifications.When the cloud clothes of distribution specific resources specification During business device, the volume residual that assessment calculates the resource of whole server cluster is generally required, to determine whether to this cloud Server-assignment resource and how to optimize distribution resource.
The evaluation scheme of the prior art is that every server can produce all of Cloud Server in traversal server cluster For example, being stored to 32 core 32GB memories out of 1 core 1G, the resource of every server is added, and then determines clothes for resource specification The allowable resource being engaged in device cluster.At this point, every server in cluster server needs to do division calculation, each cloud is obtained All servers under the production quantity of compliance server, then cluster of summing obtain the allowable resource of cluster server afterwards Comprehensive assessment.
For the scheme of the prior art when cluster produces Cloud Server, the method for use is allowable resource definite first Quantity whether meet production Cloud Server requirement.If the comprehensive assessment of the allowable resource of cluster server determines, clothes The allowable resource of business device cluster internal server can support the Cloud Server of production these requirements specification, just randomly choose it In a server met the requirements produced.After production, it is also necessary to recalculate each Cloud Server specification The volume residual of resource.
The shortcomings that prior art, is:
For the stock assessment of server cluster, computation complexity is high, it is difficult to ensure real-time.One cluster often by into Thousand up to ten thousand single server compositions, while the specification of Cloud Server production also often exceeds hundreds of;One server cluster First resource assessment is carried out, often relates to nearly 100,000 division arithmetics, computation complexity is higher, and the efficiency of stock assessment is very low. Moreover, Cloud Server production, release, migration etc. can all cause the dynamic change of server cluster resource.
The resource for being randomly assigned cluster easily generates the wasting of resources.Since the Cloud Server of cluster internal calculates and stores money Source is shared.Such as the physical resource of the remaining 8 core 8G memories of server, theory can produce two 4 core 4G memories The Cloud Server of Cloud Server, the Cloud Server of 4 core 8G memory and a 8 core 8G memories.But if production one After the Cloud Server of 4 core 8G memories, this server will cannot produce the server of other specifications, and can cause 4 cores Resource fragmentation, so as to waste server resource.
The content of the invention
The application provides the distribution method of resource, a kind of resource allocation device of product set, one in a kind of product set It kind establishes the method for the assessment models of resource in product, a kind of establish the device of the assessment models of resource in product, a kind of foundation The method of the assessment models of resource, a kind of device for establishing the assessment models of resource in product set, Yi Jiyi in product set Kind of electronic equipment, with the resource allocation news commentary for solving existing product set estimate computation complexity is high, be difficult to ensure that real-time with And cause the problem of resource waste of resource specification fragment because resource allocation is unreasonable.
The application provides a kind of distribution method of resource in product set, including:
Obtain the setting resource specification of each product in the product set can quantity allotted;
According to the setting resource specification of each product can quantity allotted, establish to assess in the product set The assessment models of resource;The dimension of the assessment models is corresponding with the setting resource specification;The assessment models can be true In the fixed product set preferred allocation specification of resource and with the corresponding preferred allocation quantity of the preferred allocation specification;
Obtain the specification and quantity for being allocated object;The specification of the allocated object is opposite with the setting resource specification It should;
According to the assessment models of resource in the product set, according to the specification and quantity of the allocated object, to institute State the resource in the allocated object distribution product set.
Optionally, in the assessment models it is each setting resource specification unit amount be integer power side.
Optionally, the preferred allocation specification is to distribute after resource not generating resource specification wave to the allocated object The maximum setting resource specification taken.
Optionally, the assessment models according to resource in the product set, according to the specification of the allocated object And quantity, the step of distributing the resource in the product set to the allocated object, including:
If the specification of the allocated object is identical with the preferred allocation specification, according to the preferred allocation specification, The resource in the product set is distributed to the allocated object.
Optionally, the assessment models according to resource in the product set, according to the specification of the allocated object And quantity, the step of distributing the resource in the product set to the allocated object, including:
If the specification of the allocated object is different from the preferred allocation specification, according to more than the allocated object Specification and in the assessment models of the product set closest to the allocated object specification the preferred allocation Specification distributes the resource in the product set to the allocated object.
Optionally, it is if identical with the preferred allocation specification in the specification for performing the allocated object, according to The preferred allocation specification after the step of resource that the allocated object is distributed in the product set or is being held If the specification of the row allocated object is different from the preferred allocation specification, according to more than the allocated object The preferred allocation of specification and the specification in the assessment models of the product set closest to the allocated object is advised Lattice after the step of distributing the resource in the product set to the allocated object, perform following step:
If the quantity of the allocated object is more than the preferred allocation number for the preferred allocation specification being assigned Amount is more than then the part of the preferred allocation quantity for the allocated object, according to more than described in being assigned Preferred allocation specification and in the assessment models of the product set closest to the allocated object specification it is described excellent Choosing distribution specification, the resource in the product set is distributed to the allocated object.
Optionally, described in the specification of the allocated object closest in the assessment models of the product set Preferred allocation specification is definite by using Euclidean distance formula.
Optionally, the setting resource specification according to each product can quantity allotted, establish for assessing The step of stating the assessment models of resource in product set, including:
The assessment models of resource in each product are polymerize and are added, establishes and assesses resource in the product set The assessment models.
Optionally, the assessment models are in power side of the gauge number set in resource specification dimension as 2.
Optionally, in the product resource the assessment models, established by performing following step:
By the setting resource specification of the product of acquisition can quantity allotted, be respectively converted into binary digit;
According to the order from a high position to low level, the digit number after nonzero digit in the binary digit is obtained respectively Value, and by the paired digit numerical value positioned at same cis-position, respectively as the coordinate value of the correspondence setting resource specification dimension, Generate preferred allocation coordinate;
Gather the preferred allocation coordinate of generation, establish the assessment models of resource in the product.
Optionally, the paired digit numerical value is paired in the dimension of each setting resource specification.
Optionally, the preferred allocation coordinate of the set generation establishes the assessment mould of resource in the product The step of type, including:
The number of the preferred allocation coordinate of generation is marked on each preferred allocation coordinate in the evaluation model Mesh.
Optionally, the preferred allocation coordinate of the set generation establishes the assessment mould of resource in the product The step of type, including:
According to the preferred allocation coordinate, determine and the corresponding preferred allocation specification of the preferred allocation coordinate;
The definite preferred allocation specification of set adds in the assessment models of the resource of the product.
Optionally, the number for setting resource specification is two.
Optionally, the order according to from a high position to low level, obtain respectively in the binary digit nonzero digit it Digit numerical value afterwards, and by the paired digit numerical value positioned at same cis-position, respectively as the correspondence setting resource specification dimension The coordinate value of degree, the step of establishing the preferred allocation coordinate in the product in the assessment models of resource, including:
According to the order from a high position to low level, first nonzero digit in the binary digit is found;The institute that will be found out The digit numerical value after first nonzero digit of setting resource specification is stated, respectively as the value of abscissa and ordinate, is established Preferred allocation coordinate in the two-dimensional table assessment models of the resource of one product;
Continually look for next nonzero digit in the binary digit;By the next of the setting resource specification found out Digit numerical value after a nonzero digit respectively as the value of abscissa and ordinate, establishes the resource of a product Preferred allocation coordinate in two-dimensional table assessment models;
Before each nonzero digit in the binary digit is found, described two are continually looked for described in return Next nonzero digit in binary digits;By the digit number after the next nonzero digit for the setting resource specification found out Value, it is excellent in the two-dimensional table assessment models for the resource for establishing a product respectively as the value of abscissa and ordinate The step of choosing distribution coordinate.
Optionally, the product is single server, and the resource specification that sets is processor core and memory.
The application provides a kind of distributor of resource in product set, including:
Obtain resource can quantity allotted unit, for obtaining the setting resource specification of each product in the product set It can quantity allotted;
The assessment models unit of resource in product set is established, for the setting resource specification according to each product Can quantity allotted, establish to assess the assessment models of resource in the product set;The dimension of the assessment models with it is described It is corresponding to set resource specification;The assessment models can determine in the product set preferred allocation specification of resource and with institute State the corresponding preferred allocation quantity of preferred allocation specification;
It obtains and is allocated object size and processing units, for obtaining the specification of allocated object and quantity;It is described to be divided Specification with object is corresponding with the setting resource specification;
Resource unit is distributed according to assessment models, for the assessment models according to resource in the product set, according to institute The specification and quantity of allocated object are stated, the resource in the product set is distributed to the allocated object.
Optionally, in the assessment models it is each setting resource specification unit amount be integer power side.
Optionally, the preferred allocation specification is to distribute after resource not generating resource specification wave to the allocated object The maximum setting resource specification taken.
Optionally, it is described to distribute resource unit according to assessment models, including:
Resource unit is distributed when specification is identical, if specification and the preferred allocation specification phase for the allocated object Together, then the resource in the product set is distributed to the allocated object according to the preferred allocation specification.
Optionally, it is described to distribute resource unit according to assessment models, including:
Resource unit is distributed during specification difference, if for the specification of the allocated object and the preferred allocation specification not Together, then divided according to the specification more than the allocated object and closest to described in the assessment models of the product set The preferred allocation specification of specification with object distributes the resource in the product set to the allocated object.
Optionally, resource unit is distributed when distributing resource unit or the specification difference when the triggering specification is identical Afterwards, following units are triggered:
Resource unit is distributed for volume residual, if being more than the institute that has been assigned for the quantity of the allocated object The preferred allocation quantity of preferred allocation specification is stated, then is more than the part of the preferred allocation quantity for the allocated object, According to more than the preferred allocation specification being assigned and in the assessment models of the product set closest to institute The preferred allocation specification of the specification of allocated object is stated, the money in the product set is distributed to the allocated object Source.
Optionally, described in the specification of the allocated object closest in the assessment models of the product set Preferred allocation specification is definite by using Euclidean distance formula.
Optionally, the assessment models unit for establishing resource in product set, is used for:
For each product, the assessment models unit of resource in product is established in triggering, and by acquisition by each production The assessment models polymerization of resource is added in product, establishes the assessment models for assessing resource in the product set.
Optionally, the assessment models are in power side of the gauge number set in resource specification dimension as 2.
Optionally, the assessment models unit for establishing resource in product, including:
Convert can quantity allotted into binary cell, for the setting resource specification of the product obtained to be distributed Quantity is respectively converted into binary digit;
Preferred allocation coordinate unit is generated, for according to the order from a high position to low level, obtaining the binary number respectively Digit numerical value in word after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as described in correspondence The coordinate value of resource specification dimension is set, generates preferred allocation coordinate;
Gather preferred allocation coordinate unit, for gathering the preferred allocation coordinate of generation, establish in the product and provide The assessment models in source.
Optionally, the paired digit numerical value is paired in the dimension of each setting resource specification.
Optionally, the set preferred allocation coordinate unit, including:
The number unit of preferred allocation coordinate is marked, for each preferred allocation coordinate in the evaluation model Mark the number of the preferred allocation coordinate of generation.
Optionally, the set preferred allocation coordinate unit, including:
Preferred allocation specification unit is determined, for according to the preferred allocation coordinate, determining and the preferred allocation coordinate The corresponding preferred allocation specification;
Gather preferred allocation specification unit, for gathering the definite preferred allocation specification, add in the money of the product The assessment models in source.
Optionally, the number for setting resource specification is two.
Optionally, the generation preferred allocation coordinate unit, including:
First preferred allocation coordinate unit is determined, for according to the order from a high position to low level, finding the binary system First nonzero digit in number;By the digit numerical value after first nonzero digit of the setting resource specification found out, Respectively as the value of abscissa and ordinate, preferably dividing in the two-dimensional table assessment models for the resource for establishing a product With coordinate;
Next preferred allocation coordinate unit is determined, for continually looking for next non-zero number in the binary digit Word;By the digit numerical value after the next nonzero digit for the setting resource specification found out, respectively as abscissa and indulge Target value is sat, the preferred allocation coordinate in the two-dimensional table assessment models for the resource for establishing a product;
Determine trigger condition unit, before being found for each nonzero digit in the binary digit, Return to triggering definite next preferred allocation coordinate unit.
Optionally, the product is single server, and the resource specification that sets is processor core and memory.
The application provides a kind of method for establishing the assessment models of resource in product, including:
Obtain the setting resource specification of the product can quantity allotted;
By described in acquisition can quantity allotted be respectively converted into binary digit;
According to the order from a high position to low level, the digit number after nonzero digit in the binary digit is obtained respectively Value, and by the paired digit numerical value positioned at same cis-position, respectively as the coordinate value of the correspondence setting resource specification dimension, Generate the preferred allocation coordinate of the product resource;
Gather the preferred allocation coordinate of generation, establish the assessment models of resource in the product;The assessment models Latitude correspond to it is described setting resource specification.
The application provides a kind of device for establishing the assessment models of resource in product, including:
Obtain setting resource specification can quantity allotted unit, for obtaining dividing for the setting resource specification of the product With quantity;
Convert can quantity allotted into binary number word cell, for described in obtaining can quantity allotted be respectively converted into two Binary digits;
Preferred allocation coordinate unit is generated, for according to the order from a high position to low level, obtaining the binary number respectively Digit numerical value in word after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as described in correspondence The coordinate value of resource specification dimension is set, generates the preferred allocation coordinate of the product resource;
The assessment models unit of resource in product is established, for gathering the preferred allocation coordinate of generation, described in foundation The assessment models of resource in product;The latitude of the assessment models corresponds to the setting resource specification.
The application provides a kind of method for establishing the assessment models of resource in product set, including:
For each product in the product set, the side for establishing the assessment models of resource in product is performed Method, to obtain the assessment models of resource in corresponding each product;
The assessment models of resource in each product of acquisition are polymerize and are added, establish resource in the product set Assessment models.
The application provides a kind of device for establishing the assessment models of resource in product set, including:
The assessment models unit of resource in product is obtained, for each product being directed in the product set, triggers institute That states establishes the device of the assessment models of resource in product, to obtain the assessment models of resource in corresponding each product;
The assessment models unit of resource in product set is established, for the assessment of resource in each product that will obtain Model aggregation is added, and establishes the assessment models of resource in the product set.
The application also puies forward a kind of electronic equipment, including:
Display;
Processor;
Memory, for storing the distribution program of resource in product set, described program is held by processor reading During row, following operation is performed:Obtain the setting resource specification of each product in the product set can quantity allotted;According to each The setting resource specification of a product can quantity allotted, establish to assess the assessment mould of resource in the product set Type;The dimension of the assessment models is corresponding with the setting resource specification;The assessment models can determine the product collection In conjunction the preferred allocation specification of resource and with the corresponding preferred allocation quantity of the preferred allocation specification;It obtains and is allocated object Specification and quantity;The specification of the allocated object is corresponding with the setting resource specification;According in the product set According to the specification and quantity of the allocated object, the product collection is distributed to the allocated object for the assessment models of resource Resource in conjunction.
Compared with prior art, the application has the following advantages:
The application generates single product and the resource Multidimensional Data Model of product set according to the spec characteristic of product, can Without largely calculating, to be directly used in the allowable resource state of the plurality of specifications of assessment product set, calculating process is answered Miscellaneous degree is low, and real-time is good;
The technical solution of the application can also find out the allowable resource of maximum specification, and as not unrestrained with maximum specification as possible Take the mode scientific dispatch production of product resource, can effectively reduce the problem of wasting of resources.
Description of the drawings
Fig. 1 is the distribution method embodiment signal of resource in a kind of product set provided for the application first embodiment Figure;
Fig. 2 is the assessment models two-dimensional table signal of resource in a kind of product set that the application first embodiment provides Figure;
Fig. 3 is the distributor embodiment schematic diagram of resource in a kind of product set that the application second embodiment provides;
Fig. 4 is that a kind of embodiment of the method for establishing the assessment models of resource in product that the application 3rd embodiment provides is shown It is intended to;
Fig. 5 is that a kind of device embodiment for establishing the assessment models of resource in product that the application fourth embodiment provides is shown It is intended to;
Fig. 6 is that the embodiment of the method for establishing the assessment models of resource in product set that the 5th embodiment of the application provides is shown It is intended to;
Fig. 7 is that the device embodiment for establishing the assessment models of resource in product set that the application sixth embodiment provides is shown It is intended to;
Fig. 8 is the embodiment schematic diagram for a kind of electronic equipment that the 7th embodiment of the application provides.
Specific embodiment
Many details are elaborated in the following description in order to fully understand the application.But the application can be with Much implement different from other manner described here, those skilled in the art can be in the situation without prejudice to the application intension Under do similar popularization, therefore the application is from the limitation of following public specific implementation.
The application provides the distribution method of resource, a kind of resource allocation device of product set, one in a kind of product set It kind establishes the method for the assessment models of resource in product, a kind of establish the device of the assessment models of resource in product, a kind of foundation The method of the assessment models of resource, a kind of device and one kind for establishing the assessment models of resource in product set in product set Electronic equipment is in turn below described in detail embodiments herein with reference to attached drawing.
It please refers to Fig.1, the distribution method embodiment stream of resource in the product set provided for the application first embodiment Cheng Tu.The distribution method of resource in the product set, including:
Step S101:Obtain the setting resource specification of each product in the product set can quantity allotted.
The setting resource specification of all set member's products can quantity allotted in acquisition product set.
Resource in product set is the summation of the resource in product set in all products.Product includes but not limited to can To provide the physics of special-purpose or virtual device;Resource in product include but not limited to computing resource, storage resource and Logical resource etc..For example, in the present embodiment, product is single server, product collection is combined into server cluster, product and product Resource in set is that can provide calculating and the storage resource of virtual Cloud Server.
The measurement specification unit of resource, content can be the groups of product during resource specification is set as preset product Into component, ingredient or other factors closely related with product etc., they can be used for evaluating property, the performance of representative products Or the relevant leading indicator of other products.For example, in the present embodiment, resource specification is set as processor core and memory. Product set resource specification can quantity allotted be that product remaining can be used for distributing in specifically setting resource specification Resource quantity.
For example, in the present embodiment, product collection is combined into the cluster of 5 servers, this step is to obtain this server The assignable quantity of the residue of the processor core of all 5 servers and memory in cluster is respectively that server 1 is 20 cores The heart and 12GB, server 2 are 16 cores and 12GB, and server 3 is 8 cores and 16GB, and server 4 is 16 cores and 16GB kimonos Device 5 be engaged in as 4 cores and 2GB.
Step S103:According to the setting resource specification of each product can quantity allotted, establish to assess described The assessment models of resource in product set;The dimension of the assessment models is corresponding with the setting resource specification;The assessment Model can determine in the product set preferred allocation specification of resource and corresponding preferably with the preferred allocation specification Quantity allotted;
According to the setting resource specification of acquired each product can quantity allotted, can establish to assess product collection The assessment models of resource in conjunction.
Assessment models can be multidimensional, and specific latitude depends on the number of the setting resource specification of product, and The unit amount of each setting resource specification is the power side of integer in the assessment models.For example, in the present embodiment, The setting resource specification of server has two, then the assessment models of server and server cluster is two-dimentional, and this two Tie up the power side that unit amount of the assessment models on processor core and memory is 2, i.e., 1,2,4,8,16 and 32 (20, 21, 22, 23, 24With 25) etc..
Preferred allocation specification is that the maximum setting for not generating the waste of resource specification is distributed after resource to allocated object Resource specification.Preferred allocation specification, corresponds to the specific coordinate points in evaluation model, this coordinate points is referred to as exclusive single Member, the coordinate value in setting resource specification is preferred allocation specification.Preferred allocation specification represents the corresponding specification of distribution Resource, maximally utilize, resource specification fragment will not be generated, the resource allocation of other specifications will not be influenced.For example, In the present embodiment, the processor core of server 5 and memory can quantity allotted be 4 cores and 2GB, distributing to 12 core After 2GB Cloud Servers, the resource specification fragment of 2 cores can be generated.Therefore, for 5,2 core 2GB this specification of server just It is not preferred distribution specification.For another example 8 core 16GB of server 3, can produce maximum specification as 8 cores and 16GB memories Cloud Server simultaneously do not have any wasting of resources;Certainly, the Cloud Server of more small dimension can also be produced at this time, for example, 2 The Cloud Server of a 4 core and 8GB does not generate resource specification fragment equally.For 3,8 core 16GB of server, 4 core 8GB It is its preferred allocation specification.
Preferred allocation quantity is corresponding with the preferred allocation specification, i.e., preferred allocation quantity is that preferred allocation is advised in product The quantity of the resource of lattice.For example, the preferred allocation quantity for the preferred allocation specification of 3,4 core 8GB of server is 2.
Assessment models can determine the preferred allocation specification of resource in product set and opposite with the preferred allocation specification The preferred allocation quantity answered.Assessment models are to assess product and product set by preferred allocation specification and preferred allocation quantity Middle resource can allocation situation, the essence of assessment models is exactly a multi-dimensional spreadsheet, and it is excellent that correspondence has been gathered in this form The exclusive unit coordinate points of choosing distribution specification..
For example, in the present embodiment, this step is to establish for two of resource in evaluating server and server cluster Dimension table lattice assessment models;In this two-dimensional table assessment models, 5 servers possess 6 exclusive units (coordinate points) altogether, i.e., A=(2,1), B=(2,2), C=(3,4), D=(4,3), E=(4,3), F=(4,4);It please refers to Fig.2, this 6 coordinate point sinks Always form Fig. 2-(2).These exclusive corresponding preferred allocation specifications of unit and preferred allocation quantity are respectively:4 core processings Device 2GB memories 1,4 core processor 4GB memories 1,8 core processor 16GB memories 1,16 core processor 8GB memories 2 and 16 core processor 16GB memories 1.
The method for establishing the assessment models of resource in product and product set is detailed below.Product is established in description first The method of the assessment models of middle resource.
Step S103-1:By the setting resource specification of the product of acquisition can quantity allotted, be respectively converted into two into System number.
Obtain first the setting resource specification of product can quantity allotted, and it is digital to be respectively converted into two-stage system.
For example, in the present embodiment, in the server 1 of acquisition processor can quantity allotted be 20 cores, memory can Quantity allotted is 12GB;The processor of server and memory can quantity allotted show also have on this server at 20 cores Reason device and 12GB memories can be used for producing Cloud Server.By 20 core processors of above-mentioned server and 12GB memories, conversion For binary number, transformed result is the 001100 of 010100 and memory of processor respectively.
Step S103-3:According to the order from a high position to low level, obtain respectively in the binary digit nonzero digit it Digit numerical value afterwards, and by the paired digit numerical value positioned at same cis-position, respectively as the correspondence setting resource specification dimension The coordinate value of degree generates preferred allocation coordinate.
According to the order from a high position to low level, respectively from each binary number of each setting resource specification of correspondence The numerical value of the digit of binary number after nonzero digit is obtained, and by the numerical value of the digit in same ordinal position, Respectively as the coordinate value of corresponding dimension, corresponding preferred allocation coordinate is generated.
Preferred allocation coordinate is the coordinate of the preferred allocation specification of corresponding setting resource specification in multidimensional evaluation model Point, for example, the abscissa alignment processing device of the preferred allocation coordinate of the present embodiment generation, ordinate correspond to memory.
The numerical value of the digit of binary number after nonzero digit, refers to from a high position to low level, nonzero digit The numerical value of the total bit of the binary digit also included after that numerical digit.
It,, can be with from a high position to low level in the corresponding binary digit 010100 of processor for example, in the present embodiment Obtaining the digit included after first nonzero digit 1 is 4 and obtains the digit included after second nonzero digit 1 and be 2;In the corresponding binary digit 001100 of memory, from a high position to low level, first nonzero digit 1 can be obtained and included afterwards Digit be 3 and to obtain the digit included after second nonzero digit 1 be 2;By the digit in same ordinal position Numerical value, respectively as coordinate value, i.e., by the first units numerical value 4 of the processor of same cis-position and the first units number of memory Value 3, as abscissa 4 and ordinate 3;By second position of the second units numerical value 2 of the processor of same cis-position and memory Number numerical value 2, as abscissa 2 and ordinate 2;So as to produce 2 preferred allocation coordinates (4,3) and (2,2), as Fig. 2- (1) shown in.
When execution above-mentioned steps establish the assessment models of product, it is desirable that the gauge number in setting resource specification dimension is equal The power side started for 2 since 0, for example, 20, 21, 22, 23, 24, 25Deng the specification of processor and memory in the present embodiment It is exactly such.
Meanwhile paired digit numerical requirements are paired in the dimension of each setting resource specification;To on same cis-position Azygous numerical value does not generate preferred allocation coordinate.In two-dimentional assessment models, if there is a setting group of same cis-position Part can find digit numerical value, and when another component can not find digit numerical value, that is, obtain abscissa or ordinate it In one;At this point, complete preferred allocation coordinate can not be generated, the processing of any generation preferred allocation coordinate is not done, directly Into next step.For example, in the present embodiment, if the binary digit of processor is 010110, wherein appearance three is non- Zero numerical value, and the binary digit of memory is 001100, wherein only there is the numerical value of two non-zeros, then to same cis-position The numerical value of 3rd non-zero of processor, it is without any processing.
If setting the number of resource specification as two, i.e., when the dimension of corresponding assessment models is 2, perform the life of this step Following preferred method can also be used into preferred allocation coordinate:
Step S103-3-1:According to the order from a high position to low level, first non-zero number in the binary digit is found Word;By the digit numerical value after first nonzero digit of the setting resource specification found out, respectively as abscissa and indulge Target value is sat, the preferred allocation coordinate in the two-dimensional table assessment models for the resource for establishing a product;
Step S103-3-3:Continually look for next nonzero digit in the binary digit;The setting that will be found out Digit numerical value after next nonzero digit of resource specification respectively as the value of abscissa and ordinate, establishes an institute State the preferred allocation coordinate in the two-dimensional table assessment models of the resource of product;
Step S103-3-5:Before each nonzero digit in the binary digit is found, described in return Continually look for next nonzero digit in the binary digit;By the next non-zero number for the setting resource specification found out Digit numerical value after word respectively as the value of abscissa and ordinate, establishes the two-dimensional table of the resource of a product The step of preferred allocation coordinate in assessment models.
Step S103-3-1 to S103-3-5 is distributed using a pair of of the setting resource specification for finding same cis-position one by one The mode of the digit numerical value of quantity.First, from a high position to low level, the binary digit that two setting resource specifications have been converted is found In first nonzero digit;By the digit numerical value after first nonzero digit of find out setting resource specification and find out Another setting resource specification first nonzero digit after digit numerical value, as paired value respectively as abscissa With the value of ordinate, a preferred allocation coordinate is generated;
Continually look for next nonzero digit in the binary digit;The next of resource specification is set by find out one Digit numerical value after a nonzero digit and the digit after the next nonzero digit for another the setting resource specification found out Numerical value respectively as the value of abscissa and ordinate, generates a preferred allocation coordinate;
Choose two setting resource specifications in any one setting resource specifications, this setting resource specification two into It before each nonzero digit in system number is all found, returns and performs step S103-3-3, until whole paired value It is found.
For example, in the present embodiment, binary number of processor is for binary number of 010100 and memory 001100;This preferred steps is:First from a high position to low level, find in the binary digit of processor and memory first it is non- The 1 of 3rd in deputy 1 and 001100 in zero number i.e. 010100;By first nonzero digit of the processor found out it Digit numerical value afterwards starts calculate 0100 totally 4 after that is, deputy 1, and digit numerical value is 4;And the memory found out Digit numerical value after first nonzero digit, i.e., the 3rd 1 after start 100 totally 3 calculated, digit numerical value is 3;Point Value not as abscissa and ordinate generates a preferred allocation coordinate (4,3);
Continually look for next nonzero digit in the binary digit;By the next nonzero digit for the processor found out Digit numerical value afterwards, 2 and the memory found out next nonzero digit after digit numerical value, 2;Respectively as abscissa With the value of ordinate, a preferred allocation coordinate (2,2) is generated;
Choose any one setting resource specification in two setting resource specifications, it is assumed that choose processor, judge to handle Whether each nonzero digit in the binary digit of device is all found;At this time 2 are shared in the binary digit of processor Each nonzero digit of a nonzero digit is found, then after being unsatisfactory for returning and performing and continually look for next nonzero digit The condition of digit numerical value, terminates this preferred steps.
Step S103-5:Gather the preferred allocation coordinate of generation, establish the assessment mould of resource in the product Type.
Gather the preferred allocation coordinate of generation, form the coordinate set of the dimension of corresponding setting resource specification, these are sat Mark set inserts the coordinate diagram system of the dimension of a corresponding setting resource specification, establishes the assessment mould of resource in the product Type.
When using Two-Dimensional Evaluation Model, each preferred allocation coordinate for gathering generation is preferably to divide each of generation With coordinate, all mark to corresponding list cell on two-dimensional table evaluation model;In figure, that is, share same original Point, for coordinate system is converted to two-dimensional table, the preferred allocation coordinate in former coordinate system corresponds to the unit in two-dimensional table respectively.
For example, the row alignment processing device in the Two-Dimensional Evaluation Model of the present embodiment, arranges corresponding memory;Capable unit is core Calculation, the unit of row is GB;1st row is 20That is 1 core processor, the 2nd row are 2 core processors, and the 3rd row is 4 core processings Device, and so on;1st row are 20That is 1GB memories, the 2nd row are 21That is 2GB memories, the 3rd row are 22That is 4GB memories, and so on. Gather preferred allocation coordinate (4,3) and (2,2) of generation, that is, establish the Two-Dimensional Evaluation Model of corresponding server 1.
In the evaluation model of resource in establishing product, following preferred steps are can also carry out:
Step S103-5-3:The described preferred of generation is marked on each preferred allocation coordinate in the evaluation model Distribute the number of coordinate.
According to each preferred allocation coordinate of generation, the number of mark preferred allocation coordinate in corresponding evaluation model; If a preferred allocation coordinate is not overlapped with other preferred allocation coordinates, 1 is marked on this preferred allocation coordinate;If Preferred allocation coordinate overlaps, that is, the multiple preferred allocation coordinates generated are located at same coordinate position, then at this preferably Distribute the number that coordinate subscript focuses on the preferred allocation coordinate closed.
Each latitude coordinates value of preferred allocation coordinate corresponds to the specification power of the setting resource specification respectively, can basis This power relation, by preferred allocation Labeling Coordinate in corresponding evaluation model.
For example, in the present embodiment, the preferred allocation coordinate (4,3) of rendezvous server 1 and (2,2), generation is as product During the two-dimentional assessment models of middle resource, preferred allocation coordinate (4,3) represents that row is 24It is 2 that i.e. 16 core of processor arranges simultaneously3It is i.e. interior 8GB is deposited, is the unit of the 5th row and the 4th row in two-dimensional table in corresponding 16 cores and 8GB, in this unit mark number 1; Preferred allocation coordinate (2,2) represents that row is 22It is 2 that i.e. 4 core of processor arranges simultaneously2That is memory 4GB exists in corresponding 4 cores and 4GB It is the 3rd row and the unit of the 3rd row in two-dimensional table, in this unit mark number 1.At this point, it obtains as resource in product Assessment models two-dimensional table, there are on this form 2 units to have number 1, be respectively the 5th row and the 4th row unit and The unit of 3rd row and the 3rd row.It is assumed that another preferred allocation coordinate (2,2) is also generated at this time, then in mark two-dimensional table During the unit of the 3rd row and the 3rd row, mark number 2 represents that this element corresponds to 2 preferred allocation coordinates.
The upper left corner shows the present embodiment after completing to gather preferred allocation coordinate marked as the small figure of (1) in Fig. 2, generation The two-dimensional table as the assessment models of resource in server.
In the evaluation model of resource in establishing product, following preferred steps are can also carry out:
Step S103-5-1:According to the preferred allocation coordinate, determine corresponding described with the preferred allocation coordinate Preferred allocation specification;The definite preferred allocation specification of set adds in the assessment models of resource in the product.
When establishing evaluation model, the excellent of these corresponding preferred allocation coordinates can also be determined according to preferred allocation coordinate Choosing distribution specification, and gather these definite preferred allocation specifications, it is added among evaluation model.
After this preferred steps, there are preferred allocation coordinates and the set of preferred allocation specification in evaluation model.In this way, When performing distribution resource, generally it is convenient to select carry out next step using preferred allocation coordinate or preferred allocation specification It calculates.
In product is established after the evaluation model of resource, the evaluation model of resource in product set can be established:
Step S103-7:The assessment models of resource in each product are polymerize and are added, establishes and assesses the production The assessment models of resource in product set.
By the assessment models of resource in each product, all polymerization is added, and is formed one and is commented as resource in product set Estimate model.When polymerization is added multiple assessment models, it is necessary to which the number of the preferred allocation coordinate of coincidence is also carried out polymerization addition.
For example, in the present embodiment, it is all poly- by 5 Two-Dimensional Evaluation Model forms of 5 servers in server cluster Conjunction is added on a Two-Dimensional Evaluation Model form, as shown in Fig. 2-(2), is obtained one and is commented as resource in server cluster Estimate model.
Step S105:Obtain the specification and quantity for being allocated object;The specification of the allocated object is provided with the setting Source specification is corresponding.
It is allocated allocated object of the object for resource in product.In the present embodiment, object is allocated to take for virtual cloud Business device.The specification and setting resource specification for being allocated object are one-to-one, and the gauge number for being allocated object is similary It is corresponding with setting resource specification, it is the power side of integer.
For example, in the present embodiment, the specification for being allocated object is similarly CUP cores and memory, and unit amount is also 2 Power side.It Wei not be in 8 core processors and 4GB assuming that being allocated the The concrete specification of object virtual Cloud Server in the present embodiment It deposits, quantity is 2.
Step S107:According to the assessment models of resource in the product set, according to the allocated object specification and Quantity distributes the resource in the product set to the allocated object.
According to the assessment models of resource in the product set of foundation, according to the specification and quantity of the allocated object of acquisition, The resource in product set is distributed to allocated object.
This step determines to be most suitable for the preferred allocation to allocated object distribution resource by using the assessment models of foundation Specification, and then carry out resource allocation.How being specifically allocated will be described in detail in the sub-step of this step.
Step S107-1:If the specification of the allocated object is identical with the preferred allocation specification, according to described excellent Choosing distribution specification, the resource in the product set is distributed to the allocated object.
If the specification for being allocated object is identical with the preferred allocation specification in evaluation model, it is possible to according to preferred allocation Specification (namely specification of allocated object) distributes resource to allocated object.
It, can be direct since the specification for being allocated object does not generate the preferred allocation specification of resource specification fragment waste as Resource allocation is carried out using this specification.
For example, in this example, it is assumed that it is the cloud service that 1 specification is 4 core processor 2GB memories to be allocated object Device, specification are identical with the 4 core processor 2GB memories of preferred allocation specification in assessment models, it is possible to directly distribute 4 to it The resource (corresponding server 5) of core processor 2GB memories.
Step S107-3:If the specification of the allocated object is different from the preferred allocation specification, according to more than institute State the specification of allocated object and the specification of the closest allocated object in the assessment models of the product set The preferred allocation specification distributes the resource in the product set to the allocated object.
If the preferred allocation specification being allocated in the specification and evaluation model of object differs, it is possible to according to more than quilt The specification of distribution object at the same in evaluation model closest to allocated object specification that preferred allocation specification, come Resource is distributed to allocated object.
Preferred allocation specification in the specification and evaluation model for being allocated object is different, is allocated object Specification in evaluation model corresponding coordinate points be not exclusive unit.At this time, it may be necessary to it determines to be allocated object pair apart from this The exclusive unit of the coordinate points answered recently, then the corresponding preferred allocation specification of unit is monopolized with this, it is distributed to distribution object Resource.
The preferred allocation specification of the specification of the closest allocated object, is by adopting in the assessment models of product set The definite coordinate points due to preferred allocation specification correspondence in evaluation model with Euclidean distance formula, can be by using Europe Formula range formula is advised to calculate the coordinate points in the evaluation model corresponding to the specification of allocated object with other preferred allocations The distance of coordinate points corresponding to lattice, the corresponding preferred allocation specification of coordinate points of beeline is immediate preferred allocation Specification.In Two-Dimensional Evaluation Model, this formula is directly applicable in;It, can be by several in the evaluation model of three-dimensional more than dimension Where method is applicable in this formula (for example, determining the beeline in three-dimensional evaluation model between two coordinate points).
It is during the preferred allocation specification that this step determines it needs to be determined that bigger than the specification of allocated object, it otherwise can not distribute money Source.It is that optimum allocation specification is determined in the range of specific region that this point, which is reflected on evaluation model,.
For example, in the present embodiment, as shown in Fig. 2-(3), it is assumed that be allocated the specification of object Cloud Server as at 8 cores Device 4GB memories are managed, at this time there is no same preferred allocation specification, then can be found closest to this corresponding Cloud Server Specification, corresponding preferred allocation specification coordinate points, the lower right of (3,2) coordinate points is found as into Fig. 2-(3), finally It is (3,4) to determine immediate coordinate points, corresponds to 8 core processor 16GB memories of optimum allocation specification, then can be by corresponding 8 The resource of the server (i.e. server 2) of this preferred allocation specification of core processor 16GB memories, distributes to this cloud service Device.
Step S107-1 or S107-3 is being performed after allocated object distributes resource, can also carry out following preferred steps Suddenly:
Step S107-5:If the quantity of the allocated object is more than preferably dividing for the allocated preferred allocation specification With quantity, then it is more than the part of the preferred allocation quantity for the allocated object, according to more than being assigned The preferred allocation specification and in the assessment models of the product set closest to the allocated object specification institute Preferred allocation specification is stated, the resource in the product set is distributed to the allocated object.
If the quantity for being allocated object is more than the preferred allocation quantity for the preferred allocation specification being assigned, so that it may For object is allocated described in the part more than preferred allocation quantity, to be advised according to more than the preferred allocation being assigned Lattice and in the assessment models of product set closest to allocated object specification preferred allocation specification, be allocated to described Object distributes resource.
For example, in this example, it is assumed that it is the cloud service that 2 specifications are 4 core processor 2GB memories to be allocated object Device, directly to its distribute 14 core processor 2GB memory resource (corresponding server 5) after, for remaining 1 cloud Server, can be according to more than 4 core processor 2GB memories of preferred allocation specification, immediate preferred point be assigned Resource is distributed with 8 core processor 16GB memories of specification.
Fig. 3 is refer to, the distributor of resource is implemented in a kind of product set provided for the application second embodiment It illustrates and is intended to.Since device embodiment is substantially similar to embodiment of the method, so describe fairly simple, related part is referring to the The explanation of one embodiment.Device embodiment described below is only schematical.
The application provides a kind of distributor of resource in product set, including:
Obtain resource can quantity allotted unit 201, for obtain the setting resource of each product in the product set rule Lattice can quantity allotted;
The assessment models unit 203 of resource in product set is established, for being advised according to the setting resource of each product Lattice can quantity allotted, establish to assess the assessment models of resource in the product set;The dimension of the assessment models with The setting resource specification is corresponding;The assessment models can determine in the product set preferred allocation specification of resource and With the corresponding preferred allocation quantity of the preferred allocation specification;
It obtains and is allocated object size and processing units 205, for obtaining the specification of allocated object and quantity;The quilt The specification of distribution object is corresponding with the setting resource specification;
Resource unit 207 is distributed according to assessment models, for the assessment models according to resource in the product set, according to The specification and quantity of the allocated object distribute the resource in the product set to the allocated object.
Optionally, in the assessment models it is each setting resource specification unit amount be integer power side.
Optionally, the preferred allocation specification is to distribute after resource not generating resource specification wave to the allocated object The maximum setting resource specification taken.
Optionally, it is described to distribute resource unit according to assessment models, including:
Resource unit is distributed when specification is identical, if specification and the preferred allocation specification phase for the allocated object Together, then the resource in the product set is distributed to the allocated object according to the preferred allocation specification.
Optionally, it is described to distribute resource unit according to assessment models, including:
Resource unit is distributed during specification difference, if for the specification of the allocated object and the preferred allocation specification not Together, then divided according to the specification more than the allocated object and closest to described in the assessment models of the product set The preferred allocation specification of specification with object distributes the resource in the product set to the allocated object.
Optionally, resource unit is distributed when distributing resource unit or the specification difference when the triggering specification is identical Afterwards, following units are triggered:
Resource unit is distributed for volume residual, if being more than the institute that has been assigned for the quantity of the allocated object The preferred allocation quantity of preferred allocation specification is stated, then is more than the part of the preferred allocation quantity for the allocated object, According to more than the preferred allocation specification being assigned and in the assessment models of the product set closest to institute The preferred allocation specification of the specification of allocated object is stated, the money in the product set is distributed to the allocated object Source.
Optionally, described in the specification of the allocated object closest in the assessment models of the product set Preferred allocation specification is definite by using Euclidean distance formula.
Optionally, the assessment models unit for establishing resource in product set, is used for:
For each product, the assessment models unit of resource in product is established in triggering, and by acquisition by each production The assessment models polymerization of resource is added in product, establishes the assessment models for assessing resource in the product set.
Optionally, the assessment models are in power side of the gauge number set in resource specification dimension as 2.
Optionally, the assessment models unit for establishing resource in product, including:
Convert can quantity allotted into binary cell, for the setting resource specification of the product obtained to be distributed Quantity is respectively converted into binary digit;
Preferred allocation coordinate unit is generated, for according to the order from a high position to low level, obtaining the binary number respectively Digit numerical value in word after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as described in correspondence The coordinate value of resource specification dimension is set, generates preferred allocation coordinate;
Gather preferred allocation coordinate unit, for gathering the preferred allocation coordinate of generation, establish in the product and provide The assessment models in source.
Optionally, the paired digit numerical value is paired in the dimension of each setting resource specification.
Optionally, the set preferred allocation coordinate unit, including:
The number unit of preferred allocation coordinate is marked, for each preferred allocation coordinate in the evaluation model Mark the number of the preferred allocation coordinate of generation.
Optionally, the set preferred allocation coordinate unit, including:
Preferred allocation specification unit is determined, for according to the preferred allocation coordinate, determining and the preferred allocation coordinate The corresponding preferred allocation specification;
Gather preferred allocation specification unit, for gathering the definite preferred allocation specification, add in the money of the product The assessment models in source.
Optionally, the number for setting resource specification is two.
Optionally, the generation preferred allocation coordinate unit, including:
First preferred allocation coordinate unit is determined, for according to the order from a high position to low level, finding the binary system First nonzero digit in number;By the digit numerical value after first nonzero digit of the setting resource specification found out, Respectively as the value of abscissa and ordinate, preferably dividing in the two-dimensional table assessment models for the resource for establishing a product With coordinate;
Next preferred allocation coordinate unit is determined, for continually looking for next non-zero number in the binary digit Word;By the digit numerical value after the next nonzero digit for the setting resource specification found out, respectively as abscissa and indulge Target value is sat, the preferred allocation coordinate in the two-dimensional table assessment models for the resource for establishing a product;
Determine trigger condition unit, before being found for each nonzero digit in the binary digit, Return to triggering definite next preferred allocation coordinate unit.
Optionally, the product is single server, and the resource specification that sets is processor core and memory.
Fig. 4 is refer to, a kind of side for establishing the assessment models of resource in product provided for the application 3rd embodiment Method embodiment schematic diagram.Since the present embodiment is substantially similar to first embodiment, so describe fairly simple, related part ginseng See the part explanation of first embodiment.Embodiment of the method described below is only schematical.
The application provides a kind of method for establishing the assessment models of resource in product, including:
Step S301:Obtain the setting resource specification of the product can quantity allotted;
Step S303:By described in acquisition can quantity allotted be respectively converted into binary digit;
Step S305:According to the order from a high position to low level, obtain respectively in the binary digit after nonzero digit Digit numerical value, and by the paired digit numerical value positioned at same cis-position, respectively as the correspondence setting resource specification dimension Coordinate value, generate preferred allocation coordinate;
Step S307:Gather the preferred allocation coordinate of generation, establish the assessment models of resource in the product;It is described The latitude of assessment models corresponds to the setting resource specification.
Fig. 5 is refer to, a kind of dress for establishing the assessment models of resource in product provided for the application fourth embodiment Put embodiment schematic diagram.Since device embodiment is substantially similar to embodiment of the method, so describe fairly simple, related part Illustrate referring to the part of embodiment of the method.Device embodiment described below is only schematical.
The application provides a kind of device for establishing the assessment models of resource in product, including:
Obtain setting resource specification can quantity allotted unit 401, for obtaining the setting resource specification of the product It can quantity allotted;
Convert can quantity allotted into binary number word cell 403, for described in obtaining can quantity allotted convert respectively For binary digit;
Preferred allocation coordinate unit 405 is generated, for according to the order from a high position to low level, obtaining the binary system respectively Digit numerical value in number after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as corresponding institute The coordinate value of setting resource specification dimension is stated, generates the preferred allocation coordinate of the product resource;
The assessment models unit 407 of resource in product is established, for gathering the preferred allocation coordinate of generation, establishes institute State the assessment models of resource in product;The latitude of the assessment models corresponds to the setting resource specification.
Fig. 6 is refer to, the side for establishing the assessment models of resource in product set provided for the 5th embodiment of the application Method embodiment schematic diagram.Since the present embodiment is substantially similar to first embodiment, so describe fairly simple, related part ginseng See the part explanation of first embodiment.Embodiment of the method described below is only schematical.
The application provides a kind of method for establishing the assessment models of resource in product set, including:
Step S501:For each product in the product set, establishing in product described in 3rd embodiment is performed The method of the assessment models of resource, to obtain the assessment models of resource in corresponding each product;
Step S503:The assessment models of resource in each product of acquisition are polymerize and are added, establish the product collection The assessment models of resource in conjunction.
Fig. 7 is refer to, the dress for establishing the assessment models of resource in product set provided for the application sixth embodiment Put embodiment schematic diagram.Since the present embodiment is substantially similar to first embodiment, so describe fairly simple, related part ginseng See the part explanation of first embodiment.Device embodiment described below is only schematical.
The application provides a kind of device for establishing the assessment models of resource in product set, including:
The assessment models unit 601 of resource in product is obtained, for each product being directed in the product set, triggering The device for establishing the assessment models of resource in product described in claim 34, to obtain resource in corresponding each product Assessment models;
The assessment models unit 603 of resource in product set is established, for resource in each product that will obtain Assessment models polymerization is added, and establishes the assessment models of resource in the product set.
Fig. 8 is refer to, the embodiment schematic diagram of a kind of electronic equipment is provided for the 7th embodiment of the application.Due to this reality It applies example and is substantially similar to first embodiment, so describing fairly simple, referring to the part explanation of first embodiment in place of correlation .Electronic equipment embodiment described below is only schematical.
37. a kind of electronic equipment, including:
Display 701;
Processor 703;
Memory 705, for storing the distribution program of resource in product set, described program is by the processor 703 When reading execution, following operation is performed:Obtain the setting resource specification of each product in the product set can quantity allotted; According to the setting resource specification of each product can quantity allotted, establish to assess commenting for resource in the product set Estimate model;The dimension of the assessment models is corresponding with the setting resource specification;The assessment models can determine the production In product set the preferred allocation specification of resource and with the corresponding preferred allocation quantity of the preferred allocation specification;It obtains and is allocated The specification and quantity of object;The specification of the allocated object is corresponding with the setting resource specification;According to the product collection According to the specification and quantity of the allocated object, the production is distributed to the allocated object for the assessment models of resource in conjunction Resource in product set.
Although the application is disclosed as above with preferred embodiment, it is not for limiting the application, any this field skill Art personnel are not being departed from spirit and scope, can make possible variation and modification, therefore the guarantor of the application Shield scope should be subject to the scope that the application claim is defined.
In a typical configuration, computing device includes one or more processors (processor), input/output connects Mouth, network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
1st, computer-readable medium can be by any side including permanent and non-permanent, removable and non-removable media Method or technology realize that information stores.Information can be computer-readable instruction, data structure, the module of program or other numbers According to.The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), dynamic random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), fast flash memory bank or other memory techniques, read-only optical disc are read-only Memory (CD-ROM), digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic rigid disk storage or Other magnetic storage apparatus or any other non-transmission medium, the information that can be accessed by a computing device available for storage.According to Herein defines, and computer-readable medium does not include non-temporary computer readable media (transitory media), such as modulates Data-signal and carrier wave.
2nd, it will be understood by those skilled in the art that embodiments herein can be provided as method, system or computer program production Product.Therefore, the embodiment in terms of complete hardware embodiment, complete software embodiment or combination software and hardware can be used in the application Form.It can use moreover, the application can be used in one or more computers for wherein including computer usable program code The computer program product that storage medium is implemented on (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) Form.

Claims (37)

1. a kind of distribution method of resource in product set, which is characterized in that including:
Obtain the setting resource specification of each product in the product set can quantity allotted;
According to the setting resource specification of each product can quantity allotted, establish to assess resource in the product set Assessment models;The dimension of the assessment models is corresponding with the setting resource specification;The assessment models can determine institute State resource in product set preferred allocation specification and with the corresponding preferred allocation quantity of the preferred allocation specification;
Obtain the specification and quantity for being allocated object;The specification of the allocated object is corresponding with the setting resource specification;
According to the assessment models of resource in the product set, according to the specification and quantity of the allocated object, to the quilt Distribution object distributes the resource in the product set.
2. the distribution method of resource in product set according to claim 1, which is characterized in that in the assessment models The unit amount of each setting resource specification is the power side of integer.
3. the distribution method of resource in product set according to claim 1, which is characterized in that the preferred allocation specification To distribute after resource the maximum setting resource specification for not generating the waste of resource specification to the allocated object.
4. the distribution method of resource in product set according to claim 1, which is characterized in that described according to the product The assessment models of resource in set, according to the specification and quantity of the allocated object, to described in the allocated object distribution The step of resource in product set, including:
If the specification of the allocated object is identical with the preferred allocation specification, according to the preferred allocation specification, to institute State the resource in the allocated object distribution product set.
5. the distribution method of resource in product set according to claim 4, which is characterized in that described according to the product The assessment models of resource in set, according to the specification and quantity of the allocated object, to described in the allocated object distribution The step of resource in product set, including:
If the specification of the allocated object is different from the preferred allocation specification, according to the rule more than the allocated object Lattice and in the assessment models of the product set closest to the allocated object specification the preferred allocation specification, The resource in the product set is distributed to the allocated object.
6. the distribution method of resource in product set according to claim 5, which is characterized in that if described performing It is identical with the preferred allocation specification to be allocated the specification of object, then according to the preferred allocation specification, to described allocated pair If the specification of the allocated object and institute described in after the step of as distributing the resource in the product set or performing Preferred allocation specification difference is stated, then according to the specification more than the allocated object and in the assessment models of the product set In closest to the allocated object specification the preferred allocation specification, distribute the product collection to the allocated object After the step of resource in conjunction, following step is performed:
If the quantity of the allocated object is more than the preferred allocation quantity for the preferred allocation specification being assigned, It is more than the part of the preferred allocation quantity for the allocated object, according to more than described preferred point be assigned With specification and in the assessment models of the product set closest to the allocated object specification the preferred allocation Specification distributes the resource in the product set to the allocated object.
7. the distribution method of resource in product set according to claim 5 or 6, which is characterized in that described in the production The preferred allocation specification of the specification of the closest allocated object, is by using European in the assessment models of product set Range formula and it is definite.
8. the distribution method of resource in product set according to claim 1, which is characterized in that described according to each described The setting resource specification of product can quantity allotted, establish to assess the step of the assessment models of resource in the product set Suddenly, including:
The assessment models of resource in each product are polymerize and are added, establish the institute for assessing resource in the product set State assessment models.
9. the distribution method of resource in product set according to claim 8, which is characterized in that the assessment models are in institute It states and sets the gauge number in resource specification dimension as 2 power side.
10. the distribution method of resource in product set according to claim 9, which is characterized in that resource in the product The assessment models, established by performing following step:
By the setting resource specification of the product of acquisition can quantity allotted, be respectively converted into binary digit;
According to the order from a high position to low level, the digit numerical value after nonzero digit in the binary digit is obtained respectively, and By the paired digit numerical value positioned at same cis-position, respectively as the coordinate value of the correspondence setting resource specification dimension, generate Preferred allocation coordinate;
Gather the preferred allocation coordinate of generation, establish the assessment models of resource in the product.
11. the distribution method of resource in product set according to claim 10, which is characterized in that the paired digit Numerical value is paired in the dimension of each setting resource specification.
12. the distribution method of resource in product set according to claim 10, which is characterized in that the set generation The preferred allocation coordinate, the step of establishing the assessment models of resource in the product, including:
The number of the preferred allocation coordinate of generation is marked on each preferred allocation coordinate in the evaluation model.
13. the distribution method of resource in product set according to claim 10, which is characterized in that the set generation The preferred allocation coordinate, the step of establishing the assessment models of resource in the product, including:
According to the preferred allocation coordinate, determine and the corresponding preferred allocation specification of the preferred allocation coordinate;
The definite preferred allocation specification of set adds in the assessment models of the resource of the product.
14. the distribution method of resource in the product set according to claim 10 or 13, which is characterized in that the setting money The number of source specification is two.
15. the distribution method of resource in product set according to claim 14, which is characterized in that described according to from a high position To the order of low level, the digit numerical value after nonzero digit in the binary digit is obtained respectively, and will be located at same cis-position Paired digit numerical value, respectively as correspondence it is described setting resource specification dimension coordinate value, establish resource in the product The assessment models in preferred allocation coordinate the step of, including:
According to the order from a high position to low level, first nonzero digit in the binary digit is found;It is set described in finding out Determine the digit numerical value after first nonzero digit of resource specification, respectively as the value of abscissa and ordinate, establish one Preferred allocation coordinate in the two-dimensional table assessment models of the resource of the product;
Continually look for next nonzero digit in the binary digit;By the next non-of the setting resource specification found out Digit numerical value after zero number respectively as the value of abscissa and ordinate, establishes the two dimension of the resource of a product Preferred allocation coordinate in form assessment models;
Before each nonzero digit in the binary digit is found, the binary system is continually looked for described in return Next nonzero digit in number;By the digit numerical value after the next nonzero digit for the setting resource specification found out, Respectively as the value of abscissa and ordinate, preferably dividing in the two-dimensional table assessment models for the resource for establishing a product The step of with coordinate.
16. the distribution method of resource in product set according to claim 15, which is characterized in that the product is separate unit Server, the resource specification that sets is processor core and memory.
17. a kind of distributor of resource in product set, which is characterized in that including:
Obtain resource can quantity allotted unit, for obtaining dividing for the setting resource specification of each product in the product set With quantity;
The assessment models unit of resource in product set is established, for dividing for the setting resource specification according to each product With quantity, establish to assess the assessment models of resource in the product set;The dimension of the assessment models and the setting Resource specification is corresponding;The assessment models can determine in the product set preferred allocation specification of resource and with it is described excellent The choosing distribution corresponding preferred allocation quantity of specification;
It obtains and is allocated object size and processing units, for obtaining the specification of allocated object and quantity;Described allocated pair The specification of elephant is corresponding with the setting resource specification;
Resource unit is distributed according to assessment models, for the assessment models according to resource in the product set, according to the quilt The specification and quantity of distribution object distribute the resource in the product set to the allocated object.
18. the distributor of resource in product set according to claim 17, which is characterized in that in the assessment models In it is each setting resource specification unit amount be integer power side.
19. the distributor of resource in product set according to claim 17, which is characterized in that the preferred allocation rule Lattice are that the maximum setting resource specification for not generating the waste of resource specification is distributed after resource to the allocated object.
20. the distributor of resource in product set according to claim 17, which is characterized in that described according to assessment mould Type distributes resource unit, including:
Resource unit is distributed when specification is identical, if identical with the preferred allocation specification for the specification of the allocated object, Then according to the preferred allocation specification, the resource in the product set is distributed to the allocated object.
21. the distributor of resource in product set according to claim 20, which is characterized in that described according to assessment mould Type distributes resource unit, including:
Resource unit is distributed during specification difference, if different from the preferred allocation specification for the specification of the allocated object, Then it is allocated according to the specification more than the allocated object and closest to described in the assessment models of the product set The preferred allocation specification of the specification of object distributes the resource in the product set to the allocated object.
22. the distributor of resource in product set according to claim 21, which is characterized in that triggering the specification It is distributed when resource unit or the specification difference are distributed when identical after resource unit, triggers following units:
Resource unit is distributed for volume residual, if described excellent more than being assigned for the quantity of the allocated object The preferred allocation quantity of choosing distribution specification is more than then the part of the preferred allocation quantity for the allocated object, according to Closest to the quilt more than the preferred allocation specification being assigned and in the assessment models of the product set The preferred allocation specification of the specification of distribution object distributes the resource in the product set to the allocated object.
23. the distributor of resource in the product set according to claim 21 or 22, which is characterized in that described described The preferred allocation specification of the specification of the closest allocated object, is by using Europe in the assessment models of product set Formula range formula and it is definite.
24. the distributor of resource in product set according to claim 17, which is characterized in that described to establish product collection The assessment models unit of resource, is used in conjunction:
For each product, the assessment models unit of resource in product is established in triggering, and will be in each product by acquisition The assessment models polymerization of resource is added, and establishes the assessment models for assessing resource in the product set.
25. the distributor of resource in product set according to claim 24, which is characterized in that the assessment models exist Power side of the gauge number set in resource specification dimension as 2.
26. the distributor of resource in product set according to claim 25, which is characterized in that described to establish in product The assessment models unit of resource, including:
Convert can quantity allotted into binary cell, for distributing the setting resource specification of the product obtained to number Amount, is respectively converted into binary digit;
Preferred allocation coordinate unit is generated, for according to the order from a high position to low level, obtaining respectively in the binary digit Digit numerical value after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as the correspondence setting The coordinate value of resource specification dimension generates preferred allocation coordinate;
Gather preferred allocation coordinate unit, for gathering the preferred allocation coordinate of generation, establish resource in the product The assessment models.
27. the distributor of resource in product set according to claim 26, which is characterized in that the paired digit Numerical value is paired in the dimension of each setting resource specification.
28. the distributor of resource in product set according to claim 26, which is characterized in that the set is preferably divided With coordinate unit, including:
The number unit of preferred allocation coordinate is marked, for being marked in the evaluation model on each preferred allocation coordinate The number of the preferred allocation coordinate of generation.
29. the distributor of resource in product set according to claim 26, which is characterized in that the set is preferably divided With coordinate unit, including:
Preferred allocation specification unit is determined, for according to the preferred allocation coordinate, determining opposite with the preferred allocation coordinate The preferred allocation specification answered;
Gather preferred allocation specification unit, for gathering the definite preferred allocation specification, add in the resource of the product The assessment models.
30. the distributor of resource in the product set according to claim 26 or 29, which is characterized in that the setting money The number of source specification is two.
31. the distributor of resource in product set according to claim 30, which is characterized in that the generation preferably divides With coordinate unit, including:
First preferred allocation coordinate unit is determined, for according to the order from a high position to low level, finding the binary digit In first nonzero digit;By the digit numerical value after first nonzero digit of the setting resource specification found out, difference As the value of abscissa and ordinate, the preferred allocation in the two-dimensional table assessment models for the resource for establishing a product is sat Mark;
Next preferred allocation coordinate unit is determined, for continually looking for next nonzero digit in the binary digit;It will Digit numerical value after the next nonzero digit for the setting resource specification found out, respectively as abscissa and ordinate It is worth, the preferred allocation coordinate in the two-dimensional table assessment models for the resource for establishing a product;
It determines trigger condition unit, before being found for each nonzero digit in the binary digit, returns Trigger definite next preferred allocation coordinate unit.
32. the distributor of resource in product set according to claim 31, which is characterized in that the product is separate unit Server, the resource specification that sets is processor core and memory.
A kind of 33. method for establishing the assessment models of resource in product, which is characterized in that including:
Obtain the setting resource specification of the product can quantity allotted;
By described in acquisition can quantity allotted be respectively converted into binary digit;
According to the order from a high position to low level, the digit numerical value after nonzero digit in the binary digit is obtained respectively, and By the paired digit numerical value positioned at same cis-position, respectively as the coordinate value of the correspondence setting resource specification dimension, generate The preferred allocation coordinate of the product resource;
Gather the preferred allocation coordinate of generation, establish the assessment models of resource in the product;The latitude of the assessment models Degree corresponds to the setting resource specification.
34. a kind of device for establishing the assessment models of resource in product, which is characterized in that including:
Obtain setting resource specification can quantity allotted unit, distribute number for obtain the setting resource specification of the product Amount;
Convert can quantity allotted into binary number word cell, for described in obtaining can quantity allotted be respectively converted into binary system Number;
Preferred allocation coordinate unit is generated, for according to the order from a high position to low level, obtaining respectively in the binary digit Digit numerical value after nonzero digit, and by the paired digit numerical value positioned at same cis-position, respectively as the correspondence setting The coordinate value of resource specification dimension generates the preferred allocation coordinate of the product resource;
The assessment models unit of resource in product is established, for gathering the preferred allocation coordinate of generation, establishes the product The assessment models of middle resource;The latitude of the assessment models corresponds to the setting resource specification.
A kind of 35. method for establishing the assessment models of resource in product set, which is characterized in that including:
For each product in the product set, the assessment models for establishing resource in product described in perform claim requirement 33 Method, to obtain the assessment models of resource in the corresponding each product;
The assessment models of resource in each product of acquisition are polymerize and are added, establish the assessment of resource in the product set Model.
36. a kind of device for establishing the assessment models of resource in product set, which is characterized in that including:
The assessment models unit of resource in product is obtained, for each product being directed in the product set, triggering right will The device for establishing the assessment models of resource in product described in 34 is sought, to obtain the assessment mould of resource in corresponding each product Type;
The assessment models unit of resource in product set is established, for the assessment models of resource in each product that will obtain Polymerization is added, and establishes the assessment models of resource in the product set.
37. a kind of electronic equipment, including:
Display;
Processor;
Memory, for storing the distribution program of resource in product set, described program read by the processor perform when, Perform following operation:Obtain the setting resource specification of each product in the product set can quantity allotted;According to each institute State the setting resource specification of product can quantity allotted, establish to assess the assessment models of resource in the product set;Institute The dimension for stating assessment models is corresponding with the setting resource specification;The assessment models can determine to be provided in the product set The preferred allocation specification in source and with the corresponding preferred allocation quantity of the preferred allocation specification;Obtain the specification for being allocated object And quantity;The specification of the allocated object is corresponding with the setting resource specification;According to resource in the product set Assessment models according to the specification and quantity of the allocated object, are distributed to the allocated object in the product set Resource.
CN201611089360.9A 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 Active CN108122062B (en)

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 true CN108122062A (en) 2018-06-05
CN108122062B 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)

* Cited by examiner, † Cited by third party
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

Patent Citations (6)

* Cited by examiner, † Cited by third party
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
CN108122062B (en) 2021-11-26

Similar Documents

Publication Publication Date Title
CN106056529B (en) Method and equipment for training convolutional neural network for picture recognition
US20170331886A1 (en) Data processing system, computing node, and data processing method
JP2018506107A (en) Efficient determination of joint paths via radix estimation
CN104112008A (en) Multi-table data association inquiry optimizing method and device
CN108241531A (en) A kind of method and apparatus for distributing resource for virtual machine in the cluster
Valero‐Lara et al. cuThomasBatch and cuThomasVBatch, CUDA routines to compute batch of tridiagonal systems on NVIDIA GPUs
CN110209714A (en) Report form generation method, device, computer equipment and computer readable storage medium
TW201816627A (en) Resource scheduling method, device, and system
CN104952086A (en) Apparatus, and method for managing structure data
CN107070645A (en) Compare the method and system of the data of tables of data
JP2017531852A (en) Resource leak detection method, apparatus and system
CN106651513B (en) Quotation method and device for circuit board orders
CN104951442A (en) Method and device for determining result vector
CN106940712A (en) Sequence generating method and equipment
CN109345252A (en) A kind of online trading control method, device and computer equipment
CN104572588A (en) Matrix inversion processing method and device
CN110110158B (en) Storage space division method and system for three-dimensional grid data
CN108122062A (en) The distribution of resource and the method and apparatus for establishing the assessment models of resource in product, product set in product set
Schmitz et al. Efficient and quality contouring algorithms on the GPU
CN112506948A (en) Index query method of service information and related equipment
CN112149213A (en) Method, device and equipment for transmitting finite element model grid data of nuclear island structure
CN111125157B (en) Query data processing method and device, storage medium and processor
CN106215417A (en) Server and gift bag distributor and method
CN111260272A (en) Method, device, equipment and storage medium for responding to user request based on inventory
CN109933771A (en) A kind of automatic merging method of report, device, equipment and storage medium

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