WO2024040947A1 - 一种基于深度学习的服务器负载预测方法 - Google Patents

一种基于深度学习的服务器负载预测方法 Download PDF

Info

Publication number
WO2024040947A1
WO2024040947A1 PCT/CN2023/082143 CN2023082143W WO2024040947A1 WO 2024040947 A1 WO2024040947 A1 WO 2024040947A1 CN 2023082143 W CN2023082143 W CN 2023082143W WO 2024040947 A1 WO2024040947 A1 WO 2024040947A1
Authority
WO
WIPO (PCT)
Prior art keywords
sequence
server
load
layer
attention mechanism
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2023/082143
Other languages
English (en)
French (fr)
Inventor
邓水光
陈飞佚
赵海亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University Zhongyuan Institute
Zhejiang University
Original Assignee
Zhejiang University Zhongyuan Institute
Zhejiang University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhejiang University Zhongyuan Institute, Zhejiang University filed Critical Zhejiang University Zhongyuan Institute
Priority to US18/281,770 priority Critical patent/US12542719B2/en
Publication of WO2024040947A1 publication Critical patent/WO2024040947A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00—Network arrangements or protocols for supporting network services or applications
    • H04L67/01—Protocols
    • H04L67/10—Protocols in which an application is distributed across nodes in the network
    • H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004—Server selection for load balancing
    • H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00—Arrangements for monitoring or testing data switching networks
    • H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/04—Architecture, e.g. interconnection topology
    • G06N3/044—Recurrent networks, e.g. Hopfield networks
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/04—Architecture, e.g. interconnection topology
    • G06N3/044—Recurrent networks, e.g. Hopfield networks
    • G06N3/0442—Recurrent networks, e.g. Hopfield networks characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/04—Architecture, e.g. interconnection topology
    • G06N3/045—Combinations of networks
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/04—Architecture, e.g. interconnection topology
    • G06N3/049—Temporal neural networks, e.g. delay elements, oscillating neurons or pulsed inputs
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/08—Learning methods
    • G—PHYSICS
    • G06—COMPUTING OR CALCULATING; COUNTING
    • G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00—Computing arrangements based on biological models
    • G06N3/02—Neural networks
    • G06N3/08—Learning methods
    • G06N3/084—Backpropagation, e.g. using gradient descent
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/16—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks using machine learning or artificial intelligence
    • H—ELECTRICITY
    • H04—ELECTRIC COMMUNICATION TECHNIQUE
    • H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00—Network arrangements or protocols for supporting network services or applications
    • H04L67/01—Protocols
    • H04L67/10—Protocols in which an application is distributed across nodes in the network
    • H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • H04L67/1004—Server selection for load balancing
    • H04L67/1012—Server selection for load balancing based on compliance of requirements or conditions with available server resources

