Resource allocation method and device, computer equipment, storage medium and program product

By obtaining and analyzing the target feature data of the cloud service system, predicting future resource requirements, and dynamically regulating, and pre-allocating them in combination with the priority of business requests, the rationality of cloud service resource allocation is solved, and efficient resource utilization and rapid response are achieved.

CN119938338APending Publication Date: 2025-05-06SHENZHEN POWER SUPPLY BUREAU
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510184133.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-19
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

How to reasonably allocate cloud service resources to ensure system performance and avoid resource waste when meeting the needs of the user's cloud service resource.

Method used

By obtaining the target characteristic data of the cloud service system, including system operation data, system log data and user behavior data, predict resource requirements in the future period, and dynamically regulate based on the current available resources to increase or decrease cloud service resources. At the same time, pre-allocated based on the priority and attribute information of the service request to achieve load balancing.

Benefits of technology

It realizes that while meeting the user-side resource needs, cloud service resources are allocated more rationally, ensuring system performance, avoiding resource waste, and improving the response speed to future business requests.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938338A_ABST
    Figure CN119938338A_ABST
Patent Text Reader

Abstract

The invention relates to a resource allocation method and device, computer equipment, a storage medium and a program product. Obtaining target feature data, related to the cloud service resources, of the cloud service system in the first historical time period; determining target resource demand data for the cloud service resources in a future preset time period according to the target feature data; according to the target resource demand data and the current available resource quantity of the cloud service resources in the cloud service system, increasing or reducing the cloud service resources of the cloud service system; and distributing cloud service resources for each future service request according to the service attribute information of each future service request in the future time period. According to the scheme, the cloud service resources are dynamically regulated and controlled, and the cloud service resources are allocated to the future service requests according to the service attribute information, so that the system performance is ensured, the resource waste is avoided, the cloud service resources are pre-allocated to the future service requests, and the response speed of the future service requests can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a resource allocation method, apparatus, computer equipment, storage medium and program product. Background Art

[0002] Cloud computing is an Internet-based computing model that provides computing and storage resources to users in a virtualized manner. With the popularization and development of cloud computing technology, more and more applications have been migrated to the cloud, and the demand for cloud service resources from users is also growing.

[0003] Therefore, how to reasonably allocate cloud service resources while meeting the cloud service resource needs of the user side is a technical problem that needs to be solved urgently in this field. Summary of the invention

[0004] Based on this, it is necessary to provide a resource allocation method, device, computer equipment, storage medium and program product to address the above technical problems, which can more reasonably allocate cloud service resources while meeting the cloud service resource needs of the user side.

[0005] In a first aspect, the present application provides a resource allocation method, comprising:

[0006] Obtaining target feature data related to cloud service resources of the cloud service system during the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data;

[0007] Determine target resource demand data for cloud service resources within a preset time period in the future based on target feature data;

[0008] Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of cloud service resources in the cloud service system;

[0009] Pre-allocate cloud service resources for each future business request based on business attribute information of each future business request in a future time period.

[0010] In one embodiment, allocating cloud service resources to each future service request according to service attribute information of each future service request in a future time period includes:

[0011] Determining the priority of each future service request in the future time period according to the service attribute information of each future service request in the future time period;

[0012] Pre-allocate cloud service resources for each future business request in order of priority from high to low, based on the load balancing running on the cloud service resources.

[0013] In one embodiment, pre-allocating cloud service resources for each future service request according to service attribute information of each future service request in a future time period includes:

[0014] Based on user behavior data, predict future business requests in future time periods;

[0015] Determine the target service type according to the service attribute information of each historical service request in the second historical period; wherein the target service type is the service type corresponding to the service request whose number of service requests in the second historical period exceeds a preset threshold;

[0016] Determine, according to the service attribute information of each future service request in the future time period, a target service request corresponding to the target service type in each future service request in the future time period;

[0017] Pre-allocate cloud service resources for target business requests.

[0018] In one embodiment, determining target resource demand data for cloud service resources within a future preset period of time based on the target characteristic data includes:

[0019] Perform feature recognition on system log data and user behavior data to obtain the operation feature data of the cloud service system and the behavior feature data of the user end;

[0020] Based on the operational characteristic data of the cloud service system and the behavioral characteristic data of the user end, determine the resource demand trend for cloud service resources in the future period;

[0021] Determine, based on the resource demand trend, an increase in the resource demand for the cloud service resources relative to the current resource demand for the cloud service resources;

[0022] Based on the increase and system operation data, determine the target resource demand data for cloud service resources in the future period.

[0023] In one embodiment, increasing cloud service resources of the cloud service system according to target resource demand data and current available resource amounts of cloud service resources in the cloud service system includes:

[0024] If the target resource demand data for the cloud service resource in the future period is greater than the current available resource amount, determining a first ratio of the target resource demand data for the cloud service resource to the current available resource amount;

[0025] Determining the expansion capacity of the cloud service resources according to the first ratio and the current available resources;

[0026] Increase the cloud service resources of the cloud service system to expand capacity.

[0027] In one embodiment, reducing cloud service resources of the cloud service system according to the target resource demand data and the current available resource amount of the cloud service resources in the cloud service system includes:

[0028] If the target resource demand data for the cloud service resource in the future period is less than or equal to the current available resource amount, determining a second ratio of the target resource demand data for the cloud service resource to the current available resource amount;

[0029] Determining the reduction in capacity of cloud service resources according to the second ratio and the current available resources;

[0030] Reduce the cloud service resources of the cloud service system with reduced capacity.

[0031] In a second aspect, the present application further provides a resource allocation device, including:

[0032] An acquisition module, used to acquire target feature data related to cloud service resources of the cloud service system within a first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, as well as user behavior data;

[0033] A determination module, used to determine target resource demand data for cloud service resources within a future preset period of time based on the target characteristic data;

[0034] An adjustment module, used to increase or decrease cloud service resources of the cloud service system according to target resource demand data and currently available resource amounts of cloud service resources in the cloud service system;

[0035] The allocation module is used to pre-allocate cloud service resources for each future business request according to the business attribute information of each future business request in the future time period.

[0036] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0037] Obtaining target feature data related to cloud service resources of the cloud service system during the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data;

[0038] Determine target resource demand data for cloud service resources within a preset time period in the future based on target feature data;

[0039] Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of cloud service resources in the cloud service system;

[0040] Pre-allocate cloud service resources for each future business request based on business attribute information of each future business request in a future time period.

[0041] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0042] Obtaining target feature data related to cloud service resources of the cloud service system during the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data;

[0043] Determine target resource demand data for cloud service resources within a preset time period in the future based on target feature data;

[0044] Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of cloud service resources in the cloud service system;

[0045] Pre-allocate cloud service resources for each future business request based on business attribute information of each future business request in a future time period.

[0046] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0047] Obtaining target feature data related to cloud service resources of the cloud service system during the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data;

[0048] Determine target resource demand data for cloud service resources within a preset time period in the future based on target feature data;

[0049] Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of cloud service resources in the cloud service system;

[0050] Pre-allocate cloud service resources for each future business request based on business attribute information of each future business request in a future time period.

[0051] The resource allocation method, device, computer equipment, storage medium and program product described above obtain target feature data related to cloud service resources in the cloud service system in the first historical period; and determine target resource demand data for cloud service resources in the future preset period according to the target feature data; and increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource quantity of cloud service resources in the cloud service system; and then pre-allocate cloud service resources for each future business request according to the business attribute information of each future business request in the future period. The above scheme can determine the target resource demand data for cloud service resources in the future period according to user behavior data, system log data and system operation data, and dynamically regulate cloud service resources according to the target resource demand data for cloud service resources and the current available resource quantity of cloud service resources, and pre-allocate cloud service resources for each future business request according to the business attribute information of each future business request, so as to more reasonably allocate cloud service resources while meeting the cloud service resource demand of the user end, that is, to ensure system performance and avoid resource waste, and to pre-allocate cloud service resources for each future business request, so as to improve the response speed to future business requests. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions 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 related drawings can be obtained based on these drawings without paying creative work.

[0053] Figure 1 A schematic diagram of a flow chart of a resource allocation method in an embodiment;

[0054] Figure 2 A schematic diagram of a process for allocating cloud service resources for future business requests in one embodiment;

[0055] Figure 3 A schematic diagram of a process for obtaining a target resource prediction model in an embodiment;

[0056] Figure 4 A schematic diagram of a process for obtaining a target resource prediction model in another embodiment;

[0057] Figure 5 A schematic diagram of a process for adding cloud service resources in one embodiment;

[0058] Figure 6 A schematic diagram of a process of reducing cloud service resources in one embodiment;

[0059] Figure 7A schematic diagram of a flow chart of a resource allocation method in another embodiment;

[0060] Figure 8 is a structural block diagram of a resource allocation device in an embodiment;

[0061] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0062] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0063] The resource allocation method provided in the embodiment of the present application can be applied to the application scenario of cloud service resource allocation. The method can be executed by a server or by a terminal. Among them, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services. The terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car devices, projection devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The head-mounted device can be a virtual reality (VR) device, an augmented reality (AR) device, smart glasses, etc.

[0064] In an exemplary embodiment, Figure 1 As shown, a schematic diagram of a resource allocation method is provided, and the method is applied to a server as an example for explanation, including the following steps:

[0065] S101, obtaining target feature data related to cloud service resources of a cloud service system within a first historical period.

[0066] Exemplarily, a cloud service system is a system that can provide cloud services, such as a system composed of a cluster of cloud servers. Cloud service resources can be computing resources, storage resources, and network resources; for example, computing resources include but are not limited to central processing units (CPU), graphics processing units (GPU), memory, etc.; storage resources include but are not limited to cloud disks, object storage, etc.; network resources refer to network resources that are interconnected between the cloud and the cloud, including but not limited to network bandwidth, Internet Protocol (IP) addresses, etc.

[0067] The target feature data includes the system performance data and system log data of cloud services, as well as user behavior data. The system performance data of cloud services includes but is not limited to CPU usage, memory usage, network bandwidth, and storage read and write speeds; the system log data includes but is not limited to the operation records and event information of the cloud service system during operation, such as software startup, stop, abnormal errors, and service call records; the user behavior data includes but is not limited to the user login time, the type of service operated, the operation frequency, and the amount of resources requested.

