Resource allocation method, device, electronic device and storage medium

By allocating basic resources according to the weighing weight of resources and controlling resource borrowing control, the problem of low resource utilization and high maintenance costs in existing technologies has been solved, and the efficient use and accurate allocation of resources are realized.

CN109767057BActive Publication Date: 2025-01-28BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN201811436573.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-11-28
Publication Date
2025-01-28
Estimated Expiration
2038-11-28

AI Technical Summary

Technical Problem

In the prior art, resource utilization is low, and first-come, first-served and on-demand allocation methods have problems such as unreasonable resource allocation and high maintenance costs.

Method used

By allocating the platform resources based on the pre -determined resource allocation weight, determine the number of basic resources of each user, and perform resource borrowing and control according to the user's resources to achieve the flexible allocation of resources.

Benefits of technology

Effectively improve the utilization of resource utilization, reduce the cost of resource maintenance, and improve the accuracy of pre -distribution of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109767057B_ABST
    Figure CN109767057B_ABST
Patent Text Reader

Abstract

The present application discloses a resource allocation method, which belongs to the field of computer technology and is used to solve the problem of low resource utilization in the prior art. The resource allocation method disclosed in the embodiment of the present application includes: allocating the resources of the platform according to the predetermined resource configuration weights matching each user, determining the basic resource quantity allocated to each user; and controlling resource transfer according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform. The resource allocation method disclosed in the embodiment of the present application performs preliminary resource allocation according to historical resource usage information when the platform is started, and then, during the operation of the platform, flexibly allocates resources according to the resource usage of each user, and handles the peaks and troughs of resource usage by transferring resources between users, thereby effectively improving resource utilization.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a resource allocation method, device, electronic device and storage medium. Background Art

[0002] With the development of Internet technology, there are more and more e-commerce platforms, which are not only for end customers, but also for many merchants. For example, a hotel reservation platform can be used as an agent for various hotel brands. It needs to connect with multiple suppliers in various links such as hotel information display, release, hotel reservation and customer service. Due to the limited platform resources, when multiple suppliers need to share limited resources, how to manage platform resources so that resources are fully and reasonably utilized is a key issue to improve system performance. There are two commonly used resource allocation methods in the prior art: first-come, first-served and on-demand allocation. First-come, first-served is to allocate resources to suppliers who have issued resource occupation requests first, until the supplier has used up the resources, and then release the resources. This method will cause the supplier who issued the resource request later to be unable to obtain resources, and the resource allocation is unreasonable. On-demand allocation is to manually allocate the number of resources to the supplier according to the supplier's needs. When there are many suppliers, this method needs to frequently modify the resource configuration due to the constant changes in the supplier's resource requirements, and the dimensional cost is high. In addition, when some suppliers apply for more resources but do not actually make full use of the resources, the resource utilization rate will be low. Summary of the invention

[0003] The present application provides a resource allocation method, which helps to improve resource utilization.

[0004] In order to solve the above problems, in a first aspect, an embodiment of the present application provides a resource allocation method, including:

[0005] Allocate platform resources according to a predetermined resource allocation weight that matches each user, and determine the basic resource quantity allocated to each user;

[0006] Resource secondment control is performed based on the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

[0007] In a second aspect, an embodiment of the present application provides a resource allocation device, including:

[0008] A resource pre-allocation module, used to allocate platform resources according to a predetermined resource configuration weight matching each user, and determine the basic resource quantity allocated to each user;

[0009] The resource secondment module is used to control resource secondment according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

[0010] In a third aspect, an embodiment of the present application further discloses an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the resource allocation method described in the embodiment of the present application when executing the computer program.

[0011] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the resource allocation method disclosed in the embodiment of the present application are performed.

[0012] The resource allocation method disclosed in the embodiment of the present application first allocates the resources of the platform according to the predetermined resource configuration weights that match each user, and determines the basic resource quantity allocated to each user; then, according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, resource secondment control is performed, which solves the problem of low resource utilization in the prior art. The resource allocation method disclosed in the embodiment of the present application performs preliminary resource allocation according to historical resource usage information when the platform is started, and then, during the operation of the platform, flexibly allocates resources according to the resource usage of each user, and handles the peaks and troughs of resource usage by seconding resources between users, effectively improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0014] Figure 1 is a flow chart of a resource allocation method according to Embodiment 1 of the present application;

