WO2022267344A1 - 资源池资源填充方法、装置、设备及可读存储介质 - Google Patents

资源池资源填充方法、装置、设备及可读存储介质 Download PDF

Info

Publication number
WO2022267344A1
WO2022267344A1 PCT/CN2021/134318 CN2021134318W WO2022267344A1 WO 2022267344 A1 WO2022267344 A1 WO 2022267344A1 CN 2021134318 W CN2021134318 W CN 2021134318W WO 2022267344 A1 WO2022267344 A1 WO 2022267344A1
Authority
WO
WIPO (PCT)
Prior art keywords
filled
resource
resources
remaining
pools
Prior art date
Application number
PCT/CN2021/134318
Other languages
English (en)
French (fr)
Inventor
蔡汉锦
彭荣杰
李晶
Original Assignee
深圳前海微众银行股份有限公司
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 深圳前海微众银行股份有限公司 filed Critical 深圳前海微众银行股份有限公司
Publication of WO2022267344A1 publication Critical patent/WO2022267344A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2209/00Indexing scheme relating to G06F9/00
    • G06F2209/50Indexing scheme relating to G06F9/50
    • G06F2209/5011Pool

Definitions

  • the present application relates to the technical field of financial technology (Fintech), and in particular to a resource pool resource filling method, device, equipment and readable storage medium.
  • the existing solution is to evenly allocate resources to the resource pools in the distributed system when the distributed system needs to be filled with resources.
  • some resources in the resource pool have not been consumed or the consumption rate is far away. It is much lower than the consumption rate of resources in other resource pools, but for this part of resource pools, the same number of resources as other resource pools are still allocated to them in the existing solution, resulting in low resource utilization in this part of resource pools.
  • the utilization rate of resources in the resource pool is low.
  • the main purpose of the present application is to provide a method, device, device and readable storage medium for filling resources in a resource pool, aiming at solving the existing technical problem of how to improve the utilization rate of resources in the resource pool.
  • the present application provides a method for filling resources in a resource pool, and the method for filling resources in a resource pool includes the steps of:
  • the set of resource pools to be filled contains resource pools that do not meet the resource filling requirements and do not need to be filled, then remove the resource pools that do not need to be filled to obtain the first remaining set of resource pools to be filled;
  • the resource pool that does not need to be filled includes a first resource pool that does not need to be filled, and if the set of resource pools to be filled contains a resource pool that does not meet the resource filling requirements, the resource that does not need to be filled is eliminated.
  • pool to obtain the first remaining set of resource pools to be filled including:
  • each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, the first unfilled resource pool is eliminated to obtain the first remaining resource pool.
  • each of the first resource pools to be filled contains a first resource pool that does not need to be filled with a first number of remaining resources greater than the average number of resources after the first filling, the first resource pool that does not need to be filled is eliminated.
  • Fill the resource pool to obtain the first remaining set of resource pools to be filled including:
  • each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, remove the first unfilled resource pool to obtain the first update The set of resource pools to be filled later;
  • the calculating the number of resources that should be filled corresponding to the first set of remaining resource pools to be filled and the total number of resources that can be filled includes:
  • the resource pool that does not need to be filled includes a second resource pool that does not need to be filled, and if the set of resource pools to be filled contains a resource pool that does not meet the resource filling requirements, the resource that does not need to be filled is eliminated.
  • pool to obtain the first remaining set of resource pools to be filled including:
  • each of the first resource pools to be filled contains a second resource pool that does not need to be filled and whose first remaining resources are greater than the average number of the first remaining resources, then the second resource pool that does not need to be filled is eliminated to obtain the second updated A collection of resource pools to be filled;
  • the second updated set of resource pools to be filled is used as the first remaining set of resource pools to be filled.
  • the calculating the number of resources that should be filled corresponding to the first set of remaining resource pools to be filled and the total number of resources that can be filled includes:
  • the fourth number of remaining resources is each third resource to be filled in the first set of remaining resource pools to be filled The number of remaining resources in the pool;
  • the calculating the sum of the difference of the number of resources to be filled corresponding to each of the fourth resource pools to be filled in the first set of remaining resource pools to be filled to obtain the number of resources to be filled includes:
  • the third quotient is respectively added to the sum of the differences of the resource numbers to be filled to obtain the resource numbers to be filled.
  • the present application also provides a resource pool resource filling device, and the resource pool resource filling device includes:
  • the obtaining module is used to obtain the set of resource pools to be filled and the total number of resources that can be filled;
  • An elimination module configured to eliminate the resource pools that do not need to be filled if the set of resource pools to be filled contains resource pools that do not meet the resource filling requirements, and obtain the first remaining set of resource pools to be filled;
  • a calculation module configured to calculate the number of resources that should be filled corresponding to the first set of remaining resource pools to be filled and the total number of resources that can be filled;
  • a filling module configured to fill the resource pool to be filled corresponding to the first set of remaining resource pools to be filled based on the number of resources to be filled
  • the present application also provides a resource pool resource filling device, the resource pool resource filling device includes a memory, a processor, and a resource pool stored on the memory and operable on the processor
  • a resource filling program when the resource pool resource filling program is executed by the processor, implements the steps of the above resource pool resource filling method.
  • the present application also provides a computer-readable storage medium, the computer-readable storage medium stores a resource pool resource filling program, and when the resource pool resource filling program is executed by a processor, the above-mentioned Steps in the resource pool resource filling method described above.
  • this application acquires the set of resource pools to be filled and the total number of resources that can be filled; if the set of resource pools to be filled If there are resource pools that do not meet the resource filling requirements and do not need to be filled, then the resource pools that do not need to be filled are eliminated to obtain the first set of remaining resource pools to be filled; the first set of remaining resource pools to be filled and the total resources that can be filled are calculated The number of resources to be filled corresponding to the number of resources to be filled; filling the resource pool to be filled corresponding to the first remaining set of resource pools to be filled based on the number of resources to be filled.
  • the resource pools that do not need to be filled are eliminated to obtain the first set of remaining resource pools to be filled, so that only the first remaining resource pools to be filled are obtained.
  • the resource pool to be filled in the collection is filled with resources, and resources in the resource pool that do not need to be filled are avoided, thereby improving the utilization rate of resources in the resource pool.
  • FIG. 1 is a schematic flowchart of the first embodiment of the method for filling resources in a resource pool of the present application
  • FIG. 2 is a schematic flow diagram of the second embodiment of the resource filling method of the resource pool of the present application
  • FIG. 3 is a schematic diagram of functional modules of a preferred embodiment of the resource pool resource filling device of the present application
  • FIG. 4 is a schematic structural diagram of the hardware operating environment involved in the solution of the embodiment of the present application.
  • FIG. 1 is a schematic flowchart of a first embodiment of the resource pool resource filling method of the present application.
  • Resource pool resource filling methods include:
  • Step S10 obtaining the set of resource pools to be filled and the total number of resources that can be filled.
  • Step S20 if the set of resource pools to be filled contains resource pools that do not meet resource filling requirements and do not need to be filled, then remove the resource pools that do not need to be filled to obtain the first remaining set of resource pools to be filled.
  • the distributed system when the distributed system is running, it needs to consume resources to complete corresponding tasks, such as transaction tasks.
  • the resource pools in the distributed system are deployed in a distributed manner, the resources in each resource pool The consumption rate is inconsistent, and the consumption rate is determined by the frequency of task execution, that is, the higher the frequency, the higher the consumption rate; the lower the frequency, the lower the consumption rate.
  • the remaining resources of each resource pool are inconsistent at the same time, and even when the resources in some resource pools are about to be exhausted, the resources in some resource pools are almost unused.
  • the resource pool is filled with resources, thereby realizing the on-demand allocation of resources; of course, if the set of resource pools to be filled does not contain resource pools that do not meet the resource filling requirements, the set of resource pools to be filled is directly used as the first remaining resource pool to be filled.
  • the resource pool set is filled, and the resource pools in the first remaining resource pool set to be filled are filled with resources.
  • elimination rules are:
  • the resource pools that do not need to be filled include a first resource pool that does not need to be filled, and if the set of resource pools to be filled contains resource pools that do not meet the resource filling requirements, the resource pools that do not need to be filled are eliminated to obtain the first remaining A collection of resource pools to be filled, including:
  • Step a calculating the average number of first remaining resources of the first remaining resources of each first resource pool to be filled in the set of resource pools to be filled.
  • the first remaining resource numbers of the first resource pools to be filled in the set of resource pools to be filled are different.
  • the first remaining resource number is 10.
  • the first average number of remaining resources corresponds to the sum of the first remaining resource numbers of each first resource pool to be filled.
  • the number of the first resource pools to be filled in the set of resource pools to be filled is n
  • the first resource pools to be filled are respectively P1, P2, ..., Pn.
  • the first resource pools corresponding to each first resource pool to be filled The numbers of remaining resources are respectively C1, C2, ..., Cn, that is, the average number of the first remaining resources is (C1+C2+...+Cn)/n.
  • Step b calculating a first average number of resources to be filled based on the total number of resources that can be filled and the number of resource pools corresponding to the set of resource pools to be filled.
  • the quotient between the total number of resources that can be filled and the number of resource pools corresponding to the set of resource pools to be filled is calculated, that is, the total number of resources that can be filled is calculated when the first resource pools to be filled are filled on average , the number of resources available to each first resource pool to be filled, that is, the average number of first resources to be filled. For example, if the total number of resources that can be filled is T, and the number of resource pools is n, then the average number of the first resources to be filled is T/n.
  • Step c calculating the sum of the first average number of remaining resources and the first average number of resources to be filled to obtain the first average number of resources after filling;
  • Step d if each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, then remove the first unfilled resource pool to obtain The first set of remaining resource pools to be filled.
  • the sum of the first average number of remaining resources and the first average number of resources to be filled is calculated to obtain the first average number of resources after filling, that is, the above-mentioned (C1+C2+...+Cn)/n+T /n.
  • the process of determining the first resource pool that does not need to be filled it is to determine whether each of the first resource pools to be filled contains a resource pool with the first remaining resources greater than the average number of resources after the first filling.
  • the resource pool as The first resource pool that does not need to be filled, and removes the first resource pool that does not need to be filled to obtain the first set of remaining resource pools to be filled, for example, remove the first resource pool P1 to be filled; if it is not included, then the first resource pool that does not need to be filled is not found , and use all the first resource pools to be filled in the set of resource pools to be filled as the resource pools in the first remaining set of resource pools to be filled.
  • each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resource number is greater than the average number of resources after the first filling, the first unfilled resource pool is eliminated. , to obtain the first remaining resource pool set to be filled, including:
  • Step d1 if each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, then remove the first unfilled resource pool to obtain Set of resource pools to be filled after the first update.
  • the above-mentioned first resource pools that do not need to be filled may need to go through multiple elimination processes. Specifically, if the first resource pools to be filled contain the first remaining resources that are greater than the average number of resources after the first filling. If the resource pool does not need to be filled, the first resource pool that does not need to be filled is eliminated, and the resource pool set to be filled after the first update is obtained. If the resource pools to be filled do not include the first unfilled resource pools whose first remaining resources are greater than the average number of resources after the first filling, there is no need to eliminate any first resource pools to be filled.
  • Step d2 taking the first updated set of resource pools to be filled as the set of resource pools to be filled, and returning to the calculation of the first remaining resource numbers of each first resource pool to be filled in the set of resource pools to be filled.
  • the step of the average number of the first remaining resources until each of the first resource pools to be filled does not contain a first unfilled resource pool whose first remaining resources are greater than the average number of resources after filling, and the first updated The set of resource pools to be filled serves as the first remaining set of resource pools to be filled.
  • enter the loop body of eliminating the first resource pool that does not need to be filled specifically, use the first updated set of resource pools to be filled as the set of resource pools to be filled, and return to calculate the resource pool set to be filled.
  • the step of the first average number of remaining resources of the first number of remaining resources of the first resource pool to be filled is to recalculate the first average number of remaining resources according to the first updated set of resource pools to be filled, and according to the recalculated
  • the first average number of remaining resources is used to determine the first resource pool that does not need to be filled in the set of resource pools to be filled after the first update.
  • This embodiment is basically the same as the embodiment of determining the first resource pool that does not need to be filled among the first resource pools to be filled. Same, no more details here.
  • each of the first resource pools to be filled contains a first resource pool that does not need to be filled, and the number of the first remaining resources is greater than the average number of resources after filling, that is, it can be selected from the set of resource pools to be filled after the first update. Eliminate the first resource pool that does not need to be filled.
  • the cycle ends, and the first updated resource pool set to be filled after the last cycle is used as the first set of remaining resource pools to be filled.
  • P1 and P2 in each of the first resource pools to be filled are eliminated after the cycle ends, and the resource pools in the first set of remaining resource pools to be filled include P3, P4, . . . , Pn.
  • Step S30 calculating the number of resources that should be filled corresponding to the first remaining resource pool set to be filled and the total number of resources that can be filled;
  • Step S40 filling resource pools to be filled corresponding to the first set of remaining resource pools to be filled based on the number of resources to be filled.
  • the above-mentioned resource pools in the first set of remaining resource pools to be filled are resource pools of resources to be filled, that is, the resources that can fill the total number of resources are all filled into the resource pools in the first remaining set of resource pools to be filled Specifically, when filling resources, the corresponding number of resources to be filled is calculated from the first remaining resource pool set to be filled and the total number of resources that can be filled; after calculating the number of resources that should be filled, the number of resources that should be filled is used to A resource pool to be filled in the set of remaining resource pools to be filled is filled accordingly.
  • the calculation of the first remaining resource pool set to be filled and the number of resources that should be filled corresponding to the total number of resources that can be filled includes:
  • Step e calculating the average number of second remaining resources of the second remaining resources of each second resource pool to be filled in the set of first remaining resource pools to be filled;
  • Step f calculating a second average number of resources to be filled between the total number of resources that can be filled and the number of resource pools corresponding to the first set of remaining resource pools to be filled;
  • Step g calculating the sum of the second average number of remaining resources and the second average number of resources to be filled to obtain the second average number of resources after filling;
  • Step h respectively calculating the difference between the second average number of resources after filling and each of the second remaining resource numbers to obtain the number of resources to be filled.
  • the resource numbers of the resources are balanced again.
  • the resource pools in the first remaining resource pool set to be filled are filled with resources in the above-mentioned manner, there is a situation that the resources whose number of resources is equal to the total number of resources that can be filled are not used up, and the unused resources can be It is assigned to the resource pool with the highest consumption rate of the resource.
  • the first resource pool to be filled P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13 Number of first remaining resources 10 2 3 4 5 6 19 30 50 60 98 0 100000 Number of resources that should be populated 83346 83354 83353 83352 83351 83350 83337 83326 83306 83296 83258 83371 0 Number of resources after filling 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83371 100000
  • resource pool P13 is the first resource pool that does not need to be filled, the number of filled resources is 0, and the number of resources corresponding to P1, P2, P3, ..., P11 in the number of resources after filling is the same. - The number of remaining resources is the least, indicating that the consumption rate of its resources is the largest, and the unused resources are allocated to P12.
  • this embodiment obtains the set of resource pools to be filled and the total number of resources that can be filled; if the resource pool to be filled If the set contains resource pools that do not meet the resource filling requirements and do not need to be filled, then the resource pools that do not need to be filled are eliminated to obtain the first set of remaining resource pools to be filled; The number of resources to be filled corresponding to the number of resources; filling the resource pool to be filled corresponding to the first remaining set of resource pools to be filled based on the number of resources to be filled.
  • the resource pool that does not need to be filled is eliminated to obtain the first set of remaining resource pools to be filled, so that only the first remaining resource pools to be filled.
  • the resource pools to be filled in the pool set are filled with resources, which avoids filling the resources in the resource pools that do not need to be filled, thereby improving the utilization rate of the resources in the resource pools.
  • the resource pool that does not need to be filled includes a second resource pool that does not need to be filled, and if the resource pool to be filled If the resource pool set contains resource pools that do not meet the resource filling requirements and do not need to be filled, then the resource pools that do not need to be filled are eliminated to obtain the first remaining resource pool set to be filled, including:
  • Step A10 calculating the average number of first remaining resources of the first remaining resources of each first resource pool to be filled in the set of resource pools to be filled.
  • the first remaining resource numbers of the first resource pools to be filled in the set of resource pools to be filled are different.
  • the first remaining resource number is 10.
  • the first average number of remaining resources corresponds to the sum of the first remaining resource numbers of each first resource pool to be filled.
  • the number of the first resource pools to be filled in the set of resource pools to be filled is n
  • the first resource pools to be filled are respectively P1, P2, ..., Pn.
  • the first resource pools corresponding to each first resource pool to be filled The numbers of remaining resources are respectively C1, C2, ..., Cn, that is, the average number of the first remaining resources is (C1+C2+...+Cn)/n.
  • Step A20 if each of the first resource pools to be filled contains a second unfilled resource pool whose first remaining resources are greater than the average number of the first remaining resources, then remove the second unfilled resource pool to obtain the second unfilled resource pool 2.
  • each of the first resource pools to be filled contains a second resource pool that does not need to be filled with the first remaining resources greater than the average number of the first remaining resources
  • the second resource pool that does not need to be filled is eliminated, for example, C1 is greater than (C1 +C2+...+Cn)/n, then remove P1 to obtain the resource pool set to be filled after the second update; if each first resource pool to be filled does not contain the first remaining resource number greater than the average number of the first remaining resources Second, if the resource pool does not need to be filled, the set of resource pools to be filled is taken as the second updated set of resource pools to be filled.
  • Step A30 calculating the sum of the third remaining resource number of the resource pool set to be filled after the second update and the total number of resources that can be filled, to obtain the total number of resources after filling;
  • Step A40 calculating the first quotient between the total number of resources after filling and the number of resource pools in the second updated set of resource pools to be filled, to obtain the average number of total resources after filling;
  • Step A50 calculating a third average number of remaining resources of the third number of remaining resources of the second updated resource pool set to be filled.
  • first calculate the sum of the third remaining resources of the resource pool set to be filled after the second update and the total number of resources that can be filled to obtain the total number of resources after filling, for example, the third remaining resources are respectively C2, C3, ..., Cn, the total number of resources after filling is C2+C3+...+Cn+T; secondly, calculate the first difference between the total number of resources after filling and the number of resource pools to be filled after the second update quotient, to obtain the average number of total resources after filling, that is, (C2+C3+...+Cn+T)/(n-1); after that, calculate the third number of the third remaining resources of the resource pool set to be filled after the second update The average number of remaining resources, namely (C2+C3+...+Cn)/(n-1).
  • Step A60 if the average number of total resources after filling is less than the third average number of remaining resources, then use the second updated set of resource pools to be filled as the set of resource pools to be filled, and return the calculated Describe the first remaining resource average number step of the first remaining resource number of each first resource pool to be filled in the set of resource pools to be filled, until the average number of total resources after filling is greater than or equal to the third average number of remaining resources, the The second updated resource pool set to be filled is used as the first remaining resource pool set to be filled.
  • the second updated set of resource pools to be filled is used as the set of resource pools to be filled, and enters the loop body, that is, returns to the Calculating the first remaining resource average number of the first remaining resources of each first resource pool to be filled in the set of resource pools to be filled until the average number of total resources after filling is greater than or equal to the third average number of remaining resources, and then
  • the second updated set of resource pools to be filled is used as the first remaining set of resource pools to be filled; if the average number of total resources after filling is greater than or equal to the third average number of remaining resources, then the second updated set of resource pools to be filled is directly used as the second set of resource pools to be filled. A set of remaining resource pools to be filled without entering the loop body.
  • the calculation of the number of resources that should be filled corresponding to the first set of remaining resource pools to be filled and the total number of resources that can be filled includes:
  • Step i obtaining the fourth average number of remaining resources of the first set of remaining resource pools to be filled.
  • the last elimination process before the end of the cycle eliminates the second resource pool that does not need to be filled.
  • the second resource pool that is eliminated for the last time is the entire cycle elimination part of the resource pools to be eliminated, but after the last elimination of the second resource pool that does not need to be filled, after the last elimination is completed, the resource pools in the first remaining resource pool set to be filled are eliminated in order to eliminate all the first resource pools in the cycle 2. Obtained after the resource pool does not need to be filled, obtain the fourth average number of remaining resources of the first set of remaining resource pools to be filled.
  • Step j calculating the difference in the number of resources to be filled between the average number of the fourth remaining resources and the fourth number of remaining resources, wherein the fourth number of remaining resources is the third remaining number of resources in the first set of remaining resource pools to be filled The number of remaining resources to be filled in the resource pool.
  • the difference in the number of resources to be filled between the average number of the fourth remaining resources and the fourth number of remaining resources is calculated, wherein the fourth number of remaining resources is the third resource number in the first remaining resource pool set to be filled. The number of remaining resources to be filled in the resource pool.
  • Step k after filling each of the third resource pools to be filled with the total number of resources that can be filled, if the remaining number of resources that can be filled is greater than zero, adding the second resource pool that does not need to be filled to the first remaining resource pool to be filled Filling the resource pool set, and returning to the step of obtaining the fourth average number of remaining resources of the first remaining resource pool set to be filled, until the preset cycle end condition is satisfied.
  • each of the third resource pools to be filled after filling each of the third resource pools to be filled with the total number of resources that can be filled, if the remaining number of resources that can be filled is greater than zero, it means filling each of the third resources to be filled in the first set of remaining resource pools to be filled After pooling, the number of resources that can be filled still remains, through which the remaining number of resources that can be filled can continue to fill the third resource pool to be filled.
  • other resource pools can also be added to the first set of remaining resource pools to be filled.
  • the other resource pool is the second resource pool that was eliminated last time and does not need to be filled, that is, when the number of remaining fillable resources is greater than zero, add the second resource pool that was eliminated last time and does not need to be filled, and return the The second step is to obtain the first remaining resource pool set to be filled without filling the resource pool, until the preset cycle end condition is met.
  • the preset cycle end condition includes two situations, one is that the remaining filling resources are zero, and the other is that all resource pools in the first remaining resource pool set to be filled are filled in the above manner.
  • the number of resources in the filled resource pool is the average number of the fourth remaining resources in the previous elimination process.
  • Step 1 obtaining the difference in the number of resources to be filled in the cycle process corresponding to the preset cycle end condition, and calculating respectively the resources to be filled corresponding to the fourth resource pools to be filled in the first remaining resource pool set to be filled The sum of the difference values is obtained to obtain the number of resources that should be filled.
  • the difference in the number of resources to be filled in the cycle process corresponding to the preset cycle end condition is obtained, and the resources to be filled corresponding to the fourth resource pools to be filled in the first remaining resource pool set to be filled are respectively calculated
  • the sum of the difference values is obtained to obtain the number of resources that should be filled. It can be understood that for different fourth resource pools to be filled, the corresponding number of resources to be filled is different. Therefore, the number of resources to be filled corresponding to each fourth resource pool to be filled needs to be recorded separately.
  • the sum of the differences of the number of resources to be filled corresponding to the fourth resource pools to be filled in the first set of remaining resource pools to be filled is respectively calculated to obtain the number of resources to be filled, including:
  • Step l1 after filling the fourth resource pool to be filled, if the remaining number of resources that can be filled is greater than zero, calculate the number of resource pools between the number of remaining resources that can be filled and the number of resource pools in the fourth resource pool to be filled Second business;
  • Step 12 eliminating resource pools in the fourth resource pool to be filled whose number of filled resources is greater than the second quotient, to obtain a second set of remaining resource pools to be filled;
  • Step 13 calculating a third quotient of the remaining number of resources that can be filled and the second set of remaining resource pools to be filled;
  • Step 14 respectively adding the third quotient to the sum of the differences of the number of resources to be filled to obtain the number of resources to be filled.
  • the remaining number of resources that can be filled can also be used to continue filling resources for the fourth resource pool to be filled. Specifically, calculate the difference between the number of remaining resources that can be filled and the number of resource pools in the fourth resource pool to be filled.
  • the resource is filled into the resource pool with the largest resource consumption rate.
  • resource pools that do not need to be filled in the resource pool set to be filled after the second update will not be filled with resources, that is, avoid The resources in the resource pool that do not need to be filled are filled, thereby improving the utilization rate of the resources in the resource pool.
  • the present application also provides a device for filling resources in a resource pool, and the device for filling resources in a resource pool includes:
  • the obtaining module 10 is used to obtain the set of resource pools to be filled and the total number of resources that can be filled;
  • the elimination module 20 is configured to, if the set of resource pools to be filled contains resource pools that do not meet the resource filling requirements and do not need to be filled, then delete the resource pools that do not need to be filled to obtain the first remaining set of resource pools to be filled;
  • a calculation module 30 configured to calculate the number of resources that should be filled corresponding to the first set of remaining resource pools to be filled and the total number of resources that can be filled;
  • the filling module 40 is configured to fill the resource pools to be filled corresponding to the first set of remaining resource pools to be filled based on the number of resources to be filled.
  • the elimination module 20 is used for:
  • each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, the first unfilled resource pool is eliminated to obtain the first remaining resource pool.
  • the elimination module 20 is also used for:
  • each of the first resource pools to be filled contains a first unfilled resource pool whose first remaining resources are greater than the average number of resources after the first filling, remove the first unfilled resource pool to obtain the first update The set of resource pools to be filled later;
  • the calculation module 30 is used for:
  • the elimination module 20 is also used for:
  • each of the first resource pools to be filled contains a second resource pool that does not need to be filled and whose first remaining resources are greater than the average number of the first remaining resources, then the second resource pool that does not need to be filled is eliminated to obtain the second updated A collection of resource pools to be filled;
  • the second updated set of resource pools to be filled is used as the first remaining set of resource pools to be filled.
  • the calculation module 30 is also used for:
  • the fourth number of remaining resources is each third resource to be filled in the first set of remaining resource pools to be filled The number of remaining resources in the pool;
  • the calculation module is also used for:
  • the third quotient is respectively added to the sum of the differences of the resource numbers to be filled to obtain the resource numbers to be filled. .
  • the specific implementation manner of the resource pool resource filling device of the present application is basically the same as the above embodiments of the resource pool resource filling method, and will not be repeated here.
  • FIG. 4 is a schematic structural diagram of a hardware operating environment involved in the solution of the embodiment of the present application.
  • FIG. 4 is a schematic structural diagram of a hardware operating environment of a resource filling device in a resource pool.
  • the resource pool resource filling device may include: a processor 1001 , such as a CPU, a memory 1005 , a user interface 1003 , a network interface 1004 , and a communication bus 1002 .
  • the communication bus 1002 is used to realize connection and communication between these components.
  • the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface.
  • the network interface 1004 may include a standard wired interface and a wireless interface (such as a WI-FI interface).
  • the memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory.
  • the memory 1005 may also be a storage device independent of the aforementioned processor 1001 .
  • the resource pool resource filling device may also include an RF (Radio Frequency, radio frequency) circuits, sensors, audio circuits, WiFi modules, etc.
  • RF Radio Frequency, radio frequency
  • resource pool resource filling device structure shown in FIG. 4 does not constitute a limitation on the resource pool resource filling device, and may include more or less components than those shown in the figure, or combine certain components, or different component arrangements.
  • the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a resource pool resource filling program.
  • the operating system is a program that manages and controls the hardware and software resources of the resource pool resource filling device, and supports the operation of the resource pool resource filling program and other software or programs.
  • the user interface 1003 is mainly used to connect to the terminal and perform data communication with the terminal, such as receiving user signaling data sent by the terminal;
  • the network interface 1004 is mainly used for the background server to communicate with the background server Perform data communication;
  • the processor 1001 can be used to call the resource pool resource filling program stored in the memory 1005, and execute the steps of the above resource pool resource filling method.
  • the specific implementation manner of the resource pool resource filling device of the present application is basically the same as the above embodiments of the resource pool resource filling method, and will not be repeated here.
  • the embodiment of the present application also proposes a computer-readable storage medium, where a resource pool resource filling program is stored on the computer-readable storage medium, and when the resource pool resource filling program is executed by a processor, the above resource The steps of the pool resource fill method.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请公开了一种资源池资源填充方法、装置、设备及可读存储介质,该方法包括步骤:获取待填充资源池集合和可填充总资源数;若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。