[0068] Exemplarily, the target feature data related to the cloud service resources of the cloud service system in the first historical period can be obtained from multiple data sources. For example, the target feature data related to the cloud service resources in the first historical period can be obtained from data sources such as relational databases, non-relational databases, log files, cloud service provider's application programming interface (API), third-party data providers, web pages, etc. For example, according to business needs, the data fields, data types and data formats to be extracted can be defined; then, data extraction, transformation, and loading tools (Extract, Transform, Load Tool, ETL) (such as Apache NiFi, Talend, InformaticaPowerCenter, etc.) or custom scripts can be used to perform data extraction operations to obtain target feature data.

[0069] For example, after obtaining the target feature data, the target feature data can be compressed and stored to reduce the storage space occupied and improve the efficiency of data processing. Data compression can be lossy compression and lossless compression. Lossy compression will lose some data details, but usually can achieve a higher compression ratio; while lossless compression will not lose any data details, but the compression ratio may be relatively low. When selecting a compression algorithm, it is necessary to select according to the characteristics of the data and business needs.

[0070] Among them, the first historical period can be set according to needs, for example, it can be set to one day, one week, one hour, etc., and no specific limitation is made here for the first historical period.

[0071] S102: Determine target resource demand data for cloud service resources within a future preset time period based on the target characteristic data.

[0072] For example, based on the target feature data, the target resource demand data for cloud service resources in the future period can be predicted; wherein, the target resource demand data can be understood as the resource demand. For example, time series analysis, regression analysis and other technologies can be used to analyze the changing trend and periodicity of system performance data, so as to predict the system load in the future period. And the system log data can be parsed and visualized through log analysis tools (such as Elasticsearch, Logstash, Kibana, etc.) to identify key information such as peak demand time, low demand time and abnormal events, so as to adjust resource allocation and optimize server performance. It is also possible to analyze user behavior data, extract useful features (such as user activity, login frequency, etc.), and use machine learning algorithms (such as linear regression, logistic regression, decision tree, etc.) to build a prediction model to predict user behavior trends in the future period.

[0073] Furthermore, the target resource demand data within a preset period of time can be predicted using prediction models (such as time series prediction models, machine learning prediction models, etc.) combined with the system performance analysis results, system log data analysis results, and user behavior analysis results. The prediction results can include the demand for resources such as CPU, memory, storage, and network bandwidth.

[0074] S103: Increase or decrease the cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of the cloud service resources in the cloud service system.

[0075] Furthermore, based on the target resource demand data for cloud service resources in the future time period and the currently available resources of cloud service resources in the cloud service system, it can be determined whether the currently available resources of cloud service resources are sufficient. If the currently available resources of cloud service resources are insufficient, the cloud service resources of the cloud service system can be increased to ensure the performance of the cloud service system; if the currently available resources of cloud service resources are redundant, the cloud service resources of the cloud service system can be reduced to avoid wasting cloud service resources.

[0076] S104: Allocate cloud service resources to each future service request according to service attribute information of each future service request in the future time period.

[0077] Furthermore, the service attribute information may include information such as service name, service type, service priority, and cloud service resources required by the service. Cloud service resources may be allocated to each future service request in the future period according to the service attribute information of each future service request. For example, the order of allocating cloud service resources to each future service request may be determined according to the order of priority of each future service request from high to low, and the corresponding required cloud service resources may be allocated to each future service request according to the order of priority according to the cloud service resources required by each future service request.

[0078] The resource allocation method described above obtains target feature data related to cloud service resources in the cloud service system in the first historical period; and determines target resource demand data for cloud service resources in the future preset period according to the target feature data; and increases or decreases cloud service resources of the cloud service system according to the target resource demand data and the current available resource quantity of cloud service resources in the cloud service system; and then pre-allocates cloud service resources for each future business request according to the business attribute information of each future business request in the future period. The above scheme can determine the target resource demand data for cloud service resources in the future period according to user behavior data, system log data and system operation data, and dynamically regulate cloud service resources according to the target resource demand data for cloud service resources and the current available resource quantity of cloud service resources, and pre-allocate cloud service resources for each future business request according to the business attribute information of each future business request, so as to more reasonably allocate cloud service resources while meeting the cloud service resource demand of the user end, that is, to ensure system performance and avoid resource waste, and to pre-allocate cloud service resources for each future business request, so as to improve the response speed to future business requests.

[0079] In some optional implementations, a load balancing algorithm can be used to allocate cloud service resources to each business request based on the priority of the business request. This ensures that high-priority business requests are processed first and balances the load of cloud service resources, avoiding the problem of individual cloud service resources being too high or too low in load.

[0080] Based on this, see Figure 2 , Figure 2 A schematic diagram of a process for allocating cloud service resources for each future business request is provided, which specifically includes the following steps:

[0081] S201, determining the priority of each future service request in the future time period according to service attribute information of each future service request in the future time period.

[0082] Exemplarily, the service attribute information of each future service request may include priority information of the service request, thereby extracting the priority information of each future service request in the future time period from the service attribute information of each service request, and then determining the priority of each future service request in the future time period based on the priority information of each future service request.