[0015] Figure 2 is a schematic diagram of resource allocation in Embodiment 1 of the present application;

[0016] Figure 3 is a schematic diagram of resource borrowing in Example 1 of the present application;

[0017] Figure 4 This is a schematic diagram of resource recall in Example 1 of the present application;

[0018] Figure 5 This is a schematic diagram of resource return in Embodiment 1 of the present application;

[0019] Figure 6 This is one of the schematic diagrams of the structure of the resource allocation device of the second embodiment of the present application;

[0020] Figure 7 This is the second structural diagram of the resource allocation device of the second embodiment of the present application. DETAILED DESCRIPTION

[0021] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0022] Embodiment 1

[0023] This embodiment discloses a resource allocation method, such as Figure 1 As shown, the method includes: step 110 and step 120.

[0024] Step 110, allocating platform resources according to a predetermined resource configuration weight matching each user, and determining a basic resource quantity allocated to each user.

[0025] The resource allocation method disclosed in the embodiment of the present application is applicable to various e-commerce platforms that provide services to corporate users, such as hotel reservation platforms, restaurant reservation platforms, etc. The resources described in the embodiment of the present application can be network traffic, storage space, data distribution nodes, etc., which can be applied through network communication.

[0026] In order to facilitate readers to understand the technical solution of the present application, in this embodiment, resource allocation is applied to a hotel reservation platform, and the allocated resources are network traffic as an example to explain the specific technical solution of the present application in detail.

[0027] In specific implementation, when the platform is started, the resource configuration weight of each user is first determined based on the historical resource usage information of the user to be allocated resources in the platform. The resource configuration weight is used to indicate the proportion of resources allocated to the user. The resource configuration weight is proportional to the user's historical resource usage. The greater the user's historical resource usage, the greater the resource configuration weight of the user. Then, resources are pre-allocated to the user based on the resource configuration weight.

[0028] In some embodiments of the present application, the platform resources are allocated according to the predetermined resource configuration weights matching each user, and the basic resource quantity allocated to each user is determined, including: for each user, the interface response time of the user calling the resource access interface within the preset time period is sorted in order from the smallest to the smallest, and the interface response time of the Nth percentile is determined as the TPN interface response time; for each user, the product of the number of times the user calls the resource access interface within the preset time period and the TPN interface response time of the user is used as the resource configuration weight of the user; according to the resource configuration weight, the corresponding proportion of the basic resource quantity is allocated to each user. Wherein, N is a natural number greater than 80, and the preferred value of N is 99.

[0029] For example, the hotel reservation platform includes 100 hotel suppliers, which are marked as hotel supplier 1, hotel supplier 2, ... hotel supplier 100. First, obtain the number of interface calls made by the above 100 hotel suppliers in the past 30 days when uploading information, customers booking hotels, etc., as well as the interface response time of each call to the platform interface. Then, for each hotel supplier, such as hotel supplier 1, sort the interface response time of hotel supplier 1 calling the network interface in the above 30 days in order from smallest to smallest, and determine the 99th percentile interface response time as the TP99 interface response time of hotel supplier 1. Afterwards, the product of the number of interface calls made by hotel supplier 1 in the past 30 days to the platform's network interface and the TP99 interface response time of hotel supplier 1 is used as the resource allocation weight of hotel supplier 1, denoted as W 1 According to the above method, the resource allocation weights of hotel supplier 1 to hotel supplier 100 can be determined respectively, which are denoted as W 1 , W 2 ,…W 100 .

[0030] Then, the resource allocation weight W determined in the above steps is 1 , W 2 ,…W 100 , allocate a corresponding proportion of basic resource quantities to hotel suppliers 1 to 100. In some embodiments of the present application, network traffic can be pre-allocated to each hotel supplier using the following formula:

[0031] S i =Total number of resources*W i / (W 1+ W 2+ W 3 …+W n ), where 1≤i≤n. Specifically in this embodiment, n=100, S iIt is represented by the hotel supplier i and the number of allocated resources, W 1 , W 2 , W 3 ,…W n represents the resource allocation weights of hotel supplier 1, hotel supplier 2, ... hotel supplier n. Assume that the resources allocated to hotel supplier 1 to hotel supplier 100 are as follows: Figure 2 shown.

[0032] In other embodiments of the present application, the resource configuration weight of each user to whom resources are to be allocated in the platform may also be obtained by other methods in the prior art, which are not listed one by one in the embodiments of the present application.

[0033] Step 120: Control resource loan based on the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

[0034] In specific implementation, the resource borrowing control based on the basic resource quantity and the resource usage information of the user obtained during the platform operation includes at least one of the following: resource borrowing control based on the basic resource quantity and the resource usage information of the user obtained during the platform operation; resource recall control based on the basic resource quantity and the resource usage information of the user obtained during the platform operation; resource return control based on the basic resource quantity and the resource usage information of the user obtained during the platform operation.

[0035] Then, during the operation of the platform, the resources allocated to each user are flexibly allocated through the idea of ​​resource borrowing according to the actual resource usage of each user. For example, when hotel supplier 1 is at a peak of network demand, it can borrow network traffic from hotel suppliers 2 to 100 that have resources to lend, and return the borrowed network traffic to the hotel supplier when the network demand of hotel supplier 1 is at a low point or when a hotel supplier that lent network traffic to hotel supplier 1 is at a peak of network demand.

[0036] In the specific implementation, by setting up monitoring applications in the platform and calling the platform's resource management

[0037] In some embodiments of the present application, resource borrowing control is performed based on the basic resource quantity and the resource usage information of the user obtained during the platform operation, including: determining a first user who needs to borrow resources and a second user who does not need to borrow resources among the users based on the resource usage information of the user obtained during the platform operation; determining the number of extended resources corresponding to the first user based on the basic resource quantity allocated to the first user and the resource usage information of the first user obtained during the platform operation; for each of the second users, determining the number of resources that can be lent by the second user based on the basic resource quantity allocated to the second user and the resource usage information of the second user obtained during the platform operation; determining the actual number of resources lent corresponding to each of the second users based on the number of resources that can be lent by each of the second users and the extended resource quantity of the first user; and reallocating the idle resources that match the corresponding actual number of resources lent among the resources allocated to each of the second users to the first user. The following is combined with Figure 2 and Figure 3 Describe the resource borrowing control process.

[0038] In specific implementation, the platform can record the number of basic resources pre-allocated by each user, borrowed resource information, loaned resource information, etc. by maintaining a resource list. The borrowed resource information and loaned resource information can be represented by a borrowing voucher and a lending voucher, and the borrowing voucher and the lending voucher can include the serial number of the loan operation, the identity of the resource borrower, the identity of the resource lender, the number of borrowed or loaned resources, etc. When resources are reallocated, such as resource borrowing, resource recall, or resource return, the resource allocation and loan information recorded in the resource list are updated synchronously.

[0039] For example, by monitoring the user's resource usage, the resource usage information of each user is obtained. The resource usage information includes, but is not limited to: the number of idle resources, the TP99 resource occupancy time in the last L seconds, the number of interface calls in the last L seconds, and the current total number of resources. The current total number of resources is the sum of the number of pre-allocated resources and the number of borrowed resources. According to the resource usage information of the user obtained during the operation of the platform, determining the first user who needs to borrow resources and the second user who does not need to borrow resources includes: determining whether the user needs to borrow resources according to the number of idle resources of the user obtained during the operation of the platform, the TP99 resource occupancy time in the last L seconds, QPS (number of interface calls in the last L seconds), the current total number of resources, and the preset reserved resource coordination time; if it is determined that the user needs to borrow resources, the user is used as the first user; if it is determined that the user does not need to borrow resources, the user is used as the first user. In specific implementation, if the number of idle resources / (TP99 resource occupancy time in the last L seconds*QPS-1 / TP99 resource occupancy time)>reserved resource coordination time, it is determined that the user needs to borrow resources. The reserved resource coordination time is the minimum resource coordination time that can be tolerated and is configured according to the interface conditions. Figure 2 Among them, hotel supplier 1 needs to borrow resources, and hotel suppliers 2 to 100 do not need to borrow resources.

