Resource allocation method for cloud server, and scheduling apparatus
By adjusting the allocation of exclusive resources and shared resources in the cloud server according to the user's dynamic resource needs, the problem of resource waste and tight use of cloud servers is solved, and resource utilization and cost-effectiveness are improved.
Patent Information
- Application Number
- PCT/CN2024/087060
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-04-14
- Filing Date
- 2024-04-10
- Publication Date
- 2024-10-17
AI Technical Summary
The resource allocation method of cloud servers is difficult to adapt to the dynamically fluctuating resource needs of users, leading to resource waste or tight usage.
After the cloud server is initialized, the allocation of exclusive resources is dynamically adjusted according to the user's resource needs in the target time period, combined with the use of shared resources, to ensure that resources are allocated on demand.
It realizes the dynamic allocation of exclusive resources, avoids the situation where static resources cannot meet dynamic needs, reduces resource waste and usage tension, and improves resource utilization and cost-effectiveness.
Smart Images

Figure CN2024087060_17102024_PF_FP_ABST
Abstract
Description
Resource allocation method and scheduling device for cloud server
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on April 14, 2023, with application number CN202310418394.1 and invention name “Resource Allocation Method and Scheduling Device for Cloud Server”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computer technology, and in particular to a resource allocation method and a scheduling device for a cloud server. Background Art
[0003] Cloud servers offer various resource delivery options, including exclusive resources. The size of these exclusive resources is determined during cloud server initialization and cannot be changed during use. To ensure data stability, cloud server users typically determine the size of these exclusive resources based on peak resource demand. However, resource demand does not remain constant, but rather fluctuates significantly. This results in wasted resource costs during low-data periods and limited resource usage during peak data periods.
[0004] Therefore, the cloud server resource allocation method in the related art is difficult to adapt to the dynamically fluctuating resource demands of users, resulting in a waste of cloud server resources or a problem of tight resource usage on the part of users.
[0005] It should be noted that this section is intended to provide a background or context for the embodiments of the present invention recited in the claims, and should not be considered an admission that the description herein is prior art simply by virtue of its inclusion in this section.
[0006] Summary of the Invention
[0007] The cloud server resource allocation method and scheduling device provided by the embodiments of the present invention at least solve the problem that the cloud server resource allocation method in the related art is difficult to adapt to the dynamically fluctuating resource demands of users, resulting in waste of cloud server resources or tight resource usage of users.
[0008] An embodiment of the present invention provides a resource allocation method for a cloud server, the method comprising: after the cloud server initially allocates exclusive resources to a user, obtaining the resource requirements of the user in a target time period, wherein the exclusive resources are cloud server resources that are pre-allocated to the user and used exclusively by the user; modifying the allocation information of the exclusive resources of the user according to the resource requirements; and allocating exclusive resources to the user in the target time period according to the allocation information.
[0009] The beneficial effects of the embodiments of the present invention are as follows: allocation information is reconfigured before the target time period based on the resource requirements of the user in the target time period, and resources are allocated according to the allocation information during the target time period. This enables dynamic allocation of exclusive resources, thereby ensuring that the exclusive resources allocated are dynamically adjusted according to the user's requirements. This avoids the situation where static exclusive resources are unable to meet dynamically fluctuating resource requirements, and solves the problem of resource waste or resource shortage for cloud server users.
[0010] As an optional implementation, obtaining the resource demand of the user in the target time period includes: determining the resource demand based on the demand information input by the user; or predicting the resource demand based on the historical data of resource allocation by the user, wherein the historical data is the information of resource allocation by the user in the historical time period.
[0011] The user's resource requirements can be determined based on the demand information they input, better matching the actual resource needs of the applicable party. The user's resource needs can also be predicted based on their historical data, eliminating the need for the user to participate in the dynamic adjustment of resource allocation, improving the user experience and avoiding additional workload. This allows users to choose based on their actual needs, increasing the flexibility of the solution.
[0012] As an optional implementation, predicting the resource demand based on the historical data of resource allocation by the user includes: collecting historical load data of the cloud server and extracting the historical data, wherein the historical load data includes historical data of the cloud server providing resources to the user; and predicting the resource demand based on the historical data.
[0013] The cloud server's historical load data is used to extract historical data and predict the user's resource needs. This eliminates the need for the user to provide historical data, improving the efficiency of demand forecasting.
[0014] As an optional implementation, the historical data includes the allocation historical data of each demand level within the historical time period, and the historical load data of the cloud server is collected. Extracting the historical data includes: using the resource data occupied by the data with a demand level reaching a preset level in the historical load data as the allocation historical data of the exclusive resources.
[0015] Based on the resource data occupied by data reaching a preset demand level, historical data on exclusive resource allocation is extracted from historical load data. By using the exclusive resources corresponding to the historical load data determined based on the preset level classification, rather than directly using the exclusive resources recorded in the historical load data as allocation data, historical data can be more closely aligned with user needs and avoid inaccurate resource demand forecasts due to changes in usage demand.
[0016] As an optional implementation, modifying the allocation information of the exclusive resources of the user according to the resource demand includes: generating corresponding pre-allocation information according to the resource demand, wherein the resource data allocated in the pre-allocation information is the same as the resource data in the resource demand; sending the verification information required for the pre-allocation information to the user; and if the verification is passed, using the pre-allocation information as the allocation information.
[0017] Since cloud server resources have been reallocated, the allocated resources have also changed, which will affect the use of the user. Therefore, it is necessary to first determine the pre-allocation information based on resource requirements and send it to the user for verification and confirmation. If the verification and confirmation are passed, the pre-allocation information will be used as the allocation information for resource allocation.
[0018] As an optional implementation, the verification required for the pre-allocation information includes payment verification, the verification information of the payment verification includes a payment link, and sending the verification information required for the pre-allocation information to the user includes: sending the payment link of the payment verification to the user; when the payment link feedback indicates that the payment is successful, it is determined that the payment verification is passed.
[0019] The resources of the cloud server are provided for a fee, and payment verification can be performed through a paid link. If the payment verification is passed, the pre-allocation information will be used as the allocation information to allocate resources in the target time period.
[0020] As an optional implementation, in the target time period, allocating exclusive resources to the user according to the allocation information includes: obtaining current allocation information of the user for resource allocation in the current time period, wherein the target time period is the next time period of the current time period; when the current allocation information is inconsistent with the allocation information, adjusting the current allocation information to the allocation information in the target time period; when the current allocation information is consistent with the allocation information, performing resource allocation according to the current allocation information in the target time period.
[0021] When allocating resources to cloud servers based on allocation information, the current allocation information for the current time period can be compared to see if they are the same. If they are different, reallocation can be performed; if they are the same, no reallocation is performed. This can improve the efficiency of reallocation and avoid unnecessary reallocation.
[0022] As an optional implementation, the cloud server resources also include shared resources, and the method further includes: when the exclusive resources do not meet the usage requirements, calling the shared resources to provide them to the user; after the shared resources are used up, releasing the shared resources.
[0023] The resources of the cloud server also include shared resources, which can be used in conjunction with dynamically adjusted exclusive resources to meet the user's sudden resource needs, ensuring that the user has sufficient resources to occupy in an emergency and ensuring the user's resource use.
[0024] An embodiment of the present invention provides a scheduling device for resource allocation of a cloud server, comprising: a console and a resource adjustment unit; the console is used to obtain the resource requirements of a user in a target time period after the cloud server initially allocates exclusive resources to the user; the allocation information of the exclusive resources of the user is modified according to the resource requirements, wherein the exclusive resources are cloud server resources that are pre-allocated to the user and used exclusively by the user; the resource adjustment unit is connected to both the console and the cloud server, and is used to allocate exclusive resources to the user in the target time period according to the allocation information.
[0025] The beneficial effects of the embodiments of the present invention are as follows: allocation information is reconfigured before the target time period based on the resource requirements of the user in the target time period, and resources are allocated according to the allocation information during the target time period. This enables dynamic allocation of exclusive resources, thereby ensuring that the exclusive resources allocated are dynamically adjusted according to the user's requirements. This avoids the situation where static exclusive resources are unable to meet dynamically fluctuating resource requirements, and solves the problem of resource waste or resource shortage for cloud server users.
[0026] As an optional implementation, the scheduling device also includes a load data collection unit, which is connected to the cloud server and is used to collect historical load data of the cloud server and extract historical data, wherein the historical load data includes historical data of the cloud server providing resources to the user, and the historical data is information on resource allocation by the user within a historical time period; the load data collection unit is also connected to the resource adjustment unit and is used to predict the resource demand based on the historical data of resource allocation by the user, and send it to the resource adjustment unit for resource allocation to the cloud server.
[0027] This approach leverages historical load data recorded by cloud servers and extracts historical data to predict user resource needs. This eliminates the need for users to provide historical data, improving demand forecasting efficiency. User resource needs can be predicted based on their historical data, eliminating the need for users to participate in dynamic resource allocation adjustments. This improves the user experience and minimizes workload. This allows for flexible solutions based on actual needs.
[0028] An embodiment of the present invention provides an electronic device, comprising: a processor, and a memory storing a program, wherein the program comprises instructions, and when the instructions are executed by the processor, the processor executes any one of the cloud server resource allocation methods described above.
[0029] An embodiment of the present invention provides a non-transitory machine-readable medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the cloud server resource allocation methods described above.
[0030] The details of one or more embodiments of the invention are set forth in the accompanying drawings and the description below so that other features, objects, and advantages of the invention are more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other embodiments can be derived from these drawings without inventive effort.
[0032] FIG1 is a flow chart of a resource allocation method for a cloud server according to an embodiment of the present invention;
[0033] FIG2 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention;
[0034] FIG3 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention;
[0035] FIG4 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention;
[0036] 5 is a schematic diagram of allocating CPU usage in a solution combining dynamic exclusive resources and shared resources according to an embodiment of the present invention;
[0037] FIG6 is a schematic diagram of a scheduling device for resource allocation of a cloud server according to an embodiment of the present invention;
[0038] 7 is a block diagram of a scheduling device using a combination of dynamic exclusive resources and shared resources according to an embodiment of the present invention;
[0039] FIG8 is a schematic structural diagram of the electronic device of this embodiment. DETAILED DESCRIPTION
[0040] The following describes embodiments of the present invention in more detail with reference to the accompanying drawings. Although certain embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be construed as being limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present invention. It should be understood that the accompanying drawings and embodiments of the present invention are for illustrative purposes only and are not intended to limit the scope of protection of the present invention.
[0041] Elastic computing allows you to quickly scale processing, memory, and storage resources up or down to meet your changing resource needs, without having to worry about capacity planning and engineering for peak usage. Elastic computing matches allocated resources to actual demand without interrupting operations. The flexibility of cloud servers eliminates the need to pay for unused or idle resources, and eliminates the need to invest in or maintain additional resources and equipment.
[0042] A cloud server is a computing service provided by cloud computing. It is a simulated server on which customers can install and run operating systems and applications.
[0043] In related technologies, elastic computing cloud servers have various resource delivery forms, including static exclusive resources, static exclusive resources + unregulated shared resources (shared resources are freely contested), static exclusive resources + regulated shared resources (shared resources are subject to conditional restrictions), and shared resources (completely free to contest). The details are as follows:
[0044] The first type is static, exclusive resources. In this resource delivery model, a cloud server's performance metric is statically specified at a maximum value, and this maximum is guaranteed to be achieved. For example, a cloud server's network bandwidth specification of 1 Gbps means that its network communication can reach this maximum value and will actually reach it when needed. The advantage is guaranteed performance; the disadvantage is that on the one hand, it can be wasteful, as most cloud servers typically don't use their specified performance limits most of the time; on the other hand, performance suffers, and when performance beyond the baseline is required, it cannot be met.
[0045] The second type is static exclusive resources + shared resources. This resource delivery model partially offsets some of the shortcomings of the first model, allowing cloud servers to access greater performance capacity than static exclusive resources when needed. This means that their performance can dynamically burst. This dynamic bursting model can be divided into two types: one is regulated, allowing bursts of, for example, 10 minutes within an hour, using a points-based approach. However, the disadvantage of this approach is that performance can still be compromised. The other is unregulated, allowing different cloud servers on the same physical server to freely compete for resources based on a baseline. The disadvantage of this approach is that burst performance is not guaranteed. However, due to the existence of static exclusive resources, the problem of wasted resource reservations still exists.
[0046] The third type is shared resources. This resource delivery model lacks a baseline for exclusive resources, or only has weakly guaranteed baselines for exclusive resources. Cloud servers compete for limited shared resources. The advantage is that you can achieve maximum performance when others don't need it. The disadvantage is that contention is easily triggered, leading to resource runs.
[0047] Regardless of the resource delivery model used in related technologies, the size of static exclusive resources allocated to cloud servers is fixed and cannot be changed during the use of the cloud server. To ensure data stability, cloud server users generally determine the size of these exclusive resources based on peak resource demand.
[0048] Exclusive resources have a higher unit price than shared resources, which results in wasted resources during low-data-hours. Using shared resources during high-data-hours can lead to resource competition and tight resource usage.
[0049] In order to solve the problem that the cloud server resource allocation method in the related art is difficult to adapt to the dynamically fluctuating resource demands of users, resulting in wasted cloud server resources or tight resource utilization of users, this embodiment proposes a cloud server resource allocation method that can dynamically adjust the size of exclusive resources according to the load characteristics of the cloud server and the resource planning of the user, while ensuring resource certainty and saving resource reservation costs. This method can effectively help users reduce cloud migration costs and further improve the resource utilization of cloud servers.
[0050] The resource allocation method for a cloud server provided in this specification can be applied to electronic devices that schedule cloud server resources. The electronic devices may include notebooks, desktop computers, smart phones, smart wearable devices (virtual reality glasses, smart watches, etc.), tablet computers, etc. Of course, the resource allocation method for a cloud server provided in this specification can also be applied to applications running on the above-mentioned electronic devices. For example, the resource allocation method for a cloud server can be applied to a browser with instant messaging function, or it can be applied to instant messaging software.
[0051] FIG1 is a flow chart of a resource allocation method for a cloud server according to an embodiment of the present invention. As shown in FIG1 , a resource allocation method for a cloud server provided by an embodiment of the present invention includes the following steps:
[0052] Step S101: After the cloud server initially allocates exclusive resources to the user, the resource requirements of the user in the target time period are obtained, wherein exclusive resources are cloud server resources that are pre-allocated to the user and used exclusively by the user;
[0053] Step S102, modifying the allocation information of the user's exclusive resources according to resource requirements;
[0054] Step S103: Allocate exclusive resources to the user according to the allocation information during the target time period.
[0055] The cloud server resource allocation method provided in the embodiments of the present invention can be applied to and executed by a scheduling device. Because allocation information is reconfigured before a target time period based on a user's resource needs during that time period, resource allocation is performed during that time period based on the allocation information. This allows for dynamic allocation of exclusive resources, ensuring that the allocated exclusive resources are dynamically adjusted based on demand. This avoids the situation where static exclusive resources are unable to meet dynamically fluctuating resource needs, thereby resolving the resource waste or resource shortage issues faced by cloud server users.
[0056] During initialization, the aforementioned cloud servers will perform an initial resource allocation, typically based on default values, but also on values set prior to initialization. During initial allocation, resources are allocated differently based on different allocation schemes. For example, if the allocation scheme is exclusive resources, only exclusive resources are allocated. If the allocation scheme is exclusive resources + shared resources, both exclusive and shared resources are allocated. If the allocation scheme is shared resources, only shared resources are allocated.
[0057] Normally, after the initial allocation, exclusive resources are static and cannot be changed. Exclusive resources provide a strong guarantee for the resource needs of the user. The inability to change exclusive resources will lead to greater volatility in the resource needs of the user. When the user's demand is large, it will lead to resource shortages. When the user's demand is small, it will lead to a waste of exclusive resources.
[0058] To this end, the embodiment of the present application obtains the resource demands of users in different time periods, including the demands for exclusive resources, and reallocates the resources of the cloud server according to their demands. The reallocation is mainly for exclusive resources, which can realize dynamic adjustment of exclusive resources to meet the fluctuating resource demands of users.
[0059] The resources of the above-mentioned cloud servers include but are not limited to central processing units (CPUs), memory, graphics processing units (GPUs), disks, etc., as well as performance indicators in various dimensions of computing, network, and storage, such as network bps (bits per second), pps (packets per second, transmission rate in units of network packets), cps (cyber-physical system), session, storage bps (bits per second), iops (the number of I / O requests that the system can process per unit time), etc.
[0060] Since cloud servers also include shared resources, the dynamic resource allocation of this embodiment can also be applied to the allocation of shared resources. That is, resource demand includes shared resource demand, and allocation information includes shared resource allocation information. Specifically, the shared resource demand of a cloud server user during a target time period can be obtained, and the user's shared resource allocation information can be determined based on the shared resource demand. During the target time period, the user's cloud server resources can be allocated based on the shared resource allocation information.
[0061] Given the inherent dynamic adjustment capabilities of shared resources, dynamic resource allocation by time period can take into account the resource needs of multiple users and allocate limited shared resources. This ensures that each time period has a reasonable initial amount of shared resources to minimize resource runs. This allows for more rational allocation of cloud server resources, ensuring that the resource needs of multiple users of the cloud server are appropriately distributed.
[0062] The allocation information of the user is determined based on resource demand. In theory, equal or appropriate surplus resources can be allocated based on the resources required by the user. However, since cloud servers usually have to connect to many users, both exclusive and shared resources are limited resources and are usually provided to users for a fee.
[0063] Therefore, when determining the allocation information of the user based on resource requirements, pre-allocation information can be generated and sent to the user for verification and confirmation. The user can also take this opportunity to make appropriate adjustments to the pre-allocation information. After the user verifies and confirms it, the subsequent resource reallocation can be carried out according to the verified and confirmed pre-allocation information as the allocation information.
[0064] After obtaining the allocation information, the user's cloud server resources are allocated according to the allocation information during the target time period. This can be achieved by utilizing the functional device that performs resource allocation during cloud server initialization. Alternatively, a separate device with resource allocation functionality can be set up for this purpose, using the same principle as resource allocation during cloud server initialization.
[0065] When allocating resources during the target time period, allocations can be made according to the allocation information. If the allocation information only includes allocations for exclusive resources, only the exclusive resources can be reallocated. If the allocation information includes allocations for both exclusive and shared resources, both exclusive and shared resources can be allocated.
[0066] FIG2 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention. As shown in FIG2 , another embodiment of the present invention further provides another cloud server resource allocation method, which is applied to the above-mentioned scheduling device. Optionally, the cloud server resource allocation method provided by the embodiment of the present invention can be used in step S101 provided in the above-mentioned embodiment. In the above-mentioned step S101, obtaining the resource requirements of the user in the target time period includes:
[0067] Step S201, determining resource requirements based on the demand information input by the user;
[0068] Alternatively, in step S202, resource demand is predicted based on historical data of resource allocation performed by the user, wherein the historical data is information on resource allocation performed by the user within a historical time period.
[0069] The cloud server resource allocation method provided in the embodiments of the present invention can better meet the actual resource needs of the applicable party because the user's resource requirements can be determined based on the user's input demand information. The user's resource requirements can also be predicted based on the user's historical data. Since the user does not need to actually participate in the dynamic adjustment of resource allocation, the user experience can be improved and the user's workload can be avoided. During use, the user can choose according to the actual situation, increasing the flexibility of the solution.
[0070] In other embodiments, the method of inputting demand information according to the user and the method of predicting resource demand according to historical data may be combined to determine the final resource demand.
[0071] Specifically, resource requirements can be predicted based on historical resource allocation data. The predicted resource requirements are then sent to the user, who can then modify them based on the predicted resource requirements and enter more appropriate demand information to finalize their resource requirements. The user can also directly confirm the predicted resource requirements, which will serve as the basis for resource allocation during the target time period.
[0072] This will result in more accurate resource requirements and improve the accuracy of resource allocation in the target time period.
[0073] The above-mentioned demand information input by the user can be executed through an interactive interface or interactive device with the user. When it is necessary to obtain resource requirements, the interactive interface or interactive device displays an input interface for demand information, and the user enters the demand information based on the input interface. The above-mentioned demand information may include resource usage and specific values of various resource parameters.
[0074] The above-mentioned prediction of resource demand based on the historical data of resource allocation by users can be made using artificial intelligence models, linear regression, and other prediction methods that can predict subsequent data development conditions based on the development trends of historical data.
[0075] Taking the prediction method of artificial intelligence model as an example, the artificial intelligence model can be trained with training data first. The training data includes historical data and resource data of the time period to be predicted. After the artificial intelligence model training converges, the above historical data is input into the artificial intelligence model, and the artificial intelligence model outputs the predicted resource demand for the target time period.
[0076] As an optional implementation method, resource demand is predicted based on the historical data of resource allocation by the user, including: collecting historical load data of the cloud server, extracting historical data, wherein the historical load data includes historical data of resources provided by the cloud server to the user; and predicting resource demand based on the historical data.
[0077] The cloud server's historical load data is used to extract historical data and predict the user's resource needs. This eliminates the need for the user to provide historical data, improving the efficiency of demand forecasting.
[0078] The above-mentioned cloud server itself has the function of recording the user's resource usage and actual allocation. Since the user's resource usage is part of the load relative to the cloud server, the above-mentioned user's resource usage and timing allocation on the cloud server are collectively referred to as historical load data.
[0079] When collecting historical load data for a cloud server, you can obtain historical load data for the historical time period corresponding to the aforementioned historical data from the cloud server. Alternatively, you can obtain historical load data that includes the historical time period. It should be noted that, given the large amount of load data for a historical time period and the fact that dynamic resource adjustments are performed periodically, there may be overlap in the historical data used to predict resource demand during multiple dynamic resource adjustments.
[0080] To address this situation, after acquiring historical load data, you can cache it for a suitable period of time. Before each acquisition of historical load data, you can perform a check to determine if there is any overlap in historical data. If the historical data required for the current demand forecast overlaps with the cached historical load data, you can determine the additional historical load data to acquire based on the existing cached historical load data. Then, you can retrieve the corresponding additional historical load data from the cloud service. This can effectively speed up the acquisition of historical load data, reduce the amount of data acquired, and minimize resource usage.
[0081] Reasonable use of the cloud server's own functions and existing historical load data can directly extract historical data, avoiding the need to collect data from users separately to obtain historical data, which will increase the burden of data acquisition and lead to low data acquisition efficiency.
[0082] As an optional implementation method, the historical data includes the allocation historical data of each demand level within the historical time period, and the historical load data of the cloud server is collected. The extraction of historical data includes: using the resource data occupied by the data with a demand level reaching a preset level in the historical load data as the allocation historical data of exclusive resources.
[0083] Based on the resource data occupied by data reaching a preset demand level, historical data on exclusive resource allocation is extracted from historical load data. By using the exclusive resources corresponding to the historical load data determined based on the preset level classification, rather than directly using the exclusive resources recorded in the historical load data as allocation data, historical data can be more closely aligned with user needs and avoid inaccurate resource demand forecasts due to changes in usage demand.
[0084] Since exclusive resources are intended to provide users with stronger guarantees, stronger guarantees are relative. In this embodiment, data with a demand level that reaches a preset level is considered data that users need to have stronger guarantees for. In contrast, weaker guarantees can be understood as data with a demand level that does not reach the preset level.
[0085] When extracting historical data from historical load data, the resource requirements of users are usually not deliberately divided into strong or weak guarantees. In addition, the urgency of data resources with different demand levels varies in different time periods, that is, the range of data with strong or weak guarantees in different time periods is different.
[0086] Therefore, it's necessary to identify data with stronger guarantees based on demand levels, thereby determining the actual demand for exclusive resources by users within historical data. This, rather than the data partitioning used to allocate exclusive resources at the time, can better align with resource demand during the target time period, thereby improving the accuracy of resource demand forecasts.
[0087] FIG3 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention. As shown in FIG3 , another cloud server resource allocation method according to an embodiment of the present invention is also provided, which is applied to the above-mentioned scheduling device. Optionally, the cloud server resource allocation method provided by the embodiment of the present invention can be used in step S102 provided in the above-mentioned embodiment. In the above-mentioned step S102, modifying the allocation information of the user's exclusive resources according to resource requirements includes:
[0088] Step S301, generating corresponding pre-allocation information according to resource requirements, wherein the resource data allocated in the pre-allocation information is the same as the resource data in the resource requirements;
[0089] Step S302, sending the verification information required for the pre-allocated information to the user;
[0090] Step S303: If the verification is successful, the pre-allocation information is used as the allocation information.
[0091] The resource allocation method of the above-mentioned cloud server provided in the embodiment of the present invention is that since the cloud server resources are redistributed, the allocated resources are also changed, which will affect the use of the user. Therefore, it is necessary to first determine the pre-allocation information based on the resource demand and send it to the user for verification and confirmation. If the verification and confirmation are passed, the pre-allocation information is used as the allocation information to perform resource allocation.
[0092] This pre-allocation information can allocate resources equal to or with a moderate surplus based on the user's resource requirements. In other words, the resource data allocated in the pre-allocation information can be the same as the resource data in the resource requirement, or it can be moderately larger than the resource data in the resource requirement. The purpose of allocating a moderate surplus is to fully cover the resource requirements and avoid under-satisfaction of resource requirements due to performance issues.
[0093] However, since the pre-allocation information needs to be sent to the user for verification, the user can also make appropriate modifications during verification. In this embodiment, the pre-allocation information is the same as the resource data in the resource demand to avoid unnecessary resource occupation. After confirming that the verification is passed, an appropriate amount of surplus can be made to obtain the above allocation information.
[0094] The above verification and confirmation methods can be used for various verifications, including permission verification, identity verification, security verification, payment verification, etc., to ensure the user's initiative in resource adjustment and avoid malicious attacks causing losses to the user.
[0095] The above-mentioned sending of the verification information required for the pre-allocated information to the user can also be performed through the above-mentioned interactive interface or interactive device, where a verification interface is displayed and the user performs operations based on the verification interface to perform verification.
[0096] It should be noted that the verification operation can be performed by interacting with data on different pages or third-party devices according to the verification requirements.
[0097] As an optional implementation, the verification required for the pre-allocation information includes payment verification, and the verification information of the payment verification includes a payment link. Sending the verification information required for the pre-allocation information to the user includes: sending the payment link of the payment verification to the user; when the payment link feedback indicates that the payment is successful, it is determined that the payment verification is passed.
[0098] The resources of the cloud server are provided for a fee, and payment verification can be performed through a paid link. If the payment verification is passed, the pre-allocation information will be used as the allocation information to allocate resources in the target time period.
[0099] The above payment link can jump to a third-party payment server or a third-party payment page for payment. After the payment is successful, the third-party payment server will feedback the payment success information to confirm that the payment verification is passed.
[0100] As an optional implementation, allocating exclusive resources to the user according to the allocation information in the target time period includes: obtaining the current allocation information of the user for resource allocation in the current time period, wherein the target time period is the next time period of the current time period; when the current allocation information is inconsistent with the allocation information, adjusting the current allocation information to the allocation information in the target time period; when the current allocation information is consistent with the allocation information, performing resource allocation according to the current allocation information in the target time period.
[0101] When allocating resources to cloud servers based on allocation information, the current allocation information for the current time period can be compared to see if they are the same. If they are different, reallocation can be performed; if they are the same, no reallocation is performed. This can improve the efficiency of reallocation and avoid unnecessary reallocation.
[0102] FIG4 is a flow chart of another cloud server resource allocation method according to an embodiment of the present invention. As shown in FIG4 , another cloud server resource allocation method is also provided in an embodiment of the present invention, which is applied to the above-mentioned scheduling device. Optionally, the cloud server resources also include shared resources. In addition to steps S101-S103, the cloud server resource allocation method further includes:
[0103] Step S401: when exclusive resources do not meet the usage requirements, shared resources are called to provide to the user;
[0104] Step S402: After the shared resource is used up, the shared resource is released.
[0105] The resource allocation method of the cloud server provided in the embodiment of the present invention, since the resources of the cloud server also include shared resources, can be used in conjunction with dynamically adjusted exclusive resources to meet the sudden resource needs of the user, ensure that the user has sufficient resources to occupy in an emergency situation, and ensure the user's resource utilization.
[0106] This embodiment is based on the original resource delivery method of the cloud server and can provide a "dynamic exclusive resource + shared resource" method.
[0107] Figure 5 is a schematic diagram of allocating CPU usage in a dynamic exclusive resource and shared resource combination solution in an embodiment of the present invention. As shown in Figure 5, when the cloud server is initialized, that is, when time is 0, there is an initial exclusive resource and shared resource allocation ratio, and 80% of the CPU utilization can be allocated as exclusive resources and the remaining 20% as shared resources.
[0108] During cloud server operation, as time passes, exclusive resource allocation can be adjusted as needed to meet resource demands requiring stronger guarantees. For example, at 02:00, two hours later, due to a decrease in user demand, 40% of CPU utilization can be allocated as exclusive resources, leaving 60% as shared resources. At 03:00, one hour later, due to an increase in user demand, 90% of CPU utilization can be allocated as exclusive resources, leaving 10% as shared resources. It should be noted that the dynamically adjusted time period can be either fixed or fluid.
[0109] The cloud server can charge accordingly according to the adjusted results, and then make adjustments after charging.
[0110] Cloud servers offer two adjustment methods: users can adjust exclusive resources based on their own resource needs through the console or API. Users can also delegate this dynamic adjustment capability to the cloud server, which can then perform time series forecasting based on the cloud server's load and make corresponding adjustments.
[0111] FIG6 is a schematic diagram of a scheduling device for resource allocation of a cloud server according to an embodiment of the present invention. As shown in FIG6 , based on the resource allocation method for a cloud server provided in the embodiment of the present invention, an embodiment of the present invention further provides a scheduling device for resource allocation of a cloud server, which is applied to resource scheduling of a cloud server. The scheduling device includes: a console 61, a resource adjustment unit 62;
[0112] The console 61 is used to obtain the user's resource requirements in the target time period after the cloud server initially allocates exclusive resources to the user; modify the user's exclusive resource allocation information according to the resource requirements, wherein the exclusive resources are cloud server resources that are pre-allocated to the user and used exclusively by the user; the resource adjustment unit 62 is connected to both the console 61 and the cloud server, and is used to allocate exclusive resources to the user in the target time period according to the allocation information.
[0113] The scheduling device for resource allocation in a cloud server provided by an embodiment of the present invention reconfigures allocation information before a target time period based on the resource needs of a user during that time period, and allocates resources based on the allocation information during the target time period. This allows for dynamic allocation of exclusive resources, thereby ensuring that the allocated exclusive resources are dynamically adjusted based on demand. This avoids the situation where static exclusive resources are unable to meet dynamically fluctuating resource needs, thereby resolving the resource waste or resource shortage issues faced by cloud server users.
[0114] As an optional implementation, the scheduling device also includes a load data collection unit 63, which is connected to the cloud server and is used to collect historical load data of the cloud server and extract historical data, wherein the historical load data includes historical data of resources provided by the cloud server to the user, and the historical data is information on resource allocation by the user within a historical time period; the load data collection unit is also connected to the resource adjustment unit and is used to predict resource demand based on the historical data of resource allocation by the user, and send it to the resource adjustment unit for resource allocation to the cloud server.
[0115] This approach leverages historical load data recorded by cloud servers and extracts historical data to predict user resource needs. This eliminates the need for users to provide historical data, improving demand forecasting efficiency. User resource needs can be predicted based on their historical data, eliminating the need for users to participate in dynamic resource allocation adjustments. This improves the user experience and minimizes workload. This allows for flexible solutions based on actual needs.
[0116] Figure 7 is a structural block diagram of a scheduling device that adopts a dynamic combination of exclusive resources and shared resources in an embodiment of the present invention. As shown in Figure 7, a device for dynamically adjusting exclusive resources of a cloud server is also proposed, including a console, a resource adjustment unit, and a resource collection / prediction unit, wherein the resource collection / prediction unit is equivalent to the above-mentioned load data collection unit.
[0117] The resource adjustment unit is responsible for configuring and managing the exclusive resource size of the cloud server and accepting console / API (Application Programming Interface) requests. The load collection / forecasting unit collects historical load data of the cloud server through a load collection agent running on the host machine. Furthermore, it performs load timing prediction based on the collected data and provides resource adjustment suggestions based on the prediction results.
[0118] An embodiment of the present invention further provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, wherein the computer program, when executed by the at least one processor, causes the electronic device to perform the method of an embodiment of the present invention.
[0119] An embodiment of the present invention further provides a non-transitory machine-readable medium storing a computer program, wherein the computer program, when executed by a processor of a computer, is used to cause the computer to perform the method of the embodiment of the present invention.
[0120] An embodiment of the present invention further provides a computer program product, including a computer program, wherein when the computer program is executed by a processor of a computer, it is used to enable the computer to perform the method of the embodiment of the present invention.
[0121] With reference to Figure 8, the structural block diagram of the electronic device that can be used as the server or client of an embodiment of the present invention will now be described, which is an example of a hardware device that can be applied to various aspects of the present invention. The electronic device is intended to represent various forms of digital electronic computer equipment, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0122] As shown in Figure 8, the electronic device includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device can also be stored. The computing unit 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0123] Multiple components within the electronic device are connected to the I / O interface 805, including an input unit 806, an output unit 807, a storage unit 808, and a communication unit 809. The input unit 806 can be any type of device capable of inputting information into the electronic device. The input unit 806 can receive input digital or character information and generate key signal inputs related to user settings and / or function control of the electronic device. The output unit 807 can be any type of device capable of presenting information and may include, but is not limited to, a display, a speaker, a video / audio output terminal, a vibrator, and / or a printer. The storage unit 808 may include, but is not limited to, a magnetic disk or an optical disk. The communication unit 809 allows the electronic device to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks and may include, but is not limited to, a modem, a network card, an infrared communication device, a wireless communication transceiver, and / or a chipset, such as a Bluetooth device, a WiFi device, a WiMax device, a cellular communication device, and / or the like.
[0124] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a CPU, a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units that run machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above. For example, in some embodiments, the method embodiments of the present invention may be implemented as a computer program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on an electronic device via ROM 802 and / or communication unit 809. In some embodiments, the computing unit 801 may be configured to perform the above-described method in any other appropriate manner (e.g., by means of firmware).
[0125] The computer programs for implementing the methods of the embodiments of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer programs are executed by the processor or controller, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0126] In the context of an embodiment of the present invention, a machine-readable medium can be a tangible medium that can contain or store a program for use by an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable signal medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0127] It should be noted that the term "including" and its variations used in the embodiments of the present invention are open-ended, i.e., "including but not limited to." The term "based on" means "based at least in part on." The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one other embodiment"; and the term "some embodiments" means "at least some embodiments." The modifications of "one" and "a plurality of" mentioned in the embodiments of the present invention are illustrative and non-restrictive. Those skilled in the art should understand that, unless the context clearly indicates otherwise, they should be understood as "one or more."
[0128] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0129] The various steps described in the method implementation scheme provided in the embodiments of the present invention may be performed in different orders and / or in parallel. In addition, the method implementation scheme may include additional steps and / or omit the steps shown. The scope of protection of the present invention is not limited in this respect.
[0130] The term "embodiment" in this specification refers to specific features, structures, or characteristics described in conjunction with the embodiment that can be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. The various embodiments in this specification are described in a related manner, and the same or similar parts between the various embodiments are referenced to each other. In particular, for the embodiments of the device, equipment, and system, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts are referred to the partial description of the method embodiment.
[0131] The above-described embodiments merely illustrate several implementations of the present invention. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent. It should be noted that a person skilled in the art would be able to make numerous variations and improvements without departing from the spirit of the present invention, all of which fall within the scope of the present invention. Therefore, the scope of the present invention shall be determined by the appended claims.
Claims
1. A resource allocation method for a cloud server, comprising: After the cloud server initially allocates exclusive resources to the user, obtaining the resource demand of the user in the target time period, wherein the exclusive resources are cloud server resources pre-allocated to the user and used exclusively by the user; Modifying allocation information of the exclusive resources of the user according to the resource demand; In the target time period, exclusive resources are allocated to the user according to the allocation information.
2. The method according to claim 1, wherein: Obtain the resource requirements of the user in the target time period, including: Determining the resource demand according to the demand information input by the user; Or, predicting the resource demand based on historical data of resource allocation performed by the user, wherein the historical data is information on resource allocation performed by the user within a historical time period.
3. The method according to claim 2, wherein: Predicting the resource demand according to the historical data of resource allocation by the user includes: Collecting historical load data of the cloud server and extracting the historical data, wherein the historical load data includes historical data of resources provided by the cloud server to the user; The resource demand is predicted based on the historical data.
4. The method according to claim 3, wherein: The historical data includes the historical data of allocation of each demand level in the historical time period, and the historical load data of the cloud server is collected. Extracting the historical data includes: The resource data occupied by the data whose demand level reaches the preset level in the historical load data is used as the allocation history data of the exclusive resource.
5. The method according to claim 1, wherein: Modifying the allocation information of the exclusive resource of the user according to the resource demand includes: Generate corresponding pre-allocation information according to the resource demand, wherein the resource data allocated in the pre-allocation information is the same as the resource data in the resource demand; Sending verification information required for the pre-allocated information to the user; If the verification is successful, the pre-allocation information is used as the allocation information.
6. The method according to claim 5, wherein: The verification required for the pre-allocation information includes payment verification, the verification information of the payment verification includes a payment link, and sending the verification information required for the pre-allocation information to the user includes: Sending the payment link of the payment verification to the user; When the payment link feedback indicates that the payment is successful, it is determined that the payment verification is passed.
7. The method according to claim 1, wherein: In the target time period, allocating exclusive resources to the user according to the allocation information includes: Acquire current allocation information of resources allocated by the user in the current time period, wherein the target time period is the next time period of the current time period; When the current allocation information is inconsistent with the allocation information, adjusting the current allocation information to the allocation information in the target time period; In a case where the current allocation information is consistent with the allocation information, resource allocation is performed in the target time period according to the current allocation information.
8. The method according to claim 1, wherein: The cloud server resources also include shared resources, and the method further includes: In the case that the exclusive resource does not meet the usage demand, calling the shared resource to provide to the user; After the shared resource is used up, the shared resource is released.
9. A scheduling device for resource allocation of a cloud server, comprising: console, resource adjustment unit; The console is used to obtain the resource requirements of the user in the target time period after the cloud server initially allocates exclusive resources to the user; Modifying allocation information of the exclusive resource of the user according to the resource demand, wherein the exclusive resource is a cloud server resource pre-allocated to the user and used exclusively by the user; The resource adjustment unit is connected to both the console and the cloud server, and is used to allocate exclusive resources to the user according to the allocation information during the target time period.
10. The scheduling device according to claim 9, wherein: Also includes a load data acquisition unit, The load data collection unit is connected to the cloud server and is used to collect historical load data of the cloud server and extract historical data, wherein the historical load data includes historical data of resources provided by the cloud server to the user, and the historical data is information on resource allocation by the user in a historical time period; The load data collection unit is also connected to the resource adjustment unit, and is used to predict the resource demand based on the historical data of resource allocation by the user, and send the data to the resource adjustment unit for resource allocation to the cloud server.
11. An electronic device, comprising: A processor, and a memory storing a program, wherein the program includes instructions, and when the instructions are executed by the processor, the processor executes the resource allocation method for the cloud server according to any one of claims 1 to 8.
12. A non-transitory machine-readable medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the cloud server resource allocation method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Multi-tenant cloud service management method and device, equipment and storage medium
CN115348264A
Resource allocation method and scheduling device of cloud server
CN116866280A
Dynamic orchestration of disaggregated resources
US11588750B1
Dynamic resource tuning cloud service
WO2020172692A2
Method and apparatus for providing cloud service, and device
WO2022199234A1
Cited By
Disaster recovery method for third-party payment system and third-party payment system
CN119621444A
A disaster recovery method for a third-party payment system and a third-party payment system
CN119621444B
Method and device for realizing cloud password service resource pool
CN120639719A