[0083] S202 , pre-allocate cloud service resources for each future business request in order of priority from high to low, based on the load balancing running on the cloud service resources.

[0084] Furthermore, cloud service resources can be allocated to each future service request in the order of priority from high to low, based on the principle of load balancing running on cloud service resources. For example, a load balancing algorithm can be used to allocate corresponding cloud service resources to each future service request in the order of priority from high to low. In this way, the amount of service requests processed by each cloud service resource can be relatively balanced, avoiding the problem of overload or idle cloud service resources. Thus, on the basis of ensuring that future service requests with high priority are processed first, the load of cloud service resources is balanced, and the utilization rate of resources and the processing efficiency of service requests are improved.

[0085] In some optional implementations, cloud service resources can be pre-allocated for future business requests under the business type corresponding to the business requests that appear more frequently in the second historical period. In this way, sufficient cloud service resources can be pre-allocated to future business requests that appear more frequently, thereby improving the response speed of future business requests that appear more frequently.

[0086] Based on this, various future service requests in the future period can be predicted based on the user behavior data. For example, data mining algorithms and time series analysis algorithms can be used to analyze the user behavior data to predict various future service requests in the future period.

[0087] Furthermore, the target service type can be determined based on the service attribute information of each historical service request in the second historical period; wherein the target service type is the service type corresponding to the service request whose number of service requests in the second historical period exceeds the preset threshold. The second historical period can be set according to demand, for example, it can be set to one day, one week, one hour, etc., and no specific limitation is made to the first historical period. The preset threshold can be set according to the second historical duration and the regularity of the service request, for example, it can be set to 5 times or 10 times, etc., and no specific limitation is made to the preset threshold.

[0088] Exemplarily, the service type corresponding to the service request whose number of service requests in the second historical period exceeds a preset threshold may be used as the target service type.

[0089] Furthermore, the target service request corresponding to the target service type in each future service request in the future period can be determined according to the service attribute information of each future service request in the future period; that is, the future service request of the target service type in each future service request in the future period can be used as the target service request. Then, cloud service resources can be pre-allocated for each target service request.

[0090] In an embodiment of the present application, by pre-allocating cloud service resources for target business requests whose occurrence frequency exceeds a preset threshold, it can be ensured that future business requests with a higher frequency can be allocated sufficient cloud service resources to improve the efficiency of processing future business requests with a higher frequency.

[0091] Optionally, a prediction model can be used to determine the target resource demand data for cloud service resources in a future preset period based on the target feature data. The specific implementation process is as follows:

[0092] Exemplarily, the target feature data may be input into a target resource prediction model to obtain target resource demand data for cloud service resources within a future preset time period.

[0093] Exemplarily, the target resource prediction model is obtained by training the initial resource prediction model using sample feature data. When predicting the target resource demand data for cloud service resources in the future period, the target feature data can be input into the target resource prediction model, and the target resource prediction model extracts and predicts the target feature data to obtain the target resource demand data for cloud service resources in the future preset period. The target resource demand data in the future preset period can be the total resource demand amount in the future preset period, or the total resource demand amount at each future moment in the future preset period.

[0094] In some optional implementations, see Figure 3 , Figure 3 A flowchart for obtaining a target resource prediction model is provided, which specifically includes the following steps:

[0095] S301, obtaining sample feature data.

[0096] Exemplarily, candidate feature data related to cloud service resources in the first historical period can be obtained from multiple data sources. For example, candidate feature data related to cloud service resources in the first historical period can be obtained from data sources such as an internal database, an API interface of a cloud service provider, a third-party data provider, and a web page. The candidate feature data can be multi-dimensional data related to cloud service resources.

[0097] Optionally, in order to improve the quality of the candidate feature data, the candidate feature data may be preprocessed, for example, data cleaning and format conversion may be performed on the candidate feature data. Then, sample feature data may be screened out from the preprocessed candidate feature data by methods such as correlation analysis and chi-square test.

[0098] S302: Determine candidate parameter combinations for an initial resource prediction model.

[0099] Furthermore, the grid search technology can be used to determine the candidate parameter combination of the initial resource prediction model. Among them, grid search is a method of hyperparameter tuning, which is used to find the best hyperparameter combination of the model. First, it is necessary to define the search space of the hyperparameters, that is, to list the hyperparameters that need to be adjusted for the initial resource prediction model and their possible value ranges. Taking the initial resource prediction model as the support vector machine (SVM) as an example, the value of the regularization parameter C for SVM may be set to [0.1, 1, 10], and the value of the kernel function parameter gamma may be set to [0.01, 0.1, 1]. The candidate parameter combination of the initial resource prediction model is the combination of C and gamma.

[0100] It should be noted that in the embodiments of the present application, the machine learning algorithms used to train the initial resource prediction model include but are not limited to time series prediction algorithms and regression algorithms.

[0101] S303, based on the sample feature data, a target parameter combination is selected from the candidate parameter combinations by cross-validation.

[0102] Furthermore, based on the sample feature data, a cross-validation method can be used to screen the target parameter combination from the candidate parameter combinations. For example, for each candidate parameter combination, the performance of the initial resource prediction model is evaluated using cross-validation, and the performance indicators under different candidate parameter combinations are compared, and the candidate parameter combination with the best performance is used as the target parameter combination.