[0040] When determining the number of extended resources corresponding to the first user based on the number of basic resources allocated to the first user and the resource usage information of the first user obtained during the operation of the platform, the number of extended resources for each first user who needs to borrow resources can be calculated according to the formula: number of extended resources = TP99 resource occupation time in the last L seconds * QPS - current total number of resources, where QPS is the number of interface calls made by the current first user in the last L seconds, and the current total number of resources is the current number of resources of the current first user. During the operation of the platform, the total number of current resources of the first user = the number of pre-allocated basic resources + the number of borrowed resources - the number of lent resources. The number of extended resources is the number of resources required to maintain the normal interface call of the first user for a period of time thereafter, determined based on the resource usage of the first user in the last L seconds. Assume that the number of extended resources required by hotel supplier 1 is 3.

[0041] In specific implementation, it is also necessary to determine the number of resources that users who do not need to borrow resources can borrow, such as Figure 2In some embodiments of the present application, for each of the second users, according to the basic resource quantity allocated to the second user and the resource usage information of the second user obtained during the operation of the platform, when the second user can lend the number of resources, the formula can be used: the number of resources that can be lent = the number of idle resources - (the total number of resources - MAX (the same period of time, the number of used resources)), wherein the year-on-year number of resources is the TP99 value of the number of resources occupied by the second user in the historical period (such as 30 days), that is, the number of resources occupied by the second user in the historical period (such as 30 days) is sorted in order from small to large, and the number of occupied resources at the 99th position is taken. The total number of resources is the sum of the basic resource quantity of the second user and the number of resources currently borrowed. After calculation, it is assumed that the number of resources that hotel supplier 2 can lend is 1, hotel suppliers 3 to hotel suppliers 99 currently have no resources that can be lent, and the number of resources that hotel supplier 100 can lend is 1.

[0042] Next, the actual number of resources lent corresponding to each second user is determined based on the number of resources that can be lent by each second user and the number of extended resources of the first user. For example, the minimum value of the number of resources that can be lent by a second user and the number of extended resources of the first user is taken as the actual number of resources lent corresponding to the second user. And the idle resources in the resources of the second user that match the actual number of resources lent are reallocated to the first user. The number of extended resources of the first user is updated to: the number of extended resources - = the actual number of resources lent. For example, hotel supplier 1 first borrows 1 resource from hotel supplier 2, and then the resources that hotel supplier 1 needs to borrow, that is, the extended resources are updated to 2.

[0043] If the first user still needs to borrow resources, that is, the updated extended resource quantity is greater than 0, then continue to select a second user from other second users who can lend resources, and determine the actual number of lent resources corresponding to the second user based on the number of lent resources of the selected second user and the updated extended resource quantity of the first user. This continues until the first user no longer needs to borrow resources, or all second users who can lend resources have lent resources to the first user. Since hotel supplier 2 to hotel supplier 99 currently have no resources to lend, hotel supplier 1 continues to borrow resources from hotel supplier 100. Hotel supplier 1 can borrow at most 1 resource from hotel supplier 100, after which the extended resource quantity of hotel supplier 100 is updated to 1. After the resources are borrowed, if Figure 3 As shown, hotel supplier 1 currently has 5 resources allocated.

[0044] So far, hotel supplier 1 has borrowed all the resources that hotel suppliers can currently lend, but it still cannot meet the current resource demand. At this time, hotel supplier 1 will recall its lent resources.

[0045] In some embodiments of the present application, the resource recall control is performed based on the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, including: after allocating the idle resources among the resources allocated to each of the second users that match the corresponding actual loaned resource quantity to the first user, if the sum of the actual loaned resource quantities corresponding to each of the second users is less than the extended resource quantity, determining the fourth user who borrows resources from the first user and the resource quantity borrowed from the first user by each of the fourth users; and reallocating the resources borrowed from the first user by each of the fourth users to the first user.

