A resource management method, device, apparatus and storage medium
Patent Information
- Application Number
- CN202210914934.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-01
- Publication Date
- 2026-10-13
- Estimated Expiration
- 2042-08-01
AI Technical Summary
然而,当分配的资源过多时,容易造成资源闲置,资源的利用率较低,导致企业或机构的运营成本增加;当分配的资源不足时,在业务需求突增或者访问量加大时,容易出现不可访问的情况,造成巨大损失
[0032]在本申请实施例中,资源管理设备获取目标资源的时间序列数据,并对时间序列数据进行特征提取,得到动态变化特征,然后调用至少一个预测模型中与动态变化特征匹配的目标预测模型对时间序列数据进行预测处理,得到目标资源在下一个业务周期的预测使用量。由于本申请的资源管理方法可以基于时间序列数据包括的历史使用数据预测下一个业务周期的预测使用量,可以提前预测资源的使用情况,实时预测资源,这样可以避免分配的资源过多或者分配的资源不足,可以降低成本,提升运营质量。除此之外,由于本申请调用至少一个预测模型中与时间序列特征的动态变化特征匹配的目标预测模型对时间序列数据进行预测处理,即资源管理设备可以基于动态变化特征从至少一个预测模型中自适应选择匹配的目标预测模型,至少一个预测模型可以适用于具有不同动态变化特征的时间序列数据,有效提升预测模型的灵活性以及兼容性。并且,目标预测模型与动态变化特征匹配,由目标预测模型预测得到的下一个业务周期的预测使用量更准确,从而可以避免分配的资源过多或者分配的资源不足,可以降低成本,提升运营质量。
Smart Images