Description

资源池资源填充方法、装置、设备及可读存储介质
本申请要求于2021年6月23日申请的、申请号为202110702135.2的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及金融科技(Fintech)技术领域,尤其涉及一种资源池资源填充方法、装置、设备及可读存储介质。
背景技术
随着金融科技,尤其是互联网科技金融的不断发展,越来越多的技术(如分布式、人工智能等)应用在金融领域,但金融业也对技术提出了更高的要求,如对金融业的分布式系统资源分配也有更高的要求。
现有方案是在分布式系统需要填充资源时,为该分布式系统中的资源池平均分配资源,然而,在该分布式系统中,存在部分资源池中的资源一直没被消耗或消耗速率远远低于其他资源池中的资源的消耗速率,但是对于该部分资源池,在现有方案中仍然为其分配与其他资源池相同数量的资源,导致该部分资源池中资源的利用率低。
也即,资源池中资源的利用率低。
技术问题
本申请的主要目的在于提供一种资源池资源填充方法、装置、设备及可读存储介质,旨在解决现有的如何提高资源池中资源的利用率的技术问题。
技术解决方案
为实现上述目的,本申请提供一种资源池资源填充方法,所述资源池资源填充方法包括步骤:
获取待填充资源池集合和可填充总资源数;
若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;
计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。
在一实施例中,所述无需填充资源池包括第一无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
基于所述可填充总资源数与所述待填充资源池集合对应的资源池数,计算第一待填充资源平均数;
计算所述第一剩余资源平均数和所述第一待填充资源平均数之和,得到第一填充后资源平均数;
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合。
在一实施例中,所述若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合,包括:
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一更新后待填充资源池集合;
将所述第一更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至各所述第一待填充资源池中未含有第一剩余资源数大于所述填充后资源平均数的第一无需填充资源池,将所述第一更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在一实施例中,所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
计算所述第一剩余待填充资源池集合中各第二待填充资源池的第二剩余资源数的第二剩余资源平均数;
计算所述可填充总资源数与所述第一剩余待填充资源池集合对应的资源池数之间的第二待填充资源平均数;
计算所述第二剩余资源平均数和所述第二待填充资源平均数之和,得到第二填充后资源平均数;
分别计算所述第二填充后资源平均数与各所述第二剩余资源数之差,得到所述应填充资源数。
在一实施例中,所述无需填充资源池包括第二无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一剩余资源平均数的第二无需填充资源池,则剔除所述第二无需填充资源池,得到第二更新后待填充资源池集合;
计算所述第二更新后待填充资源池集合的第三剩余资源数和所述可填充总资源数之和,得到填充后总资源数;
计算所述填充后总资源数与所述第二更新后待填充资源池集合的资源池数之间的第一商,得到填充后总资源平均数;
计算所述第二更新后待填充资源池集合的第三剩余资源数的第三剩余资源平均数;
若所述填充后总资源平均数小于所述第三剩余资源平均数,则将所述第二更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至所述填充后总资源平均数大于或等于第三剩余资源平均数,将所述第二更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在一实施例中,所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
获取所述第一剩余待填充资源池集合的第四剩余资源平均数;
计算所述第四剩余资源平均数与第四剩余资源数之间的待填充资源数差值,其中,所述第四剩余资源数为第一剩余待填充资源池集合中各第三待填充资源池的剩余资源数;
在通过所述可填充总资源数填充各所述第三待填充资源池后,若剩余可填充资源数大于零,则加入所述第二无需填充资源池至所述第一剩余待填充资源池集合,并返回所述获取所述第一剩余待填充资源池集合的第四剩余资源平均数步骤,直至满足预设循环结束条件;
获取所述预设循环结束条件对应的循环过程中的待填充资源数差值,并分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数。
在一实施例中,所述分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数,包括:
在填充所述第四待填充资源池后,若剩余可填充资源数大于零,则计算所述剩余可填充资源数和所述第四待填充资源池的资源池数之间的第二商;
剔除所述第四待填充资源池中填充后资源数大于所述第二商的资源池,得到第二剩余待填充资源池集合;
计算所述剩余可填充资源数和所述第二剩余待填充资源池集合的第三商;
分别添加所述第三商至各所述待填充资源数差值之和,得到应填充资源数。
此外,为实现上述目的,本申请还提供一种资源池资源填充装置,所述资源池资源填充装置包括:
获取模块,用于获取待填充资源池集合和可填充总资源数;
剔除模块,用于若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;
计算模块,用于计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
填充模块,用于基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池
此外,为实现上述目的,本申请还提供一种资源池资源填充设备,所述资源池资源填充设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的资源池资源填充程序,所述资源池资源填充程序被所述处理器执行时实现如上所述的资源池资源填充方法的步骤。
此外,为实现上述目的,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质上存储有资源池资源填充程序,所述资源池资源填充程序被处理器执行时实现如上所述的资源池资源填充方法的步骤。
有益效果
与现有技术中,为资源池平均分配资源,致使资源池中资源的资源利用率低相比,本申请通过获取待填充资源池集合和可填充总资源数;若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。本申请在待填充资源池集合中含有未满足资源填充要求的无需填充资源池时,剔除该无需填充资源池,得到第一剩余待填充资源池集合,从而仅对该第一剩余待填充资源池集合中的待填充资源池进行资源的填充,而避免了对无需填充资源池中的资源进行填充,进而提高了资源池中资源的利用率。
附图说明
图1是本申请资源池资源填充方法第一实施例的流程示意图;
图2是本申请资源池资源填充方法第二实施例的流程示意图;
图3是本申请资源池资源填充装置较佳实施例的功能模块示意图;
图4是本申请实施例方案涉及的硬件运行环境的结构示意图。
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。
本发明的实施方式
应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。
本申请提供一种资源池资源填充方法,参照图1,图1为本申请资源池资源填充方法第一实施例的流程示意图。
本申请实施例提供了资源池资源填充方法的实施例,需要说明的是,虽然在流程图中示出了逻辑顺序,但是在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤。资源池资源填充方法可应用于分布式系统中。为了便于描述,以下省略执行主体描述资源池资源填充方法的各个步骤。资源池资源填充方法包括:
步骤S10,获取待填充资源池集合和可填充总资源数。
在本实施例中,在对分布式系统的资源池进行资源填充之前,需要获取该资源池的数量,从而根据该数量来确定申请的可填充总资源数,以通过该可填充总资源数的资源来对待填充资源池集合(即分布式系统的各资源池的集合)进行资源填充。
步骤S20,若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合。
在本实施例中,分布式系统在运行时,需要消耗资源以完成相应的任务,例如交易任务,相应地,由于分布式系统中的资源池是分布式部署的,各资源池中的资源的消耗速率不一致,该消耗速率由任务执行的频率决定,即频率越高,消耗速率越高;频率越低,消耗速率越低。其中,由于消耗速率不一致,导致在相同时间,各资源池的资源剩余量不一致,甚至,在有些资源池中的资源即将耗尽时,有些资源池中的资源还几乎未使用。
需要说明的是,在存在资源耗尽或即将耗尽的资源池时,需要申请填充一批资源,以保证该资源耗尽或即将耗尽的资源池能够继续正常处理任务,在现有技术中,在为该资源耗尽或即将耗尽的资源池填充资源时,同样为该资源几乎未使用的资源池填充资源,并且填充资源的填充量相同,导致资源被严重浪费。由此提出了在填充资源前,确定待填充资源池集合中是否包含未满足资源填充要求的无需填充资源池(即资源几乎未使用的资源池),若待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除该无需填充资源池,得到第一剩余待填充资源池集合,从而为该第一剩余待填充资源池集合中的资源池填充资源,而不为该无需填充资源池填充资源,进而实现了资源的按需分配;当然,若待填充资源池集合中未含有未满足资源填充要求的无需填充资源池,则直接将该待填充资源池集合作为第一剩余待填充资源池集合,并对该第一剩余待填充资源池集合中的资源池填充资源。
其中,上述剔除过程通过剔除规则来完成,具体地,该剔除规则为:
所述无需填充资源池包括第一无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
步骤a,计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数。
在本实施例中,待填充资源池集合中各第一待填充资源池的第一剩余资源数不尽相同,例如待填充资源池a的第一剩余资源数为1,待填充资源池b的第一剩余资源数为10,在确定待填充资源池集合中的无需填充资源池之前,需要计算待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数。
可以理解,第一剩余资源平均数是与各第一待填充资源池的第一剩余资源数之和相对应的。例如待填充资源池集合中第一待填充资源池的数量为n,各第一待填充资源池分别为P1、P2、……、Pn,相应地,各第一待填充资源池对应的第一剩余资源数分别为C1、C2、……、Cn,即第一剩余资源平均数为(C1+C2+……+Cn)/n。
步骤b,基于所述可填充总资源数与所述待填充资源池集合对应的资源池数,计算第一待填充资源平均数。
在本实施例中,计算可填充总资源数与待填充资源池集合对应的资源池数之间的商,即计算可填充总资源数个资源在平均填充各第一待填充资源池的情况下,各第一待填充资源池能够分到的资源数,即第一待填充资源平均数。例如可填充总资源数为T,资源池数为n,则第一待填充资源平均数为T/n。
步骤c,计算所述第一剩余资源平均数和所述第一待填充资源平均数之和,得到第一填充后资源平均数;
步骤d,若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合。
在本实施例中,计算上述第一剩余资源平均数和上述第一待填充资源平均数之和,得到第一填充后资源平均数,即上述(C1+C2+……+Cn)/n+T/n。对于确定第一无需填充资源池的过程,其为确定各第一待填充资源池中是否含有第一剩余资源数大于第一填充后资源平均数的资源池,若含有,则将该资源池作为第一无需填充资源池,并剔除该第一无需填充资源池,得到第一剩余待填充资源池集合,例如剔除第一待填充资源池P1;若未含有,则未发现第一无需填充资源池,并将待填充资源池集合中所有第一待填充资源池作为第一剩余待填充资源池集合中的资源池。
进一步地,所述若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合,包括:
步骤d1,若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一更新后待填充资源池集合。
在本实施例中,上述第一无需填充资源池可能需要经过多次剔除的过程,具体地,若各第一待填充资源池中含有第一剩余资源数大于第一填充后资源平均数的第一无需填充资源池,则剔除第一无需填充资源池,得到第一更新后待填充资源池集合,上述多次剔除的过程的剔除次数由该第一更新后待填充资源池集合确定;若第一待填充资源池中未含有第一剩余资源数大于第一填充后资源平均数的第一无需填充资源池,则无需剔除任一第一待填充资源池。
步骤d2,将所述第一更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至各所述第一待填充资源池中未含有第一剩余资源数大于所述填充后资源平均数的第一无需填充资源池,将所述第一更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在本实施例中,进入剔除第一无需填充资源池的循环体,具体地,将第一更新后待填充资源池集合作为待填充资源池集合,并返回计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,即根据该第一更新后待填充资源池集合重新计算上述第一剩余资源平均数,并根据该重新计算得到的第一剩余资源平均数来确定第一更新后待填充资源池集合中的第一无需填充资源池,该实施例与确定各第一待填充资源池中的第一无需填充资源池的实施例基本相同,在此不再赘述。
需要说明的是,其循环条件为各第一待填充资源池中含有第一剩余资源数大于填充后资源平均数的第一无需填充资源池,即能够从第一更新后待填充资源池集合中剔除第一无需填充资源池,在无法从第一更新后待填充资源池集合中剔除第一无需填充资源池时,循环结束,并将最后一次循环后得到的第一更新后待填充资源池集合作为第一剩余待填充资源池集合。例如循环结束后剔除了各第一待填充资源池中的P1和P2,则第一剩余待填充资源池集合中的资源池包括P3、P4、……、Pn。
步骤S30,计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
步骤S40,基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。
在本实施例中,上述第一剩余待填充资源池集合中的资源池为待填充资源的资源池,即可填充总资源数的资源均填充至第一剩余待填充资源池集合中的资源池中,具体地,填充资源时,相应的应填充资源数由第一剩余待填充资源池集合和可填充总资源数计算得到;在计算得到应填充资源数后,根据该应填充资源数对第一剩余待填充资源池集合中的待填充资源池进行对应填充。
其中,该计算过程为:
所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
步骤e,计算所述第一剩余待填充资源池集合中各第二待填充资源池的第二剩余资源数的第二剩余资源平均数;
步骤f,计算所述可填充总资源数与所述第一剩余待填充资源池集合对应的资源池数之间的第二待填充资源平均数;
步骤g,计算所述第二剩余资源平均数和所述第二待填充资源平均数之和,得到第二填充后资源平均数;
步骤h,分别计算所述第二填充后资源平均数与各所述第二剩余资源数之差,得到所述应填充资源数。
在本实施例中,首先需要计算上述第一剩余待填充资源池集合中各第二待填充资源池的第二剩余资源数的第二剩余资源平均数,即计算P3、P4、……、Pn对应的C3、C4、……、Cn的平均数,也即(C3+C4+……+Cn)/(n-2);其次,计算上述可填充总资源数与上述第一剩余待填充资源池集合对应的资源池数之间的第二待填充资源平均数,即T/(n-2);之后计算第二剩余资源平均数和第二待填充资源平均数之和,得到第二填充后资源平均数,即(C3+C4+……+Cn)/(n-2)+T/(n-2);最后分别计算第二填充后资源平均数与各第二剩余资源数之差,得到所述应填充资源数,例如资源池P3对应的应填充资源数为(C3+C4+……+Cn)/(n-2)+T/(n-2)-C3。
可以理解,资源填充后的分布式系统的资源池中,资源的资源数重新达到均衡。其中,在通过上述方式对第一剩余待填充资源池集合中的资源池进行资源填充后,存在资源数为可填充总资源数的资源未使用完的情况,对于未使用完的资源,可将其分配给资源的消耗速率最大的资源池。
以下表为例,待填充资源池集合中存在第一待填充资源池P1、P2、P3、……、P13,依照上述方式分配资源的结果为:
第一待填充资源池 P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 P11 P12 P13
第一剩余资源数 10 2 3 4 5 6 19 30 50 60 98 0 100000
应填充资源数 83346 83354 83353 83352 83351 83350 83337 83326 83306 83296 83258 83371 0
填充后资源数 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83356 83371 100000
可以理解,资源池P13为第一无需填充资源池,填充的资源数为0,填充后资源数中P1、P2、P3、……、P11对应的资源数相同,其中,由于资源池P12的第一剩余资源数最少,说明其资源的消耗速率最大,则将未使用完的资源分配给了P12。
此外,通过上述平均分配的方式,很明显地,将原需要分配给无需填充资源池的资源分配给了其他更需要资源的资源池,从而增加了单次为剩余资源数最小的资源池填充资源的资源数,进而减少了资源补充的频率。
与现有技术中,为资源池平均分配资源,致使资源池中资源的资源利用率低相比,本实施例通过获取待填充资源池集合和可填充总资源数;若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。本实施例在待填充资源池集合中含有未满足资源填充要求的无需填充资源池时,剔除该无需填充资源池,得到第一剩余待填充资源池集合,从而仅对该第一剩余待填充资源池集合中的待填充资源池进行资源的填充,而避免了对无需填充资源池中的资源进行填充,进而提高了资源池中资源的利用率。
进一步地,参照图2,在本申请资源池资源填充方法第一实施例的基础上,提出第二实施例,所述无需填充资源池包括第二无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
步骤A10,计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数。
在本实施例中,待填充资源池集合中各第一待填充资源池的第一剩余资源数不尽相同,例如待填充资源池a的第一剩余资源数为1,待填充资源池b的第一剩余资源数为10,在确定待填充资源池集合中的无需填充资源池之前,需要计算待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数。
可以理解,第一剩余资源平均数是与各第一待填充资源池的第一剩余资源数之和相对应的。例如待填充资源池集合中第一待填充资源池的数量为n,各第一待填充资源池分别为P1、P2、……、Pn,相应地,各第一待填充资源池对应的第一剩余资源数分别为C1、C2、……、Cn,即第一剩余资源平均数为(C1+C2+……+Cn)/n。
步骤A20,若各所述第一待填充资源池中含有第一剩余资源数大于所述第一剩余资源平均数的第二无需填充资源池,则剔除所述第二无需填充资源池,得到第二更新后待填充资源池集合。
在本实施例中,若各第一待填充资源池中含有第一剩余资源数大于第一剩余资源平均数的第二无需填充资源池,则剔除第二无需填充资源池,例如C1大于(C1+C2+……+Cn)/n,则剔除P1,得到第二更新后待填充资源池集合;若各第一待填充资源池中未含有第一剩余资源数大于第一剩余资源平均数的第二无需填充资源池,则将待填充资源池集合作为第二更新后待填充资源池集合。
步骤A30,计算所述第二更新后待填充资源池集合的第三剩余资源数和所述可填充总资源数之和,得到填充后总资源数;
步骤A40,计算所述填充后总资源数与所述第二更新后待填充资源池集合的资源池数之间的第一商,得到填充后总资源平均数;
步骤A50,计算所述第二更新后待填充资源池集合的第三剩余资源数的第三剩余资源平均数。
在本实施例中,首先,计算第二更新后待填充资源池集合的第三剩余资源数和可填充总资源数之和,得到填充后总资源数,例如第三剩余资源数分别为C2、C3、……、Cn,填充后总资源数为C2+C3+……+Cn+T;其次,计算填充后总资源数与第二更新后待填充资源池集合的资源池数之间的第一商,得到填充后总资源平均数,即(C2+C3+……+Cn+T)/(n-1);之后,计算第二更新后待填充资源池集合的第三剩余资源数的第三剩余资源平均数,即(C2+C3+……+Cn)/(n-1)。
步骤A60,若所述填充后总资源平均数小于所述第三剩余资源平均数,则将所述第二更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至所述填充后总资源平均数大于或等于第三剩余资源平均数,将所述第二更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在本实施例中,若填充后总资源平均数小于第三剩余资源平均数,则将第二更新后待填充资源池集合作为所述待填充资源池集合,并进入循环体,即返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至填充后总资源平均数大于或等于第三剩余资源平均数,之后将第二更新后待填充资源池集合作为第一剩余待填充资源池集合;若填充后总资源平均数大于或等于第三剩余资源平均数,则直接将第二更新后待填充资源池集合作为第一剩余待填充资源池集合,而无需进入循环体。
在得到第一剩余待填充资源池集合后,所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
步骤i,获取所述第一剩余待填充资源池集合的第四剩余资源平均数。
在本实施例中,在经过上述循环剔除过程中,循环结束前的最后一次剔除过程剔除了第二无需填充资源池,可以理解,该最后一次剔除的第二无需填充资源池为整个循环剔除过程中剔除的资源池的一部分,但在最后一次剔除第二无需填充资源池后,在最后一次剔除完成后,第一剩余待填充资源池集合中的资源池,为剔除了循环过程中全部的第二无需填充资源池后得到的,获取该第一剩余待填充资源池集合的第四剩余资源平均数。
步骤j,计算所述第四剩余资源平均数与第四剩余资源数之间的待填充资源数差值,其中,所述第四剩余资源数为第一剩余待填充资源池集合中各第三待填充资源池的剩余资源数。
在本实施例中,计算上述第四剩余资源平均数与第四剩余资源数之间的待填充资源数差值,其中,第四剩余资源数为第一剩余待填充资源池集合中各第三待填充资源池的剩余资源数。
步骤k,在通过所述可填充总资源数填充各所述第三待填充资源池后,若剩余可填充资源数大于零,则加入所述第二无需填充资源池至所述第一剩余待填充资源池集合,并返回所述获取所述第一剩余待填充资源池集合的第四剩余资源平均数步骤,直至满足预设循环结束条件。
在本实施例中,在通过可填充总资源数填充各第三待填充资源池后,若剩余可填充资源数大于零,则说明填充第一剩余待填充资源池集合中各第三待填充资源池后,可填充资源数还有剩余,通过该剩余可填充资源数还可继续填充第三待填充资源池,此外,还可加入其他资源池至第一剩余待填充资源池集合,具体地,该其他资源池为最后一次剔除的第二无需填充资源池,即在剩余可填充资源数大于零时,加入最后一次被剔除的第二无需填充资源池,并返回所述获取最后一次剔除所述第二无需填充资源池得到第一剩余待填充资源池集合时的第四剩余资源平均数步骤,直至满足预设循环结束条件。
其中,该预设循环结束条件包括两种情况,其一为剩余填充资源为零,其二为通过上述方式对第一剩余待填充资源池集合中所有的资源池完成填充。
可以理解,每次循环填充的资源后,被填充的资源池的资源数均为上一次剔除过程的第四剩余资源平均数。
步骤l,获取所述预设循环结束条件对应的循环过程中的待填充资源数差值,并分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数。
在本实施例中,获取上述预设循环结束条件对应的循环过程中的待填充资源数差值,并分别计算第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数。可以理解,对于不同第四待填充资源池,相应的应填充资源数不同,因此,需要分别记录各第四待填充资源池对应的应填充资源数。
进一步地,分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数,包括:
步骤l1,在填充所述第四待填充资源池后,若剩余可填充资源数大于零,则计算所述剩余可填充资源数和所述第四待填充资源池的资源池数之间的第二商;
步骤l2,剔除所述第四待填充资源池中填充后资源数大于所述第二商的资源池,得到第二剩余待填充资源池集合;
步骤l3,计算所述剩余可填充资源数和所述第二剩余待填充资源池集合的第三商;
步骤l4,分别添加所述第三商至各所述待填充资源数差值之和,得到应填充资源数。
在本实施例中,对于上述预设循环结束条件为通过上述方式对第一剩余待填充资源池集合中所有的资源池完成填充的情况,在填充第四待填充资源池后,若剩余可填充资源数大于零,则还可通过该剩余可填充资源数继续为第四待填充资源池进行资源填充,具体地,计算剩余可填充资源数和所述第四待填充资源池的资源池数之间的第二商;剔除第四待填充资源池中填充后资源数大于第二商的资源池,即避免为无需填充资源池进行资源填充,得到第二剩余待填充资源池集合;之后计算剩余可填充资源数和第二剩余待填充资源池集合的第三商,以将该第三商作为填充第二剩余待填充资源池集合中各资源池的资源数;最后,分别添加第三商至各待填充资源数差值之和,即,分别将第二剩余待填充资源池集合中各资源池的第三商对应的资源数,加入上述通过循环过程分配资源后的资源数中,从而得到应填充资源数。
可以理解,通过计算第三商来实现均匀分配,可进一步保证资源分配的均衡性。
其中,在通过第三商填充第三剩余待填充资源池集合后,若资源还存在剩余,则将该资源填充至资源的消耗速率最大的资源池中。
本实施例通过剔除第一剩余资源数大于第一剩余资源平均数的第二无需填充资源池,使得第二更新后待填充资源池集合中无需填充资源的资源池不被填充资源,即避免了对无需填充资源池中的资源进行填充,从而提高了资源池中资源的利用率。
此外,参照图3,本申请还提供一种资源池资源填充装置,所述资源池资源填充装置包括:
获取模块10,用于获取待填充资源池集合和可填充总资源数;
剔除模块20,用于若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;
计算模块30,用于计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
填充模块40,用于基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。
在一实施例中,所述剔除模块20用于:
计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
基于所述可填充总资源数与所述待填充资源池集合对应的资源池数,计算第一待填充资源平均数;
计算所述第一剩余资源平均数和所述第一待填充资源平均数之和,得到第一填充后资源平均数;
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合。
在一实施例中,所述剔除模块20还用于:
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一更新后待填充资源池集合;
将所述第一更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至各所述第一待填充资源池中未含有第一剩余资源数大于所述填充后资源平均数的第一无需填充资源池,将所述第一更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在一实施例中,所述计算模块30用于:
计算所述第一剩余待填充资源池集合中各第二待填充资源池的第二剩余资源数的第二剩余资源平均数;
计算所述可填充总资源数与所述第一剩余待填充资源池集合对应的资源池数之间的第二待填充资源平均数;
计算所述第二剩余资源平均数和所述第二待填充资源平均数之和,得到第二填充后资源平均数;
分别计算所述第二填充后资源平均数与各所述第二剩余资源数之差,得到所述应填充资源数。
在一实施例中,所述剔除模块20还用于:
计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
若各所述第一待填充资源池中含有第一剩余资源数大于所述第一剩余资源平均数的第二无需填充资源池,则剔除所述第二无需填充资源池,得到第二更新后待填充资源池集合;
计算所述第二更新后待填充资源池集合的第三剩余资源数和所述可填充总资源数之和,得到填充后总资源数;
计算所述填充后总资源数与所述第二更新后待填充资源池集合的资源池数之间的第一商,得到填充后总资源平均数;
计算所述第二更新后待填充资源池集合的第三剩余资源数的第三剩余资源平均数;
若所述填充后总资源平均数小于所述第三剩余资源平均数,则将所述第二更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至所述填充后总资源平均数大于或等于第三剩余资源平均数,将所述第二更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
在一实施例中,所述计算模块30还用于:
获取所述第一剩余待填充资源池集合的第四剩余资源平均数;
计算所述第四剩余资源平均数与第四剩余资源数之间的待填充资源数差值,其中,所述第四剩余资源数为第一剩余待填充资源池集合中各第三待填充资源池的剩余资源数;
在通过所述可填充总资源数填充各所述第三待填充资源池后,若剩余可填充资源数大于零,则加入所述第二无需填充资源池至所述第一剩余待填充资源池集合,并返回所述获取所述第一剩余待填充资源池集合的第四剩余资源平均数步骤,直至满足预设循环结束条件;
获取所述预设循环结束条件对应的循环过程中的待填充资源数差值,并分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数。
在一实施例中,所述计算模块还用于:
在填充所述第四待填充资源池后,若剩余可填充资源数大于零,则计算所述剩余可填充资源数和所述第四待填充资源池的资源池数之间的第二商;
剔除所述第四待填充资源池中填充后资源数大于所述第二商的资源池,得到第二剩余待填充资源池集合;
计算所述剩余可填充资源数和所述第二剩余待填充资源池集合的第三商;
分别添加所述第三商至各所述待填充资源数差值之和,得到应填充资源数。。
本申请资源池资源填充装置具体实施方式与上述资源池资源填充方法各实施例基本相同,在此不再赘述。
此外,本申请还提供一种资源池资源填充设备。如图4所示,图4是本申请实施例方案涉及的硬件运行环境的结构示意图。
需要说明的是,图4即可为资源池资源填充设备的硬件运行环境的结构示意图。
如图4所示,该资源池资源填充设备可以包括:处理器1001,例如CPU,存储器1005,用户接口1003,网络接口1004,通信总线1002。其中,通信总线1002用于实现这些组件之间的连接通信。用户接口1003可以包括显示屏(Display)、输入单元比如键盘(Keyboard),可选用户接口1003还可以包括标准的有线接口、无线接口。网络接口1004可选的可以包括标准的有线接口、无线接口(如WI-FI接口)。存储器1005可以是高速RAM存储器,也可以是稳定的存储器(non-volatile memory),例如磁盘存储器。存储器1005可选的还可以是独立于前述处理器1001的存储装置。
在一实施例中,资源池资源填充设备还可以包括RF(Radio Frequency,射频)电路,传感器、音频电路、WiFi模块等等。
本领域技术人员可以理解,图4中示出的资源池资源填充设备结构并不构成对资源池资源填充设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
如图4所示,作为一种计算机存储介质的存储器1005中可以包括操作系统、网络通信模块、用户接口模块以及资源池资源填充程序。其中,操作系统是管理和控制资源池资源填充设备硬件和软件资源的程序,支持资源池资源填充程序以及其它软件或程序的运行。
在图4所示的资源池资源填充设备中,用户接口1003主要用于连接终端,与终端进行数据通信,如接收终端发送的用户信令数据;网络接口1004主要用于后台服务器,与后台服务器进行数据通信;处理器1001可以用于调用存储器1005中存储的资源池资源填充程序,并执行如上所述的资源池资源填充方法的步骤。
本申请资源池资源填充设备具体实施方式与上述资源池资源填充方法各实施例基本相同,在此不再赘述。
此外,本申请实施例还提出一种计算机可读存储介质,所述计算机可读存储介质上存储有资源池资源填充程序,所述资源池资源填充程序被处理器执行时实现如上所述的资源池资源填充方法的步骤。
本申请计算机可读存储介质具体实施方式与上述资源池资源填充方法各实施例基本相同,在此不再赘述。
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端设备(可以是手机,计算机,服务器,设备,或者网络设备等)执行本申请各个实施例所述的方法。
以上仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。