[0046] In some embodiments of the present application, the platform will determine the hotel suppliers that borrow resources from hotel supplier 1 and the amount of resources borrowed based on the maintained resource list. Assuming that hotel supplier 4 borrowed 1 resource from hotel supplier 1 before the current time, the platform will reallocate one idle resource of hotel supplier 4 to hotel supplier 1. At this point, the hotel supplier has obtained all the resources currently needed. Figure 4 As shown, hotel supplier 1 has currently allocated 6 resources, and hotel supplier 2's current allocated resources have been reduced to 3.

[0047] In some embodiments of the present application, the resource return control is performed based on the basic resource quantity and the resource usage information of the user obtained during the platform operation, including: determining a third user among the users who has resource redundancy and has borrowed resources from other users based on the resource usage information of the user obtained during the platform operation; and reallocating the resources of the other users borrowed by the third user to the corresponding other users.

[0048] In a specific implementation, according to the resource usage information of the user obtained during the operation of the platform, a third user among the users with redundant resources and borrowing resources from other users is determined, including: determining the resource utilization rate of the user who has borrowed resources; when the resource utilization rate is less than the average resource utilization rate, the user is determined to be a third user. Then, the redundant resource quantity of each third user is determined by the formula: the number of redundant resources = the current total number of resources * (1-average resource utilization rate), so as to redistribute the resources borrowed by the third user to the user who lent the resource according to the number of redundant resources. In a specific implementation, the resource management list of the platform can record the lender of the resources borrowed by the user, and the number of resources borrowed from the lender. The platform returns the corresponding resources to the corresponding user according to the information in the resource management list, that is, redistributes them to the corresponding user. For example, when hotel supplier 1 is at a low point in network demand, resource redundancy occurs, then control is made to return 1 resource borrowed by hotel supplier 1 from hotel supplier 2 to hotel supplier 2, and return 1 resource borrowed by hotel supplier 1 from hotel supplier 100 to hotel supplier 100. After the resources are returned, the resource allocation of each hotel supplier is as follows: Figure 5 shown.

[0049] In this embodiment, the first user, second user, third user and fourth user are only user names defined to distinguish different identities. In different stages of resource allocation, the same user can be the first user, the second user, the third user or the fourth user. That is, during the operation of the platform, a user can be both a resource lender and a resource borrower.

[0050] The resource allocation method disclosed in the embodiment of the present application first allocates the resources of the platform according to the predetermined resource configuration weights that match each user, and determines the basic resource quantity allocated to each user; then, according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, resource secondment control is performed, which solves the problem of low resource utilization in the prior art. The resource allocation method disclosed in the embodiment of the present application performs preliminary resource allocation according to historical resource usage information when the platform is started, and then, during the operation of the platform, flexibly allocates resources according to the resource usage of each user, and handles the peaks and troughs of resource usage by seconding resources between users, effectively improving resource utilization.

[0051] The resource allocation method disclosed in the embodiment of the present application performs preliminary resource allocation based on historical resource usage information when the platform is started, and then flexibly allocates resources according to the resource usage of each user during the operation of the platform. There is no need to manually configure the resources allocated to the user. When the user's resource demand changes, there is no need to manually modify the configuration, which effectively reduces the resource maintenance cost. In addition, by analyzing the interface access situation over a period of history, the resource allocation weight of each user is determined, and resources are preliminarily allocated to the user based on the resource allocation weight, which also improves the accuracy of resource pre-allocation and further improves resource utilization.

[0052] In addition, in the prior art, for a user who newly accesses the platform, if resources are not manually allocated to the user, the user cannot successfully access the platform resources. However, through the resource allocation method disclosed in the embodiment of the present application, when a new user intervenes in the platform and applies for resources, resources can also be automatically allocated to the new user, making it more convenient for the user to access the platform.

[0053] Embodiment 2

[0054] This embodiment discloses a resource allocation device, such as Figure 6 As shown, the device comprises:

[0055] The resource pre-allocation module 610 is used to allocate the platform resources according to the predetermined resource configuration weights matching each user, and determine the basic resource quantity allocated to each user;

[0056] The resource secondment module 620 is used to control resource secondment according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

[0057] In some embodiments of the present application, Figure 7 As shown, the resource secondment module 620 further includes at least one of the following:

[0058] The resource borrowing submodule 6201 is used to perform resource borrowing control according to the basic resource quantity and the resource usage information of the user obtained during the platform operation;

[0059] The resource recall submodule 6202 is used to perform resource recall control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform;

[0060] The resource return submodule 6203 is used to perform resource return control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

[0061] In some embodiments of the present application, the resource borrowing submodule 6201 is further used to:

[0062] Determine, according to the resource usage information of the users obtained during the operation of the platform, a first user who needs to borrow resources and a second user who does not need to borrow resources among the users;

[0063] Determine the number of extended resources corresponding to the first user according to the number of basic resources allocated to the first user and the resource usage information of the first user obtained during the operation of the platform;

[0064] For each second user, determine the amount of resources that the second user can lend out according to the basic amount of resources allocated to the second user and the resource usage information of the second user obtained during the operation of the platform;

[0065] Determine the actual loaned resource quantity corresponding to each of the second users according to the loanable resource quantity of each of the second users and the extended resource quantity of the first user;

[0066] The idle resources that match the corresponding actual lent resource quantity among the resources allocated to each of the second users are reallocated to the first user.

[0067] In some embodiments of the present application, the resource recall submodule 6202 is further used to:

[0068] After allocating idle resources that match the corresponding actual lent resource quantity among the resources allocated to each of the second users to the first user, if the sum of the actual lent resource quantities corresponding to each of the second users is less than the extended resource quantity, determining a fourth user that borrows resources from the first user and the resource quantity that each of the fourth users borrows from the first user;

[0069] The resources of the first user are borrowed by each of the fourth users and reallocated to the first user.

[0070] In some embodiments of the present application, the resource return submodule 6203 is further used to:

[0071] According to the resource usage information of the user obtained during the operation of the platform, determining a third user among the users who has redundant resources and has borrowed resources from other users;

[0072] The resources of the other users borrowed by the third user are reallocated to corresponding other users.

[0073] In some embodiments of the present application, the resource pre-allocation module 610 is further used to:

[0074] For each user, the interface response time of the user calling the resource access interface within the preset time period is sorted in order from the smallest arrival, and the interface response time of the Nth percentile in the sorting is determined as the TPN interface response time;

[0075] For each user, the product of the number of times the user calls the resource access interface within the preset time period and the TPN interface response time of the user is used as the resource configuration weight of the user;

[0076] According to the resource configuration weight, a corresponding proportion of basic resource quantity is allocated to each user.

[0077] The resource allocation device disclosed in the embodiment of the present application is used to implement the various steps of the resource allocation method described in Embodiment 1 and Embodiment 2 of the present application. The specific implementation methods of each module of the device refer to the corresponding steps and will not be repeated here.

[0078] The resource allocation device disclosed in the embodiment of the present application first allocates the resources of the platform according to the predetermined resource configuration weights matching each user, and determines the basic resource quantity allocated to each user; then, according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, resource transfer control is performed, which solves the problem of low resource utilization in the prior art. The resource allocation method disclosed in the embodiment of the present application performs preliminary resource allocation according to historical resource usage information when the platform is started, and then, during the operation of the platform, flexibly allocates resources according to the resource usage of each user, and handles the peaks and troughs of resource usage by transferring resources between users, effectively improving resource utilization.

[0079] The resource allocation device disclosed in the embodiment of the present application performs preliminary resource allocation based on historical resource usage information when the platform is started, and then flexibly allocates resources according to the resource usage of each user during the operation of the platform. There is no need to manually configure the resources allocated to the user. When the user's resource demand changes, there is no need to manually modify the configuration, which effectively reduces the resource maintenance cost. In addition, by analyzing the interface access situation over a period of history, the resource allocation weight of each user is determined, and resources are preliminarily allocated to the user based on the resource allocation weight, which also improves the accuracy of resource pre-allocation and further improves resource utilization.

