CN109767057A - Resource allocation methods, device, electronic equipment and storage medium - Google Patents

Resource allocation methods, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109767057A
CN109767057A CN201811436573.3A CN201811436573A CN109767057A CN 109767057 A CN109767057 A CN 109767057A CN 201811436573 A CN201811436573 A CN 201811436573A CN 109767057 A CN109767057 A CN 109767057A
Authority
CN
China
Prior art keywords
resource
user
platform
information
basic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201811436573.3A
Other languages
Chinese (zh)
Inventor
李培培
秦浏杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN201811436573.3A priority Critical patent/CN109767057A/en
Publication of CN109767057A publication Critical patent/CN109767057A/en
Pending legal-status Critical Current

Links

Abstract

This application discloses a kind of resource allocation methods, belong to field of computer technology, for solving the problems, such as that resource utilization is lower in the prior art.Resource allocation methods disclosed in the embodiment of the present application include: to carry out and distribute with resource of the matched resource distribution weight of each user to platform according to predetermined, are determined as the basic resource quantity of each user's distribution;The resource using information of the user obtained according to the basic resource quantity and in platform operational process carries out resource and temporarily transfers control.Resource allocation methods disclosed in the embodiment of the present application are when platform starts, resource is carried out according to history resource using information tentatively to distribute, then, in platform operational process, resource is flexibly deployed according to the resource service condition of each user, by carrying out resource secondment between user, carrys out the wave crest and trough that coping resources use, effectively improve resource utilization.

Description