[0103] Among them, cross-validation is a method for evaluating model performance. Sample data features can usually be divided into multiple subsets, such as k subsets, and k training and validation are performed. In each training, k-1 subsets are used as training sets, and the remaining subset is used as a validation set. The training set is used to train the initial resource prediction model, that is, to let the model learn the relationship between features and target variables (such as future resource demand). The validation set is used to evaluate the performance of the trained model, and some performance indicators are usually calculated, such as mean square error (MSE), mean absolute error (MAE), coefficient of determination (R²), etc. Repeat this process k times, each time using a different subset as the validation set, and finally get k performance indicator results. These results can be combined to evaluate the performance of the model, such as finding the average, so as to more accurately understand the performance of the model on unseen data and avoid overfitting.

[0104] S304, based on the sample feature data, the initial resource prediction model whose model parameters are the target parameter combination is trained by cross-validation to obtain the target resource prediction model.

[0105] Exemplarily, based on the sample feature data, a cross-validation method can be used to train the initial resource prediction model whose model parameters are the target parameter combination to obtain the target resource prediction model. For example, the sample feature data can be used to retrain the initial resource prediction model whose model parameters are the target parameter combination, and the model can be cross-validated to obtain the final target resource prediction model.

[0106] In the embodiment of the present application, the initial resource prediction model is trained by grid search and cross-validation, so that the obtained target resource prediction model has better model parameters and makes the prediction results more accurate, thereby improving the accuracy of the target resource prediction model.

[0107] Furthermore, in an embodiment of the present application, a target resource prediction model is used to predict the target resource demand data for the cloud service resources within a preset time period in the future, which can not only improve the efficiency of determining the target resource demand data, but also improve the accuracy of determining the target resource demand data.

[0108] Optionally, in the embodiments of the present application, data mining algorithms and time series analysis algorithms may also be used to perform feature analysis on target feature data, and determine target resource demand data for cloud service resources in future time periods based on the analysis results and system operation data.

[0109] Based on this, see Figure 4 , Figure 4 Another process diagram for obtaining a target resource prediction model is provided, which specifically includes the following steps:

[0110] S401, performing feature recognition on system log data and user behavior data to obtain operation feature data of the cloud service system and behavior feature data of the user end.

[0111] Exemplarily, the system log data and user behavior data may be preprocessed first, for example, the system log data and user behavior data may be cleaned, deduplicated, de-noised, and normalized; then, a data mining algorithm may be used to perform feature recognition on the preprocessed system log data and preprocessed user behavior data to obtain the operation feature data of the cloud service system and the behavior feature data of the user end. The operation feature data of the cloud service system are log data features related to cloud service resources, for example, a certain type of log appears frequently and is related to resource usage (such as logs of excessive memory usage). The behavior feature data of the user end are behavior data features related to cloud service resources, for example, the operation frequency of a certain type of operation of a certain type of user in a specific time period gradually increases, etc.

[0112] Optionally, the data mining algorithm in the embodiments of the present application may be a clustering algorithm (such as K-means clustering algorithm (K-Means)), a decision tree, a support vector machine, a hierarchical clustering, an association rule mining algorithm or a deep learning algorithm, etc.

[0113] S402, determining a resource demand trend for cloud service resources in a future period based on the operation characteristic data of the cloud service system and the behavior characteristic data of the user end.

[0114] Furthermore, time series analysis algorithms, such as moving average and exponential smoothing, can be used to predict resource demand trends. For user behavior data, the moving average method can be used to predict future operation frequencies based on the time series of user operations, and then infer resource demand trends; for system log data, the resource demand trend can be predicted based on the time series of information related to resource usage in the log feature data; and then the resource demand trend predicted based on user behavior data and the resource demand trend predicted based on log feature data can be merged to obtain the final resource demand trend.

[0115] S403: Determine, based on the resource demand trend, an increase in the resource demand for the cloud service resources relative to the current resource demand for the cloud service resources.

[0116] Exemplarily, the resource demand trend may reflect the increase in the resource demand for cloud service resources relative to the current resource demand for cloud service resources, and thus the increase in the resource demand for cloud service resources relative to the current resource demand for cloud service resources may be determined based on the resource demand trend. The increase may be a positive value or a negative value; if the increase is a positive value, it means that the resource demand for cloud service resources is increasing, and if the increase is a negative value, it means that the resource demand for cloud service resources is decreasing.

[0117] S404: Determine target resource demand data for cloud service resources in a future period based on the increase and system operation data.

[0118] Exemplarily, the system operation data may include the current resource usage of the cloud service resources, whereby the increase may be converted into the resource usage increase, and then the sum of the resource usage increase and the current resource usage in the system operation data may be used as the target resource demand data for the cloud service resources in the future period. The current resource usage in the system operation data may also be converted into the current resource usage, and then the sum of the increase and the current resource usage may be used as the target resource demand data for the cloud service resources in the future period.

[0119] In an embodiment of the present application, feature recognition is performed on system log data and user behavior data to determine the resource demand trend for cloud service resources in a future time period, and based on the resource demand trend, the increase in resource demand for cloud service resources relative to the current resource demand for cloud service resources is determined, and then based on the increase and system operation data, the target resource demand data for cloud service resources in the future time period is determined, so that the determined target resource demand data is more in line with the actual situation, and cloud service resources can be managed more accurately.