Figure CN117544635B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a resource management method, apparatus, device and storage medium. Background Technology
[0002] With the rapid development of cloud technology, more and more enterprises and institutions (such as government agencies, schools, etc.) are deploying their businesses on cloud platforms. Given the virtualization of cloud resources and the high requirements for the security performance of the cloud infrastructure, cloud management platforms specifically designed for cloud platforms have emerged.
[0003] Cloud management platforms can allocate resources to various business systems. However, allocating too many resources can lead to idle resources, low utilization rates, and increased operating costs for enterprises or organizations. Conversely, insufficient resources can cause inaccessibility during periods of sudden surge in business demand or increased traffic, resulting in significant losses. Therefore, accurate resource management is a pressing issue that needs to be addressed. Summary of the Invention
[0004] This application provides a resource management method, apparatus, device, and storage medium that can accurately predict the predicted usage in the next business cycle, avoiding excessive or insufficient resources.
[0005] On one hand, embodiments of this application provide a resource management method, which includes:
[0006] Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0007] Feature extraction is performed on time series data to obtain dynamic change features; these dynamic change features include one or more of the following: periodic features, monotonic features, and stationary features.
[0008] Call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data to obtain the predicted usage of the target resource in the next business cycle;
[0009] Resource management operations are performed on the target resources based on predicted usage.
[0010] On the other hand, embodiments of this application provide a resource management device, which includes:
[0011] The acquisition unit is used to acquire time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0012] The feature extraction unit is used to extract features from time series data to obtain dynamic change features; these dynamic change features include one or more of periodic features, monotonic features, and stationary features.
[0013] The prediction processing unit is used to call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data and obtain the predicted usage of the target resource in the next business cycle.
[0014] The processing unit is used to perform resource management operations on target resources based on predicted usage.
[0015] Furthermore, embodiments of this application provide a resource management device, which includes an input interface and an output interface, and further includes:
[0016] A processor, adapted to implement one or more instructions; and,
[0017] A computer storage medium that stores one or more instructions, which are adapted to be loaded by a processor and executed as follows:
[0018] Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0019] Feature extraction is performed on time series data to obtain dynamic change features; these dynamic change features include one or more of the following: periodic features, monotonic features, and stationary features.
[0020] Call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data to obtain the predicted usage of the target resource in the next business cycle;
[0021] Resource management operations are performed on the target resources based on predicted usage.
[0022] Furthermore, this application provides a computer program product including computer instructions stored in a computer-readable storage medium. The processor of the resource management device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the resource management device to perform the following steps:
[0023] Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0024] Feature extraction is performed on time series data to obtain dynamic change features; these dynamic change features include one or more of the following: periodic features, monotonic features, and stationary features.
[0025] Call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data to obtain the predicted usage of the target resource in the next business cycle;
[0026] Resource management operations are performed on the target resources based on predicted usage.
[0027] In another aspect, embodiments of this application provide a computer storage medium storing one or more instructions, which are adapted to be loaded by a processor and executed as follows:
[0028] Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0029] Feature extraction is performed on time series data to obtain dynamic change features; these dynamic change features include one or more of the following: periodic features, monotonic features, and stationary features.
[0030] Call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data to obtain the predicted usage of the target resource in the next business cycle;
[0031] Resource management operations are performed on the target resources based on predicted usage.
[0032] In this embodiment, the resource management device acquires time-series data of the target resource, extracts features from the time-series data to obtain dynamic change features, and then calls at least one prediction model that matches the dynamic change features to perform prediction processing on the time-series data, obtaining the predicted usage of the target resource in the next business cycle. Since the resource management method of this application can predict the predicted usage of the next business cycle based on historical usage data included in the time-series data, it can predict resource usage in advance and predict resources in real time. This avoids allocating too many or too few resources, reducing costs and improving operational quality. Furthermore, since this application calls at least one prediction model that matches the dynamic change features of the time-series data to perform prediction processing, the resource management device can adaptively select a matching target prediction model from at least one prediction model based on the dynamic change features. At least one prediction model can be applied to time-series data with different dynamic change features, effectively improving the flexibility and compatibility of the prediction model. Moreover, since the target prediction model matches the dynamic change features, the predicted usage of the next business cycle obtained by the target prediction model is more accurate, thereby avoiding allocating too many or too few resources, reducing costs, and improving operational quality. Attached Figure Description
[0033] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 This is a schematic diagram of the structure of a resource management system provided in an embodiment of this application;
[0035] Figure 2 This is a flowchart illustrating a resource management method provided in an embodiment of this application;
[0036] Figure 3 This is a schematic diagram of a monitoring interface provided in an embodiment of this application;
[0037] Figure 4 This is a schematic diagram of time series data and related data provided in an embodiment of this application;
[0038] Figure 5 This is a flowchart illustrating another resource management method provided in an embodiment of this application;
[0039] Figure 6 This is a flowchart illustrating another resource management method provided in an embodiment of this application;
[0040] Figure 7 This is a schematic diagram of the structure of a resource management device provided in an embodiment of this application;
[0041] Figure 8 This is a schematic diagram of the structure of a resource management device provided in an embodiment of this application. Detailed Implementation
[0042] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0043] Please see Figure 1 , Figure 1 A schematic diagram of the architecture of a resource management system is shown. For example... Figure 1As shown, the resource management system may include at least: resource device 101 and resource management device 102. Resource device 101 can be any device providing resources. Multiple resource devices 101 can constitute a resource pool. Optionally, resource device 101 can be a terminal device, which may include, but is not limited to, smartphones, tablets, laptops, desktop computers, smart home appliances, smart voice interaction devices, wearable devices, vehicle terminals, aircraft, etc. Optionally, such as... Figure 1 As shown, the resource device 101 can also be a server. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or an artificial intelligence platform that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data.
[0044] The resource management device 102 can be any device with resource management capabilities. Optionally, the resource management device 102 can be a device deployed on a cloud management platform. The resource management device 102 can be used to manage the cloud platform. The cloud platform can refer to an information platform built based on cloud computing technology. Cloud computing is a computing model that distributes computing tasks across a resource pool composed of a large number of computers (such as the resource pool provided by resource device 101), enabling various business systems to obtain computing power, storage space, and information services as needed.
[0045] In one embodiment, the resource management device 102 can allocate resources to various business systems. However, when too many resources are allocated, it can easily lead to idle resources and low resource utilization, resulting in increased operating costs for enterprises or organizations. When insufficient resources are allocated, accessibility issues can easily occur when business demands surge or access volume increases, causing significant losses. Therefore, how to accurately manage resources is a problem that urgently needs to be solved. Based on this, this application provides a resource management method. In this method, the resource management device can acquire time-series data of the target resource and extract dynamic change characteristics from the time-series data. These dynamic change characteristics include one or more of periodic characteristics, monotonic characteristics, and stationary characteristics. A target prediction model matching the dynamic change characteristics is invoked to perform prediction processing on the time-series data to obtain the predicted usage of the target resource in the next business cycle. This can obtain a more accurate predicted usage, thereby avoiding excessive or insufficient resources when performing resource management operations based on the predicted usage, improving resource utilization, reducing costs, and enhancing operational quality.
[0046] In one feasible implementation, the resource management method of this application can be applied to the field of cloud resource management. For example, it can be applied to a container cloud management platform, where the resource pool includes, but is not limited to, integrated resources such as central processing units (CPUs), memory, and network bandwidth available for tenant use. The resource management device can manage the resources corresponding to tenants based on this resource management method, meeting tenants' resource needs, avoiding excessive or insufficient resources, effectively improving the resource utilization of the container cloud management platform, and reducing operating costs. It should be noted that, as business development needs arise, this resource management method can also be applied to other resource management scenarios, which will not be elaborated upon in this application.
[0047] Please see Figure 2 , Figure 2 This is a flowchart illustrating a resource management method provided in an embodiment of this application. This resource management method can be executed by the resource management device mentioned above. Figure 2 As shown, this resource management method may include, but is not limited to, S201-S204:
[0048] S201: Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period.
[0049] Resources may include, but are not limited to, CPU, memory, and network bandwidth.
[0050] The usage data is used to indicate resource usage. Optionally, the usage data may include, but is not limited to, one or both of usage amount and utilization rate. Utilization rate can refer to the ratio of usage amount to allocated resource amount. For example, when the target resource is CPU, the allocated CPU resource amount is 100 cores, and the usage amount is 30 cores, the utilization rate can be determined to be 30%. As another example, when the target resource is memory, the allocated memory resource amount is 4000 megabytes (MB), and the usage amount is 2000 MB, the utilization rate can be determined to be 50%. It should be noted that, for network bandwidth, the usage data may include, but is not limited to, one or more of network inbound bandwidth, network outbound bandwidth, packet transmission volume, and packet reception volume.
[0051] The preset time period can be any historical time period. For example, the preset time period can be the five days closest to the current day, or the month closest to the current month, or 15:46:16 on November 29, 2021 to 15:46:16 on December 6, 2021, and so on.
[0052] In one feasible implementation, the resource management device can monitor the usage data of various resources and obtain historical usage data of each resource at various points in time within a preset time period. For example... Figure 3 As shown, for example, for the CPU, the CPU utilization rate at each time point within a preset time period can be obtained; for memory, the memory utilization rate and memory usage at each time point within a preset time period can be obtained; for network bandwidth, the network outgoing bandwidth, network incoming bandwidth, data packet transmission volume, and data packet reception volume at each time point within a preset time period can be obtained. Based on this, the resource management device can obtain the time-series data of the target resource from the historical usage data of each resource at each time point within a preset time period. For example, when the target resource is memory, the time-series data of the target resource can be... Figure 3 301 shown.
[0053] In one feasible implementation, one or more of the following can be obtained from the time series data: extreme values (including minimum and maximum values), extrema (including minimum and maximum values), and average values, to facilitate subsequent steps. For example... Figure 3 As shown in Figure 301, the maximum value of this time series data is 2934.11, the minimum value is 2104.23, and the average value is 2668.58.
[0054] S202: Extract features from time series data to obtain dynamic change features; these dynamic change features include one or more of periodic features, monotonic features, and stationary features.
[0055] Among these features, periodicity can also refer to periodicity. Stationarity can also refer to stationarity, which means that the time series data does not have obvious fluctuations. Monotonicity can also refer to monotonicity (including monotonic upward and monotonic downward). It should be noted that monotonicity can refer to the time series data having an upward or downward trend, and the existence of fluctuations does not affect the monotonicity. That is, the monotonicity mentioned in this application can be non-strictly monotonic upward or monotonic downward.
[0056] In one feasible implementation, the resource management device can invoke different detection models to determine different dynamic change characteristics. Optionally, the resource management device can invoke a periodic detection model to process the time series data and determine whether the dynamic change characteristics include periodicity; and invoke a moving average algorithm model to process the time series data and determine whether the dynamic change characteristics include stationarity or monotonicity.
[0057] The periodicity detection model can include, but is not limited to, one or both of the following: a similarity-based periodicity detection model and an autocorrelation-based periodicity detection model. In one embodiment, when the periodicity detection model is a similarity-based periodicity detection model, the resource management device can call the similarity-based periodicity detection model to process the time series data and determine the frequency domain sequence data. When the frequency domain sequence data contains periodic spike discrete data, the dynamic change characteristic is determined to include periodicity. The period of this spike discrete data is the period of the time series data. When the frequency domain sequence data does not contain periodic spike discrete data, the dynamic change characteristic is determined to exclude periodicity. Optionally, the similarity-based periodicity detection model can be a Fourier transform model. The resource management device can call the Fourier transform model to perform Fourier transform processing on the time series data to obtain the frequency domain sequence data.
[0058] In another implementation, when the period detection model is an autocorrelation period detection model, the resource management device can call the autocorrelation period detection model to process the time series data to obtain correlated data; wherein, the correlated data includes lag values i and correlation coefficient r. i The correspondence is as follows: When the correlated data contains periodic spikes in discrete data, the dynamic change characteristic is determined to include periodicity. The period of these spikes in discrete data is the period of the time series data. When the correlated data does not contain periodic spikes in discrete data, the dynamic change characteristic is determined to exclude periodicity.
[0059] Optional, correlation coefficient r i This represents the correlation coefficient between time series data and lagged series data. Specifically, the correlation coefficient r can be determined using the following expression: i :r i =corr(Y(t),Y(tT) i )).
[0060] Where, r i Y(t) represents the correlation coefficient between time series data and lagged series data, where t is a time point and Y(t) is the time series data, including the usage data of the target resource at time point t; tT i For a time point t, there is a lag of i time points, that is, a time period T lags behind time point t. i ,Y(tT i ) represents lagged sequence data, including usage data of the target resource at lagged i time points. corr refers to correlation operations.
[0061] See Figure 4 , Figure 4 This illustrates a diagram of time series data and related data. For example... Figure 4 As shown, with time t as the horizontal axis and data Y(t) as the vertical axis, a structure can be constructed as follows: Figure 4 The time series data shown (e.g.) Figure 4 (Solid line shown). With the lag value i as the horizontal axis, the correlation coefficient r... i Using the vertical axis, we can construct structures such as Figure 4 The associated data shown (such as) Figure 4 (The dashed line shown). Figure 4 It can be seen that the correlated data contains periodic spikes and discrete data, such as the correlated data in i = n*T. i There is discrete data with spikes, where n is a positive integer (i.e., the period of the discrete data with spikes is T). i ).
[0062] The moving average algorithm model calculates a sequential average of a certain number of items based on time series data to reflect long-term trends. Assume the time series data is Y = [Y1, ..., Y2]. t If we consider the moving average of any timestamp 'a', then we are considering the average value of the data used within a certain window starting from timestamp 'a'. Mathematically, this can be described as:
[0063] Where w is the window size, w ≥ 1. M w (a) is the average value of usage data within a time window starting from timestamp a, and the size of the time window is w.
[0064] Assuming window value l>s≥1, M s (n)-M l (n)>0 indicates that the short-term line crosses above the long-term line, suggesting an upward trend in the time series data; M s (n)-M l (n) < 0 indicates that the short-term line crosses below the long-term line, and the time series data shows a downward trend; that is, when M s (n)-M l (n)>0 or M s (n)-M l When (n) < 0, the dynamic characteristics of time series data include monotonicity. s (n)-M l (n)≈0 indicates that the time series data is in a stationary state, and the dynamic changes in time series data include stationary characteristics. It should be noted that the short line refers to the moving average line corresponding to the window value s, and the long line refers to the moving average line corresponding to the window value l.
[0065] S203: Call at least one of the target prediction models that matches the dynamic change characteristics to perform prediction processing on the time series data, and obtain the predicted usage of the target resource in the next business cycle.
[0066] In one embodiment, the resource management device may divide business cycles for the business system, so as to allocate different resources in different business cycles (that is, perform resource management operations).
[0067] The time of the next business cycle is later than the time of the preset time period. The present application may predict the predicted usage amount of the next business cycle through the historical usage data within the preset time period. It should be noted that when the business cycle is sufficiently small, the present application can obtain the predicted usage amount in real time. Further, the preset time period may include P business cycles, where P is a positive integer. For example, the preset time period may be the 1st historical business cycle to the P-th historical business cycle, and the predicted usage amount of the (P+1)-th business cycle may be predicted through the historical usage data of the target resource from the 1st historical business cycle to the P-th historical business cycle. For another example, the preset time period may be the 1st historical business cycle to the P-th historical business cycle, and the predicted usage amount of the Q-th business cycle may be predicted through the historical usage data of the target resource from the 1st historical business cycle to the P-th historical business cycle, where P<Q, and P and Q are positive integers.
[0068] As can be seen from the foregoing S202, the dynamic change feature includes one or more of a periodic feature, a monotonic feature, and a stationary feature. Different target prediction models matched with different dynamic change features are described in detail below.
[0069] In an embodiment, if the dynamic change feature includes a periodic feature and a monotonic feature (that is, the dynamic change feature includes a periodic feature and a monotonic feature, and does not include a stationary feature), a Long-Short Term Memory (LSTM) model or an eXtreme Gradient Boosting (xgboost) model among the at least one prediction model is determined as the target prediction model.
[0070] The LSTM model is a variant of the Recurrent Neural Network (RNN) model, which makes up for the shortcomings of the traditional RNN model in the processing mode of long-term memory information. In the embodiment of the present application, when the LSTM model in the at least one prediction model is determined as the target prediction model, step 203 specifically includes: acquiring feature data of time series data, and invoking the LSTM model to perform prediction processing on the feature data to obtain the predicted usage amount of the target resource in the next business cycle. Optionally, the feature data of the time series data may include historical usage data of P business cycles, and then the LSTM model may be invoked to perform prediction processing on the historical usage data of the P business cycles, so as to obtain the predicted usage amount of the target resource in the (P+1)-th business cycle.
[0071] The XGBoost model can transform the prediction problem of time series data into a supervised learning regression problem. The XGBRegressor model within the XGBoost model can be used. In this embodiment, when the XGBoost model is determined to be the target prediction model in at least one prediction model, step 203 specifically includes: acquiring the feature data of the time series data, calling the XGBRegressor model within the XGBoost model to perform prediction processing on the feature data, and obtaining the predicted usage of the target resource in the next business cycle. Optionally, the feature data may include sequence features. These sequence features may include, but are not limited to, one or more of the following: sequence statistical features (such as maximum / minimum, extreme / extreme values, mean, median, variance, standard deviation, year-on-year value, month-on-month value, and autocorrelation coefficient), sequence fitting features (such as moving average algorithm features, autoregressive features, and learning features), and sequence classification features (such as wavelet analysis features, numerical analysis features, and entropy features).
[0072] In another implementation, if the dynamic change characteristics include periodic characteristics (i.e., the dynamic change characteristics include periodic characteristics but exclude stationary and monotonic characteristics), then at least one of the prediction models, either the same-year / month-on-month regularity model or the Autoregressive Integrated Moving Average (ARIMA) model, is identified as the target prediction model.
[0073] The year-on-year / month-on-month correlation model is a correlation model that determines the predicted usage for the next business cycle based on year-on-year or month-on-month values and the usage in the current business cycle. The predicted usage for the next business cycle can be determined using the following formula: Y K+1 =Y K *(1+z), where Y K Z can refer to the usage in the Kth business cycle, and Z can refer to the same-cycle value or the cycle-year value, which can be positive or negative. K+1 It can refer to the predicted usage in the (K+1)th business cycle, where K is a positive integer.
[0074] For example, using the above formula, when the year-on-year value is 30% higher, the predicted usage for the next business cycle can be determined to be 1.3 times the usage for the current business cycle; when the month-on-month value is 30% lower, the predicted usage for the next business cycle can be determined to be 0.7 times the usage for the current business cycle.
[0075] In this embodiment of the application, when the year-on-year / month-on-month correlation model among at least one prediction model is determined as the target prediction model, step 203 specifically includes: acquiring the feature data of the time series data, calling the year-on-year / month-on-month correlation model to perform prediction processing on the feature data, and obtaining the predicted usage of the target resource in the next business cycle. Optionally, the feature data of the time series data may include the usage in the Kth business cycle, then the year-on-year / month-on-month correlation model can be called to perform prediction processing on the usage in the Kth business cycle to obtain the predicted usage of the target resource in the (K+1)th business cycle.
[0076] The ARIMA model is a model for predicting time series data. The ARIMA model can be described by the following formula: Among them, Y t For time series data, Δ d Y t Y represents t Stationary time series data after d differencing, ε t-1 φ represents a sequence of white noise random errors with zero mean. m (m = 1, 2…p) and θ n (m=1,2…p) are the parameters to be estimated in the ARIMA model, where p and q are the order of the model. It should be noted that the ARIMA model can be represented as ARIMA(p,d,q).
[0077] In this embodiment of the application, when the ARIMA model among at least one prediction model is determined to be the target prediction model, step 203 specifically includes: acquiring feature data of the time series data, calling the ARIMA model to perform prediction processing on the feature data, and obtaining the predicted usage of the target resource in the next business cycle. Optionally, the feature data of the time series data may include the usage over a preset time period, so the ARIMA model can be called to perform prediction processing on the usage over the preset time period to obtain the predicted usage of the target resource in the next business cycle.
[0078] In another embodiment, if the dynamic change features include monotonic features (i.e., the dynamic change features include monotonic features but exclude periodic and stationary features), then at least one of the prediction models is identified as the target prediction model, specifically the Exponentially Weighted Moving Average (EWMA) model.
[0079] EWMA (Exponentially Weighted Moving Average) is a method that assigns different weights to EWMA values, calculates a moving average based on these weights, and uses this final moving average as the basis for determining the predicted usage. The exponentially weighted moving average model is used because recent EWMA values have a significant impact on predicted usage and better reflect recent trends in resource usage. Specifically, the predicted usage for the next business cycle can be determined using the following expression: V k+1 =βV k +(1-β)Y k , where Y k V represents the predicted usage for the Kth business cycle, where K is a positive integer. The coefficient β represents the weighted rate of decrease; the smaller the value, the faster the rate of decrease, 0 < β < 1. k V represents the EWMA value for historical business cycles. k+1 This is the EWMA value for the next business cycle. For example, when β = 0.9, V k+1 =0.9V k +0.1Y k+1 When β = 0.98, V k+1 =0.98V k +0.02Y k+1 .
[0080] In this embodiment of the application, when the EWMA model in at least one prediction model is determined to be the target prediction model, step 203 specifically includes: acquiring feature data of the time series data, calling the EWMA model to perform prediction processing on the feature data, and obtaining the predicted usage of the target resource in the next business cycle. Optionally, the feature data of the time series data may include the usage in the Kth business cycle. Then, the EWMA model can be called to determine the EWMA value of the (K+1)th business cycle based on the usage in the Kth business cycle and the EWMA value of the Kth business cycle, thereby determining the predicted usage of the target resource in the (K+1)th business cycle.
[0081] In another embodiment, if the dynamic change characteristics include stationary characteristics (i.e., the dynamic change characteristics include stationary characteristics but exclude periodic and monotonic characteristics), then the 3sigma criterion model in at least one prediction model is determined as the target prediction model. In the 3sigma model, the probability that the predicted usage value is distributed within (u-3δ, u+3δ) is 0.9974, therefore any value within (u-3δ, u+3δ) can be used as the predicted usage for the next business cycle. Here, u is the average value of the time series data, and δ is the standard deviation of the time series data. In this embodiment, when the 3sigma model in at least one prediction model is determined as the target prediction model, step 203 specifically includes: obtaining the feature data of the time series data, calling the 3sigma model to perform prediction processing on the feature data, and obtaining the predicted usage of the target resource in the next business cycle. Optionally, the feature data includes the average value and standard deviation of the time series data.
[0082] It is important to understand that before using at least one prediction model that matches the dynamically changing characteristics to predict the usage of the target resource in the next business cycle from time-series data, the initialized neural network needs to be trained to obtain the prediction model. This can specifically include the following steps:
[0083] S11: Obtain sample sequence data; the sample sequence data includes the usage data of the target resource in each of the H business cycles; H is an integer greater than 1.
[0084] Optionally, the description of the sample sequence data is similar to that of the time series data in step S201, and will not be repeated here.
[0085] S12: Determine training samples based on the usage data of the target resource in at least one business cycle out of H business cycles, and determine the supervision information of the training samples based on the usage data of the target resource in other business cycles out of H business cycles excluding at least one business cycle.
[0086] In other words, the training samples include usage data for a first number of business cycles, while the supervision information includes usage data for a second number of business cycles following the first number of business cycles in the sample sequence data. For example, if the sample sequence data compiles daily usage data for 30 days from February 1st to March 1st, 2020, it can be divided into days, with each day considered a business cycle. The usage data for the first 20 days (February 1st to February 20th) can be used as the training samples, and the usage data for the last 10 days (February 21st to March 1st) can be used as the corresponding supervision information. It should be noted that, generally, the first number is greater than the second number; in the example above, the first number corresponds to the first 20 days, and the second number corresponds to the last 10 days.
[0087] S13: Obtain feature data of training samples; feature data includes one or two of the sequence features and usage data of the target resource in at least one of the H business cycles, and train the initialized neural network based on the feature data and one or two of the supervision information to obtain the prediction model.
[0088] In one optional implementation, for the initialized LSTM model, the usage data of the target resource in at least one business cycle out of H business cycles can be obtained. The initialized LSTM model is then called to perform prediction processing on the usage data of the target resource in any one business cycle out of at least one business cycle to obtain the predicted usage of the target resource in the next business cycle. The loss value is determined based on the predicted usage and the usage in the supervision information. The parameters of the initialized LSTM model are updated based on the loss value to obtain the trained LSTM model, i.e., the prediction model.
[0089] In another optional implementation, for the initialized xgboost model, the sequence features of the training samples can be obtained, the initialized xgboost model can be called to perform prediction processing on the sequence features to obtain the predicted usage of the target resource in the next business cycle, and the loss value can be determined based on the predicted usage and the usage in the supervision information. The parameters of the initialized xgboost model can be updated based on the loss value to obtain the trained xgboost model, i.e., the prediction model.
[0090] In another optional implementation, for the initialized ARIMA model, usage data of the target resource in at least one business cycle out of H business cycles can be obtained. First, the usage data of the target resource in at least one business cycle out of H business cycles is subjected to d-order differencing to obtain stationary data. Then, the stationary data is processed to obtain the autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF). Finally, by analyzing the autocorrelation plot constructed from the ACF and the partial autocorrelation plot constructed from the PACF, the optimal orders p and q are obtained, thus obtaining the ARIMA model.
[0091] S204: Perform resource management operations on the target resource based on the predicted usage.
[0092] In one feasible implementation, the resource management device can perform expansion or contraction operations on the target resource based on predicted usage.
[0093] In this embodiment, the resource management device acquires time-series data of the target resource, extracts features from the time-series data to obtain dynamic change features, and then calls at least one prediction model that matches the dynamic change features to perform prediction processing on the time-series data, obtaining the predicted usage of the target resource in the next business cycle. Since the resource management method of this application can predict the predicted usage of the next business cycle based on historical usage data included in the time-series data, it can predict resource usage in advance and predict resources in real time. This avoids allocating too many or too few resources, reducing costs and improving operational quality. Furthermore, since this application calls at least one prediction model that matches the dynamic change features of the time-series data to perform prediction processing, the resource management device can adaptively select a matching target prediction model from at least one prediction model based on the dynamic change features. At least one prediction model can be applied to time-series data with different dynamic change features, effectively improving the flexibility and compatibility of the prediction model. Moreover, since the target prediction model matches the dynamic change features, the predicted usage of the next business cycle obtained by the target prediction model is more accurate, thereby avoiding allocating too many or too few resources, reducing costs, and improving operational quality.
[0094] See above Figure 2 As can be seen from the relevant description of the method embodiments shown, Figure 2 In the resource management method shown, the resource management device can perform resource management operations on target resources based on predicted usage. Please refer to [link to relevant documentation]. Figure 5 , Figure 5 A flowchart illustrating another resource management method is shown. Figure 5 The illustrated embodiments and Figure 2 The difference compared to the illustrated embodiment is that, Figure 5 The illustrated embodiments demonstrate in detail how resource management operations can be performed on target resources based on predicted usage. For example... Figure 5 As shown, the resource management method may include S501-S505:
[0095] S501: Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period.
[0096] S502: Extract features from time series data to obtain dynamic change features; these dynamic change features include one or more of periodic features, monotonic features, and stationary features.
[0097] S503: Call at least one of the target prediction models that matches the dynamic change characteristics to perform prediction processing on the time series data, and obtain the predicted usage of the target resource in the next business cycle.
[0098] It should be noted that steps S501-S503 can be found in the relevant embodiments of S201-S203, and will not be repeated here.
[0099] S504: Obtain the current usage data of the target resource; the current usage data includes the usage and remaining amount in the allocated resource quantity, and when one or more of the current usage data and the predicted usage quantity meet the expansion conditions, determine to perform an expansion operation for the target resource.
[0100] Optionally, the current usage data includes the usage and remaining amount of the allocated resources. For example, the current memory usage data is: allocated resources are 4000MB, usage is 2000MB, and remaining amount is 2000MB.
[0101] In one feasible implementation, a scaling operation is determined to be performed on the target resource when one or more of the current usage data and predicted usage satisfy one or more of the following scaling conditions. Optionally, the scaling conditions include: (1) the utilization rate is greater than a first threshold. Wherein, the utilization rate refers to the ratio of usage to allocated resources. (2) the utilization rate is greater than the first threshold, and the remaining amount of allocated resources is less than a second threshold. (3) the allocated resources are less than the predicted usage. (4) the predicted usage is greater than a third threshold.
[0102] In one alternative implementation, scaling down can also be determined for the target resource when one or more of the current usage data and predicted usage satisfy one or more of the following scaling down conditions. Optionally, the scaling down conditions may include: (1) the usage rate is less than a fourth threshold; (2) the usage rate is less than a first threshold, and the remaining amount of allocated resources is greater than a fifth threshold; (3) the allocated resources are greater than the predicted usage; and (4) the predicted usage is less than a sixth threshold.
[0103] It should be noted that the first, second, third, fourth, fifth, and sixth thresholds can be set according to business needs or experience.
[0104] In one alternative implementation, when one or more of the current usage data and predicted usage meet one or more of the expansion conditions, the resource management device may also output alarm information for the target resource.
[0105] S505: Perform an expansion operation on the target resource.
[0106] In one feasible implementation, the resource management device can determine the predicted demand for the next business cycle based on the predicted usage and current usage data, and use this predicted demand as the resource expansion capacity. Based on this expansion capacity, resource management operations are then performed on the target resource. For example, when the resource expansion capacity is greater than a preset value, an expansion operation is determined for the target resource. When the resource expansion capacity is less than the preset value, a reduction operation is determined for the target resource.
[0107] Optionally, determining the forecasted demand for the next business cycle based on the forecasted usage for the next business cycle and the current usage data includes: using the forecasted usage for the next business cycle as the forecasted demand for the next business cycle.
[0108] Optionally, determining the forecasted demand for the next business cycle based on the forecasted usage and current usage data includes: using the difference between the forecasted usage for the next business cycle and the usage in the allocated resources as the forecasted demand for the next business cycle.
[0109] Optionally, determining the forecasted demand for the next business cycle based on the forecasted usage and current usage data may further include using the difference between the forecasted usage and the allocated resources for the next business cycle as the forecasted demand for the next business cycle.
[0110] Another feasible implementation involves determining the resource expansion capacity by combining the estimated business constraints for the next business cycle, the remaining excess resources in the super-division pool, and the predicted demand for the next business cycle. Based on this expansion capacity, resource management operations can be performed on the target resource. Specifically, as follows... Figure 6 As shown:
[0111] 601. Determine the remaining excess quantity corresponding to the excess quantity based on the excess ratio.
[0112] Optionally, for 601, the super-division pool can support the super-division of physical resources, which can effectively improve the utilization rate of physical resources. For example, physical resources can be reasonably super-divided, allocating more resources to multiple business systems than the actual physical resources they possess. Some business systems utilize physical resources during the day, while others utilize them at night, thus making full use of physical resources. In this embodiment, to effectively improve the utilization rate of remaining resources, the remaining amount in the allocated resource quantity can be super-divided to obtain the remaining super-division component, that is, the remaining super-division component corresponding to the remaining quantity can be determined based on the super-division ratio. For example, when the remaining amount of memory is B and the super-division ratio is 1:2, the remaining super-division component corresponding to the remaining amount can be determined to be 2B based on the super-division ratio. It should be noted that the remaining super-division component in the super-division pool is unused. When calculating the resource expansion capacity, the remaining super-division component can be subtracted to make full use of the resources in the super-division pool and avoid over-expansion.
[0113] 602. Obtain the estimated business constraints of the target resource in the next business cycle.
[0114] Optionally, for 602, when a business system has constraints such as business growth plans or Key Performance Indicators (KPIs), the resource requirements of the business system may change significantly. Therefore, when performing expansion operations, it is also necessary to consider the estimated business constraints corresponding to the constraints. Specifically, the resource management device can obtain the business constraints for the next business cycle and determine the estimated business constraints of the target resource in the next business cycle based on the allocated resource amount of the target resource and the business constraints. For example, if the constraint of the business system is that the business growth is twice that of the current business cycle, and the allocated resource amount of the target resource in the current business cycle is S, then the estimated business constraint for the next business cycle is 2S.
[0115] 603. Determine the forecasted demand for the next business cycle based on the predicted usage for the next business cycle and the current usage data.
[0116] Optionally, for 603, when calculating resource expansion capacity, it is necessary to consider the predicted demand to fully meet the resource needs of the business system and avoid resource shortages.
[0117] 604. Determine the resource expansion capacity of the target resources based on the estimated amount of business constraints, the remaining excess amount, and the predicted demand.
[0118] Optionally, for 604, the specific steps include: obtaining the total demand for the target resource in the next business cycle based on the estimated and predicted demand based on business constraints, and obtaining the resource expansion capacity of the target resource based on the difference between the total demand and the remaining excess and the excess ratio.
[0119] In one alternative implementation, the resource expansion capacity can be determined by the following formula: (Estimated business constraints + Forecasted demand - Remaining excess capacity) * Excess capacity ratio.
[0120] For example, when the expanded resources can also be over-divided, the over-dividing ratio is 1:2, the estimated business constraint is 2S, the predicted demand is A, and the remaining over-dividing is 2B.
[0121]
[0122] For example, when the expanded resources are not over-divided, the over-divided ratio is 1:1, and the resource expansion capacity = 2S + A - 2B.
[0123] In one feasible implementation, corresponding resource management operations can be performed based on the relationship between the resource expansion capacity and a preset value. Specifically, when the resource expansion capacity is greater than the preset value (e.g., 2S+A-2B>0), the resource management device determines that the total demand for the next business cycle is greater than the remaining excess amount, and thus requires an expansion operation for the target resource based on the resource expansion capacity. When the resource expansion capacity is equal to the preset value (e.g., 2S+A-2B=0), the resource management device determines that the total demand for the next business cycle is equal to the remaining excess amount, and the remaining amount needs to be fully over-divided, without requiring an expansion operation for the target resource. When the resource expansion capacity is less than the preset value (e.g., 2S+A-2B<0), the resource management device determines that the total demand for the next business cycle is less than the remaining excess amount, and the remaining amount is either not over-divided or only partially over-divided, without requiring an expansion operation for the target resource.
[0124] Furthermore, when there is no need to perform an expansion operation on the target resource, a reduction operation on the target resource can be considered, which can effectively save resources and avoid waste. For example, when the resource expansion capacity equals a preset value (such as 2S+A-2B=0), the over-division ratio of the remaining amount can be increased, and the excess remaining amount can be released. For example, if the over-division ratio is updated from 1:2 to 1:4, and the remaining over-division amount corresponding to B / 2 of the remaining amount is determined to be 2B, a reduction operation (i.e., releasing that part of the target resource) can be performed on the target resource with the remaining amount of B / 2.
[0125] 605. Perform resource management operations on the target resource based on resource capacity expansion.
[0126] In this embodiment, a super-division pool is considered, which can super-divide resources, effectively improving resource utilization and reducing expansion costs. Furthermore, this application also considers the estimated business constraints for the next business cycle and the business conditions of business growth dimensions to avoid resource shortages. In addition, this embodiment combines the estimated business constraints for the next business cycle, the remaining super-division pool, and the predicted demand for the next business cycle to determine resource expansion capacity, fully considering relevant factors and scenario requirements of resource management, and meeting the actual needs of the business system. This avoids excessive or insufficient resource expansion, effectively improving resource utilization, reducing costs, and improving operational quality.
[0127] Based on the description of the above resource management method embodiments, this application also discloses a resource management device, which can be a computer program (including program code) running on the aforementioned resource management equipment. This resource management device can execute... Figure 2 or Figure 5 The method shown.
[0128] Please see Figure 7 The resource management device can operate the following units:
[0129] The acquisition unit 701 is used to acquire time series data of the target resource, which includes historical usage data of the target resource at various time points in a preset time period;
[0130] The feature extraction unit 702 is used to extract features from time series data to obtain dynamic change features; the dynamic change features include one or more of periodic features, monotonic features, and stationary features;
[0131] The prediction processing unit 703 is used to call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data, so as to obtain the predicted usage of the target resource in the next business cycle.
[0132] Processing unit 704 is used to perform resource management operations on target resources based on predicted usage.
[0133] In one implementation, the resource management operation includes a capacity expansion operation, and the processing unit 704 is configured to perform the resource management operation on the target resource based on the predicted usage, including:
[0134] Obtain the current usage data of the target resource; the current usage data includes the used amount and the remaining amount of the allocated resource.
[0135] When one or more of the current usage data and the predicted usage meet the expansion conditions, perform an expansion operation on the target resource.
[0136] In another embodiment, the processing unit 704 is configured to perform a scaling operation on the target resource, including:
[0137] Determine the projected demand for the next business cycle based on current usage data and projected usage.
[0138] The remaining excess quantity is determined based on the excess ratio;
[0139] Obtain the estimated business constraints of the target resource in the next business cycle, and determine the resource expansion capacity of the target resource based on the estimated business constraints, the remaining excess amount, and the predicted demand.
[0140] If the resource expansion capacity is greater than the preset value, then an expansion operation will be performed on the target resource based on the resource expansion capacity.
[0141] In another embodiment, the processing unit 704 is used to determine the resource expansion capacity of the target resource based on the estimated business constraints, the remaining excess quantity, and the predicted demand, including:
[0142] Based on business constraints, estimate and forecast demand to obtain the total demand for target resources in the next business cycle;
[0143] Based on the difference between the total demand and the remaining excess, as well as the excess ratio, the resource expansion capacity of the target resource is obtained.
[0144] In another embodiment, the processing unit 704 is used to obtain the estimated business constraints of the target resource in the next business cycle, including:
[0145] Obtain the business constraints for the next business cycle;
[0146] Based on the allocated resources and business constraints of the target resources, the estimated business constraints of the target resources in the next business cycle are determined.
[0147] In another embodiment, the prediction processing unit 703 is further configured to:
[0148] If the dynamic change characteristics include periodic and monotonic features, then at least one prediction model, either a long short-term memory recurrent neural network model or a limit gradient boosting algorithm model, is selected as the target prediction model.
[0149] If the dynamic change characteristics include periodic characteristics, then at least one of the prediction models, either the same-year / month-on-month regularity model or the differential integrated moving average autoregressive model, is identified as the target prediction model.
[0150] If the dynamic change characteristics include monotonic characteristics, then at least one exponentially weighted moving average model in the prediction model is identified as the target prediction model.
[0151] If the dynamic change characteristics include stationary characteristics, then at least one of the prediction models is identified as the target prediction model based on the three sigma criterion.
[0152] In another embodiment, the prediction processing unit 703 is further configured to:
[0153] Obtain sample sequence data; this sample sequence data includes the usage data of the target resource in each of the H business cycles; H is an integer greater than 1;
[0154] Training samples are determined based on usage data of the target resource in at least one of the H business cycles, and supervision information for the training samples is determined based on usage data of the target resource in other business cycles besides at least one of the H business cycles.
[0155] Obtain feature data of the training samples; the feature data includes one or both of the sequence features and the usage data of the target resource in at least one of the H business cycles.
[0156] The initial neural network is trained based on one or two of the feature data and supervision information to obtain a prediction model.
[0157] In another embodiment, the feature extraction unit 702 is used to extract features from time series data to obtain dynamically changing features, including:
[0158] The periodicity detection model is invoked to process time series data to determine whether the dynamic change characteristics include periodicity;
[0159] The moving average algorithm model is used to process time series data to determine whether the dynamic change characteristics include stationarity or monotonicity.
[0160] In another embodiment, the periodicity detection model includes a similarity periodicity detection model. The feature extraction unit 702 is used to call the periodicity detection model to process the time series data and determine whether the dynamic change features include periodicity, including:
[0161] The similarity periodicity detection model is called to process the time series data to determine the frequency domain sequence data;
[0162] When there are periodic spikes in the frequency domain sequence data, the dynamic change characteristics include periodicity.
[0163] In another embodiment, the periodicity detection model includes an autocorrelation periodicity detection model, and the feature extraction unit 702 is used to call the periodicity detection model to process the time series data and determine whether the dynamic change features include periodicity, including:
[0164] The time series data is processed using an autocorrelation period detection model to obtain correlated data. This correlated data includes the correspondence between lag values i and correlation coefficients. The correlation coefficient is the correlation coefficient between the time series data and the lagged series data. The lagged series data includes the usage data of the target resource at lag i time points, where i is a positive integer.
[0165] When the associated data contains periodic punctuated discrete data, the dynamic change characteristics include periodicity.
[0166] According to one embodiment of this application, Figure 2 or Figure 5 Each step involved in the method shown can be performed by... Figure 7 The resource management device shown is executed by each unit. According to another embodiment of this application, Figure 7 The units in the resource management device shown can be individually or entirely merged into one or more other units, or some of the units can be further divided into multiple functionally smaller units. This achieves the same operation without affecting the technical effects of the embodiments of this application. The above units are based on logical function division. In practical applications, the function of one unit can be implemented by multiple units, or the function of multiple units can be implemented by one unit. In other embodiments of this application, the resource management device may also include other units. In practical applications, these functions can also be implemented with the assistance of other units, and can be implemented collaboratively by multiple units.
[0167] According to another embodiment of this application, processing elements and storage elements, such as a central processing unit (CPU), random access storage medium (RAM), and read-only storage medium (ROM), can be used. For example, a general-purpose computing device such as a computer can run on a device capable of performing tasks such as... Figure 2 or Figure 5 The computer program (including program code) for each step involved in the corresponding method shown, to construct such... Figure 7 The resource management apparatus shown herein, and the resource management method for implementing the embodiments of this application, are described. A computer program may be recorded on, for example, a computer-readable recording medium, loaded onto the aforementioned resource management apparatus via the computer-readable recording medium, and executed therein.
[0168] In this embodiment, the resource management device acquires time-series data of the target resource, extracts features from the time-series data to obtain dynamic change features, and then calls at least one prediction model that matches the dynamic change features to perform prediction processing on the time-series data, obtaining the predicted usage of the target resource in the next business cycle. Since the resource management method of this application can predict the predicted usage of the next business cycle based on historical usage data included in the time-series data, it can predict resource usage in advance and predict resources in real time. This avoids allocating too many or too few resources, reducing costs and improving operational quality. Furthermore, since this application calls at least one prediction model that matches the dynamic change features of the time-series data to perform prediction processing, the resource management device can adaptively select a matching target prediction model from at least one prediction model based on the dynamic change features. At least one prediction model can be applied to time-series data with different dynamic change features, effectively improving the flexibility and compatibility of the prediction model. Moreover, since the target prediction model matches the dynamic change features, the predicted usage of the next business cycle obtained by the target prediction model is more accurate, thereby avoiding allocating too many or too few resources, reducing costs, and improving operational quality.
[0169] Based on the description of the above resource management method embodiments, this application also discloses a resource management device. Please refer to... Figure 8 The resource management device includes at least a processor 801, an input interface 802, an output interface 803, and a computer storage medium 804, which can be connected via a bus or other means.
[0170] The computer storage medium 804 is a memory device in the resource management device, used to store programs and data. It is understood that the computer storage medium 804 can include the built-in storage medium of the resource management device, or it can include extended storage media supported by the resource management device. The computer storage medium 804 provides storage space that stores the operating system of the resource management device. Furthermore, this storage space also stores one or more instructions suitable for loading and execution by the processor 801. These instructions can be one or more computer programs (including program code). It should be noted that the computer storage medium can be a high-speed RAM memory; optionally, it can also be at least one computer storage medium located remotely from the aforementioned processor. The processor can be called a Central Processing Unit (CPU), which is the core and control center of the resource management device, suitable for implementing one or more instructions, specifically loading and executing one or more instructions to achieve the corresponding method flow or function.
[0171] In one embodiment, processor 801 may load and execute one or more instructions stored in computer storage medium 804 to perform, for example, Figure 2 or Figure 5 In the specific implementation of the corresponding methods shown, one or more instructions in the computer storage medium 804 are loaded by the processor 801 and executed in the following steps:
[0172] Obtain time-series data of the target resource, which includes historical usage data of the target resource at various points in time within a preset time period;
[0173] Feature extraction is performed on time series data to obtain dynamic change features; these dynamic change features include one or more of the following: periodic features, monotonic features, and stationary features.
[0174] Call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on time series data to obtain the predicted usage of the target resource in the next business cycle;
[0175] Resource management operations are performed on the target resources based on predicted usage.
[0176] In one implementation, the resource management operation includes a capacity expansion operation, wherein the processor 801 is configured to perform the resource management operation on a target resource based on predicted usage, including:
[0177] Obtain the current usage data of the target resource; the current usage data includes the used amount and the remaining amount of the allocated resource.
[0178] When one or more of the current usage data and the predicted usage meet the expansion conditions, perform an expansion operation on the target resource.
[0179] In another embodiment, the processor 801 is used to perform an expansion operation on the target resource, including:
[0180] Determine the projected demand for the next business cycle based on current usage data and projected usage.
[0181] The remaining excess quantity is determined based on the excess ratio;
[0182] Obtain the estimated business constraints of the target resource in the next business cycle, and determine the resource expansion capacity of the target resource based on the estimated business constraints, the remaining excess amount, and the predicted demand.
[0183] If the resource expansion capacity is greater than the preset value, then an expansion operation will be performed on the target resource based on the resource expansion capacity.
[0184] In another embodiment, the processor 801 is configured to determine the resource expansion capacity of the target resource based on the estimated business constraints, the remaining excess quantity, and the predicted demand, including:
[0185] Based on business constraints, estimate and forecast demand to obtain the total demand for target resources in the next business cycle;
[0186] Based on the difference between the total demand and the remaining excess, as well as the excess ratio, the resource expansion capacity of the target resource is obtained.
[0187] In another embodiment, the processor 801 is used to obtain the estimated business constraints of the target resource in the next business cycle, including:
[0188] Obtain the business constraints for the next business cycle;
[0189] Based on the allocated resources and business constraints of the target resources, the estimated business constraints of the target resources in the next business cycle are determined.
[0190] In another embodiment, the processor 801 is further configured to:
[0191] If the dynamic change characteristics include periodic and monotonic features, then at least one prediction model, either a long short-term memory recurrent neural network model or a limit gradient boosting algorithm model, is selected as the target prediction model.
[0192] If the dynamic change characteristics include periodic characteristics, then at least one of the prediction models, either the same-year / month-on-month regularity model or the differential integrated moving average autoregressive model, is identified as the target prediction model.
[0193] If the dynamic change characteristics include monotonic characteristics, then at least one exponentially weighted moving average model in the prediction model is identified as the target prediction model.
[0194] If the dynamic change characteristics include stationary characteristics, then at least one of the prediction models is identified as the target prediction model based on the three sigma criterion.
[0195] In another embodiment, the processor 801 is further configured to:
[0196] Obtain sample sequence data; this sample sequence data includes the usage data of the target resource in each of the H business cycles; H is an integer greater than 1;
[0197] Training samples are determined based on usage data of the target resource in at least one of the H business cycles, and supervision information for the training samples is determined based on usage data of the target resource in other business cycles besides at least one of the H business cycles.
[0198] Obtain feature data of the training samples; the feature data includes one or both of the sequence features and the usage data of the target resource in at least one of the H business cycles.
[0199] The initial neural network is trained based on one or two of the feature data and supervision information to obtain a prediction model.
[0200] In another embodiment, the processor 801 is used to extract features from time series data to obtain dynamically changing features, including:
[0201] The periodicity detection model is invoked to process time series data to determine whether the dynamic change characteristics include periodicity;
[0202] The moving average algorithm model is used to process time series data to determine whether the dynamic change characteristics include stationarity or monotonicity.
[0203] In another embodiment, the periodicity detection model includes a similarity periodicity detection model. The processor 801 is used to call the periodicity detection model to process the time series data and determine whether the dynamic change features include periodicity, including:
[0204] The similarity periodicity detection model is called to process the time series data to determine the frequency domain sequence data;
[0205] When there are periodic spikes in the frequency domain sequence data, the dynamic change characteristics include periodicity.
[0206] In another embodiment, the periodicity detection model includes an autocorrelation periodicity detection model. The processor 801 is used to call the periodicity detection model to process the time series data and determine whether the dynamic change characteristics include periodicity, including:
[0207] The time series data is processed using an autocorrelation period detection model to obtain correlated data. This correlated data includes the correspondence between lag values i and correlation coefficients. The correlation coefficient is the correlation coefficient between the time series data and the lagged series data. The lagged series data includes the usage data of the target resource at lag i time points, where i is a positive integer.
[0208] When the associated data contains periodic punctuated discrete data, the dynamic change characteristics include periodicity.
[0209] In this embodiment, the resource management device acquires time-series data of the target resource, extracts features from the time-series data to obtain dynamic change features, and then calls at least one prediction model that matches the dynamic change features to perform prediction processing on the time-series data, obtaining the predicted usage of the target resource in the next business cycle. Since the resource management method of this application can predict the predicted usage of the next business cycle based on historical usage data included in the time-series data, it can predict resource usage in advance and predict resources in real time. This avoids allocating too many or too few resources, reducing costs and improving operational quality. Furthermore, since this application calls at least one prediction model that matches the dynamic change features of the time-series data to perform prediction processing, the resource management device can adaptively select a matching target prediction model from at least one prediction model based on the dynamic change features. At least one prediction model can be applied to time-series data with different dynamic change features, effectively improving the flexibility and compatibility of the prediction model. Moreover, since the target prediction model matches the dynamic change features, the predicted usage of the next business cycle obtained by the target prediction model is more accurate, thereby avoiding allocating too many or too few resources, reducing costs, and improving operational quality.
[0210] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the resource management method embodiment described above. Figure 2 or Figure 5 The steps performed in the process.
[0211] This application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, which includes program instructions. When these program instructions are executed by a processor, they can perform the resource management method embodiments described above. Figure 2 or Figure 5 The steps performed in the process.
[0212] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0213] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Those skilled in the art will understand that all or part of the processes for implementing the above embodiments and equivalent variations made in accordance with the claims of this application are still within the scope of this application.
Claims
1. A resource management method, characterized in that, The method includes: Obtain time-series data of the target resource, wherein the time-series data includes historical usage data of the target resource at various points in time within a preset time period; Feature extraction is performed on the time series data to obtain dynamic change features; the dynamic change features include one or more of periodic features, monotonic features, and stationary features. The time series data is processed by calling at least one target prediction model that matches the dynamic change characteristics to obtain the predicted usage of the target resource in the next business cycle. Based on the predicted usage, perform resource management operations on the target resource; The resource management operation includes a capacity expansion operation, and the execution of the resource management operation for the target resource based on the predicted usage includes: Obtain the current usage data of the target resource; the current usage data includes the used amount and the remaining amount of the allocated resource. When one or more of the current usage data and the predicted usage meet the expansion conditions, the predicted demand for the next business cycle is determined based on the current usage data and the predicted usage. The remaining excess component corresponding to the remaining quantity is determined based on the excess ratio; the estimated business constraint of the target resource in the next business cycle is obtained, and the resource expansion capacity of the target resource is determined based on the estimated business constraint, the remaining excess component, and the predicted demand. If the resource expansion capacity is greater than a preset value, then an expansion operation is performed on the target resource based on the resource expansion capacity.
2. The method as described in claim 1, characterized in that, The step of determining the resource expansion capacity of the target resource based on the estimated business constraints, the remaining excess quantity, and the predicted demand includes: Based on the estimated business constraints and the predicted demand, the total demand for the target resource in the next business cycle is obtained. Based on the difference between the total demand and the remaining excess amount, and the excess proportion, the resource expansion capacity of the target resource is obtained.
3. The method as described in claim 1, characterized in that, The process of obtaining the estimated business constraints of the target resource in the next business cycle includes: Obtain the business constraints for the next business cycle; Based on the allocated resource amount of the target resource and the business constraints, the estimated business constraint amount of the target resource in the next business cycle is determined.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: If the dynamic change features are the periodic features and the monotonic features, then the long short-term memory recurrent neural network model or the extreme gradient boosting algorithm model in the at least one prediction model is determined as the target prediction model; If the dynamic change characteristic is the periodic characteristic, then the year-on-year / month-on-month regularity model or the differential integrated moving average autoregressive model in the at least one prediction model is determined as the target prediction model; If the dynamic change feature is the monotonic feature, then the exponentially weighted moving average model in the at least one prediction model is determined as the target prediction model; If the dynamic change feature is the stationary feature, then the three sigma criterion model in the at least one prediction model is determined as the target prediction model.
5. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain sample sequence data; the sample sequence data includes usage data of the target resource in each of the H business cycles; H is an integer greater than 1; Training samples are determined based on usage data of the target resource in at least one of the H business cycles, and supervision information of the training samples is determined based on usage data of the target resource in other business cycles besides the at least one business cycle in the H business cycles. Obtain feature data of the training samples; the feature data includes one or both of the sequence features and the usage data of the target resource in at least one business cycle of the H business cycles; The initial model is trained based on one or both of the feature data and the supervision information to obtain the prediction model.
6. The method according to any one of claims 1 to 3, characterized in that, The step of extracting features from the time series data to obtain dynamic change features includes: The time series data is processed by calling a periodicity detection model to determine whether the dynamic change features include the periodic features; The time series data is processed by calling a moving average algorithm model to determine whether the dynamic change characteristics include the stationary characteristics or the monotonic characteristics.
7. The method as described in claim 6, characterized in that, The periodicity detection model includes a similarity periodicity detection model. The process of calling the periodicity detection model to process the time series data and determine whether the dynamic change features include the periodic features includes: The similarity periodicity detection model is invoked to process the time series data to determine the frequency domain sequence data; When the frequency domain sequence data contains periodic spike discrete data, the dynamic change feature is determined to include the periodic feature.
8. The method as described in claim 6, characterized in that, The periodicity detection model includes an autocorrelation periodicity detection model. The process of calling the periodicity detection model to process the time series data and determine whether the dynamic change features include the periodic features includes: The time series data is processed by the autocorrelation period detection model to obtain correlated data; the correlated data includes the correspondence between lag value i and correlation coefficient; the correlation coefficient is the correlation coefficient between the time series data and the lag series data; the lag series data includes the usage data of the target resource at lag i time points; i is a positive integer; When the associated data contains periodic discrete spike data, the dynamic change feature is determined to include the periodic feature.
9. A resource management device, characterized in that, The device includes: An acquisition unit is used to acquire time-series data of a target resource, the time-series data including historical usage data of the target resource at various points in time within a preset time period; The feature extraction unit is used to extract features from the time series data to obtain dynamic change features; the dynamic change features include one or more of periodic features, monotonic features, and stationary features. A prediction processing unit is used to call at least one prediction model that matches the dynamic change characteristics to perform prediction processing on the time series data, so as to obtain the predicted usage of the target resource in the next business cycle. The processing unit is configured to perform resource management operations on the target resource based on the predicted usage. The resource management operation includes a capacity expansion operation, and the processing unit is specifically used for: Obtain the current usage data of the target resource; the current usage data includes the used amount and the remaining amount of the allocated resource. When one or more of the current usage data and the predicted usage meet the expansion conditions, the predicted demand for the next business cycle is determined based on the current usage data and the predicted usage. The remaining excess component corresponding to the remaining quantity is determined based on the excess ratio; the estimated business constraint of the target resource in the next business cycle is obtained, and the resource expansion capacity of the target resource is determined based on the estimated business constraint, the remaining excess component, and the predicted demand. If the resource expansion capacity is greater than a preset value, then an expansion operation is performed on the target resource based on the resource expansion capacity.
10. A resource management device, comprising an input interface and an output interface, characterized in that, Also includes: A processor, adapted to implement one or more instructions; as well as, A computer storage medium storing one or more instructions adapted for loading by the processor and executing the resource management method as described in any one of claims 1 to 8.
11. A computer storage medium, characterized in that, The computer storage medium stores one or more instructions, which are adapted to be loaded by a processor and executed using the resource management method as described in any one of claims 1 to 8.
12. A computer program product, characterized in that, The computer program product includes computer instructions, which, when executed by a processor, implement the resource management method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Data processing method of predicting resource consumption
CN105678414A