Resource allocation methods, device, electronic equipment and storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of resource allocation methods, device, electronic equipment and deposit Storage media.
Background technique
With the development of internet technology, e-commerce platform is more and more, and not only terminaloriented is objective for e-commerce platform Family also faces many trade companies.Such as hotel reservation platform, it can be used as the agent of each hotel brand, in hotel information exhibition Show, issue, needing to dock multiple suppliers in the links such as hotel reservation and customer service.Since platform resource is limited, when more When a supplier needs to share limited resource, how platform resource is managed, so that resource sufficiently, is reasonably utilized, it is to mention Rise the critical issue of system performance.Resource allocation methods commonly used in the prior art, which arrive first, first to be obtained and distributes according to need two kinds.First It is resource allocation to the preferential supplier for issuing occupancy resource request to first obtaining, after the supplier has used resource, by Resource release, this method issues resource request supplier after will lead to can not obtain resource, and resource allocation is unreasonable.It presses Need to be assigned as the demand according to supplier, be manually assigned to the resource quantity of supplier, this method when supplier is more, by Constantly change in the resource requirement of supplier, need frequently to modify resource distribution, dimension is at high cost, also, works as certain suppliers When having applied for more resource but actually not made full use of resource, it is lower to will cause resource utilization.
Summary of the invention
The application provides a kind of resource allocation methods, helps to promote resource utilization.
To solve the above-mentioned problems, in a first aspect, the embodiment of the present application provides a kind of resource allocation methods, comprising:
It carries out and distributes with resource of the matched resource distribution weight of each user to platform according to predetermined, determine For the basic resource quantity of each user's distribution;
The resource using information of the user obtained according to the basic resource quantity and in platform operational process, into Row resource temporarily transfers control.
Second aspect, the embodiment of the present application provide a kind of resource allocation device, comprising:
Pre-allocation of resources module, for according to it is predetermined with the matched resource distribution weight of each user to platform Resource carries out and distribution, is determined as the basic resource quantity of each user's distribution;
Resource temporarily transfers module, the user for obtaining according to the basic resource quantity and in platform operational process Resource using information, carry out resource temporarily transfer control.
The third aspect, the embodiment of the present application also disclose a kind of electronic equipment, including memory, processor and are stored in institute The computer program that can be run on memory and on a processor is stated, the processor realizes this when executing the computer program Apply for resource allocation methods described in embodiment.
Fourth aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence, when which is executed by processor the step of resource allocation methods disclosed in the embodiment of the present application.
Resource allocation methods disclosed in the embodiment of the present application, by first according to predetermined it is matched with each user Resource distribution weight is carried out to the resource of platform and distribution, is determined as the basic resource quantity of each user's distribution;Then, The resource using information of the user obtained according to the basic resource quantity and in platform operational process carries out resource and borrows Regulation system, solves the problems, such as that resource utilization is lower in the prior art.Resource allocation methods disclosed in the embodiment of the present application exist When platform starts, resource is carried out according to history resource using information and is tentatively distributed, then, in platform operational process, according to each The resource service condition of user flexibly deploys resource, by carrying out resource secondment between user, carrys out the wave crest that coping resources use And trough, effectively improve resource utilization.
Detailed description of the invention
Technical solution in ord to more clearly illustrate embodiments of the present application, below will be in embodiment or description of the prior art Required attached drawing is briefly described, it should be apparent that, the accompanying drawings in the following description is only some realities of the application Example is applied, it for those of ordinary skill in the art, without any creative labor, can also be attached according to these Figure obtains other attached drawings.
Fig. 1 is the resource allocation methods flow chart of the embodiment of the present application one;
Fig. 2 is the resource allocation schematic diagram of the embodiment of the present application one;
Fig. 3 is the resource borrowing schematic diagram of the embodiment of the present application one;
Fig. 4 is that the resource of the embodiment of the present application one recalls schematic diagram;
Fig. 5 is that the resource of the embodiment of the present application one returns schematic diagram;
Fig. 6 is one of resource allocation device structural schematic diagram of the embodiment of the present application two;
Fig. 7 is the second structural representation of the resource allocation device of the embodiment of the present application two.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiment is some embodiments of the present application, instead of all the embodiments.Based on this Shen Please in embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall in the protection scope of this application.
Embodiment one
A kind of resource allocation methods disclosed in the present embodiment, as shown in Figure 1, this method comprises: step 110 and step 120.
Step 110, according to predetermined with the matched resource distribution weight of each user to the resource of platform carry out with Distribution is determined as the basic resource quantity of each user's distribution.
Resource allocation methods disclosed in the embodiment of the present application are suitable for providing the various electric business platforms of service for enterprise customer, Such as hotel reservation platform, the pre- fixed platform of food and drink.Resource described in the embodiment of the present application can be empty for network flow, storage Between, data distributing node etc. can pass through the resource of network communication application.
The technical solution of the application is understood for the ease of reader, is put down with resource allocation applied to hotel reservation in the present embodiment The resource of platform, distribution is network flow citing, and the specific technical solution of the application is described in detail.
When it is implemented, being used first according to the history resource of the user of resource to be allocated in platform in platform starting Information determines the resource distribution weight of each user.The resource accounting that the resource distribution weight is used to indicate as user distribution Number.The resource distribution weight is directly proportional to user's history resource usage amount, and user's history resource usage amount is bigger, then should The resource distribution weight of user is bigger.Then, pre-allocation of resources is further carried out for user according to the resource distribution weight.
It is described according to the predetermined and matched resource distribution weight pair of each user in some embodiments of the present application The resource of platform carries out and distribution, is determined as the basic resource quantity of each user's distribution, comprising: for each user, The interface response time of resource access interface is called to sort according to from the sequence of small arrival within a preset period of time the user, and The interface response time for determining sequence N% is the TPN interface response time;For each user, by the user described default The product that the number of resource access interface and the TPN interface response time of the user are called in period, as the user Resource distribution weight;According to the resource distribution weight, the basic resource quantity of corresponding proportion is distributed for each user. Wherein, N is the natural number greater than 80, and preferred N value is 99.
For example, including 100 suppliers, hotel on hotel reservation platform, it is respectively labeled as supplier, hotel 1, hotel's supply Quotient 2 ... supplier, hotel 100.It is predetermined in upload information, client that above-mentioned 100 suppliers, hotel in history 30 days are obtained first When hotel etc. operates, the interface of the interface call number of the network interface of respective calling platform and each calling platform interface is rung Between seasonable.Then, for each supplier, hotel, such as supplier, hotel 1, by supplier, the hotel 1 in above-mentioned history 30 days When calling the interface response time of network interface to sort according to from the sequence of small arrival, and determining the interface response of sequence the 99%th The TP99 interface response time of supplier, the hotel Jian Wei 1.Later, by the net of the calling platform in history 30 days of supplier, hotel 1 The product of the TP99 interface response time of the interface call number and supplier, hotel 1 of network interface, the money as supplier, hotel 1 Source configures weight, is denoted as W1.According to the method described above, the resource that can determine supplier, hotel 1 to supplier, hotel 100 respectively is matched Weight is set, is denoted as W respectively1、W2、…W100
Later, the resource distribution weight W determined according to abovementioned steps1、W2、…W100, it is supplier, hotel 1 to hotel The basic resource quantity of the distribution corresponding proportion of supplier 100.In some embodiments of the present application, can be by following formula Each supplier, hotel pre-allocates network flow:
Si=total resources number * Wi/(W1+W2+W3…+Wn), wherein 1≤i≤n, specific in the present embodiment, n=100, Si It is expressed as the resource quantity of supplier, hotel i and distribution, W1、W2、W3、…WnIndicate supplier, hotel 1, supplier, hotel 2 ... The resource distribution weight of supplier, hotel n.Assuming that the resource that supplier, hotel 1 to supplier, hotel 100 distributes is as shown in Figure 2.
In the other embodiments of the application, it can also be obtained by other methods in the prior art to be allocated in platform The resource distribution weight of each user of resource does not enumerate in the embodiment of the present application.
Step 120, the resource of the user obtained according to the basic resource quantity and in platform operational process makes With information, carries out resource and temporarily transfer control.
When it is implemented, the user obtained according to the basic resource quantity and in platform operational process Resource using information carries out resource and temporarily transfers control, includes at least one of the following: according to the basic resource quantity and transports in platform The resource using information of the user obtained during row carries out resource borrowing control;According to the basic resource quantity and The resource using information of the user obtained in platform operational process carries out resource and recalls control;According to the basis money The resource using information of source quantity and the user obtained in platform operational process carries out resource and returns control.
Then, in platform operational process, according to each user actually use resource the case where, pass through the think of of resource borrowing Think, each user is flexibly deployed with the resource first distributed.It, can be with for example, when supplier, hotel 1 is in sustained peak demands There are the hotel's suppliers that can lend resource to borrow network flow into supplier, hotel 100 from supplier, hotel 2, until hotel When supplier 1 is in network demand low ebb or some hotel's suppliers of 1 network flow of supplier, hotel are lent in network When demand peak, then the network flow of borrow returned into supplier, the hotel.
When it is implemented, passing through the resource management of calling platform by the way that monitoring application is arranged in platform
It is described to be obtained according to the basic resource quantity and in platform operational process in some embodiments of the present application The user resource using information, carry out resource borrowing control, comprising: according to being obtained in platform operational process The resource using information of user determines the first user for needing to borrow resource in the user and does not need to borrow the second of resource User;According to the basic resource quantity distributed for first user and obtained in platform operational process described first The resource using information of user determines the corresponding extended resources quantity of first user;For each second user, root According to the basic resource quantity distributed for the second user and the second user obtained in platform operational process Resource using information determines that the second user can lend resource quantity respectively;Money can be lent according to each second user The extended resources quantity of source quantity and first user determines the corresponding practical lending number of resources of each second user Amount;The matched idling-resource of resource quantity, weight will be lent with corresponding reality in the resource for distributing to each second user It is newly assigned to first user.Illustrate resource borrowing control process below with reference to Fig. 2 and Fig. 3.
When it is implemented, platform can record each basic resource with predistribution by way of safeguarding the Resources list Quantity, borrow resource information, lending resource information etc..Wherein, borrow can be passed through by borrowing resource information and lending resource information Voucher indicates that described borrow in voucher and lending voucher may include the serial number for temporarily transferring operation, resource borrowing with lending voucher The information such as the square resource quantity of identity, borrow or lending of identity, resource lending side.When redistributing resource When, it such as performs resource borrowing, resource is recalled or resource is returned, then the resource allocation that is recorded in synchronized update the Resources list and borrows Adjust information.
For example, obtaining the resource using information of each user by being monitored to user using the case where resource.Wherein, The resource using information includes but is not limited to: idling-resource quantity, nearest L seconds TP99 resource occupation time, nearest L second interface Call number, current total resources quantity.Wherein, current total resources quantity is the number of resources of pre-assigned resource quantity and borrow The sum of amount.According to the resource using information of the user obtained in platform operational process, determines in the user and need to borrow With the first user of resource and do not need to borrow the second user of resource to include: according to obtaining in platform operational process The idling-resource quantity of user, it is L seconds nearest in TP99 resource occupation time, QPS (nearest L second interface call number), current total Resource quantity and preset reserved resource coordination time, determine whether the user needs to borrow resource;If it is determined that the user Need to borrow resource, then using the user as the first user;If it is determined that the user do not need borrow resource, then using the user as First user.When it is implemented, if idling-resource quantity/(TP99 resource occupation time * QPS-1/TP99 is provided in L seconds nearest Source holding time) > reserving the resource coordination time, it is determined that the user needs to borrow resource.Wherein, the resource coordination time is reserved It is configured according to interface case, the least resource that can be born coordinates the time.Assuming that supplier, the hotel Tu2Zhong 1 needs to borrow Resource, supplier, hotel 2 to 100 do not need to borrow resource.
According to the basic resource quantity for first user distribution and the institute obtained in platform operational process The resource using information for stating the first user can be according to formula when determining the corresponding extended resources quantity of first user: expanding Resource quantity=current total resources the number of TP99 resource occupation time * QPS- in L seconds, calculating recently is opened up to need to borrow each of resource The extended resources quantity of first user, wherein QPS is the nearest L second interface call number of current first user, current total resources number For the Current resource quantity of current first user.In platform operational process, Current resource sum=predistribution of the first user Basic resource quantity+borrow resource quantity-lending resource quantity.Extended resources quantity be according to nearest L second it is interior this In a period of time later that the resource service condition of one user determines, the normal interface of the first user is kept to call the money also needed Source quantity.Assuming that the extended resources quantity that supplier, hotel 1 needs is 3.
When it is implemented, also it needs to be determined that not needing to borrow the resource quantity that the user of resource can lend, such as wine in Fig. 2 The resource quantity that shop supplier 2 can respectively lend to supplier, hotel 100.In some embodiments of the present application, for every A second user is obtained according to the basic resource quantity distributed for the second user and in platform operational process The second user resource using information, when determining that the second user can lend resource quantity respectively, public affairs can be passed through Resource quantity=idling-resource quantity-(total resources quantity-MAX (year-on-year resource quantity, used resource quantity)) can be lent likes: It determines, wherein year-on-year resource quantity is that interior (such as 30 days) period second user occupies resource quantity to history for a period of time TP99 value, i.e., the second user history for a period of time in (such as 30 days) period occupy resource quantity according to from it is small to Big sequence sequence, takes the 99%th occupancy resource quantity.The total resources quantity is the basic resource number of the second user Amount and the sum of the resource quantity currently borrowed.By calculating, it is assumed that the resource quantity that supplier, hotel 2 can lend is 1, The resource that supplier, hotel 3 to supplier, hotel 99 can not currently lend, the resource quantity that supplier, hotel 100 can lend It is 1.
Next, the extended resources number of resource quantity and first user can be lent according to each second user Amount determines the corresponding practical lending resource quantity of each second user.For example, take a certain second user lends resource The minimum value of quantity and the extended resources quantity of first user, as the corresponding practical lending number of resources of the second user Amount.And it, with the practical lending matched idling-resource of resource quantity, will be reassigned to described in the resource of the second user First user.Update the extended resources quantity of first user are as follows: extended resources quantity -=reality lends resource quantity.Example Such as, supplier, hotel 1 borrows 1 resource from supplier, hotel 2 first, later, the resource that supplier, hotel 1 also needs to borrow, I.e. extended resources are updated to 2.
If the first user also needs to borrow resource, i.e., the updated extended resources quantity be greater than 0, then continue from Other, which can lend, selects a second user in the second user of resource, and lends money according to the second user of selection The updated extended resources quantity of source quantity and first user determines the corresponding practical lending number of resources of the second user Amount.Until first user no longer needs to borrow resource, alternatively, all second users for lending resource have lent resource To first user.Since supplier, hotel 2 to supplier, hotel 99 is currently without can lend resource, supplier, hotel 1 after Supplier, the hotel Xu Cong 100 borrows resource.Supplier, hotel 1 can at most borrow 1 resource from supplier, hotel 100, later, The extended resources quantity of supplier, hotel 100 is updated to 1.After resource borrowing, as shown in figure 3, supplier, hotel 1 is current It is assigned with 5 resources.
So far, supplier, hotel 1 has borrowed the resource that all suppliers, hotel can currently lend, but still also It is not able to satisfy current resource requirement.At this point, supplier, hotel 1 will recall the resource of its lending.
It is described to be obtained according to the basic resource quantity and in platform operational process in some embodiments of the present application The user resource using information, carry out resource recall control, comprising: in the money that will distribute to each second user The matched idling-resource of resource quantity is lent with corresponding reality in source, after distributing to first user, if each described The sum of corresponding practical lending resource quantity of second user is less than the extended resources quantity, it is determined that borrows from first user The resource quantity of first user is borrowed with the fourth user of resource and each fourth user;Each described 4th is used Family borrows the resource of first user, is reassigned to first user.
In some embodiments of the present application, platform will be determined to supplier, hotel 1 according to the Resources list of maintenance and be borrowed Each supplier, hotel of resource and the resource quantity of borrow.It is assumed that forward direction hotel supplier of the supplier, hotel 4 in current time 1 has borrowed 1 resource, then supplier, hotel 4 idling-resource will be reassigned to supplier, hotel 1 by platform.So far, Supplier, hotel has obtained the whole resources currently needed.As shown in figure 4, supplier, hotel 1 is 6 currently allocated Resource, the resource that supplier, hotel 2 currently divides are reduced to 3.
It is described to be obtained according to the basic resource quantity and in platform operational process in some embodiments of the present application The user resource using information, carry out resource return control, comprising: according to being obtained in platform operational process The resource using information of user determines the third use for occurring resource redundancy in the user and borrowing the resource for having other users Family;The resource for the other users that the third user borrows is reassigned to the corresponding other users.
When it is implemented, according to the resource using information of the user obtained in platform operational process, described in determination Occur resource redundancy in user and borrow the third user for having the resource of other users, comprising: determines the user for borrowing resource Resource utilization;When the resource utilization is less than average resource, third user is determined that the user is.Then, Pass through formula: redundant resource quantity=current total resources number * (1- average resource) determines the redundancy of each third user Resource quantity lends the resource to be reassigned to the resource that the third user borrows according to the redundant resource quantity User.When it is implemented, the resource management list of platform can recorde the lending side of the resource of user's borrow, and should be from this The resource quantity that lending side borrows.Corresponding resource is also back to corresponding use according to the information in resource management list by platform Family is reassigned to corresponding user.For example, it is superfluous to there is resource when supplier, hotel 1 is in network demand low ebb Remaining, then 1 resource that control borrows supplier, hotel 1 from supplier, hotel 2 supplies hotel also back to supplier, hotel 2 1 resource that quotient 1 borrows from supplier, hotel 100 is also back to supplier, hotel 100.After resource is returned, each supplier's, hotel Resource allocation conditions are as shown in Figure 5.
The first user, second user, third user and fourth user in the present embodiment are only depending on distinguishing different identity The user's name of justice, in the different phase of resource allocation, the same user not only for the first user but also can be able to be the second use Family, third user or fourth user.I.e. in platform operational process, some user both can be resource lending side, or Resource borrowing side.
Resource allocation methods disclosed in the embodiment of the present application, by first according to predetermined it is matched with each user Resource distribution weight is carried out to the resource of platform and distribution, is determined as the basic resource quantity of each user's distribution;Then, The resource using information of the user obtained according to the basic resource quantity and in platform operational process carries out resource and borrows Regulation system, solves the problems, such as that resource utilization is lower in the prior art.Resource allocation methods disclosed in the embodiment of the present application exist When platform starts, resource is carried out according to history resource using information and is tentatively distributed, then, in platform operational process, according to each The resource service condition of user flexibly deploys resource, by carrying out resource secondment between user, carrys out the wave crest that coping resources use And trough, effectively improve resource utilization.
Resource allocation methods disclosed in the embodiment of the present application, by when platform starts according to history resource using information into Row resource is tentatively distributed, and then, in platform operational process, flexibly deploys resource according to the resource service condition of each user, no The resource for needing to be manually configured as user's distribution does not need manual modification configuration, effectively when the resource requirement of user changes Reduce conservation of resources cost.Also, by the analysis to the history situation of interface access for a period of time, determine the money of each user Weight is distributed in source, and is tentatively that user distributes resource according to resource allocation weight, also improves the accuracy of pre-allocation of resources, into One step promotes resource utilization.
In addition, in the prior art, it, should if not distributing resource manually for the user for the user of new access platform User can not successful access platform resource, and by resource allocation methods disclosed in the embodiment of the present application, when there is new user When intervening platform, and applying for resource, equally resource can be distributed for new user automatically, user's access platform is more convenient.
Embodiment two
A kind of resource allocation device disclosed in the present embodiment, as shown in fig. 6, described device includes:
Pre-allocation of resources module 610 is used for according to predetermined with the matched resource distribution weight of each user to flat The resource of platform carries out and distribution, is determined as the basic resource quantity of each user's distribution;
Resource temporarily transfers module 620, described in obtaining according to the basic resource quantity and in platform operational process The resource using information of user carries out resource and temporarily transfers control.
In some embodiments of the present application, as shown in fig. 7, the resource temporarily transfer module 620 further comprise with down toward One item missing:
Resource borrowing submodule 6201, the institute for being obtained according to the basic resource quantity and in platform operational process The resource using information of user is stated, resource borrowing control is carried out;
Resource recalls submodule 6202, the institute for obtaining according to the basic resource quantity and in platform operational process The resource using information of user is stated, resource is carried out and recalls control;
Resource returns submodule 6203, the institute for obtaining according to the basic resource quantity and in platform operational process The resource using information of user is stated, resource is carried out and returns control.
In some embodiments of the present application, the resource borrowing submodule 6201 is further used for:
According to the resource using information of the user obtained in platform operational process, determines in the user and need to borrow The second user of resource is borrowed with the first user of resource and not needing;
Described in being obtained according to the basic resource quantity distributed for first user and in platform operational process The resource using information of first user determines the corresponding extended resources quantity of first user;
For each second user, according to the basic resource quantity distributed for the second user and in platform The resource using information of the second user obtained in operational process determines that the second user can lend number of resources respectively Amount;
The extended resources quantity of resource quantity and first user can be lent according to each second user, determined every The corresponding practical lending resource quantity of a second user;
It will be provided in the resource for distributing to each second user with the corresponding practical lending resource quantity matched free time Source is reassigned to first user.
In some embodiments of the present application, the resource is recalled submodule 6202 and is further used for:
The resource quantity matched free time is lent with corresponding reality in the resource that will distribute to each second user Resource, after distributing to first user, if the sum of corresponding practical lending resource quantity of each second user is less than The extended resources quantity, it is determined that borrow the fourth user of resource from first user and each fourth user borrows The resource quantity of first user;
The resource that each fourth user is borrowed to first user is reassigned to first user.
In some embodiments of the present application, the resource is returned submodule 6203 and is further used for:
According to the resource using information of the user obtained in platform operational process, determines and provided in the user Source redundancy and borrow have the third user of the resource of other users;
The resource for the other users that the third user borrows is reassigned to the corresponding other users.
In some embodiments of the present application, the pre-allocation of resources module 610 is further used for:
For each user, by the user call within a preset period of time the interface response time of resource access interface according to It sorts from the sequence of small arrival, and determines that the interface response time of sequence N% is the TPN interface response time;
For each user, which is called to number and the user of resource access interface in the preset time period The TPN interface response time product, the resource distribution weight as the user;
According to the resource distribution weight, the basic resource quantity of corresponding proportion is distributed for each user.
Resource allocation device disclosed in the embodiment of the present application, for realizing described in the embodiment of the present application one and embodiment two Resource allocation methods each step, the specific embodiment of each module of device is referring to corresponding steps, and details are not described herein again.
Resource allocation device disclosed in the embodiment of the present application, by first according to predetermined it is matched with each user Resource distribution weight is carried out to the resource of platform and distribution, is determined as the basic resource quantity of each user's distribution;Then, The resource using information of the user obtained according to the basic resource quantity and in platform operational process carries out resource and borrows Regulation system, solves the problems, such as that resource utilization is lower in the prior art.Resource allocation methods disclosed in the embodiment of the present application exist When platform starts, resource is carried out according to history resource using information and is tentatively distributed, then, in platform operational process, according to each The resource service condition of user flexibly deploys resource, by carrying out resource secondment between user, carrys out the wave crest that coping resources use And trough, effectively improve resource utilization.
Resource allocation device disclosed in the embodiment of the present application, by when platform starts according to history resource using information into Row resource is tentatively distributed, and then, in platform operational process, flexibly deploys resource according to the resource service condition of each user, no The resource for needing to be manually configured as user's distribution does not need manual modification configuration, effectively when the resource requirement of user changes Reduce conservation of resources cost.Also, by the analysis to the history situation of interface access for a period of time, determine the money of each user Weight is distributed in source, and is tentatively that user distributes resource according to resource allocation weight, also improves the accuracy of pre-allocation of resources, into One step promotes resource utilization.
In addition, in the prior art, it, should if not distributing resource manually for the user for the user of new access platform User can not successful access platform resource, and by resource allocation device disclosed in the embodiment of the present application, when there is new user When intervening platform, and applying for resource, equally resource can be distributed for new user automatically, user's access platform is more convenient.
Correspondingly, disclosed herein as well is a kind of electronic equipment, including memory, processor and it is stored in the memory Computer program that is upper and can running on a processor, the processor are realized when executing the computer program as the application is real Apply resource allocation methods described in example one.The electronic equipment can be PC machine, mobile terminal, personal digital assistant, plate electricity Brain etc..
Disclosed herein as well is a kind of computer readable storage mediums, are stored thereon with computer program, which is located Manage the step of realizing the resource allocation methods as described in the embodiment of the present application one when device executes.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.For Installation practice For, since it is basically similar to the method embodiment, so being described relatively simple, referring to the portion of embodiment of the method in place of correlation It defends oneself bright.
A kind of resource allocation methods provided by the present application and device are described in detail above, tool used herein The principle and implementation of this application are described for body example, the above embodiments are only used to help understand this Shen Method and its core concept please;At the same time, for those skilled in the art, according to the thought of the application, specific real Apply in mode and application range that there will be changes, in conclusion the content of the present specification should not be construed as the limit to the application System.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware realization.Based on such reason Solution, substantially the part that contributes to existing technology can embody above-mentioned technical proposal in the form of software products in other words Come, which may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including Some instructions are used so that a computer equipment (can be personal computer, server or the network equipment etc.) executes respectively Method described in certain parts of a embodiment or embodiment.