Claims (10)

  1. 一种资源池资源填充方法,其中,所述资源池资源填充方法包括以下步骤:
    获取待填充资源池集合和可填充总资源数;
    若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;
    计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
    基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。
  2. 如权利要求1所述的资源池资源填充方法,其中,所述无需填充资源池包括第一无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
    计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
    基于所述可填充总资源数与所述待填充资源池集合对应的资源池数,计算第一待填充资源平均数;
    计算所述第一剩余资源平均数和所述第一待填充资源平均数之和,得到第一填充后资源平均数;
    若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合。
  3. 如权利要求2所述的资源池资源填充方法,其中,所述若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一剩余待填充资源池集合,包括:
    若各所述第一待填充资源池中含有第一剩余资源数大于所述第一填充后资源平均数的第一无需填充资源池,则剔除所述第一无需填充资源池,得到第一更新后待填充资源池集合;
    将所述第一更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至各所述第一待填充资源池中未含有第一剩余资源数大于所述填充后资源平均数的第一无需填充资源池,将所述第一更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
  4. 如权利要求1所述的资源池资源填充方法,其中,所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
    计算所述第一剩余待填充资源池集合中各第二待填充资源池的第二剩余资源数的第二剩余资源平均数;
    计算所述可填充总资源数与所述第一剩余待填充资源池集合对应的资源池数之间的第二待填充资源平均数;
    计算所述第二剩余资源平均数和所述第二待填充资源平均数之和,得到第二填充后资源平均数;
    分别计算所述第二填充后资源平均数与各所述第二剩余资源数之差,得到所述应填充资源数。
  5. 如权利要求1所述的资源池资源填充方法,其中,所述无需填充资源池包括第二无需填充资源池,所述若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合,包括:
    计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数;
    若各所述第一待填充资源池中含有第一剩余资源数大于所述第一剩余资源平均数的第二无需填充资源池,则剔除所述第二无需填充资源池,得到第二更新后待填充资源池集合;
    计算所述第二更新后待填充资源池集合的第三剩余资源数和所述可填充总资源数之和,得到填充后总资源数;
    计算所述填充后总资源数与所述第二更新后待填充资源池集合的资源池数之间的第一商,得到填充后总资源平均数;
    计算所述第二更新后待填充资源池集合的第三剩余资源数的第三剩余资源平均数;
    若所述填充后总资源平均数小于所述第三剩余资源平均数,则将所述第二更新后待填充资源池集合作为所述待填充资源池集合,并返回所述计算所述待填充资源池集合中各第一待填充资源池的第一剩余资源数的第一剩余资源平均数步骤,直至所述填充后总资源平均数大于或等于第三剩余资源平均数,将所述第二更新后待填充资源池集合作为所述第一剩余待填充资源池集合。
  6. 如权利要求5所述的资源池资源填充方法,其中,所述计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数,包括:
    获取所述第一剩余待填充资源池集合的第四剩余资源平均数;
    计算所述第四剩余资源平均数与第四剩余资源数之间的待填充资源数差值,其中,所述第四剩余资源数为第一剩余待填充资源池集合中各第三待填充资源池的剩余资源数;
    在通过所述可填充总资源数填充各所述第三待填充资源池后,若剩余可填充资源数大于零,则加入所述第二无需填充资源池至所述第一剩余待填充资源池集合,并返回所述获取所述第一剩余待填充资源池集合的第四剩余资源平均数步骤,直至满足预设循环结束条件;
    获取所述预设循环结束条件对应的循环过程中的待填充资源数差值,并分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数。
  7. 如权利要求6所述的资源池资源填充方法,其中,所述分别计算所述第一剩余待填充资源池集合中各第四待填充资源池对应的待填充资源数差值之和,得到所述应填充资源数,包括:
    在填充所述第四待填充资源池后,若剩余可填充资源数大于零,则计算所述剩余可填充资源数和所述第四待填充资源池的资源池数之间的第二商;
    剔除所述第四待填充资源池中填充后资源数大于所述第二商的资源池,得到第二剩余待填充资源池集合;
    计算所述剩余可填充资源数和所述第二剩余待填充资源池集合的第三商;
    分别添加所述第三商至各所述待填充资源数差值之和,得到应填充资源数。
  8. 一种资源池资源填充装置,其中,所述资源池资源填充装置包括:
    获取模块,用于获取待填充资源池集合和可填充总资源数;
    剔除模块,用于若所述待填充资源池集合中含有未满足资源填充要求的无需填充资源池,则剔除所述无需填充资源池,得到第一剩余待填充资源池集合;
    计算模块,用于计算所述第一剩余待填充资源池集合和所述可填充总资源数对应的应填充资源数;
    填充模块,用于基于所述应填充资源数填充所述第一剩余待填充资源池集合对应的待填充资源池。
  9. 一种资源池资源填充设备,其中,所述资源池资源填充设备包括存储器、处理器和存储在所述存储器上并可在所述处理器上运行的资源池资源填充程序,所述资源池资源填充程序被所述处理器执行时实现如权利要求1至7中任一项所述的资源池资源填充方法的步骤。
  10. 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有资源池资源填充程序,所述资源池资源填充程序被处理器执行时实现如权利要求1至7中任一项所述的资源池资源填充方法的步骤。