[0080] In addition, in the prior art, for a user who newly accesses the platform, if resources are not manually allocated to the user, the user cannot successfully access the platform resources. However, through the resource allocation device disclosed in the embodiment of the present application, when a new user intervenes in the platform and applies for resources, resources can also be automatically allocated to the new user, making it more convenient for the user to access the platform.

[0081] Accordingly, the present application also discloses an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the resource allocation method as described in Embodiment 1 of the present application when executing the computer program. The electronic device may be a PC, a mobile terminal, a personal digital assistant, a tablet computer, etc.

[0082] The present application also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps of the resource allocation method described in the first embodiment of the present application are implemented.

[0083] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0084] The above is a detailed introduction to a resource allocation method and device provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

Claims

1. A resource allocation method, characterized in that: The resource allocation is applied to a hotel reservation platform, including: for each user, sorting the interface response time of the user calling the resource access interface within a preset time period in ascending order, and determining the interface response time of the Nth percentile in the sorting as the TPN interface response time, and the user is a hotel supplier; For each user, the product of the number of times the user calls the resource access interface within the preset time period and the TPN interface response time of the user is used as the resource configuration weight of the user; According to the resource allocation weight, a corresponding proportion of basic resources is allocated to each user; Resource secondment control is performed based on the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, and the resource is network traffic.

2. The method according to claim 1, characterized in that The step of controlling resource secondment according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform includes at least one of the following: Perform resource borrowing control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform; Perform resource recall control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform; Resource return control is performed according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform.

3. The method according to claim 2, characterized in that The step of performing resource borrowing control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform includes: Determine, according to the resource usage information of the users obtained during the operation of the platform, a first user who needs to borrow resources and a second user who does not need to borrow resources among the users; Determine the number of extended resources corresponding to the first user according to the number of basic resources allocated to the first user and the resource usage information of the first user obtained during the operation of the platform; For each second user, determine the amount of resources that the second user can lend out according to the basic amount of resources allocated to the second user and the resource usage information of the second user obtained during the operation of the platform; Determine the actual loaned resource quantity corresponding to each of the second users according to the loanable resource quantity of each of the second users and the extended resource quantity of the first user; The idle resources that match the corresponding actual lent resource quantity among the resources allocated to each of the second users are reallocated to the first user.

4. The method according to claim 3, characterized in that The step of performing resource recall control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform includes: After allocating idle resources that match the corresponding actual lent resource quantity among the resources allocated to each of the second users to the first user, if the sum of the actual lent resource quantities corresponding to each of the second users is less than the extended resource quantity, determining a fourth user that borrows resources from the first user and the resource quantity that each of the fourth users borrows from the first user; The resources of the first user are borrowed by each of the fourth users and reallocated to the first user.

5. The method according to claim 2, characterized in that: The step of performing resource return control according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform includes: According to the resource usage information of the user obtained during the operation of the platform, determining a third user among the users who has redundant resources and has borrowed resources from other users; The resources of the other users borrowed by the third user are reallocated to corresponding other users.

6. A resource allocation device, characterized in that: The resource allocation is applied to a hotel reservation platform, including: a resource pre-allocation module, which is used to sort the interface response time of each user calling a resource access interface within a preset time period in ascending order, and determine the interface response time of the Nth percentile in the sorting as the TPN interface response time, and the user is a hotel supplier; For each user, the product of the number of times the user calls the resource access interface within the preset time period and the TPN interface response time of the user is used as the resource configuration weight of the user; According to the resource allocation weight, a corresponding proportion of basic resources is allocated to each user; The resource secondment module is used to control resource secondment according to the basic resource quantity and the resource usage information of the user obtained during the operation of the platform, and the resource is network traffic.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the resource allocation method according to any one of claims 1 to 5 is implemented.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the resource allocation method described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Resource distribution method and device

    CN106375115A

  • Resource configuration method, electronic device and storage medium

    CN107909308A