Definitions

  • the invention belongs to the technical field of cloud computing, and specifically relates to a server load prediction method based on deep learning.
  • Cloud service providers provide scalable on-demand services to most ordinary application developers, facilitate application development, and reduce server operation and maintenance costs for ordinary developers. Therefore, cloud computing has boomed with the development of the Internet in recent years, and a large number of cloud service providers have emerged. Among them, Amazon and Facebook Cloud can provide cloud services with reliability as high as 99.65%.
  • the average CPU utilization of Google clusters is less than 35%, and the CPU utilization of 60% of virtual machines in Microsoft clusters is less than 20%.
  • the present invention provides a server load prediction method based on deep learning.
  • a deep neural network prediction model is established to optimize peak load prediction.
  • a server load prediction method based on deep learning including the following steps:
  • the load of the server is targeted at the CPU or memory resources of the server.
  • step (1) divide the load utilization sequence of the server in the past period of time into two segments, use the load utilization sequence of the previous period as the sample sequence, and use the load utilization sequence of the later period as the sample sequence.
  • the proportion of data in the previous period is greater than that in the later period.
  • step (2) for the load utilization sequence of the server in the past period of time, first calculate the autocorrelation coefficient signal of the sequence, and take the abscissa corresponding to the second peak of the correlation coefficient signal. The value is taken as the period length T, and the abscissa value represents the time interval length; then the load utilization sequence of the T time length before the tag sequence is taken as the periodic information.
  • the periodic information adaptive model is composed of an encoder module and a decoder module.
  • the encoder module includes a downsampling layer, a multi-head self-attention mechanism layer and an LSTM (Long Short-Term Memory, long short-term memory network) layer L1.
  • the decoder The module includes LSTM layer L2 and three attention mechanism layers A1 to A3.
  • step (4) first divide the sample sequence into two segments and the front sequence is longer than the back sequence, input the front sequence into the downsampling layer for downsampling, and input the downsampled result into the multi-head sequence.
  • the self-attention mechanism layer input the back sequence into the LSTM layer L1, input the hidden state of the LSTM layer L1 into the attention mechanism layer A1 as a query, and at the same time input the multi-head self-attention mechanism layer
  • the output is used as the key-value pair of the attention mechanism layer A1, the output result of the attention mechanism layer A1 is used as the initial hidden state of the LSTM layer L2, and the output of the LSTM layer L1 is used as the input of the LSTM layer L2; the decoder module needs to The hidden state of the last LSTM layer L2 is input to the attention mechanism layer A2 as a query, and the output of the multi-head self-attention mechanism layer is used as the key-value pair of the attention mechanism layer A2.
  • the output of the LSTM layer L2 and the periodic information are jointly used as The key-value pair of the attention mechanism layer A3, and the subsequent sequence of the sample sequence is used as a query for the attention mechanism layer A3.
  • the output of the attention mechanism layer A3 is the final prediction result of the model; finally, the relationship between the prediction result and the label sequence is calculated.
  • the loss function uses the subgradient descent method to perform backpropagation updates on the model parameters based on the loss function, and continues iterative updates until the loss function minimizes convergence or reaches the maximum number of iterations, that is, the training is completed.
  • the present invention provides a method that combines period information, long-term trend information and short-term time series information to improve the accuracy of neural network prediction, and shows superiority over traditional methods in the load peak part.
  • the method of the present invention can effectively improve the prediction accuracy and provide cloud service providers with more accurate scheduling and evacuation decision-making basis, thereby reducing the redundant equipment required to ensure high reliability, reducing the operating costs of cloud service providers, and reducing the cost of cloud service tenants. Lease expenses.
  • Figure 1 is a schematic waveform diagram of the autocorrelation coefficient signal of the server load utilization sequence.
  • Figure 2 is a schematic structural diagram of the neural network used in the present invention.
  • the server load prediction method based on deep learning of the present invention includes the following steps:
  • the server load value is Xi .
  • the length of a period is the k value when the autocorrelation coefficient rises to the highest point again, that is, find a j satisfying ac[j] in the interval of 2 ⁇ k ⁇ n >ac[j+1] and ac[j]>ac[j-1], at this time j is the required period length T.
  • step (5) Use the period length T to intercept the substring of length T at the beginning of the load sequence, that is, the first period, denoted as X Term , as the input of step (5).
  • the present invention proposes a method for capturing long sequence trend information based on down sampling.
  • the present invention uses an equal difference step size to downsample the historical load information starting from the current load, that is, assuming the current time is t, Note down the sampling data as
  • the processed downsampled data is obtained As one of the inputs to the decoder in step (4).
  • step (2) and step (3) Use the part described in step (2) and step (3) as the encoder, and the decoder is based on the LSTM model; as shown in Figure 2, use the output r obtained in step (3) as the first input i 0 of the decoder LSTM, and then The input of each decoding (Decode) is the last output of the decoder LSTM.
  • step (3) Use the hidden states h and c obtained in step (3) as the two queries of the attention mechanism, and use the processed downsampled data obtained in step (2)
  • As the key and value of the attention mechanism use the attention mechanism formula to obtain the results of query h and c respectively. make Where [] represents line splicing. Bundle As the initial hidden state of decoder LSTM, let The length of is l, and the hidden state input of each subsequent step of the decoding process is calculated as follows:
  • the output obtained by decoding at each step in the above process is used as a sequence of predicted values.
  • plen is a hyperparameter, indicating the prediction length, Represents the predicted load at the i-th moment.
  • Periodic information X pred how much to trust the prediction information decoded by the decoder
  • this invention uses X in as the query (Query), X pred , As the key and value, use the attention mechanism formula (2) to get the final prediction result
  • peak data Due to the uneven distribution of peak data and non-peak data in the training data, peak data accounts for about 36% and non-peak data accounts for about 64%. Peak data is the main factor causing service defaults by cloud service providers and has a higher Value Sensitivity. Therefore, the present invention designs a new loss function to correct the peak data prediction error.
  • the prediction target value is X target and the model prediction is The time interval for predicting the target value is T, then the loss function is:
  • the present invention uses a subgradient descent method for back propagation.
  • the sub-gradient of the loss function is: in
  • tools such as strace or vtune are used to detect and collect the CPU and memory usage information of each server in the current cluster in real time.
  • the model first calculates the cycle length of the server load sequence, and intercepts the first cycle of the load sequence.
  • period information starting from the second period, the sliding window mechanism is used, and tlen loads are intercepted each time as the input data of the model, and plen loads are used as the prediction target value X target .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Biophysics (AREA)
  • Biomedical Technology (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Hardware Design (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本发明公开了一种基于深度学习的服务器负载预测方法,通过采集服务器负载长序列趋势性变化,并利用服务器负载周期性信息,建立深度神经网络预测模型以优化峰值负载预测。本发明提供了一种结合周期信息、长期趋势信息和短期时间序列信息以用于提升神经网络预测准确度的方法,并在负载峰值的部分表现出较传统方法的优越性。本发明方法可以有效提升预测准确度,为云服务提供商提供更准确的调度和疏散决策依据,从而降低保证高可靠性所需的冗余设备,降低云服务提供商运营成本,降低云服务租户租赁开销。

Description

一种基于深度学习的服务器负载预测方法 技术领域
本发明属于云计算技术领域,具体涉及一种基于深度学习的服务器负载预测方法。
背景技术
云服务供应商为大多数普通应用开发者提供可伸缩的按需服务,为应用开发提供便利,并降低了普通开发者服务器运维成本。因此,云计算近年来随着互联网发展,蓬勃兴起,涌现了大量云服务提供商,其中亚马逊、阿里云可提供可靠性高达99.65%的云服务。
然而,为了满足云服务高可靠性的条件,需要预置大量冗余的计算资源。据统计,谷歌集群的CPU平均利用率低于35%,微软集群60%的虚拟机CPU利用率低于20%。
基于上述观察,文献[Jiang,Y.,et al."Burstable Instances for Clouds:Performance Modeling,Equilibrium Analysis,and Revenue Maximization."IEEE INFOCOM 2019-IEEE Conference on Computer Communications(INFOCOM'19)IEEE,2019]提出可以通过时分复用的方法,利用任务优化组合,在保证可靠性的前提下,提升服务器利用率,降低云服务提供商成本,减少云服务租赁费用。
为了实现服务器资源时分复用,需要对服务器负载进行准确的预测,为任务组合、调度、疏散提供决策依据。文献[Chen Z,Hu J,Min G,et al.Towards Accurate Prediction for High-Dimensional and Highly-Variable Cloud Workloads with Deep Learning[J].IEEE Transactions on Parallel and Distributed Systems,2019]指出服务器负载具有变化剧烈的特点。在变化剧烈的时间序列中,目前提出的模型在序列峰值处预测效果不理想;而在时分复用的背景下,峰值预测不准确,更有可能造成服务违约,使云服务供应商支付巨额违约金。
发明内容
鉴于上述,本发明提供了一种基于深度学习的服务器负载预测方法,通过采集服务器负载长序列趋势性变化,并利用服务器负载周期性信息,建立深度神经网络预测模型以优化峰值负载预测。
一种基于深度学习的服务器负载预测方法,包括如下步骤:
(1)采集服务器过去一段时间内的负载利用率序列,并将其划分成样本序列和标签序列;
(2)提取所述负载利用率序列的周期性信息;
(3)建立基于encoder-decoder架构的周期信息自适应模型;
(4)将所述样本序列、标签序列以及周期性信息输入至模型中对其进行训练;
(5)将服务器当前时间段的负载利用率序列输入至训练好的模型中,即可预测输出服务器未来一段时间的负载利用率序列。
进一步地,所述服务器的负载针对的是服务器的CPU或内存资源。
进一步地,所述步骤(1)的具体实现方式为:将服务器过去一段时间内的负载利用率序列分成两段,使前段时间的负载利用率序列作为样本序列,后段时间的负载利用率序列作为标签序列,且前段时间的数据比重大于后段时间。
进一步地,所述步骤(2)的具体实现方式为:对于过去一段时间内服务器的负载利用率序列,首先计算该序列的自相关系数信号,取自相关系数信号第二个峰值对应的横坐标值作为周期长度T,所述横坐标值表示时间间隔长度;然后取标签序列之前T时间长度的负载利用率序列作为周期性信息。
进一步地,所述周期信息自适应模型由encoder模块和decoder模块连接组成,encoder模块包括下采样层、多头自注意力机制层以及LSTM(Long Short-Term Memory,长短期记忆网络)层L1,decoder模块包括LSTM层L2以及三个注意力机制层A1~A3。
进一步地,所述步骤(4)的具体实现方式为:首先将样本序列分成两段且前段序列长于后段序列,将前段序列输入下采样层进行下采样,并将下采样后的结果输入多头自注意力机制层中;将后段序列输入LSTM层L1,将LSTM层L1的隐藏状态输入注意力机制层A1作为查询,同时将多头自注意力机制层的 输出作为注意力机制层A1的键值对,注意力机制层A1的输出结果作为LSTM层L2的初始隐藏状态,LSTM层L1的输出作为LSTM层L2的输入;decoder模块在一次解码过程中需将上一次LSTM层L2的隐藏状态输入注意力机制层A2作为查询,将多头自注意力机制层的输出作为注意力机制层A2的键值对,此外将LSTM层L2的输出与周期性信息共同作为注意力机制层A3的键值对,同时将样本序列的后段序列作为注意力机制层A3的查询,注意力机制层A3的输出即为模型最终预测结果;最后计算预测结果与标签序列之间的损失函数,根据损失函数采用次梯度下降法对模型参数进行反向传播更新,依此不断进行迭代更新,直至损失函数最小化收敛或达到最大迭代次数,即训练完成。
进一步地,所述损失函数的表达式如下:
其中:表示Xtarget与之间的损失函数,Xtarget为标签序列,为模型预测结果,t为时刻,Xtarget[t]为标签序列中t时刻服务器的负载利用率,为模型预测结果中t时刻服务器的负载利用率。
本发明提供了一种结合周期信息、长期趋势信息和短期时间序列信息以用于提升神经网络预测准确度的方法,并在负载峰值的部分表现出较传统方法的优越性。本发明方法可以有效提升预测准确度,为云服务提供商提供更准确的调度和疏散决策依据,从而降低保证高可靠性所需的冗余设备,降低云服务提供商运营成本,降低云服务租户租赁开销。
附图说明
图1为服务器负载利用率序列自相关系数信号的波形示意图。
图2为本发明使用的神经网络结构示意图。
具体实施方式
为了更为具体地描述本发明,下面结合附图及具体实施方式对本发明的技术方案进行详细说明。
本发明基于深度学习的服务器负载预测方法包括如下步骤:
(1)在测试集中,利用自相关系数计算周期长度。
设服务器负载序列长度为i,在第i时刻,服务器负载值为Xi。
首先,对服务器负载序列做滑动窗口长度为100的滑动窗口平均,即
使用自相关系数公式(1)计算当k∈{k∈N|1≤k≤n}时的自相关系数值序列ac,如图1所示,可以看到服务器负载的自相关性先下降后上升。自相关性先下降的原因是随着时间跨度增加,数据之间相关性减弱;自相关性后上升的原因是由于服务器负载存在周期性,设周期长度为T,则XT+k≈Xk,因此当k不断接近于T时,相关性增加;一个周期的长度为自相关系数重新上升至最高点时的k值,即在2≤k≤n的区间内找到一个j满足ac[j]>ac[j+1]且ac[j]>ac[j-1],此时j即为所求周期长度T。
使用周期长度T在负载序列初始处截取长度为T的子串,即第一个周期,记为XTerm,作为步骤(5)的输入。
(2)利用稀疏自注意力机制下采样服务器负载长序列趋势性变化。
由于服务器负载从长期看具有趋势性,而短期内的趋势性变化可能被噪声掩盖,而传统的时间序列的训练模型例如LSTM、GRU在处理长序列信息时存在遗忘的问题,效果往往不佳。Transformer的自注意力机制被证明可以有效处理长序列信息,但由于其序列长度二次方的时间和空间复杂度,在处理长序列时,有较大的时间和内存开销。因此,本发明提出一种基于下采样(Down Sampling)的长序列趋势信息捕捉方法。
首先,基于在同一个周期内,时间跨度越大,历史负载信息对当前负载预测贡献越小的认知,跨度小的数据采样应越密集,跨度大的数据采样应越稀疏。因此,本发明使用等差步长对从当前负载开始的历史负载信息进行下采样,即设当前时刻为t,对记下采样数据为
对下采样数据使用自注意力机制,如图2所示,得到处理后的下采样数据作为步骤(4)中decoder的输入之一。
(3)利用LSTM模型处理服务器负载短序列信息。
把当前时刻前30个数据Xin={Xt-30,Xt-29,…,Xt}作为短序列输入到encoder的LSTM层中,并获得该LSTM最后输出的隐状态(h,c)和输出r作为步骤(4)的输入。
(4)使用encoder-decoder架构生成预测序列。
把步骤(2)步骤(3)所述部分作为encoder,而decoder以LSTM模型作为基础;如图2所示,把步骤(3)得到的输出r作为decoder LSTM的第一个输入i0,之后每一次解码(Decode)的输入都是decoder LSTM上一次的输出。把步骤(3)中得到的隐状态h和c分别作为注意力机制的两个查询(Query),把步骤(2)得到的处理后的下采样数据作为注意力机制的键值(Key)和值(Value),使用注意力机制公式,分别得到查询h和c的结果令其中[]表示行拼接。把作为decoder LSTM的初始隐状态,设的长度为l,之后每一步解码过程的隐状态输入计算如下:
把上一步解码得到的隐状态ht-1,ct-1映射为长度为的向量 其中W为模型参数。再将作为查询,作为键值和值,使用注意力机制公式(2),其中Q为查询向量,K为键值向量,V为值向量,分别得到查询结果令把作为当前步隐状态输入。
result=softmax(QTK)V#(2)
把上述过程中每一步解码得到的输出作为预测值序列其中plen为超参数,表示预测长度,表示预测的第i时刻的负载。
(5)用注意力机制线性加和步骤(4)中预测值和周期性信息。
使用MSE作为序列距离度量,如公式(3)所示,其中X1,X2是长度为n的时间序列。使用滑动窗口,在步骤(1)截取的周期参照信息XTerm中找到与步骤(3)中Xin MSE距离最小的子串Xmatcx={Xj,…,Xj+30},则当前需预测的值在周期参照信息中对应的值为Xpred={Xj+30+1,…,Xj+30+plen}。由于服务负载表现出周期性与突发性并存的状况,本发明使用注意力机制决定多大程度上信任周 期性信息Xpred,多大程度上信任decoder解码的预测信息在使用注意力机制时本发明把Xin作为查询(Query),把Xpred,作为键值(Key)和值(Value),使用注意力机制公式(2),得到最终的预测结果
(6)修正损失函数,优化峰值处负载预测。
由于在训练数据中峰值数据和非峰值数据分布并不均衡,峰值数据约占36%,非峰值数据约占64%,而峰值数据是主要造成云服务提供厂商服务违约的因素,具有更高的价值敏感性。因此,本发明设计一种新的损失函数修正峰值数据预测误差,预测目标值为Xtarget,模型预测为预测目标值的时刻区间为Τ,则损失函数为:
由于最大值函数非光滑,在反向传播过程中无法直接求导,因此本发明使用一种次梯度下降的方法反向传播。
f(x1,x2,…,xn)=maxi∈(1,n)xi, 则公式(4)中Loss函数可表示为:
该损失函数次梯度为:其中
本实施例在一个服务集群中,使用strace或vtune等工具实时检测收集当前集群各服务器CPU和内存占用率信息,模型首先计算出服务器负载序列周期长度,并把负载序列第一个周期截取出来,作为周期信息参照;从第二个周期开始,使用滑动窗口机制,每次截取tlen个负载作为模型的输入数据,plen个负载作为预测目标值Xtarget。
上述对实施例的描述是为便于本技术领域的普通技术人员能理解和应用本发明,熟悉本领域技术的人员显然可以容易地对上述实施例做出各种修改,并把在此说明的一般原理应用到其他实施例中而不必经过创造性的劳动。因此, 本发明不限于上述实施例,本领域技术人员根据本发明的揭示,对于本发明做出的改进和修改都应该在本发明的保护范围之内。

Claims (8)

  1. 一种基于深度学习的服务器负载预测方法,包括如下步骤:
    (1)采集服务器过去一段时间内的负载利用率序列,并将其划分成样本序列和标签序列;
    (2)提取所述负载利用率序列的周期性信息;
    (3)建立基于encoder-decoder架构的周期信息自适应模型;
    (4)将所述样本序列、标签序列以及周期性信息输入至模型中对其进行训练;
    (5)将服务器当前时间段的负载利用率序列输入至训练好的模型中,即可预测输出服务器未来一段时间的负载利用率序列。
  2. 根据权利要求1所述的服务器负载预测方法,其特征在于:所述服务器的负载针对的是服务器的CPU或内存资源。
  3. 根据权利要求1所述的服务器负载预测方法,其特征在于:所述步骤(1)的具体实现方式为:将服务器过去一段时间内的负载利用率序列分成两段,使前段时间的负载利用率序列作为样本序列,后段时间的负载利用率序列作为标签序列,且前段时间的数据比重大于后段时间。
  4. 根据权利要求1所述的服务器负载预测方法,其特征在于:所述步骤(2)的具体实现方式为:对于过去一段时间内服务器的负载利用率序列,首先计算该序列的自相关系数信号,取自相关系数信号第二个峰值对应的横坐标值作为周期长度T,所述横坐标值表示时间间隔长度;然后取标签序列之前T时间长度的负载利用率序列作为周期性信息。
  5. 根据权利要求1所述的服务器负载预测方法,其特征在于:所述周期信息自适应模型由encoder模块和decoder模块连接组成,encoder模块包括下采样层、多头自注意力机制层以及LSTM层L1,decoder模块包括LSTM层L2以及三个注意力机制层A1~A3。
  6. 根据权利要求5所述的服务器负载预测方法,其特征在于:所述步骤(4)的具体实现方式为:首先将样本序列分成两段且前段序列长于后段序列,将前段序列输入下采样层进行下采样,并将下采样后的结果输入多头自注意力机制 层中;将后段序列输入LSTM层L1,将LSTM层L1的隐藏状态输入注意力机制层A1作为查询,同时将多头自注意力机制层的输出作为注意力机制层A1的键值对,注意力机制层A1的输出结果作为LSTM层L2的初始隐藏状态,LSTM层L1的输出作为LSTM层L2的输入;decoder模块在一次解码过程中需将上一次LSTM层L2的隐藏状态输入注意力机制层A2作为查询,将多头自注意力机制层的输出作为注意力机制层A2的键值对,此外将LSTM层L2的输出与周期性信息共同作为注意力机制层A3的键值对,同时将样本序列的后段序列作为注意力机制层A3的查询,注意力机制层A3的输出即为模型最终预测结果;最后计算预测结果与标签序列之间的损失函数,根据损失函数采用次梯度下降法对模型参数进行反向传播更新,依此不断进行迭代更新,直至损失函数最小化收敛或达到最大迭代次数,即训练完成。
  7. 根据权利要求6所述的服务器负载预测方法,其特征在于:所述损失函数的表达式如下:
    其中:表示Xtarget与之间的损失函数,Xtarget为标签序列,为模型预测结果,t为时刻,Xtarget[t]为标签序列中t时刻服务器的负载利用率,为模型预测结果中t时刻服务器的负载利用率。
  8. 根据权利要求1所述的服务器负载预测方法,其特征在于:该方法结合周期信息、长期趋势信息和短期时间序列信息以提升神经网络预测准确度,并在负载峰值的部分表现出较传统方法的优越性,可以有效提升预测准确度,为云服务提供商提供更准确的调度和疏散决策依据,从而降低保证高可靠性所需的冗余设备,降低云服务提供商运营成本,降低云服务租户租赁开销。
PCT/CN2023/082143 2022-08-23 2023-03-17 一种基于深度学习的服务器负载预测方法 Ceased WO2024040947A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US18/281,770 US12542719B2 (en) 2022-08-23 2023-03-17 Server load prediction method based on deep learning

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211013582.8 2022-08-23
CN202211013582.8A CN115378948B (zh) 2022-08-23 2022-08-23 一种基于深度学习的服务器负载预测方法

Publications (1)

Publication Number Publication Date
WO2024040947A1 true WO2024040947A1 (zh) 2024-02-29

Family

ID=84067424

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/082143 Ceased WO2024040947A1 (zh) 2022-08-23 2023-03-17 一种基于深度学习的服务器负载预测方法

Country Status (3)

Country Link
US (1) US12542719B2 (zh)
CN (1) CN115378948B (zh)
WO (1) WO2024040947A1 (zh)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118364286A (zh) * 2024-04-24 2024-07-19 山东省人工智能研究院 一种基于小波分解和多头外部注意力机制的轻量级云服务器负载预测方法
CN119363601A (zh) * 2024-10-18 2025-01-24 广东电网有限责任公司 一种基于预测模型的电力系统触发通信方法及装置
CN119440977A (zh) * 2024-09-25 2025-02-14 浙江大学 一种容器云环境下基于混合模型的负载预测方法及装置
CN119854813A (zh) * 2024-12-31 2025-04-18 华中科技大学 一种结合深度学习和统计学方法的基站负载预测方法、装置及电子设备
CN120264333A (zh) * 2025-04-14 2025-07-04 中国长江电力股份有限公司 一种短报文通信系统的动态负载测试方法及系统
CN120523608A (zh) * 2025-07-24 2025-08-22 吉林省有云数智科技有限公司 一种异构算力平台负载预测方法
CN120929274A (zh) * 2025-10-11 2025-11-11 福建理工大学 一种自监督多尺度云工作负载预测方法及系统

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115357371A (zh) * 2022-03-31 2022-11-18 福州大学 基于深度学习的面向高维高可变云工作负载的预测方法
CN115378948B (zh) * 2022-08-23 2024-07-19 浙江大学中原研究院 一种基于深度学习的服务器负载预测方法
CN116277952B (zh) * 2023-04-07 2023-11-17 苏州壹哲智能科技有限公司 一种3d打印设备、方法、装置及介质
US20250103857A1 (en) * 2023-09-22 2025-03-27 Chaos Industries, Inc. Divide and attend long range block attention
CN117931420B (zh) * 2023-12-08 2024-09-17 中电信量子信息科技集团有限公司 云工作负载预测方法、装置、设备及存储介质
CN118152217A (zh) * 2024-02-21 2024-06-07 支付宝(杭州)信息技术有限公司 针对服务集群中服务的工作负载预测方法和装置
CN118331746B (zh) * 2024-06-12 2024-08-20 贵州大学 一种基于复杂周期的边缘云长序列负载预测方法、装置、设备及介质
CN118802587A (zh) * 2024-06-17 2024-10-18 南京基流科技有限公司 Ai算力网络负载的智能预测方法、装置及相关介质、设备
CN120414724B (zh) * 2025-04-25 2026-01-27 四川蜀道城乡投资集团有限责任公司 一种基于智能建筑绿色能源系统的电力管理优化方法
CN120353687B (zh) * 2025-06-24 2025-08-29 苏州元脑智能科技有限公司 服务器性能预测方法、电子设备、存储介质及程序产品
CN120528799B (zh) * 2025-07-25 2025-10-10 南昌首页科技股份有限公司 一种大带宽网络流量调度管理方法及系统
CN121284040B (zh) * 2025-10-13 2026-07-03 云南约牛软件技术有限公司 基于客户端算力协同的云服务器负载均衡方法和系统
CN121808295B (zh) * 2026-03-11 2026-06-26 浙江师范大学 一种基于自适应分割与跨变量注意力的时序预测方法

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200118039A1 (en) * 2018-10-10 2020-04-16 Oracle International Corporation Out of band server utilization estimation and server workload characterization for datacenter resource optimization and forecasting
CN113553150A (zh) * 2021-07-02 2021-10-26 深圳先进技术研究院 一种云服务器集群负载预测方法、系统、终端以及存储介质
CN113626177A (zh) * 2020-05-08 2021-11-09 中国科学院微电子研究所 基于lstm的cpu资源负载情况预测方法
CN114490065A (zh) * 2022-01-27 2022-05-13 中国科学院微电子研究所 一种负载预测方法、装置及设备
CN114528097A (zh) * 2022-01-25 2022-05-24 华南理工大学 一种基于时序卷积神经网络的云平台服务负载预测方法
CN115378948A (zh) * 2022-08-23 2022-11-22 浙江大学中原研究院 一种基于深度学习的服务器负载预测方法

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103164742B (zh) * 2013-04-02 2016-02-17 南京邮电大学 一种基于粒子群优化神经网络的服务器性能预测方法
US11341019B2 (en) * 2019-01-17 2022-05-24 Anodot Ltd. System and method for efficient estimation of high cardinality time-series models
CN111638958B (zh) * 2020-06-02 2024-04-05 中国联合网络通信集团有限公司 云主机负载处理方法、装置、控制设备及存储介质
US20220129745A1 (en) * 2020-10-27 2022-04-28 Sap Se Prediction and Management of System Loading
CN114880067A (zh) * 2021-12-01 2022-08-09 中国重型机械研究院股份公司 一种基于容器负载预测的容器调度策略
US20230244947A1 (en) * 2022-01-28 2023-08-03 Salesforce, Inc. Systems and methods for time series forecasting
CN114707698A (zh) * 2022-03-03 2022-07-05 深圳智芯微电子科技有限公司 基于综合形状误差和时间误差的长期电力负荷预测方法

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200118039A1 (en) * 2018-10-10 2020-04-16 Oracle International Corporation Out of band server utilization estimation and server workload characterization for datacenter resource optimization and forecasting
CN113626177A (zh) * 2020-05-08 2021-11-09 中国科学院微电子研究所 基于lstm的cpu资源负载情况预测方法
CN113553150A (zh) * 2021-07-02 2021-10-26 深圳先进技术研究院 一种云服务器集群负载预测方法、系统、终端以及存储介质
CN114528097A (zh) * 2022-01-25 2022-05-24 华南理工大学 一种基于时序卷积神经网络的云平台服务负载预测方法
CN114490065A (zh) * 2022-01-27 2022-05-13 中国科学院微电子研究所 一种负载预测方法、装置及设备
CN115378948A (zh) * 2022-08-23 2022-11-22 浙江大学中原研究院 一种基于深度学习的服务器负载预测方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CAO YU, YANG JUN: "A Deep Learning Based Elastic Retractable Algorithm for Cloud Platform", COMPUTER AND MODERNIZATION., 15 April 2019 (2019-04-15), pages 17 - 24, XP093142938, DOI: 1006-24(2019)04-0017-08 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118364286A (zh) * 2024-04-24 2024-07-19 山东省人工智能研究院 一种基于小波分解和多头外部注意力机制的轻量级云服务器负载预测方法
CN119440977A (zh) * 2024-09-25 2025-02-14 浙江大学 一种容器云环境下基于混合模型的负载预测方法及装置
CN119363601A (zh) * 2024-10-18 2025-01-24 广东电网有限责任公司 一种基于预测模型的电力系统触发通信方法及装置
CN119854813A (zh) * 2024-12-31 2025-04-18 华中科技大学 一种结合深度学习和统计学方法的基站负载预测方法、装置及电子设备
CN120264333A (zh) * 2025-04-14 2025-07-04 中国长江电力股份有限公司 一种短报文通信系统的动态负载测试方法及系统
CN120523608A (zh) * 2025-07-24 2025-08-22 吉林省有云数智科技有限公司 一种异构算力平台负载预测方法
CN120929274A (zh) * 2025-10-11 2025-11-11 福建理工大学 一种自监督多尺度云工作负载预测方法及系统

Also Published As

Publication number Publication date
CN115378948A (zh) 2022-11-22
US12542719B2 (en) 2026-02-03
CN115378948B (zh) 2024-07-19
US20250030610A1 (en) 2025-01-23

Similar Documents

Publication Publication Date Title
CN115378948B (zh) 一种基于深度学习的服务器负载预测方法
US11954522B2 (en) Method for processing tasks in parallel, device and storage medium
CN102043674B (zh) 基于响应时间估计服务资源消耗
CN114490057B (zh) 一种基于深度强化学习的mec已卸载任务资源分配方法
CN118200169B (zh) 基于混合时空深度学习模型的电力光通信链路流量预测方法
CN114124734A (zh) 一种基于GCN-Transformer集成模型的网络流量预测方法
CN111638958A (zh) 云主机负载处理方法、装置、控制设备及存储介质
CN117202264A (zh) Mec环境中面向5g网络切片的计算卸载方法
CN116886619A (zh) 一种基于线性回归算法的负载均衡方法及装置
CN114021713A (zh) 一种基于神经元级别迁移学习的光路传输质量估计方法
Wang et al. Stable consistency tuning: Understanding and improving consistency models
CN112711481B (zh) 基于截止时间和可靠性约束的云服务利润最优化方法及系统
Li et al. Mars: A fast sampler for mean reverting diffusion based on ode and sde solvers
Huang et al. Accurate prediction of required virtual resources via deep reinforcement learning
CN121367512A (zh) 基于边缘计算的hplc双模通信模块数据高效采集方法及系统
Liu et al. Circinus: Efficient Query Planner for Compound ML Serving
Li et al. A novel self-similar traffic prediction method based on wavelet transform for satellite Internet
CN118710475A (zh) 基于机器学习算法的能耗数据修正方法及系统
Wei et al. Workload prediction of serverless computing
CN111291922B (zh) 一种基于动态时间窗的混杂数据流分流量预测方法
CN114897137A (zh) 训练神经网络的方法、预测呼入流量的方法及装置
CN115913965A (zh) 一种基于任务时效性的关联切片资源分配方法
Niu et al. An asynchronous fixed-point algorithm for resource sharing with coupled objectives
CN118819382A (zh) 数据迁移方法、电子设备和计算机程序产品
CN118113421B (zh) 云工作站的云资源池容量规划方法、装置及计算机设备

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 18281770

Country of ref document: US

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

Ref document number: 23856044

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 23856044

Country of ref document: EP

Kind code of ref document: A1

WWG Wipo information: grant in national office

Ref document number: 18281770

Country of ref document: US