PCT/CN2021/134318 2021-06-23 2021-11-30 资源池资源填充方法、装置、设备及可读存储介质 WO2022267344A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110702135.2 2021-06-23
CN202110702135.2A CN113360288A (zh) 2021-06-23 2021-06-23 资源池资源填充方法、装置、设备及可读存储介质

Publications (1)

Publication Number Publication Date
WO2022267344A1 true WO2022267344A1 (zh) 2022-12-29

Family

ID=77536104

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/134318 WO2022267344A1 (zh) 2021-06-23 2021-11-30 资源池资源填充方法、装置、设备及可读存储介质

Country Status (2)

Country Link
CN (1) CN113360288A (zh)
WO (1) WO2022267344A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360288A (zh) * 2021-06-23 2021-09-07 深圳前海微众银行股份有限公司 资源池资源填充方法、装置、设备及可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150277987A1 (en) * 2014-03-31 2015-10-01 International Business Machines Corporation Resource allocation in job scheduling environment
CN105404542A (zh) * 2015-08-14 2016-03-16 国家超级计算深圳中心(深圳云计算中心) 云计算系统及在其上运行高性能计算的方法
CN110928649A (zh) * 2018-09-19 2020-03-27 北京国双科技有限公司 资源调度的方法和装置
CN111880914A (zh) * 2020-07-20 2020-11-03 北京百度网讯科技有限公司 资源调度方法、资源调度装置、电子设备和存储介质
CN113360288A (zh) * 2021-06-23 2021-09-07 深圳前海微众银行股份有限公司 资源池资源填充方法、装置、设备及可读存储介质

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7634590B2 (en) * 2005-10-12 2009-12-15 Computer Associates Think, Inc. Resource pool monitor
CN105912397A (zh) * 2016-03-31 2016-08-31 乐视控股(北京)有限公司 一种资源管理方法和装置
CN110231992A (zh) * 2019-06-06 2019-09-13 深圳前海微众银行股份有限公司 分布式资源分配方法、装置、设备及可读存储介质
CN111858034B (zh) * 2020-06-29 2023-01-06 苏州浪潮智能科技有限公司 一种资源的管理方法、系统、设备以及介质
CN112698943A (zh) * 2020-12-29 2021-04-23 北京顺达同行科技有限公司 资源分配方法、装置、计算机设备以及存储介质
CN112862293A (zh) * 2021-02-01 2021-05-28 北京三快在线科技有限公司 一种资源分配方法、装置、存储介质及电子设备
CN112905342B (zh) * 2021-02-07 2024-03-01 广州虎牙科技有限公司 资源调度方法、装置、设备及计算机可读存储介质
CN112948111B (zh) * 2021-02-26 2023-07-14 北京奇艺世纪科技有限公司 一种任务分配方法、装置、设备及计算机可读介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150277987A1 (en) * 2014-03-31 2015-10-01 International Business Machines Corporation Resource allocation in job scheduling environment
CN105404542A (zh) * 2015-08-14 2016-03-16 国家超级计算深圳中心(深圳云计算中心) 云计算系统及在其上运行高性能计算的方法
CN110928649A (zh) * 2018-09-19 2020-03-27 北京国双科技有限公司 资源调度的方法和装置
CN111880914A (zh) * 2020-07-20 2020-11-03 北京百度网讯科技有限公司 资源调度方法、资源调度装置、电子设备和存储介质
CN113360288A (zh) * 2021-06-23 2021-09-07 深圳前海微众银行股份有限公司 资源池资源填充方法、装置、设备及可读存储介质

