Movatterモバイル変換


[0]ホーム

URL:


CN111651264A - Method, device and computer equipment for obtaining physical machine resource allocation model - Google Patents

Method, device and computer equipment for obtaining physical machine resource allocation model
Download PDF

Info

Publication number
CN111651264A
CN111651264ACN202010334968.3ACN202010334968ACN111651264ACN 111651264 ACN111651264 ACN 111651264ACN 202010334968 ACN202010334968 ACN 202010334968ACN 111651264 ACN111651264 ACN 111651264A
Authority
CN
China
Prior art keywords
training
resource allocation
physical machine
hidden layer
output value
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.)
Granted
Application number
CN202010334968.3A
Other languages
Chinese (zh)
Other versions
CN111651264B (en
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen Co Ltd
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 Ping An Technology Shenzhen Co LtdfiledCriticalPing An Technology Shenzhen Co Ltd
Priority to CN202010334968.3ApriorityCriticalpatent/CN111651264B/en
Priority to PCT/CN2020/098788prioritypatent/WO2021212654A1/en
Publication of CN111651264ApublicationCriticalpatent/CN111651264A/en
Application grantedgrantedCritical
Publication of CN111651264BpublicationCriticalpatent/CN111651264B/en
Activelegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本申请揭示了一种物理机资源分配模型的获取方法、装置和计算机设备,其中方法包括,将训练数据集中的数据输入到预设的BILSTM神经网络中进行训练,得到隐含层的输出值Hi=(hi+hi’);以及,将训练数据进行求和后再平均处理,得到平均训练值,并将平均训练值输入到BILSTM神经网络中进行训练,得到对应的隐含层的输出值X;根据输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;通过线性函数Hk’=H(C,hk,Xk)求出输出值X对应的隐含层输出值hk’;依据隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对基础模型进行训练,得到物理机资源分配模型。本申请提高了预测精度。

Figure 202010334968

The present application discloses a method, device and computer equipment for obtaining a physical machine resource allocation model, wherein the method includes: inputting data in a training data set into a preset BILSTM neural network for training, and obtaining an output value Hi of a hidden layer =(hi+hi'); and, after the training data is summed and then averaged, the average training value is obtained, and the average training value is input into the BILSTM neural network for training, and the output value X of the corresponding hidden layer is obtained ; According to the probability distribution of the output value X on each historical node, calculate the product of the hidden layer output Hi and the probability weight of each historical node, and then add the value C; Through the linear function Hk'=H(C,hk, Xk) Find the hidden layer output value hk' corresponding to the output value X; write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and train the basic model to obtain physical machine resources distribution model. The present application improves the prediction accuracy.

Figure 202010334968

Description

Translated fromChinese
物理机资源分配模型的获取方法、装置和计算机设备Method, device and computer equipment for obtaining physical machine resource allocation model

技术领域technical field

本申请涉及到智能决策领域,特别是涉及到一种物理机资源分配模型的获取方法、装置和计算机设备。The present application relates to the field of intelligent decision-making, and in particular, to a method, apparatus and computer equipment for obtaining a resource allocation model of a physical machine.

背景技术Background technique

传统的物理机资源分配主要是是根据经验分配,往往会出现各个区的物理机资源准备不能满足业务的需求,有时物理机资源准备充分却没有市场,有时物理机资源没有准备充分确有很大的市场需求,从而导致资源利用不充分。The traditional allocation of physical machine resources is mainly based on experience. It often occurs that the physical machine resources in each area cannot meet the needs of the business. Sometimes the physical machine resources are fully prepared but there is no market, and sometimes the physical machine resources are not fully prepared. market demand, resulting in underutilization of resources.

所以亟需一种可以准确预测物理机资源分配的方法。Therefore, there is an urgent need for a method that can accurately predict the resource allocation of physical machines.

发明内容SUMMARY OF THE INVENTION

本申请的主要目的为提供一种物理机资源分配模型的获取方法、装置和计算机设备,旨在解决现有技术无法准确预测物理机资源分配的技术问题。The main purpose of this application is to provide a method, device and computer equipment for obtaining a physical machine resource allocation model, which aims to solve the technical problem that the existing technology cannot accurately predict the physical machine resource allocation.

为了实现上述发明目的,本申请提出一种物理机资源分配模型的获取方法,包括:In order to achieve the above purpose of the invention, the present application proposes a method for obtaining a physical machine resource allocation model, including:

获取指定区域的物理机的历史使用数据;Obtain historical usage data of physical machines in a specified area;

将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;Preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;

将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The training data in the training data set are respectively input into the front hidden layer and the rear hidden layer in the preset BILSTM neural network according to the forward order and reverse order of time for training, and the output value of the front item is obtained. hi and the subsequent output value hi', and adding the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; and,

将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The training data is summed and then averaged to obtain an average training value, and the average training value is input into the former hidden layer and the latter hidden layer in the BILSTM neural network for training to obtain the corresponding The output value X of the hidden layer;

根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;According to the probability distribution of the output value X on each historical node, the product of the hidden layer output Hi of each historical node and the probability weight is calculated, and then added to obtain the value C;

通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;Obtain the output value hk' of the hidden layer corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Compiling the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein the physical machine resource allocation The predicted value calculated by the model is Y=R(X,hk'), where R is a constant.

进一步地,所述根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C的步骤,包括:Further, according to the probability distribution of the output value X on each historical node, the step of calculating the product of the hidden layer output Hi and the probability weight of each historical node, and then adding the value C, includes:

根据所述输出值X在各历史节点上的概率分布,构建公式:According to the probability distribution of the output value X on each historical node, construct the formula:

Figure BDA0002466244970000021
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000021
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

依据公式

Figure BDA0002466244970000022
得到所述值C。According to the formula
Figure BDA0002466244970000022
The value C is obtained.

进一步地,所述将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集的步骤,包括:Further, the steps of obtaining available historical data after preprocessing the historical usage data, and dividing the historical data into a training data set and a test data set, include:

对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;classifying the historical usage data, wherein the classification includes the zoom type that needs to reduce the data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;

将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;Processing the classified data according to the corresponding processing method to obtain the available historical data;

将所述可用的历史数据分成所述训练数据集和所述测试数据集。The available historical data is divided into the training dataset and the test dataset.

进一步地,所述获取指定区域的物理机的历史使用数据的步骤,包括:Further, the step of obtaining the historical usage data of the physical machines in the designated area includes:

获取所述预设的BILSTM神经网络的节点数量;Obtain the number of nodes of the preset BILSTM neural network;

根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;Determine the start time and end time of the historical data according to the value of the number of nodes minus one;

获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The data between the start time and the end time is acquired as the historical usage data.

进一步地,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤,包括:Further, the described basic model of the physical machine resource allocation based on BILSTM neural network is written according to the hidden layer output value hk', and the basic model is trained to obtain the step of the physical machine resource allocation model, including :

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;Write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk';

使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。Using different amounts of training data in the training data set to train the basic model to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the obtained physical machine resource allocation models the lower the prediction accuracy.

进一步地,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤之后,包括:Further, according to the described hidden layer output value hk', the basic model of the physical machine resource allocation based on BILSTM neural network is written, and the basic model is trained, after the step of obtaining the physical machine resource allocation model, include:

获取调用所述物理机资源分配模型的命令;Obtain a command for invoking the physical machine resource allocation model;

依据所述命令,启动身份识别程序,得到当前操作者的身份;According to the command, start the identity recognition program to obtain the identity of the current operator;

根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。The physical machine resource allocation model registered corresponding to the operator's identity is allocated according to the operator's identity.

本申请还提供一种物理机资源分配模型的获取装置,包括:The present application also provides a device for obtaining a physical machine resource allocation model, including:

获取单元,用于获取指定区域的物理机的历史使用数据;The acquisition unit is used to acquire historical usage data of physical machines in the specified area;

处理单元,用于将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;a processing unit for preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;

第一训练单元,用于将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The first training unit is used for inputting the training data in the training data set into the former hidden layer and the latter hidden layer in the preset BILSTM neural network respectively according to the forward order and reverse order of time. Training, obtain the output value hi of the former item and the output value hi' of the latter item, and add the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; as well as,

第二训练单元,用于将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The second training unit is used for summing and averaging the training data to obtain an average training value, and inputting the average training value into the previous hidden layer and the subsequent hidden layer in the BILSTM neural network to train in and get the output value X of the corresponding hidden layer;

第一计算单元,用于根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;a first calculation unit, configured to calculate the product of the hidden layer output Hi of each historical node and the probability weight according to the probability distribution of the output value X on each historical node, and then add the value C;

第二计算单元,用于通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;The second calculation unit is used to obtain the hidden layer output value hk' corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

编写训练单元,用于依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Writing a training unit, for writing a basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein, The predicted value calculated by the physical machine resource allocation model is Y=R(X,hk'), where R is a constant.

进一步地,所述第一计算单元,包括:Further, the first computing unit includes:

构建模块,用于根据所述输出值X在各历史节点上的概率分布,构建公式:The building module is used to build the formula according to the probability distribution of the output value X on each historical node:

Figure BDA0002466244970000041
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000041
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

计算模块,用于依据公式

Figure BDA0002466244970000042
得到所述值C。Calculation module for formulating
Figure BDA0002466244970000042
The value C is obtained.

本申请还提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现上述任一项所述方法的步骤。The present application also provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described above when the processor executes the computer program.

本申请还提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任一项所述的方法的步骤。The present application also provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any one of the methods described above.

本申请的物理机资源分配模型的获取方法、装置和计算机设备,将训练数据集中的数据输入到预设的BILSTM神经网络中进行训练,得到隐含层的输出值Hi=(hi+hi’);以及,将训练数据进行求和后再平均处理,得到平均训练值,并将平均训练值输入到BILSTM神经网络中进行训练,得到对应的隐含层的输出值X;根据输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;通过线性函数Hk’=H(C,hk,Xk)求出输出值X对应的隐含层输出值hk’;依据隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对基础模型进行训练,得到物理机资源分配模型。本申请使用了注意力机制以及BILSTM神经网络,在整个技术方案中加入注意力机制后,对算法进行了改进,从而提高了预测精度,优化了架构,提高特征值的挖掘深度。In the acquisition method, device and computer equipment of the physical machine resource allocation model of the present application, the data in the training data set is input into the preset BILSTM neural network for training, and the output value of the hidden layer Hi=(hi+hi') is obtained. ; And, the training data is summed and then averaged to obtain the average training value, and the average training value is input into the BILSTM neural network for training to obtain the output value X of the corresponding hidden layer; The probability distribution on the historical nodes, calculate the product of the hidden layer output Hi and the probability weight of each historical node, and then add the value C; obtain the output value X through the linear function Hk'=H(C,hk,Xk) The corresponding hidden layer output value hk'; according to the hidden layer output value hk', the basic model of physical machine resource allocation based on BILSTM neural network is compiled, and the basic model is trained to obtain the physical machine resource allocation model. This application uses the attention mechanism and the BILSTM neural network. After adding the attention mechanism to the entire technical solution, the algorithm is improved, thereby improving the prediction accuracy, optimizing the architecture, and improving the mining depth of feature values.

附图说明Description of drawings

图1为本申请一实施例的物理机资源分配模型的获取方法的流程示意图;1 is a schematic flowchart of a method for acquiring a physical machine resource allocation model according to an embodiment of the present application;

图2为本申请一实施例的物理机资源分配模型的获取装置的结构示意框图;2 is a schematic structural block diagram of an apparatus for obtaining a physical machine resource allocation model according to an embodiment of the application;

图3为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic structural block diagram of a computer device according to an embodiment of the present application.

本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics and advantages of the purpose of the present application will be further described with reference to the accompanying drawings in conjunction with the embodiments.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

参照图1,本申请实施例提供一种物理机资源分配模型的获取方法,包括:Referring to FIG. 1 , an embodiment of the present application provides a method for obtaining a physical machine resource allocation model, including:

S1、获取指定区域的物理机的历史使用数据;S1. Obtain historical usage data of physical machines in a specified area;

S2、将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;S2, obtaining available historical data after preprocessing the historical usage data, and dividing the historical data into a training data set and a test data set;

S3、将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,S3. The training data in the training data set are respectively input into the former hidden layer and the latter hidden layer in the preset BILSTM neural network according to the forward order and reverse order of time for training, and the former item is obtained. The output value hi and the subsequent output value hi', and adding the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; and,

S4,将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到所述隐含层的输出值X;S4, the training data is summed and then averaged to obtain an average training value, and the average training value is input into the former hidden layer and the latter hidden layer in the BILSTM neural network for training, to obtain The output value X of the hidden layer;

S5、根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;S5, according to the probability distribution of the output value X on each historical node, calculate the product of the hidden layer output Hi of each historical node and the probability weight, and then add up to obtain the value C;

S6、通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;S6, obtain the hidden layer output value hk' corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

S7、依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。S7. Compiling a basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein the physical machine The predicted value calculated by the resource allocation model is Y=R(X,hk'), where R is a constant.

执行上述方法的执行主体一般是服务器、计算机设备等具有运算能力的电子计算机设备。The execution subject that executes the above method is generally an electronic computer device with computing capability, such as a server and a computer device.

如上述步骤S1所述,上述物理机是指服务器等物理设备。上述历史使用数据一般包括GUP(Graphic Processing Unit,中文翻译为“图形处理器”)的数据、硬盘容量数据、网卡速率数据、物理机的使用数量数据等数据。上述指定区域是指一个地理范围或者网络环境范围,比如,某个地域的物理机使用数据,又或者某一业务领域对应的网络环境中物理机的使用数据等。As described in the above step S1, the above-mentioned physical machine refers to a physical device such as a server. The above-mentioned historical usage data generally includes data of a GUP (Graphic Processing Unit, translated as "graphics processor" in Chinese), hard disk capacity data, network card rate data, usage quantity data of physical machines, and other data. The above designated area refers to a geographic scope or a network environment scope, for example, the usage data of physical machines in a certain region, or the usage data of physical machines in a network environment corresponding to a certain business field.

如上述步骤S2所述,上述预处理即为数据清理的过程,将不符合训练下述预设的BILSTM神经网络的数据进行删除或者变形,比如对不规则的数据进行归一化处理,对文字属性的数据进行one-hot转变等,在此不在一一赘述。将清洗后的历史数据随机分分配,得到训练数据集和测试数据集,其中训练数据集中的数据用于训练下述的BILSTM神经网络,而测试数据集中的数据用于测试训练后的BILSTM神经网络是否可用。As described in the above step S2, the above preprocessing is the process of data cleaning, deleting or deforming the data that does not meet the training of the following preset BILSTM neural network, such as normalizing irregular data, One-hot transformation of attribute data, etc., will not be repeated here. Randomly distribute the cleaned historical data to obtain a training data set and a test data set. The data in the training data set is used to train the following BILSTM neural network, and the data in the test data set is used to test the trained BILSTM neural network. it's usable or not.

如上述步骤S3和S4所述,上述BILSTM(Bi-directional Long Short-Term Memory的缩写,是由前向LSTM与后向LSTM组合而成)神经网络是一种双向输入的LSTM神经网络,即一个节点具有前项隐含层和后项隐含层,在训练或预测的时候需要数据按照时间顺序,正向和反向分别输入到前项隐含层和后项隐含层,然后将前项隐含层和后项隐含层的输出相加得到该节点的隐含层输出,本申请选择BILSTM神经网络进行训练,可以提高各时间点之间的数据影响,进而提高后续的预测准确性。在本申请中,不但对训练数据进行训练,还将训练数据相加然后求平均得到一个平均训练值,并且为该平均训练值对应设置一个节点进行训练,得到该节点对应的隐含层输出值。举个例子,训练数据为12个月内产生的数据,每一个月的数据对应设置一个节点,则BILSTM神经网络的总结点数为13个,多出的一个节点即为平均训练值对应的节点。将平均训练值加入训练过程,可以提高后续的注意力机制的计算,提高预测精度。As described in the above steps S3 and S4, the above-mentioned BILSTM (abbreviation for Bi-directional Long Short-Term Memory, which is composed of a forward LSTM and a backward LSTM) neural network is a bidirectional input LSTM neural network, that is, a The node has the former hidden layer and the latter hidden layer. During training or prediction, the data is required to be input into the former hidden layer and the latter hidden layer in a chronological order. Forward and reverse are respectively input into the former hidden layer and the latter hidden layer, and then the former The output of the hidden layer and the subsequent hidden layer is added to obtain the output of the hidden layer of the node. In this application, the BILSTM neural network is selected for training, which can improve the influence of data between each time point, thereby improving the subsequent prediction accuracy. In this application, not only the training data is trained, but also the training data is added and averaged to obtain an average training value, and a node is set corresponding to the average training value for training, and the output value of the hidden layer corresponding to the node is obtained. . For example, if the training data is the data generated within 12 months, and each month's data corresponds to a node, the number of summary points of the BILSTM neural network is 13, and the extra node is the node corresponding to the average training value. Adding the average training value to the training process can improve the calculation of the subsequent attention mechanism and improve the prediction accuracy.

如上述步骤S5至S7所述,即为加入了注意力机制后,进行一系列的计算处理后,得到一个重新编写的基础模型,然后再对该基础模型进行训练,进而得到物理机资源分配模型。需要注意的是,对上述基础模型进行训练和测试的数据仍然是上述的训练数据集和测试数据集中的数据。物理机资源分配模型计算出的预测值为Y=R(X,hk’),其结合了平均训练值对应的X,以及通过注意力机制计算出的hk’,大大地提高了预测精度。在本实施例中,基于BILSTM神经网络的物理机资源分配的基础模型,其损失函数按MSE(均方误差)的标准进行计算即可。As described in the above steps S5 to S7, that is, after adding the attention mechanism, after a series of calculation processing, a rewritten basic model is obtained, and then the basic model is trained to obtain a physical machine resource allocation model . It should be noted that the data for training and testing the above basic model is still the data in the above training data set and test data set. The predicted value calculated by the physical machine resource allocation model is Y=R(X,hk'), which combines the X corresponding to the average training value and the hk' calculated by the attention mechanism, which greatly improves the prediction accuracy. In this embodiment, the loss function of the basic model of physical machine resource allocation based on the BILSTM neural network can be calculated according to the MSE (Mean Squared Error) standard.

在一个实施例中,上述根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C的步骤S5,包括:In one embodiment, the above-mentioned step S5 of calculating the product of the hidden layer output Hi of each historical node and the probability weight according to the probability distribution of the output value X on each historical node, and then adding the value C, includes: :

根据所述输出值X在各历史节点上的概率分布,构建公式:According to the probability distribution of the output value X on each historical node, construct the formula:

Figure BDA0002466244970000071
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000071
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

依据公式

Figure BDA0002466244970000072
得到所述值C。According to the formula
Figure BDA0002466244970000072
The value C is obtained.

在本实施例中,即为具体的计算上述值C的过程,Ski=vtanh(Whk+Uhi+b)是LSTM神经网络中的基础计算公式之一,在此不做解释。上述输出值X在各历史节点上的概率分布是指之前节点对X的影响,即权重的分配。然后构建出极大自然数公式αki,然后计算出值C。值C的作用是用于后续计算输出值X对应的隐含层输出值hk’。In this embodiment, it is a specific process of calculating the above-mentioned value C. Ski=vtanh(Whk+Uhi+b) is one of the basic calculation formulas in the LSTM neural network, which will not be explained here. The above probability distribution of output value X on each historical node refers to the influence of previous nodes on X, that is, the distribution of weights. Then the maximum natural number formula αki is constructed, and then the value C is calculated. The role of the value C is for the subsequent calculation of the output value hk' of the hidden layer corresponding to the output value X.

在一个实施例中,上述将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集的步骤S2,包括:In one embodiment, the above-mentioned step S2 of preprocessing the historical usage data to obtain available historical data and dividing the historical data into a training data set and a test data set includes:

对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;classifying the historical usage data, wherein the classification includes the zoom type that needs to reduce the data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;

将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;Processing the classified data according to the corresponding processing method to obtain the available historical data;

将所述可用的历史数据分成所述训练数据集和所述测试数据集。The available historical data is divided into the training dataset and the test dataset.

在本实施例中,上述缩放类型的数据只是属性数据大于预设值的数据,将其等比例缩小,从而降低因为数据之间差距太大而影响训练的结果;上述归一类型是指不规则数据,比如历史使用数据中的离散数据等,将其归一化到0到1之间,防止之后模型训练时产生过拟合的情况;上述文字类型是指不能直接训练的数据,将进行one-hot转变,从而可以进行神经网络的训练。在本实施例中,将所述可用的历史数据分成所述训练数据集和所述测试数据集的方法可以为,将每一个时间段内的可用的历史数据,按照7/3,或8/2的比例进行随机划分得到每一个时间段内的训练数据和测试数据,比如,12个月的历史数据,每一个月为一个时间段,那么在第一个月的时间段内随机抽取7成的数据作为测试数据,剩余的3成数据作为测试数据,并以此类推。这样处理,每一个时间段内的训练数据基本保持足够多的训练量,防止整体随机分配时,将某个时间段的数据全部或大部分被分配到测试数据集中,从而影响对神经网络的训练结果等。In this embodiment, the data of the above-mentioned scaling type is only the data whose attribute data is greater than the preset value, which is reduced in equal proportions, thereby reducing the result of training that is affected by the large gap between the data; the above-mentioned normalizing type refers to irregular Data, such as discrete data in historical usage data, are normalized to between 0 and 1 to prevent overfitting during model training; the above text types refer to data that cannot be directly trained, and will be one -hot transformation so that the training of the neural network can be performed. In this embodiment, the method for dividing the available historical data into the training data set and the test data set may be: dividing the available historical data in each time period according to 7/3, or 8/3 The ratio of 2 is randomly divided to obtain training data and test data in each time period. For example, 12 months of historical data, each month is a time period, then 70% of the time period in the first month is randomly selected. The data is used as the test data, the remaining 30% of the data is used as the test data, and so on. In this way, the training data in each time period basically maintains enough training volume to prevent all or most of the data in a certain time period from being allocated to the test data set during the overall random allocation, thus affecting the training of the neural network. results etc.

在一个实施例中,上述获取指定区域的物理机的历史使用数据的步骤S1,包括:In one embodiment, the above step S1 of acquiring historical usage data of physical machines in a designated area includes:

获取所述预设的BILSTM神经网络的节点数量;Obtain the number of nodes of the preset BILSTM neural network;

根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;Determine the start time and end time of the historical data according to the value of the number of nodes minus one;

获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The data between the start time and the end time is acquired as the historical usage data.

在本实施例中,在获取历史使用数据的时候并不会盲目的获取,而是有选择的获取,比如,先确定BILSTM神经网络的节点数量,可以根据节点数量知道历史使用数据需要包含多少个时间跨度,具体地,因为本申请中多出一个用于计算平均训练值的节点,所以需要对节点数量进行减一处理,如BILSTM神经网络的节点数量为13,其应该对应不同的12个连续的时间跨度的数据,最后一个节点用于训练这个12个时间跨度中的数据平均值。当确定具体的节点数量后,再根据上述的时间跨度既可以确定历史数据的起始时间和结束时间。比如,时间跨度是1个月,节点数量为13,那么起始时间是12月前对应当前时间的时间,当前时间为结束时间。在另一个实施例中,如果时间跨度为1个月,且为从1号开始的自然月,则开始时间将当前时间对应的月份时间去除,当前时间的前一个月的结束时间为历史数据的结束时间,而历史数据的开始时间则从结束时间向前推12个月得到时间。通过本实施例得到的历史使用数据,在进行预处理之后对预设的BILSTM神经网络进行训练的时候,数据对应各节点更加准确,从而提高训练后的物理机资源分配模型具有更加精准的预测能力。In this embodiment, the historical usage data is not acquired blindly, but is acquired selectively. For example, the number of nodes in the BILSTM neural network is first determined, and the number of nodes in the historical usage data can be known according to the number of nodes. Time span, specifically, because there is one more node for calculating the average training value in this application, the number of nodes needs to be reduced by one. For example, the number of nodes in the BILSTM neural network is 13, which should correspond to different 12 consecutive The data of the time span, the last node is used to train the average of the data in this 12 time spans. After the specific number of nodes is determined, the start time and end time of the historical data can be determined according to the above time span. For example, if the time span is 1 month and the number of nodes is 13, then the start time is the time corresponding to the current time before December, and the current time is the end time. In another embodiment, if the time span is 1 month and is a natural month starting on the 1st, the start time removes the month corresponding to the current time, and the end time of the month before the current time is the value of the historical data. The end time, and the start time of the historical data is pushed forward 12 months from the end time to get the time. Using the historical usage data obtained in this embodiment, when the preset BILSTM neural network is trained after preprocessing, the data corresponds to each node more accurately, thereby improving the trained physical machine resource allocation model to have more accurate prediction capabilities .

在一个实施例中,上述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤S7,包括:In one embodiment, the above steps of compiling a basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model S7, including:

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;Write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk';

使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。Using different amounts of training data in the training data set to train the basic model to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the obtained physical machine resource allocation models the lower the prediction accuracy.

在本实施例中,主要是要训练得到多个训练程度不同的物理机资源分配模型,以便于后期的使用。本申请中,可以训练出三个物理机资源分配模型,如使用全部训练数据集中的训练数据训练得到的物理机资源分配模型,其预测准确性最高,定义为高级物理机资源分配模型,使用训练数据的数量中等得到的模型定义为中级述物理机资源分配模型,使用训练数据的数量最少得到的模型定义为低级述物理机资源分配模型。在使用过程,可以根据模型使用者的身份,给以对应级别的模型使用,比如,模型使用者是公司的决策者,其使用高级物理机资源分配模型,其可以准确的掌握物理机的资源分配量;而其他如客服人员等需要简单了解预测结果以回复客户问题的,则使用低级物理机资源分配模型等,以防止将准确的数据透漏给竞争对手等。In this embodiment, it is mainly necessary to train to obtain a plurality of physical machine resource allocation models with different training degrees, so as to facilitate later use. In this application, three physical machine resource allocation models can be trained. For example, the physical machine resource allocation model obtained by training the training data in all training data sets has the highest prediction accuracy and is defined as an advanced physical machine resource allocation model. A model obtained with a medium amount of data is defined as a medium-level physical machine resource allocation model, and a model obtained using the least amount of training data is defined as a low-level physical machine resource allocation model. During the use process, the model of the corresponding level can be used according to the identity of the model user. For example, the model user is the decision maker of the company, and it uses the advanced physical machine resource allocation model, which can accurately grasp the resource allocation of the physical machine. For others, such as customer service personnel, who need to simply understand the forecast results to respond to customer questions, use low-level physical machine resource allocation models to prevent accurate data from being leaked to competitors.

在一个实施例中,上述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤之后,包括:In one embodiment, the above steps of compiling a basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model After that, include:

获取调用所述物理机资源分配模型的命令;Obtain a command for invoking the physical machine resource allocation model;

依据所述命令,启动身份识别程序,得到当前操作者的身份;According to the command, start the identity recognition program to obtain the identity of the current operator;

根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。The physical machine resource allocation model registered corresponding to the operator's identity is allocated according to the operator's identity.

在本实施例中,上述身份识别程序可以现有技术中的任意一种程序,比如指纹识别、人脸识别、声纹识别等等。不同的操作者可以调用的物理机资源分配模型的等级不同,可以有效管控资源分配数据的安全性。In this embodiment, the above-mentioned identity recognition program may be any program in the prior art, such as fingerprint recognition, face recognition, voiceprint recognition, and the like. Different operators can call different levels of physical machine resource allocation models, which can effectively control the security of resource allocation data.

本申请的物理机资源分配模型的获取方法,将训练数据集中的数据输入到预设的BILSTM神经网络中进行训练,得到隐含层的输出值Hi=(hi+hi’);以及,将训练数据进行求和后再平均处理,得到平均训练值,并将平均训练值输入到BILSTM神经网络中进行训练,得到对应的隐含层的输出值X;根据输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;通过线性函数Hk’=H(C,hk,Xk)求出输出值X对应的隐含层输出值hk’;依据隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对基础模型进行训练,得到物理机资源分配模型。本申请使用了注意力机制以及BILSTM神经网络,在整个技术方案中加入注意力机制后,对算法进行了改进,从而提高了预测精度,优化了架构,提高特征值的挖掘深度。In the acquisition method of the physical machine resource allocation model of the present application, the data in the training data set is input into the preset BILSTM neural network for training, and the output value of the hidden layer Hi=(hi+hi') is obtained; After the data is summed and then averaged, the average training value is obtained, and the average training value is input into the BILSTM neural network for training, and the output value X of the corresponding hidden layer is obtained; according to the probability of the output value X on each historical node distribution, calculate the product of the hidden layer output Hi of each historical node and the probability weight, and then add the value C; obtain the hidden layer corresponding to the output value X through the linear function Hk'=H(C,hk,Xk) The output value hk'; according to the output value hk' of the hidden layer, the basic model of physical machine resource allocation based on BILSTM neural network is compiled, and the basic model is trained to obtain the physical machine resource allocation model. This application uses the attention mechanism and the BILSTM neural network. After adding the attention mechanism to the entire technical solution, the algorithm is improved, thereby improving the prediction accuracy, optimizing the architecture, and improving the mining depth of feature values.

参照图2,本申请还提供一种物理机资源分配模型的获取装置,包括:Referring to FIG. 2, the present application also provides a device for obtaining a physical machine resource allocation model, including:

获取单元10,用于获取指定区域的物理机的历史使用数据;anacquisition unit 10 for acquiring historical usage data of physical machines in a designated area;

处理单元20,用于将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;Theprocessing unit 20 is used to obtain available historical data after preprocessing the historical usage data, and divide the historical data into a training data set and a test data set;

第一训练单元30,用于将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,Thefirst training unit 30 is used to input the training data in the training data set into the former hidden layer and the latter hidden layer in the preset BILSTM neural network respectively according to the forward order and the reverse order of time. Perform training to obtain the output value hi of the former item and the output value hi' of the latter item, and add the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node ;as well as,

第二训练单元40,用于将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;Thesecond training unit 40 is used for summing the training data and then averaging to obtain an average training value, and inputting the average training value into the former hidden layer and the latter hidden layer in the BILSTM neural network The training is carried out in the layer, and the output value X of the corresponding hidden layer is obtained;

第一计算单元50,用于根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;Thefirst calculation unit 50 is configured to calculate the product of the hidden layer output Hi of each historical node and the probability weight according to the probability distribution of the output value X on each historical node, and then add to obtain the value C;

第二计算单元60,用于通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;Thesecond calculation unit 60 is configured to obtain the hidden layer output value hk' corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

编写训练单元70,用于依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。The writingtraining unit 70 is used for writing the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein , the predicted value calculated by the physical machine resource allocation model is Y=R(X,hk'), and R is a constant.

在一个实施例中,上述第一计算单元50,包括:In one embodiment, the above-mentionedfirst computing unit 50 includes:

构建模块,用于根据所述输出值X在各历史节点上的概率分布,构建公式:The building module is used to build the formula according to the probability distribution of the output value X on each historical node:

Figure BDA0002466244970000101
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000101
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

计算模块,用于依据公式

Figure BDA0002466244970000111
得到所述值C。Calculation module for formulating
Figure BDA0002466244970000111
The value C is obtained.

在一个实施例中,上述处理单元20,包括:In one embodiment, the above-mentionedprocessing unit 20 includes:

分类模块,用于对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;A classification module, used for classifying the historical usage data, wherein the classification includes the zoom type that needs to be reduced in data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;

处理模块,用于将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;a processing module, configured to process the classified data according to a corresponding processing method to obtain the available historical data;

拆分模块,用于将所述可用的历史数据分成所述训练数据集和所述测试数据集。A splitting module for dividing the available historical data into the training data set and the test data set.

在一个实施例中,上述处理单元20,包括:In one embodiment, the above-mentionedprocessing unit 20 includes:

第一获取模块,用于获取所述预设的BILSTM神经网络的节点数量;The first acquisition module is used to acquire the number of nodes of the preset BILSTM neural network;

确定模块,用于根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;A determination module, configured to determine the start time and end time of the historical data according to the value of the number of nodes minus one;

第二获取模块,用于获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The second acquiring module is configured to acquire the data between the start time and the end time as the historical usage data.

在一个实施例中,上述编写训练单元70,包括:In one embodiment, the above-mentionedwriting training unit 70 includes:

编写模块,用于依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;A writing module for writing a basic model of physical machine resource allocation based on the BILSTM neural network according to the hidden layer output value hk';

训练模块,用于使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。A training module, used for training the basic model using different amounts of training data in the training data set to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the more The prediction accuracy of the physical machine resource allocation model is lower.

进一步地,上述物理机资源分配模型的获取装置,包括:Further, the device for obtaining the above-mentioned physical machine resource allocation model includes:

获取命令单元,用于获取调用所述物理机资源分配模型的命令;Obtaining a command unit for obtaining a command for invoking the physical machine resource allocation model;

身份识别单元,用于依据所述命令,启动身份识别程序,得到当前操作者的身份;an identity recognition unit, used for starting the identity recognition program according to the command to obtain the identity of the current operator;

分配模型单元,用于根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。an allocation model unit, configured to allocate the physical machine resource allocation model registered corresponding to the operator's identity according to the operator's identity.

上述各单元和模块是执行上述各方法步骤的装置,在此不在展开一一说明。The above-mentioned units and modules are apparatuses for executing the above-mentioned method steps, and will not be described one by one here.

参照图3,本申请实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图3所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于历史使用数据等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种物理机资源分配模型的获取方法。Referring to FIG. 3 , an embodiment of the present application further provides a computer device. The computer device may be a server, and its internal structure may be as shown in FIG. 3 . The computer device includes a processor, memory, a network interface, and a database connected by a system bus. Among them, the processor of the computer design is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The computer equipment's database is used for data such as historical usage data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for obtaining a resource allocation model of a physical machine is implemented.

上述处理器执行上述物理机资源分配模型的获取方法,包括步骤:The above-mentioned processor executes the above-mentioned method for obtaining the physical machine resource allocation model, comprising the steps of:

获取指定区域的物理机的历史使用数据;Obtain historical usage data of physical machines in a specified area;

将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;Preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;

将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The training data in the training data set are respectively input into the front hidden layer and the rear hidden layer in the preset BILSTM neural network according to the forward order and reverse order of time for training, and the output value of the front item is obtained. hi and the subsequent output value hi', and adding the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; and,

将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The training data is summed and then averaged to obtain an average training value, and the average training value is input into the former hidden layer and the latter hidden layer in the BILSTM neural network for training to obtain the corresponding The output value X of the hidden layer;

根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;According to the probability distribution of the output value X on each historical node, the product of the hidden layer output Hi of each historical node and the probability weight is calculated, and then added to obtain the value C;

通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;Obtain the output value hk' of the hidden layer corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Compiling the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein the physical machine resource allocation The predicted value calculated by the model is Y=R(X,hk'), where R is a constant.

在一个实施例中,所述根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C的步骤,包括:In one embodiment, the step of calculating the product of the hidden layer output Hi and the probability weight of each historical node according to the probability distribution of the output value X on each historical node, and then adding the value to obtain the value C, includes: :

根据所述输出值X在各历史节点上的概率分布,构建公式:According to the probability distribution of the output value X on each historical node, construct the formula:

Figure BDA0002466244970000131
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000131
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

依据公式

Figure BDA0002466244970000132
得到所述值C。According to the formula
Figure BDA0002466244970000132
The value C is obtained.

在一个实施例中,所述将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集的步骤,包括:In one embodiment, the steps of obtaining available historical data after preprocessing the historical usage data, and dividing the historical data into a training data set and a test data set include:

对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;classifying the historical usage data, wherein the classification includes the zoom type that needs to reduce the data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;

将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;Processing the classified data according to the corresponding processing method to obtain the available historical data;

将所述可用的历史数据分成所述训练数据集和所述测试数据集。The available historical data is divided into the training dataset and the test dataset.

在一个实施例中,所述获取指定区域的物理机的历史使用数据的步骤,包括:In one embodiment, the step of acquiring historical usage data of physical machines in a designated area includes:

获取所述预设的BILSTM神经网络的节点数量;Obtain the number of nodes of the preset BILSTM neural network;

根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;Determine the start time and end time of the historical data according to the value of the number of nodes minus one;

获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The data between the start time and the end time is acquired as the historical usage data.

在一个实施例中,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤,包括:In one embodiment, the basic model of physical machine resource allocation based on BILSTM neural network is compiled according to the hidden layer output value hk', and the basic model is trained to obtain the physical machine resource allocation model. steps, including:

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;Write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk';

使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。Using different amounts of training data in the training data set to train the basic model to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the obtained physical machine resource allocation models the lower the prediction accuracy.

在一个实施例中,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤之后,包括:In one embodiment, the basic model of physical machine resource allocation based on BILSTM neural network is compiled according to the hidden layer output value hk', and the basic model is trained to obtain the physical machine resource allocation model. After the steps, including:

获取调用所述物理机资源分配模型的命令;Obtain a command for invoking the physical machine resource allocation model;

依据所述命令,启动身份识别程序,得到当前操作者的身份;According to the command, start the identity recognition program to obtain the identity of the current operator;

根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。The physical machine resource allocation model registered corresponding to the operator's identity is allocated according to the operator's identity.

本领域技术人员可以理解,图3中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。Those skilled in the art can understand that the structure shown in FIG. 3 is only a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied.

本申请实施例还提供一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现一种上述物理机资源分配模型的获取方法,包括步骤:Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, a method for obtaining the above-mentioned physical machine resource allocation model is implemented, including the steps:

获取指定区域的物理机的历史使用数据;Obtain historical usage data of physical machines in a specified area;

将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;Preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;

将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The training data in the training data set are respectively input into the front hidden layer and the rear hidden layer in the preset BILSTM neural network according to the forward order and reverse order of time for training, and the output value of the front item is obtained. hi and the subsequent output value hi', and adding the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; and,

将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The training data is summed and then averaged to obtain an average training value, and the average training value is input into the former hidden layer and the latter hidden layer in the BILSTM neural network for training to obtain the corresponding The output value X of the hidden layer;

根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;According to the probability distribution of the output value X on each historical node, the product of the hidden layer output Hi of each historical node and the probability weight is calculated, and then added to obtain the value C;

通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;Obtain the output value hk' of the hidden layer corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Compiling the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein the physical machine resource allocation The predicted value calculated by the model is Y=R(X,hk'), where R is a constant.

在一个实施例中,所述根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C的步骤,包括:In one embodiment, the step of calculating the product of the hidden layer output Hi of each historical node and the probability weight according to the probability distribution of the output value X on each historical node, and then adding the value to obtain the value C, includes: :

根据所述输出值X在各历史节点上的概率分布,构建公式:According to the probability distribution of the output value X on each historical node, construct the formula:

Figure BDA0002466244970000151
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure BDA0002466244970000151
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;

依据公式

Figure BDA0002466244970000152
得到所述值C。According to the formula
Figure BDA0002466244970000152
The value C is obtained.

在一个实施例中,所述将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集的步骤,包括:In one embodiment, the steps of obtaining available historical data after preprocessing the historical usage data, and dividing the historical data into a training data set and a test data set include:

对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;classifying the historical usage data, wherein the classification includes the zoom type that needs to reduce the data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;

将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;Processing the classified data according to the corresponding processing method to obtain the available historical data;

将所述可用的历史数据分成所述训练数据集和所述测试数据集。The available historical data is divided into the training dataset and the test dataset.

在一个实施例中,所述获取指定区域的物理机的历史使用数据的步骤,包括:In one embodiment, the step of acquiring historical usage data of physical machines in a designated area includes:

获取所述预设的BILSTM神经网络的节点数量;Obtain the number of nodes of the preset BILSTM neural network;

根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;Determine the start time and end time of the historical data according to the value of the number of nodes minus one;

获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The data between the start time and the end time is acquired as the historical usage data.

在一个实施例中,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤,包括:In one embodiment, the basic model of physical machine resource allocation based on BILSTM neural network is compiled according to the hidden layer output value hk', and the basic model is trained to obtain the physical machine resource allocation model. steps, including:

依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;Write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk';

使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。Using different amounts of training data in the training data set to train the basic model to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the obtained physical machine resource allocation models the lower the prediction accuracy.

在一个实施例中,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤之后,包括:In one embodiment, the basic model of physical machine resource allocation based on BILSTM neural network is compiled according to the hidden layer output value hk', and the basic model is trained to obtain the physical machine resource allocation model. After the steps, including:

获取调用所述物理机资源分配模型的命令;Obtain a command for invoking the physical machine resource allocation model;

依据所述命令,启动身份识别程序,得到当前操作者的身份;According to the command, start the identity recognition program to obtain the identity of the current operator;

根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。The physical machine resource allocation model registered corresponding to the operator's identity is allocated according to the operator's identity.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储与一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的和实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM一多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双速据率SDRAM(SSRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium provided in this application and used in the embodiments may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、装置、物品或者方法不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、装置、物品或者方法所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、装置、物品或者方法中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, device, article or method comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, apparatus, article or method. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in the process, apparatus, article, or method that includes the element.

以上所述仅为本申请的优选实施例,并非因此限制本申请的专利范围,凡是利用本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above are only the preferred embodiments of the present application, and are not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the description and drawings of the present application, or directly or indirectly applied to other related The technical field is similarly included in the scope of patent protection of this application.

Claims (10)

Translated fromChinese
1.一种物理机资源分配模型的获取方法,其特征在于,包括:1. a kind of acquisition method of physical machine resource allocation model, is characterized in that, comprises:获取指定区域的物理机的历史使用数据;Obtain historical usage data of physical machines in a specified area;将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;Preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The training data in the training data set are respectively input into the front hidden layer and the rear hidden layer in the preset BILSTM neural network according to the forward order and reverse order of time for training, and the output value of the front item is obtained. hi and the subsequent output value hi', and adding the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; and,将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The training data is summed and then averaged to obtain an average training value, and the average training value is input into the former hidden layer and the latter hidden layer in the BILSTM neural network for training to obtain the corresponding The output value X of the hidden layer;根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;According to the probability distribution of the output value X on each historical node, the product of the hidden layer output Hi of each historical node and the probability weight is calculated, and then added to obtain the value C;通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;Obtain the output value hk' of the hidden layer corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Compiling the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein the physical machine resource allocation The predicted value calculated by the model is Y=R(X,hk'), where R is a constant.2.根据权利要求1所述的物理机资源分配模型的获取方法,其特征在于,所述根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C的步骤,包括:2. The method for obtaining a physical machine resource allocation model according to claim 1, wherein the hidden layer output Hi of each historical node is calculated according to the probability distribution of the output value X on each historical node and the product of the probability weights, and then add the steps to get the value C, including:根据所述输出值X在各历史节点上的概率分布,构建公式:According to the probability distribution of the output value X on each historical node, construct the formula:
Figure FDA0002466244960000011
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure FDA0002466244960000011
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;依据公式
Figure FDA0002466244960000012
得到所述值C。
According to the formula
Figure FDA0002466244960000012
The value C is obtained.
3.根据权利要求1所述的物理机资源分配模型的获取方法,其特征在于,所述将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集的步骤,包括:3. The method for obtaining a physical machine resource allocation model according to claim 1, wherein the historical usage data is preprocessed to obtain available historical data, and the historical data is divided into a training data set and the steps for the test dataset, including:对所述历史使用数据进行分类,其中,分类包括需要将数据缩小的缩放类型、需要归一化处理的归一类型以及需要one-hot转变的文字类型;classifying the historical usage data, wherein the classification includes the zoom type that needs to reduce the data, the normalization type that needs to be normalized, and the text type that needs one-hot transformation;将分类后的数据按照对应的处理方式进行处理得到所述可用的历史数据;Processing the classified data according to the corresponding processing method to obtain the available historical data;将所述可用的历史数据分成所述训练数据集和所述测试数据集。The available historical data is divided into the training dataset and the test dataset.4.根据权利要求1所述的物理机资源分配模型的获取方法,其特征在于,所述获取指定区域的物理机的历史使用数据的步骤,包括:4. The method for obtaining a physical machine resource allocation model according to claim 1, wherein the step of obtaining historical usage data of a physical machine in a designated area comprises:获取所述预设的BILSTM神经网络的节点数量;Obtain the number of nodes of the preset BILSTM neural network;根据所述节点数量减一的值,确定所述历史数据的起始时间和结束时间;Determine the start time and end time of the historical data according to the value of the number of nodes minus one;获取所述起始时间和结束时间之间的数据作为所述历史使用数据。The data between the start time and the end time is acquired as the historical usage data.5.根据权利要求1所述的物理机资源分配模型的获取方法,其特征在于,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤,包括:5. the acquisition method of physical machine resource allocation model according to claim 1, is characterized in that, described according to described hidden layer output value hk' compiling the basic model of the physical machine resource allocation based on BILSTM neural network, and to The basic model is trained, and the steps of obtaining the physical machine resource allocation model include:依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型;Write the basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk';使用所述训练数据集中不同数量的训练数据对所述基础模型进行训练,得到不同训练等级的所述物理机资源分配模型,其中,使用的训练数据越少,得到的所述物理机资源分配模型的预测准确度越低。Using different amounts of training data in the training data set to train the basic model to obtain the physical machine resource allocation models of different training levels, wherein the less training data used, the obtained physical machine resource allocation models the lower the prediction accuracy.6.根据权利要求5所述的物理机资源分配模型的获取方法,其特征在于,所述依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型的步骤之后,包括:6. The acquisition method of physical machine resource allocation model according to claim 5, is characterized in that, described according to described hidden layer output value hk' compiling the basic model of the physical machine resource allocation based on BILSTM neural network, and to BILSTM neural network. After the basic model is trained to obtain the physical machine resource allocation model, the steps include:获取调用所述物理机资源分配模型的命令;Obtain a command for invoking the physical machine resource allocation model;依据所述命令,启动身份识别程序,得到当前操作者的身份;According to the command, start the identity recognition program to obtain the identity of the current operator;根据所述操作者的身份分配与所述操作者的身份相对应登记的所述物理机资源分配模型。The physical machine resource allocation model registered corresponding to the operator's identity is allocated according to the operator's identity.7.一种物理机资源分配模型的获取装置,其特征在于,包括:7. A device for obtaining a physical machine resource allocation model, comprising:获取单元,用于获取指定区域的物理机的历史使用数据;The acquisition unit is used to acquire historical usage data of physical machines in the specified area;处理单元,用于将所述历史使用数据进行预处理后得到可用的历史数据,并将所述历史数据分成训练数据集和测试数据集;a processing unit for preprocessing the historical usage data to obtain available historical data, and dividing the historical data into a training data set and a test data set;第一训练单元,用于将所述训练数据集中的训练数据按照时间的正向顺序和反向顺序分别输入到预设的BILSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到前项输出值hi和后项输出值hi’,并且将所述hi与hi’相加得到隐含层的输出值Hi=(hi+hi’),其中i为某个历史节点;以及,The first training unit is used for inputting the training data in the training data set into the former hidden layer and the latter hidden layer in the preset BILSTM neural network respectively according to the forward order and reverse order of time. Training, obtain the output value hi of the former item and the output value hi' of the latter item, and add the hi and hi' to obtain the output value of the hidden layer Hi=(hi+hi'), where i is a certain historical node; as well as,第二训练单元,用于将所述训练数据进行求和后再平均处理,得到平均训练值,并将所述平均训练值输入到LSTM神经网络中的前项隐含层和后项隐含层中进行训练,得到对应的隐含层的输出值X;The second training unit is used for summing and averaging the training data to obtain an average training value, and inputting the average training value into the previous hidden layer and the subsequent hidden layer in the LSTM neural network to train in and get the output value X of the corresponding hidden layer;第一计算单元,用于根据所述输出值X在各历史节点上的概率分布,计算出各历史节点的隐含层输出Hi和概率权重的乘积,然后相加得到值C;a first calculation unit, configured to calculate the product of the hidden layer output Hi of each historical node and the probability weight according to the probability distribution of the output value X on each historical node, and then add the value C;第二计算单元,用于通过线性函数Hk’=H(C,hk,Xk)求出所述输出值X对应的隐含层输出值hk’;The second calculation unit is used to obtain the hidden layer output value hk' corresponding to the output value X through the linear function Hk'=H(C,hk,Xk);编写训练单元,用于依据所述隐含层输出值hk’编写基于BILSTM神经网络的物理机资源分配的基础模型,并对所述基础模型进行训练,得到所述物理机资源分配模型,其中,所述物理机资源分配模型计算出的预测值为Y=R(X,hk’),R为常量。Writing a training unit, for writing a basic model of physical machine resource allocation based on BILSTM neural network according to the hidden layer output value hk', and training the basic model to obtain the physical machine resource allocation model, wherein, The predicted value calculated by the physical machine resource allocation model is Y=R(X,hk'), where R is a constant.8.根据权利要求7所述的物理机资源分配模型的获取装置,其特征在于,所述第一计算单元,包括:8. The device for obtaining a physical machine resource allocation model according to claim 7, wherein the first computing unit comprises:构建模块,用于根据所述输出值X在各历史节点上的概率分布,构建公式:The building module is used to build the formula according to the probability distribution of the output value X on each historical node:
Figure FDA0002466244960000031
其中,Ski=vtanh(Whk+Uhi+b),k为某个历史节点,i为某个历史节点,b为常量;
Figure FDA0002466244960000031
Among them, Ski=vtanh(Whk+Uhi+b), k is a certain historical node, i is a certain historical node, and b is a constant;
计算模块,用于依据公式
Figure FDA0002466244960000041
得到所述值C。
Calculation module for formulating
Figure FDA0002466244960000041
The value C is obtained.
9.一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至6中任一项所述方法的步骤。9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 6 when the processor executes the computer program .10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至6中任一项所述的方法的步骤。10. A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
CN202010334968.3A2020-04-242020-04-24 Method, device and computer equipment for obtaining physical machine resource allocation modelActiveCN111651264B (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN202010334968.3ACN111651264B (en)2020-04-242020-04-24 Method, device and computer equipment for obtaining physical machine resource allocation model
PCT/CN2020/098788WO2021212654A1 (en)2020-04-242020-06-29Physical machine resource allocation model acquisition method and apparatus, and computer device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202010334968.3ACN111651264B (en)2020-04-242020-04-24 Method, device and computer equipment for obtaining physical machine resource allocation model

Publications (2)

Publication NumberPublication Date
CN111651264Atrue CN111651264A (en)2020-09-11
CN111651264B CN111651264B (en)2024-12-20

Family

ID=72352187

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202010334968.3AActiveCN111651264B (en)2020-04-242020-04-24 Method, device and computer equipment for obtaining physical machine resource allocation model

Country Status (2)

CountryLink
CN (1)CN111651264B (en)
WO (1)WO2021212654A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115130929A (en)*2022-08-292022-09-30中国西安卫星测控中心Resource pool intelligent generation method based on machine learning classification

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN114331064B (en)*2021-12-172024-11-08浙江大学 Manufacturing resource allocation method for nuclear power equipment product value chain based on Nash equilibrium
CN115118822B (en)*2022-06-152025-07-15马上消费金融股份有限公司 Task processing method and device
CN117350518B (en)*2023-12-042024-03-29深圳智慧园区信息技术有限公司Intelligent park emergency resource scheduling method and system
CN118869731B (en)*2024-06-142025-03-14国网青海省电力公司信息通信公司Energy Internet of things converged communication system and method based on group intelligence
CN119854813A (en)*2024-12-312025-04-18华中科技大学Base station load prediction method and device combining deep learning and statistical method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019062413A1 (en)*2017-09-302019-04-04Oppo广东移动通信有限公司Method and apparatus for managing and controlling application program, storage medium, and electronic device
CN111046961A (en)*2019-12-162020-04-21浙江大学Fault classification method based on bidirectional long-and-short-term memory unit and capsule network

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US11170287B2 (en)*2017-10-272021-11-09Salesforce.Com, Inc.Generating dual sequence inferences using a neural network model
CN110837683A (en)*2019-05-202020-02-25全球能源互联网研究院有限公司 Training and prediction method and device for prediction model of transient stability of power system
CN110276638A (en)*2019-05-292019-09-24南京邮电大学 A method and system for electricity price prediction based on bidirectional long-term and short-term neural network

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
WO2019062413A1 (en)*2017-09-302019-04-04Oppo广东移动通信有限公司Method and apparatus for managing and controlling application program, storage medium, and electronic device
CN111046961A (en)*2019-12-162020-04-21浙江大学Fault classification method based on bidirectional long-and-short-term memory unit and capsule network

Cited By (2)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN115130929A (en)*2022-08-292022-09-30中国西安卫星测控中心Resource pool intelligent generation method based on machine learning classification
CN115130929B (en)*2022-08-292022-11-15中国西安卫星测控中心Resource pool intelligent generation method based on machine learning classification

Also Published As

Publication numberPublication date
CN111651264B (en)2024-12-20
WO2021212654A1 (en)2021-10-28

Similar Documents

PublicationPublication DateTitle
CN111651264A (en) Method, device and computer equipment for obtaining physical machine resource allocation model
Chan et al.A new model of inflation, trend inflation, and long‐run inflation expectations
CN111523678B (en)Service processing method, device, equipment and storage medium
Peng et al.A meta-analysis of international tourism demand forecasting and implications for practice
Engsted et al.Testing for rational bubbles in a coexplosive vector autoregression
CN109284920B (en)Big data-based user information risk assessment method and system
CN105718490A (en)Method and device for updating classifying model
CN111738504A (en)Enterprise financial index fund amount prediction method and device, equipment and storage medium
CN111061948A (en)User label recommendation method and device, computer equipment and storage medium
FriedmanContrast trees and distribution boosting
CN109783788A (en)Tables of data complementing method, device, computer equipment and storage medium
Koop et al.Prior elicitation in multiple change‐point models
CN108182633A (en)Loan data processing method, device, computer equipment and storage medium
CN117852702A (en)Carbon emission prediction method, system, storage medium and apparatus
Yu et al.Joint dynamics of stock returns and cash flows: A time‐varying present‐value framework
CN112348658A (en)Resource allocation method and device and electronic equipment
CN115796548A (en)Resource allocation method, device, computer equipment, storage medium and product
CN115630221A (en)Terminal application interface display data processing method and device and computer equipment
CN110765110A (en) Generalization ability processing method, device, device and storage medium
CN112613920A (en)Loss probability prediction method and device
US20230153326A9 (en)Space partitioning method for database table, device and storage medium
Fasanya et al.Trivariate analysis of oil revenue, government spending and economic growth in Nigeria
CN114139920B (en) A KPI allocation method and application for automobile enterprise activity operation based on sliding sales funnel
CN110874667A (en)Scoring card model optimization method and device, server and storage medium
CN115759742A (en)Enterprise risk assessment method and device, computer equipment and storage medium

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
REGReference to a national code

Ref country code:HK

Ref legal event code:DE

Ref document number:40033519

Country of ref document:HK

SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant

[8]ページ先頭

©2009-2025 Movatter.jp