Claims (10)

1. a kind of resource allocation methods characterized by comprising
It carries out and distributes with resource of the matched resource distribution weight of each user to platform according to predetermined, be determined as every The basic resource quantity of a user's distribution;
The resource using information of the user obtained according to the basic resource quantity and in platform operational process, is provided Temporarily transfer control in source.
2. the method according to claim 1, wherein described run according to the basic resource quantity and in platform The resource using information of the user obtained in the process carries out the step of resource temporarily transfers control, includes at least one of the following:
The resource using information of the user obtained according to the basic resource quantity and in platform operational process, is provided Source borrows control;
The resource using information of the user obtained according to the basic resource quantity and in platform operational process, is provided Recall control in source;
The resource using information of the user obtained according to the basic resource quantity and in platform operational process, is provided Return control in source.
3. according to the method described in claim 2, it is characterized in that, described run according to the basic resource quantity and in platform The step of resource using information of the user obtained in the process, progress resource borrowing control, comprising:
According to the resource using information of the user obtained in platform operational process, determines and need to borrow money in the user First user in source and the second user for not needing to borrow resource;
According to the basic resource quantity distributed for first user and obtained in platform operational process described first The resource using information of user determines the corresponding extended resources quantity of first user;
For each second user, run according to the basic resource quantity distributed for the second user and in platform The resource using information of the second user obtained in the process determines that the second user can lend resource quantity respectively;
The extended resources quantity that resource quantity and first user can be lent according to each second user determines each institute State the corresponding practical lending resource quantity of second user;
The matched idling-resource of resource quantity, weight will be lent with corresponding reality in the resource for distributing to each second user It is newly assigned to first user.
4. according to the method described in claim 3, it is characterized in that, described run according to the basic resource quantity and in platform The resource using information of the user obtained in the process carries out the step of resource recalls control, comprising:
The matched idling-resource of resource quantity is lent with corresponding reality in the resource that will distribute to each second user, After distributing to first user, if the sum of corresponding practical lending resource quantity of each second user is less than the expansion Open up resource quantity, it is determined that borrow the fourth user of resource from first user and each fourth user borrows described the The resource quantity of one user;
The resource that each fourth user is borrowed to first user is reassigned to first user.
5. according to the method described in claim 2, it is characterized in that, described run according to the basic resource quantity and in platform The resource using information of the user obtained in the process carries out the step of resource returns control, comprising:
According to the resource using information of the user obtained in platform operational process, determine in the user that resource occur superfluous Remaining and borrow has the third user of the resource of other users;
The resource for the other users that the third user borrows is reassigned to the corresponding other users.
6. method according to any one of claims 1 to 5, which is characterized in that described according to predetermined and each use The matched resource distribution weight in family is carried out to the resource of platform and distribution, is determined as the basic resource number of each user's distribution The step of amount, comprising:
For each user, call the interface response time of resource access interface according to from small within a preset period of time the user The sequence of arrival sorts, and determines that the interface response time of sequence N% is the TPN interface response time;
For each user, which is called to the number of resource access interface and the institute of the user in the preset time period The product for stating the TPN interface response time, the resource distribution weight as the user;
According to the resource distribution weight, the basic resource quantity of corresponding proportion is distributed for each user.
7. a kind of resource allocation device characterized by comprising
Pre-allocation of resources module, for the resource according to the predetermined and matched resource distribution weight of each user to platform It carries out and distributes, be determined as the basic resource quantity of each user's distribution;
Resource temporarily transfers module, the money of the user for obtaining according to the basic resource quantity and in platform operational process Source use information carries out resource and temporarily transfers control.
8. device according to claim 7, which is characterized in that the pre-allocation of resources module is further used for:
For each user, call the interface response time of resource access interface according to from small within a preset period of time the user The sequence of arrival sorts, and determines that the interface response time of sequence N% is the TPN interface response time;
For each user, which is called to the number of resource access interface and the institute of the user in the preset time period The product for stating the TPN interface response time, the resource distribution weight as the user;
According to the resource distribution weight, the basic resource quantity of corresponding proportion is distributed for each user.
9. a kind of electronic equipment, including memory, processor and it is stored on the memory and can runs on a processor Computer program, which is characterized in that the processor realizes claim 1 to 6 any one when executing the computer program The resource allocation methods.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor The step of resource allocation methods described in claim 1 to 6 any one are realized when execution.
CN201811436573.3A 2018-11-28 2018-11-28 Resource allocation methods, device, electronic equipment and storage medium Pending CN109767057A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811436573.3A CN109767057A (en) 2018-11-28 2018-11-28 Resource allocation methods, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811436573.3A CN109767057A (en) 2018-11-28 2018-11-28 Resource allocation methods, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN109767057A true CN109767057A (en) 2019-05-17