Also Published As

Publication number Publication date
CN113360288A (zh) 2021-09-07

Similar Documents

Publication Publication Date Title
US11146502B2 (en) Method and apparatus for allocating resource
CN106802932B (zh) 一种数据库的路由方法、装置及数据库系统
CN108052615B (zh) 访问请求的处理方法、装置、介质及电子设备
CN106817432A (zh) 云计算环境下虚拟资源弹性伸展的方法,系统和设备
CN110311989A (zh) 一种灰度发布方法、装置、存储介质、设备及系统
CN110830604B (zh) Dns调度方法、装置
WO2022267344A1 (zh) 资源池资源填充方法、装置、设备及可读存储介质
CN107392582B (zh) 资源转移的实现方法和装置、收付款的实现方法和装置
US20090164987A1 (en) System and method for updating a dual layer browser
US20140164662A1 (en) Methods and apparatus for interleaving priorities of a plurality of virtual processors
CN104125297A (zh) 虚拟资源共享方法、装置及系统
TW202121274A (zh) 雲端資源管理方法、裝置、電子設備及電腦可讀儲存媒體
JP5466786B1 (ja) 画像処理装置及び画像処理プログラム
CN116185623A (zh) 任务分配方法、装置、电子设备及存储介质
WO2021057811A1 (zh) 网络节点处理方法、装置、存储介质及电子设备
CN108667940B (zh) 云平台的资源分配方法、装置及计算机可读存储介质
CN111190719A (zh) 优化集群资源分配的方法、装置、介质及电子设备
CN110839166B (zh) 一种数据共享方法及装置
CN112332999A (zh) 带宽分配方法、装置、设备及计算机可读存储介质
CN105550000B (zh) 一种移动端滑动插件的生成方法及系统
CN108845860B (zh) 一种quota管理方法、装置及电子设备
CN115168017B (zh) 一种任务调度云平台及其任务调度方法
JP6173226B2 (ja) 画像処理装置及び画像処理プログラム
JP7489478B2 (ja) タスク割り当て方法と装置、電子デバイス、コンピュータ可読媒体
CN115113947A (zh) 流程引擎的配置方法、终端设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21946822

Country of ref document: EP

Kind code of ref document: A1