[0120] In some optional implementations, when it is determined to increase cloud service resources, the capacity expansion may be first determined based on the target resource demand data and the currently available resources to increase the capacity of the cloud service resources.

[0121] Based on this, see Figure 5 , Figure 5 A flowchart for adding cloud service resources is provided, which specifically includes the following steps:

[0122] S501: If the target resource demand data for the cloud service resources in the future period is greater than the current available resource amount, determine a first ratio of the target resource demand data for the cloud service resources to the current available resource amount.

[0123] For example, if the target resource demand data for cloud service resources in the future period is greater than the currently available resources, it means that the currently available resources are insufficient in the future period, and the cloud service resources of the cloud service system need to be increased to ensure the performance of the cloud service system.

[0124] Thus, a first ratio of the target resource demand data for the cloud service resources to the current available resource amount can be calculated, that is, the quotient of the target resource demand data for the cloud service resources and the current available resource amount is taken as the first ratio.

[0125] S502: Determine the expansion capacity of the cloud service resources according to the first ratio and the current available resource amount.

[0126] Furthermore, the product of the first ratio and the current available resource amount may be rounded up, and the obtained integer may be used as the expansion capacity of the cloud service resources of the cloud service system.

[0127] S503, increase the cloud service resources of the cloud service system with expanded capacity.

[0128] Furthermore, the cloud service resources for capacity expansion can be increased. For example, taking the cloud service resource as CPU as an example, the number of CPUs for capacity expansion can be increased. Exemplarily, the cloud service resources of the cloud service system for capacity expansion can be increased through the interaction between the server and the API or management interface of the cloud service system. For example, the server interacts through the API or management interface of the cloud service system to realize services such as dynamic configuration, migration, startup or shutdown of virtual machines.

[0129] In the embodiment of the present application, in the process of increasing cloud service resources, the number of cloud service resources to be increased is first determined, so that the number of increased cloud service resources can meet resource demand without causing waste of resources.

[0130] In some optional implementations, when it is determined to reduce cloud service resources, capacity reduction may be determined first based on target resource demand data and currently available resources to reduce the cloud service resources to be reduced.

[0131] Based on this, see Figure 6 , Figure 6 A flowchart for reducing cloud service resources is provided, which specifically includes the following steps:

[0132] S601: If the target resource demand data for the cloud service resources in the future period is less than or equal to the current available resource amount, determine a second ratio of the target resource demand data for the cloud service resources to the current available resource amount.

[0133] If the target resource demand data for cloud service resources in the future period is less than or equal to the current available resource amount, it means that the current available resources are redundant in the future period, and the cloud service resources of the cloud service system need to be reduced to avoid wasting cloud service resources.

[0134] Based on this, a second ratio of the target resource demand data for the cloud service resources to the current available resource amount may be calculated, that is, the quotient of the target resource demand data for the cloud service resources and the current available resource amount is taken as the second ratio.

[0135] S602: Determine the reduced capacity of the cloud service resources according to the second ratio and the current available resources.

[0136] Furthermore, the product of the second ratio and the current available resource amount may be rounded down, and the obtained integer may be used as the reduced capacity of the cloud service resources of the cloud service system.

[0137] S603, reducing cloud service resources of the reduced-capacity cloud service system.

[0138] Furthermore, the cloud service resources of the reduced capacity can be reduced. For example, taking the cloud service resource as CPU as an example, the number of CPUs of the reduced capacity can be reduced. Exemplarily, the cloud service resources of the cloud service system of the expanded capacity can be increased by interacting with the API or management interface of the cloud service system through the server. For example, the server interacts with the API or management interface of the cloud service system to realize the dynamic configuration, migration, startup or shutdown of the virtual machine and other services.

[0139] In the embodiment of the present application, in the process of reducing cloud service resources, it is first determined to reduce the number of cloud service resources, so that the resource demand can still be met after the number of cloud service resources is reduced, and resource waste is avoided.

[0140] Exemplarily, the resource allocation method provided in the embodiment of the present application can also monitor the various resource usage of the cloud service system in real time, such as CPU usage, memory occupancy, disk I / O, etc.; and perform system performance evaluation based on resource usage, for example, evaluate the performance of the cloud service system according to various resource usage, including key performance indicators such as response time and throughput. And the historical resource usage data and performance data can be compared with the real-time resource usage data and real-time performance data to detect whether there is abnormal resource usage or service performance degradation in the cloud service system. When the resource usage rate is abnormal (for example, the resource usage rate exceeds the preset threshold), the service quality is reduced, or other abnormal situations occur, the alarm information can be sent to the administrator and relevant operation and maintenance personnel through various methods such as email, SMS, instant messaging, etc.; so that after the administrator or operation and maintenance personnel receive the alarm information, they can perform manual intervention according to the preset emergency response strategy to adjust resources and troubleshoot faults.

[0141] Furthermore, the performance of the cloud service system can be evaluated regularly, including evaluation of resource utilization and service response time indicators; and based on the performance evaluation results, the relevant parameters of the cloud service system (for example, parameters of the data mining algorithm and parameters of the time series analysis algorithm) can be adjusted and optimized to improve the stability and efficiency of the cloud service system.