Family

ID=66450732

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811436573.3A Pending CN109767057A (en) 2018-11-28 2018-11-28 Resource allocation methods, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109767057A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019453A (en) * 2019-05-29 2020-12-01 潘仲光 Resource reallocation method, equipment and storage medium
CN112529471A (en) * 2020-12-28 2021-03-19 量波智能科技(南京)有限公司 Method for managing and adjusting equipment quantity according to order
CN113672168A (en) * 2021-07-15 2021-11-19 济南浪潮数据技术有限公司 Bandwidth resource allocation method, device, equipment and storage medium of storage system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112019453A (en) * 2019-05-29 2020-12-01 潘仲光 Resource reallocation method, equipment and storage medium
CN112529471A (en) * 2020-12-28 2021-03-19 量波智能科技(南京)有限公司 Method for managing and adjusting equipment quantity according to order
CN113672168A (en) * 2021-07-15 2021-11-19 济南浪潮数据技术有限公司 Bandwidth resource allocation method, device, equipment and storage medium of storage system
CN113672168B (en) * 2021-07-15 2024-02-13 济南浪潮数据技术有限公司 Bandwidth resource allocation method, device and equipment of storage system and storage medium

Similar Documents

Publication Publication Date Title
US6480861B1 (en) Distributed adaptive computing
JP5076279B2 (en) IT asset management system, IT asset management method, and IT asset management program
US8856334B2 (en) Resource lending control apparatus and resource lending method
US8429049B2 (en) Method and system for allocating computing resources
US7844513B2 (en) Method and system for operating a commissioned e-commerce service prover
CN104040486A (en) Decoupling PAAS resources, jobs, and scheduling
CN104040485A (en) PAAS hierarchial scheduling and auto-scaling
CN109783237A (en) A kind of resource allocation method and device
CN109767057A (en) Resource allocation methods, device, electronic equipment and storage medium
CN104301257B (en) A kind of resource allocation methods, device and equipment
JP2010277589A (en) Data center batch job quality of service control
CN108337109A (en) A kind of resource allocation methods and device and resource allocation system
CN108154298B (en) Distribution task allocation method and device, electronic equipment and computer storage medium
CN107222430A (en) A kind of resource allocation methods and device
CN110442449A (en) A kind of resource regulating method and device
CN108574645A (en) A kind of array dispatching method and device
CN111240841B (en) Method and system for executing new tasks or processing resource withdrawal requests
CN107665143A (en) Method for managing resource, apparatus and system
EP2705424A1 (en) Revenue-based impact analysis using multidimensional models of software offerings
US20150012398A1 (en) Credit optimization to minimize latency
CN110225088A (en) A kind of cloud desktop management method and system
Dutta et al. Cost-based decision-making in middleware virtualization environments
Kim et al. Virtual machines placement for network isolation in clouds
CN106126319A (en) Central processing unit resource allocation methods and calculating node
CN110096352A (en) Process management method, device and computer readable 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