[0142] Furthermore, as the business develops and the amount of data increases, data mining algorithms can be continuously updated and upgraded to improve the accuracy and efficiency of predicting resource demand trends.

[0143] In some optional implementations, see Figure 7 , Figure 7 A flowchart of another resource allocation method is provided, which specifically includes the following steps:

[0144] S701, obtaining target feature data related to cloud service resources of a cloud service system within a first historical period.

[0145] S702: Determine target resource demand data for cloud service resources within a future preset time period based on the target characteristic data.

[0146] Optionally, the target feature data may be input into a target resource prediction model to obtain target resource demand data for cloud service resources within a future preset period of time.

[0147] Alternatively, feature recognition is performed on system log data and user behavior data to obtain operation feature data of the cloud service system and behavior feature data of the user end; and based on the operation feature data of the cloud service system and the behavior feature data of the user end, the resource demand trend for cloud service resources in the future time period is determined; and based on the resource demand trend, the increase in resource demand for cloud service resources relative to the current resource demand for cloud service resources is determined; and then based on the increase and the system operation data, the target resource demand data for cloud service resources in the future time period is determined.

[0148] S703: Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of the cloud service resources in the cloud service system.

[0149] If the target resource demand data for cloud service resources in the future time period is greater than the currently available resource amount, a first ratio of the target resource demand data for cloud service resources to the currently available resource amount is determined; and based on the first ratio and the currently available resource amount, the expansion capacity of the cloud service resources is determined; and then the cloud service resources of the expanded capacity cloud service system are increased.

[0150] If the target resource demand data for cloud service resources in the future time period is less than or equal to the current available resource amount, then determine a second ratio of the target resource demand data for cloud service resources to the current available resource amount; and determine the reduction in capacity of the cloud service resources based on the second ratio and the current available resource amount; thereby reducing the cloud service resources of the reduced-capacity cloud service system.

[0151] S704, determining the priority of each service request in the future time period according to the service attribute information of each service request in the future time period.

[0152] S705 , allocating cloud service resources to each business request in descending order of priority and based on the load balancing running on the cloud service resources.

[0153] The specific process of S701 to S705 can refer to the description of the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.

[0154] Furthermore, the execution order of the above steps is only an exemplary description and is not used to limit the execution steps. Other execution orders of the steps are within the protection scope of the embodiments of the present application.

[0155] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0156] Based on the same inventive concept, the embodiment of the present application also provides a resource allocation device for implementing the resource allocation method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more resource allocation device embodiments provided below can refer to the limitations on the resource allocation method above, and will not be repeated here.

[0157] In an exemplary embodiment, Figure 8 As shown, a resource allocation device is provided, comprising:

[0158] The acquisition module 10 is used to acquire target feature data related to cloud service resources of the cloud service system in the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data;

[0159] A determination module 20, for determining target resource demand data for cloud service resources within a future preset period of time according to the target characteristic data;

[0160] An adjustment module 30, configured to increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the current available resource amounts of the cloud service resources in the cloud service system;

[0161] The allocation module 40 is used to allocate cloud service resources to each future service request according to the service attribute information of each future service request in the future time period.

[0162] The resource allocation device obtains target feature data related to cloud service resources in the cloud service system in the first historical period; and determines target resource demand data for cloud service resources in the future preset period according to the target feature data; and increases or decreases cloud service resources of the cloud service system according to the target resource demand data and the current available resource amount of cloud service resources in the cloud service system; and then pre-allocates cloud service resources for each future service request according to the service attribute information of each future service request in the future period. The above scheme can determine the target resource demand data for cloud service resources in the future period according to user behavior data, system log data and system operation data, and dynamically regulate cloud service resources according to the target resource demand data for cloud service resources and the current available resource amount of cloud service resources, and pre-allocate cloud service resources for each future service request according to the service attribute information of each future service request, so that cloud service resources can be allocated more reasonably while meeting the cloud service resource demand of the user end, that is, both ensuring system performance and avoiding resource waste, and pre-allocating cloud service resources for each future service request can improve the response speed to future service requests.

[0163] In one embodiment, the allocation module 40 is specifically configured to:

[0164] Determine the priority of each future business request in the future time period based on the business attribute information of each future business request in the future time period; pre-allocate cloud service resources for each future business request in descending order of priority based on the load balancing running on the cloud service resources.

[0165] In one embodiment, the determination module 20 is specifically configured to:

[0166] Predict each future business request in a future time period based on user behavior data; determine the target business type based on the business attribute information of each historical business request in a second historical time period; wherein the target business type is the business type corresponding to the business request whose number of business requests in the second historical time period exceeds a preset threshold; determine the target business request corresponding to the target business type in each future business request in the future time period based on the business attribute information of each future business request in the future time period; pre-allocate cloud service resources for the target business request.

[0167] In one embodiment, the determination module 20 is specifically configured to:

[0168] Perform feature recognition on system log data and user behavior data to obtain operation feature data of the cloud service system and behavior feature data of the user end; determine the resource demand trend for cloud service resources in the future period based on the operation feature data of the cloud service system and the behavior feature data of the user end; determine the increase in resource demand for cloud service resources relative to the current resource demand for cloud service resources based on the resource demand trend; determine the target resource demand data for cloud service resources in the future period based on the increase and the system operation data.

[0169] In one embodiment, the adjustment module 30 is specifically used for:

[0170] If the target resource demand data for cloud service resources in a future time period is greater than the current available resource amount, determine a first ratio of the target resource demand data for cloud service resources to the current available resource amount; determine the expansion capacity of the cloud service resources based on the first ratio and the current available resource amount; and increase the cloud service resources of the expanded capacity cloud service system.

[0171] In one embodiment, the adjustment module 30 is specifically used for:

[0172] If the target resource demand data for cloud service resources in the future time period is less than or equal to the current available resource amount, determine a second ratio of the target resource demand data for cloud service resources to the current available resource amount; determine the reduction in capacity of the cloud service resources based on the second ratio and the current available resource amount; and reduce the cloud service resources of the reduced-capacity cloud service system.

[0173] Each module in the resource allocation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0174] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig. 9 As shown. The computer device includes a processor, a memory, an input / output (I / O) interface and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store system data of the cloud service system. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a resource allocation method is implemented.

[0175] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0176] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the resource allocation method described in any of the above embodiments are implemented.

[0177] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the resource allocation method described in any of the above embodiments are implemented.

[0178] In one embodiment, a computer program product is provided, including a computer program, which implements the steps of the resource allocation method described in any of the above embodiments when executed by a processor.

[0179] It should be noted that 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 this application 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 relevant regulations.

[0180] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0181] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0182] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A resource allocation method, characterized in that: The method comprises: Acquire target feature data related to cloud service resources of the cloud service system in the first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data; Determining target resource demand data for the cloud service resources within a future preset period of time according to the target characteristic data; Increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the currently available resource amounts of cloud service resources in the cloud service system; The cloud service resources are pre-allocated to each future service request according to the service attribute information of each future service request in a future time period.

2. The method according to claim 1, characterized in that The pre-allocating the cloud service resources for each future service request according to the service attribute information of each future service request in the future time period includes: Determining the priority of each future service request in the future time period according to the service attribute information of each future service request in the future time period; The cloud service resources are pre-allocated for each future business request in order of priority from high to low, based on the load balancing running on the cloud service resources.

3. The method according to claim 1, characterized in that The pre-allocating the cloud service resources for each future service request according to the service attribute information of each future service request in the future time period includes: predicting future service requests in a future time period based on the user behavior data; Determine the target service type according to the service attribute information of each historical service request in the second historical period; wherein the target service type is the service type corresponding to the service request whose number of service requests in the second historical period exceeds a preset threshold; Determine, according to the service attribute information of each future service request in the future time period, a target service request corresponding to the target service type in each future service request in the future time period; The cloud service resources are pre-allocated for the target business request.

4. The method according to claim 1, characterized in that: Determining target resource demand data for the cloud service resources within a future preset period of time according to the target characteristic data includes: Performing feature recognition on the system log data and the user behavior data to obtain operation feature data of the cloud service system and behavior feature data of the user end; Determining a resource demand trend for the cloud service resources in a future period based on the operation characteristic data of the cloud service system and the behavior characteristic data of the user terminal; Determining, based on the resource demand trend, an increase in the resource demand for the cloud service resource relative to a current resource demand for the cloud service resource; According to the increase and the system operation data, target resource demand data for the cloud service resources in the future time period is determined.

5. The method according to claim 1, characterized in that: Increasing the cloud service resources of the cloud service system according to the target resource demand data and the current available resource amount of the cloud service resources in the cloud service system includes: If the target resource demand data for the cloud service resource in the future period is greater than the currently available resource amount, determining a first ratio of the target resource demand data for the cloud service resource to the currently available resource amount; Determining the expansion capacity of the cloud service resources according to the first ratio and the currently available resource amount; Increase the cloud service resources of the cloud service system with the expanded capacity.

6. The method according to claim 1, characterized in that Reducing the cloud service resources of the cloud service system according to the target resource demand data and the current available resource amount of the cloud service resources in the cloud service system includes: If the target resource demand data for the cloud service resource in the future period is less than or equal to the currently available resource amount, determining a second ratio of the target resource demand data for the cloud service resource to the currently available resource amount; Determining a reduced capacity of the cloud service resources according to the second ratio and the currently available resource amount; Reduce the cloud service resources of the reduced capacity cloud service system.

7. A resource allocation device, characterized in that: The device comprises: An acquisition module, used to acquire target feature data related to cloud service resources of the cloud service system within a first historical period; wherein the target feature data includes system operation data and system log data of the cloud service, and user behavior data; A determination module, configured to determine target resource demand data for the cloud service resources within a future preset period of time according to the target characteristic data; An adjustment module, configured to increase or decrease cloud service resources of the cloud service system according to the target resource demand data and the currently available resource amounts of cloud service resources in the cloud service system; The allocation module is used to pre-allocate the cloud service resources for each future business request according to the business attribute information of each future business request in a future time period.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Cited By

  • Resource scheduling method, device and equipment

    CN120803668A

  • Resource scheduling method, apparatus and device

    CN120803668B