CN114398228A - Method and device for predicting equipment resource use condition and electronic equipment - Google Patents

Method and device for predicting equipment resource use condition and electronic equipment Download PDF

Info

Publication number
CN114398228A
CN114398228A CN202111637154.8A CN202111637154A CN114398228A CN 114398228 A CN114398228 A CN 114398228A CN 202111637154 A CN202111637154 A CN 202111637154A CN 114398228 A CN114398228 A CN 114398228A
Authority
CN
China
Prior art keywords
data
monitoring data
resource
monitoring
predicted
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.)
Pending
Application number
CN202111637154.8A
Other languages
Chinese (zh)
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.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN202111637154.8A priority Critical patent/CN114398228A/en
Publication of CN114398228A publication Critical patent/CN114398228A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3065Monitoring arrangements determined by the means or processing involved in reporting the monitored data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3452Performance evaluation by statistical analysis

Abstract

The embodiment of the invention provides a method and a device for predicting the use condition of equipment resources and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of obtaining monitoring data of target equipment in a first target time period, inputting the monitoring data into a pre-trained index prediction model to enable the index prediction model to map monitoring index data of resources to be predicted in the monitoring data and monitoring index data of each associated resource into two-dimensional images respectively, predicting the use condition of the resources to be predicted in a second target time period based on the two-dimensional images, outputting the use condition, and obtaining the use condition output by the index prediction model as a prediction result. By adopting the method, the prediction accuracy of the service condition of the resource to be predicted is improved, and the index prediction model only needs to be adjusted by few parameters, so that the method can be widely applied to different index prediction scenes.

Description

Method and device for predicting equipment resource use condition and electronic equipment
Technical Field
The invention belongs to the technical field of IT operation and maintenance, and particularly relates to a method and a device for predicting the use condition of equipment resources and electronic equipment.
Background
In order to evaluate the performance of devices such as a server, monitoring indexes such as the occupancy rate, the usage rate, and IO of objects such as a CPU, a memory, a disk, and a java process heap memory are generally required to be predicted. At present, time series analysis is often adopted and each monitoring index of objects such as a CPU (central processing unit), a memory and the like is predicted in a self-modeling mode.
However, the method has the problems of insufficient feature extraction of the monitoring index, weak monitoring index prediction capability and no universality. For example, this approach requires a specific hardware environment, operating system, or even software scenario to achieve a practical prediction for individual monitoring targets, and the performance of the prediction decreases dramatically when switching to other scenarios. In addition, the model learning is performed by directly encoding the time series data into a two-dimensional matrix by adopting time series analysis and a self-modeling mode, so that the characteristics of multivariable in a high-dimensional space are difficult to embody, and the prediction accuracy of the learned model is low.
Disclosure of Invention
The embodiment of the invention aims to provide a method and a device for predicting the use condition of equipment resources and electronic equipment, so as to improve the prediction accuracy of the use condition of the predicted resources.
In a first aspect, an embodiment of the present invention provides a method for predicting a device resource usage, including:
acquiring monitoring data of target equipment in a first target time period, wherein the monitoring data comprises monitoring index data of resources to be predicted of the target equipment and monitoring index data of at least one associated resource of the resources to be predicted;
inputting the monitoring data into a pre-trained index prediction model so that the index prediction model maps the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images respectively, predicting the use condition of the resource to be predicted in a second target time period based on the two-dimensional images, and outputting the use condition, wherein the index prediction model is obtained based on sample monitoring data and a corresponding label through pre-training;
and obtaining the use condition output by the index prediction model as a prediction result.
Optionally, the mapping the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data to two-dimensional images respectively includes:
normalizing the monitoring data to obtain normalized monitoring data;
discretizing the monitoring data after the normalization processing to obtain discretized monitoring data;
mapping the discretized monitoring data to a high-dimensional Euclidean space, wherein the resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimension in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimension number being consistent with a first preset number, and the first preset number is the sum of the number of the resource to be predicted and each associated resource;
and performing convolution processing on planes determined by any two dimensionalities in the high-dimensional Euclidean space by using the first preset number of hypercube convolution filters to obtain a two-dimensional image with the channel number being the first preset number, wherein the two hypercube convolution filters are convolution filters with different convolution kernels and the dimensionality number being the first preset number.
Optionally, the discretization processing is performed on the monitoring data after the normalization processing to obtain the discretization processed monitoring data, and the discretization processing includes:
and for each piece of data in the monitoring data after the normalization processing, determining a coordinate scale value closest to the data on a coordinate axis corresponding to the resource to which the data belongs as a discretized numerical value corresponding to the data to obtain the discretized monitoring data, wherein the coordinate axes corresponding to the resource to be predicted and the associated resources are divided into a second preset number of intervals, and values at two ends of each interval are the coordinate scale values of the coordinate axis where the interval is located.
Optionally, the mapping the discretized monitoring data to a high-dimensional european space includes:
mapping the discretized monitoring data to a high-dimensional Euclidean space by adopting the following formula:
Figure BDA0003442682350000021
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in a high-dimensional Euclidean space, k is a first preset number, | | p | | luminancekIs the k-th norm of p.
Optionally, the performing convolution processing on the planes determined by any two dimensions in the high-dimensional european space by using the first preset number of hypercube convolution filters to obtain the two-dimensional images with the number of channels being the first preset number includes:
respectively performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space by using the hypercube convolution filters with the first preset number;
filling the two-dimensional image with the number of channels obtained after the convolution processing being the first preset number by using preset filling pixels so as to enable the sizes of the channels of the obtained two-dimensional image to be consistent, wherein the size of the two-dimensional image is S, and S ═ r ((gamma + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
Optionally, the predicting, based on the two-dimensional image, a usage of the resource to be predicted in a second target time period includes:
extracting image features of the two-dimensional image;
and performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in a second target time period.
Optionally, the training mode of the index prediction model includes:
obtaining sample monitoring data, and obtaining monitoring index data of specified resources in a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data comprises monitoring index data of a plurality of sample resources in the first preset time period, and the plurality of sample resources comprise the specified resources;
inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicting the predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputting the predicted use condition;
calculating a loss value of an index prediction model to be trained based on the label and the predicted use condition;
judging whether the loss value is smaller than a preset loss threshold value or not, if so, determining that the training of the index prediction model to be trained is completed, and obtaining the index prediction model; and if not, updating the parameters of the index prediction model to be trained, returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
In a second aspect, an embodiment of the present invention provides an apparatus for predicting device resource usage, including:
the data acquisition module is used for acquiring monitoring data of target equipment in a first target time period, wherein the monitoring data comprises monitoring index data of resources to be predicted of the target equipment and monitoring index data of at least one associated resource of the resources to be predicted;
the condition prediction module is used for inputting the monitoring data into a pre-trained index prediction model so as to enable the index prediction model to map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images respectively, predicting the service condition of the resource to be predicted in a second target time period based on the two-dimensional images and outputting the service condition, wherein the index prediction model is obtained by pre-training based on sample monitoring data and corresponding labels;
and the result obtaining module is used for obtaining the use condition output by the index prediction model as a prediction result.
Optionally, the situation prediction module includes:
the normalization submodule is used for performing normalization processing on the monitoring data to obtain the monitoring data after the normalization processing;
the discrete processing submodule is used for carrying out discretization processing on the monitoring data after the normalization processing to obtain discretized monitoring data;
the data mapping sub-module is used for mapping the discretized monitoring data to a high-dimensional Euclidean space, wherein the resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimension in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimension number being consistent with a first preset number, and the first preset number is the sum of the number of the resource to be predicted and each associated resource;
and the convolution submodule is used for performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space by using the first preset number of hypercube convolution filters to obtain a two-dimensional image with the number of channels being the first preset number, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the number of dimensions being the first preset number.
Optionally, the discrete processing sub-module is specifically configured to, for each piece of data in the normalized monitoring data, determine a coordinate scale value closest to the piece of data on a coordinate axis corresponding to a resource to which the piece of data belongs as a discretized numerical value corresponding to the piece of data, and obtain discretized monitoring data, where the coordinate axes corresponding to the resource to be predicted and each associated resource are equally divided into a second preset number of intervals, and values at two ends of each interval are the coordinate scale values of the coordinate axis where the interval is located.
Optionally, the data mapping sub-module is specifically configured to map the discretized monitoring data to a high-dimensional european space by using the following formula:
Figure BDA0003442682350000051
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in a high-dimensional Euclidean space, k is a first preset number, | | p | | luminancekIs the k-th norm of p.
Optionally, the convolution sub-module is specifically configured to perform convolution processing on planes determined by any two dimensions in the high-dimensional euclidean space by using the first preset number of hypercube convolution filters; filling the two-dimensional image with the number of channels obtained after the convolution processing being the first preset number by using preset filling pixels so as to enable the sizes of the channels of the obtained two-dimensional image to be consistent, wherein the size of the two-dimensional image is S, and S ═ r ((gamma + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
Optionally, the condition prediction module is specifically configured to extract image features of the two-dimensional image; and performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in a second target time period.
Optionally, the apparatus further includes a model training model, configured to obtain the index prediction model by training in the following training manner:
obtaining sample monitoring data, and obtaining monitoring index data of specified resources in a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data comprises monitoring index data of a plurality of sample resources in the first preset time period, and the plurality of sample resources comprise the specified resources;
inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicting the predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputting the predicted use condition;
calculating a loss value of an index prediction model to be trained based on the label and the predicted use condition;
judging whether the loss value is smaller than a preset loss threshold value or not, if so, determining that the training of the index prediction model to be trained is completed, and obtaining the index prediction model; and if not, updating the parameters of the index prediction model to be trained, returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor and the communication interface complete communication between the memory and the processor through the communication bus;
a memory for storing a computer program;
a processor adapted to perform the method steps of any of the above first aspects when executing a program stored in the memory.
In a fourth aspect, the present invention provides a computer-readable storage medium, in which a computer program is stored, and the computer program, when executed by a processor, implements the method steps of any one of the above first aspects.
The embodiment of the invention has the following beneficial effects:
by adopting the method provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by referring to these drawings.
Fig. 1 is a flowchart of a method for predicting usage of device resources according to an embodiment of the present invention;
FIG. 2 is a flow chart of image mapping according to an embodiment of the present invention;
FIG. 3 is a flowchart of the training of the index prediction model according to the embodiment of the present invention
Fig. 4 is a schematic structural diagram of an apparatus for predicting usage of device resources according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
In order to improve the prediction accuracy of predicting the use condition of the resource, the embodiment of the invention provides a method and a device for predicting the use condition of the resource, an electronic device, a computer-readable storage medium and a computer program product.
The method for predicting the use condition of the device resource provided by the embodiment of the invention can be applied to any electronic device capable of analyzing and processing indexes such as occupancy rates, use rates, IO (input/output) of a CPU (central processing unit), a memory, a disk and a java process heap memory, for example, devices such as a computer and a mobile phone, and the like, and is not limited specifically herein.
Fig. 1 is a flowchart of a method for predicting usage of device resources according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, acquiring monitoring data of a target device in a first target time period.
The monitoring data comprises monitoring index data of a resource to be predicted of the target equipment and monitoring index data of at least one associated resource of the resource to be predicted.
Specifically, the resources of the target device may include hardware resources and software resources of the target device. The resource to be predicted can be a CPU, a memory, a disk or a java process heap memory of the target device. The associated resource of the resource to be predicted is the resource which influences the use condition of the resource to be predicted. In theory, the usage of any resource of the target device may be affected by all resources of other resources in the target device, and in the embodiment of the present invention, for any resource of the target device, other resources except the resource may be determined as associated resources of the resource. In the embodiment of the present invention, for any resource of the target device, at least one resource that has a large influence on the use condition of the resource may also be specified from other resources except the resource, and as the associated resource of the resource, for example, if the resource to be predicted is the "heap memory after the recovery of the java program" of the target device, the resources such as the CPU, the memory, the heap memory before the recovery of the java program, and the like in the target device may be determined in advance as the associated resource of the "heap memory after the recovery of the java program".
The monitoring index data of the resource to be predicted can be the occupancy rate, the utilization rate, the IO and the like of the resource to be predicted, and the monitoring index data of each associated resource of the resource to be predicted can be the occupancy rate, the utilization rate, the IO and the like of the associated resource.
In the embodiment of the present invention, the target device may be an electronic device that executes the method for predicting the device resource usage provided in the embodiment of the present invention, or may be another electronic device, and the target device may specifically be a computer, a mobile phone, an ipad, a server, or the like.
The first target time period is a specified time period before the current time, for example, the current time is "12/24/53: 02/2021", and the first target time period may be a time period [ 12/23/13/53: 02/2021, 12/24/13/53: 02/2021 ].
Step 102, inputting the monitoring data into a pre-trained index prediction model so as to enable the index prediction model to map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images respectively, predicting the service condition of the resource to be predicted in a second target time period based on the two-dimensional images, and outputting the service condition.
The index prediction model is obtained by pre-training based on sample monitoring data and corresponding labels.
And 103, obtaining the use condition output by the index prediction model as a prediction result.
By adopting the method provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
In a possible implementation manner, fig. 2 is an image mapping flowchart provided in an embodiment of the present invention, and as shown in fig. 2, the mapping the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data to a two-dimensional image respectively includes:
step 201, performing normalization processing on the monitoring data to obtain the monitoring data after normalization processing.
In the embodiment of the invention, the monitoring data P of the target equipment in the first target time period can be acquiredm:Pm={(x11,x12,…,x1k),(x21,x22,…,x2k),…,(xm1,xm2,…,xmk)}。
Wherein the monitoring data PmThe method comprises the following steps of acquiring data sequences of m time moments with fixed frequency: (x)11,x12,…,x1k)、(x21,x22,…,x2k)、…、(xm1,xm2,…,xmk). The first target time period comprises m time moments with equal intervals, the acquisition time moments of the data in each data sequence are the same, and the data sequence (x)11,x12,…,x1k)、(x21,x22,…,x2k)、…、(xm1,xm2,…,xmk) The collection time is respectively the 1 st, 2 nd and m th time in the first target time periodAnd (6) engraving. The data sequence collected at the ith moment in the first target time period is (t)i,xi1,xi2,…,xik) The data sequence is (t)i,xi1,xi2,…,xik) And i is more than or equal to 1 and less than or equal to m for k monitoring index data of the target equipment at the ith moment.
In the embodiment of the invention, the monitoring data can be normalized to obtain the normalized monitoring data. In particular, the monitoring data P may bem={(x11,x12,…,x1k),(x21,x22,…,x2k),…,(xm1,xm2,…,xmk) Normalizing each data to be 0,1]Obtaining normalized monitoring data P 'from data in the interval'm
The specific normalization processing method may refer to any one of the existing normalization processing algorithms, and is not specifically limited herein.
Step 202, discretizing the monitoring data after the normalization processing to obtain discretized monitoring data.
In the embodiment of the present invention, for each piece of data in the normalized monitoring data, a coordinate scale value closest to the data on a coordinate axis corresponding to a resource to which the piece of data belongs may be determined as a discretized numerical value corresponding to the piece of data, so as to obtain discretized monitoring data.
And the coordinate axes corresponding to the resources to be predicted and the associated resources are equally divided into a second preset number of intervals, and the values at two ends of each interval are coordinate scale values of the coordinate axis where the interval is located. The second preset number may be set to 100 or 200 according to practical applications, and is not limited in detail here.
In the embodiment of the present invention, each resource of the target device may correspond to one coordinate axis, for example, a "CPU" resource of the target device may correspond to a coordinate axis ax1, and a "memory" resource of the target device may correspond to a coordinate axis ax 2.
The value range of the monitoring data after normalization processing is 0,1]that is, the definition domain of the coordinate axis corresponding to each resource of the target device is [0,1 ]]. The definition of the coordinate axis of each resource can be localized to [0,1 ]]Equally dividing the interval into a second preset number of intervals to obtain the second preset number plus 1 coordinate scale. The q-th coordinate scale from left to right on the coordinate axis meets the following requirements: x is the number ofqQ is 1,2, …, γ, (γ + 1). Wherein γ is a second predetermined number.
In the embodiment of the invention, for each data in the monitoring data after normalization processing, if the data belongs to the resource to be predicted, the coordinate scale value closest to the data on the coordinate axis corresponding to the resource to be predicted can be determined as the discretized numerical value corresponding to the data; if the data belongs to the associated resource of the resource to be predicted, the coordinate scale value closest to the data on the coordinate axis corresponding to the associated resource can be determined as the discretized numerical value corresponding to the data. By the method, the monitoring data can be discretized to obtain the discretized monitoring data.
For example, for normalized monitored data P'mFor each datum, if the datum belongs to a resource to be predicted, determining a coordinate scale value closest to the datum on a coordinate axis corresponding to the resource to be predicted as a discretized numerical value corresponding to the datum; if the data belongs to the associated resource of the resource to be predicted, the coordinate scale value closest to the data on the coordinate axis corresponding to the associated resource can be determined as the discretized numerical value corresponding to the data, and the discretized monitoring data P' can be obtained "m
Step 203, mapping the discretized monitoring data to a high-dimensional Euclidean space.
The resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimensionality in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimensionality number being consistent with a first preset number, and the first preset number is the sum of the quantity of the resource to be predicted and each associated resource. For example, the monitoring data of the target device includes 5 pieces of monitoring index data, namely, a CPU utilization rate, a memory utilization rate, a handle number of a user of the startup program, a heap memory value after recovery of the java program, and a heap memory value before recovery of the java program, where the heap memory value after recovery of the java program is the monitoring index data of the resource to be predicted, the first preset number may be set to 5, and the discretized monitoring data may be mapped to a high-dimensional european space with a dimension of 5 dimensions.
Assuming that a hypercube lambada exists in a high-dimensional Euclidean space psi with a k dimension, and the coordinate value of each coordinate in 2k vertex coordinates of the hypercube lambada satisfies: x is the number ofm0 or xm1,2, …, k. Namely, the side length of each dimension of the hypercube is 1, and the hypercube can be called as a high-dimension European space.
In the embodiment of the present invention, the mapping the discretized monitoring data to the high-dimensional european space specifically may include: mapping the discretized monitoring data to a high-dimensional Euclidean space by adopting the following formula:
Figure BDA0003442682350000111
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in the high-dimensional european space, k is a first preset number, and | p | | | k is a k-order norm of p.
In the embodiment of the invention, the relevance between the monitoring index data of the resource to be predicted and the monitoring index data of the related resource adjacent to the resource to be predicted is larger,
Figure BDA0003442682350000112
the function can enhance the mapping value of monitoring index data with later acquisition time in P'm in a high-dimensional Euclidean space. The high-dimensional Euclidean space after data mapping is close to the expression form of the sparse matrix.
And 204, using the hypercube convolution filters of the first preset number to respectively perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space to obtain two-dimensional images with the channel number being the first preset number.
Any two hypercube convolution filters are convolution filters with different convolution kernels and the dimensionality number being the first preset number.
In the embodiment of the present invention, a first preset number of hypercube convolution filters may be provided, and the side length L of the hypercube convolution filter p in the dimension of the resource to be predicted and the other dimensionpAnd Lp’Satisfies the following conditions:
Figure BDA0003442682350000121
the side lengths in the remaining (k-2) dimensions are l, k is a first preset number, the side lengths l between different hypercube convolution filters can be different or the same, and gamma is a second preset number.
In this embodiment of the present invention, the performing convolution processing on the planes determined by any two dimensions in the high-dimensional european space by using the first preset number of hypercube convolution filters to obtain the two-dimensional images with the number of channels being the first preset number may specifically include the following steps a1-a 2:
step a1, performing convolution processing on the planes determined by any two dimensions in the high-dimensional european space respectively by using the first predetermined number of hypercube convolution filters.
Step a2, filling, by using preset filling pixels, the two-dimensional image with the number of channels obtained after the convolution processing being the first preset number so that the sizes of the channels of the obtained two-dimensional image are consistent, wherein the size of the two-dimensional image is S, and S ═ r ((γ + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
Using a first predetermined number of hypercube volumesA product filter, in which a plane determined by any two dimensions in a high-dimensional Euclidean space is subjected to two-dimensional convolution operation, for example, a sparse matrix corresponding to monitoring index data of a resource to be predicted in the high-dimensional Euclidean space is LpThe sparse matrix corresponding to the monitoring index data of any one relevant resource of the resource to be predicted in the high-dimensional Euclidean space is Lp’Then L can be separately filtered using a first predetermined number of hypercube convolution filterspAnd Lp’And performing two-dimensional convolution operation on the determined plane. After the convolution operation of the hypercube convolution filters with the first preset number, the two-dimensional image with the first preset number of channels can be obtained.
In order to ensure that the two-dimensional images of the channels have the same length and width, padding (pixel filling) may be performed during convolution to make the sizes of the channels of the two-dimensional images uniform, where S is r ((γ + 1)/Conv)step)2, r is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
The monitoring data after discretization processing is processed by a convolution encoder to become a two-dimensional image with a first preset number of channels, namely an index prediction task in an IT monitoring field is converted into an image recognition task.
By adopting the method provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
In a possible implementation, the predicting the usage of the resource to be predicted in the second target time period based on the two-dimensional image may include the following steps B1-B2:
and step B1, extracting image features of the two-dimensional image.
Specifically, the method for extracting the image features may refer to any existing image feature extraction algorithm, and the image feature extraction algorithm is generally based on a convolutional neural network, and is not specifically limited herein.
And step B2, performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in the second target time period.
Specifically, the hypercube convolution filter may be input to a specific convolution neural network, a multichannel feature may be output, and a linear regression analysis may be performed on the output multichannel feature to obtain a usage of the resource to be predicted in the second target time period.
The second target time period is a time period after the first target time period, and may be a specified time period after the current time. For example, the current time is "24/12/24/16: 13: 49/2021", and the second target time period may be [ 24/12/2021/16: 13: 49/2021/25/12/16: 13:49 ].
By adopting the method provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
Fig. 3 is a flowchart of a training process of an index prediction model according to an embodiment of the present invention, and as shown in fig. 3, a training method of the index prediction model includes:
step 301, obtaining sample monitoring data, and obtaining monitoring index data of a specified resource in a second preset time period as a label corresponding to the sample monitoring data.
The sample monitoring data comprises monitoring index data of a plurality of sample resources in a first preset time period, and the plurality of sample resources comprise the specified resources.
The first preset time period and the second preset time period are both time periods before the current time.
In the embodiment of the present invention, a monitoring data set D within a first preset time period T may be collected in advance:
D={(t1,x11,x12,...,x1k),(t2,x21,x22,...,x2k),...,(tn,xn1,xn2,...,xnk)}n≥1;k≥1
the data set D comprises n time series of sample points of fixed acquisition frequency, for one of which:
(ti,xi1,xi2,...,xik)1≤i≤n;ti∈T
tiis the acquisition time, x, of the sample pointi1,xi2,...,xikIf the prediction task of the method is that the trend of the p-th monitoring index data is within the second preset time period H, the k-th monitoring index data of the sample point
Figure DA00034426823536663601
Figure BDA0003442682350000151
According to the prediction task, sample monitoring data and test monitoring data can be constructed according to the data set D. For any of the training, the sample monitors the data PdataLabel P corresponding to sample monitoring datalabelIs defined as:
Pdata={(x(s+1)1,x(s+1)2,...,x(s+1)k),(x(s+2)1,x(s+2)2,...,x(s+2)k),...,(x(s+ε)1,x(s+ε)2,...,x(s+ε)k)}
Plabel=(x(θ+1)p,x(θ+2)p,...,x(θ+δ)p)
s.t.s+ε≤n;1≤p≤kθ>s+ε;δ≥0
wherein ε determines PdataThe number of samples in (1), δ, determines the size of the prediction window. The prediction task can be single-step univariate prediction or multi-step univariate prediction.
In the embodiment of the invention, the sample monitoring data and the label corresponding to the sample monitoring data can be normalized, and then the normalized sample monitoring data and the label corresponding to the sample monitoring data are subjected to discrete processing, so that the sample monitoring data after the discrete processing and the label corresponding to the sample monitoring data are obtained.
Step 302, inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image, predicts a predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputs the predicted use condition.
Specifically, the discretized sample monitoring data can be mapped to a high-dimensional sample space. The specified resources in the sample monitoring data and the associated resources of the specified resources respectively correspond to one dimension in a high-dimensional sample space, and the high-dimensional sample space is a cubic space with the dimension number being consistent with the sum of the number of the specified resources in the sample monitoring data and the associated resources of the specified resources.
In the embodiment of the present invention, the following formula may be adopted to map the discretized sample monitoring data to the high-dimensional sample space:
Figure BDA0003442682350000161
wherein F (p) is each coordinate point obtained by mapping the discretized sample monitoring data to a high-dimensional sample space,
Figure BDA0003442682350000162
for the discretized sample monitoring data, p is a coordinate point in a high-dimensional sample space, k is the sum of the number of the specified resource in the sample monitoring data and each associated resource of the specified resource, | p | chargingkIs the k-th norm of p.
After the discretized sample monitoring data are mapped to a high-dimensional sample space, a plurality of hypercube convolution filters can be used for respectively performing convolution processing on planes determined by any two dimensions in the high-dimensional sample space to obtain a sample two-dimensional image. The number of channels of the sample two-dimensional image is the sum of the number of the specified resources in the sample monitoring data and the number of each associated resource of the specified resources, and the number of the hypercube convolution filters is also the sum of the number of the specified resources in the sample monitoring data and the number of each associated resource of the specified resources.
And then, converting the sample monitoring data into a sample two-dimensional image, namely converting an index prediction task in the IT monitoring field into an image identification task.
The specific mapping process may refer to the method described in fig. 2.
After the sample two-dimensional image is obtained, the image characteristics of the sample two-dimensional image can be extracted, linear regression analysis is carried out on the basis of the image characteristics extracted by the convolutional neural network, and the predicted use condition of the specified resource in a second preset time period is obtained.
And 303, calculating a loss value of the index prediction model to be trained based on the label and the predicted use condition.
Since the label reflects the actual use condition of the monitoring index data of the specified resource in the second preset time period, the loss value of the index prediction model to be trained can be calculated according to the label and the predicted use condition when the predicted use condition of the specified resource in the second preset time period is obtained. Specifically, the loss value of the index prediction model to be trained may be calculated and optimized with reference to any loss function in the image processing field, for example, a cross entropy loss function, and the like, which is not specifically limited herein.
Step 304, determining whether the loss value is smaller than a preset loss threshold value.
If the determination result is yes, step 305 is executed, and if the determination result is no, step 306 is executed.
The preset loss threshold may be set according to an actual application situation, and is not specifically limited herein.
And 305, determining that the index prediction model to be trained is trained, and obtaining the index prediction model.
And step 306, updating parameters of the index prediction model to be trained, and returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
Specifically, parameters related to image feature extraction in the index prediction model to be trained and parameters related to data mapping of the high-dimensional sample space may be updated.
The following is a specific application example of the index prediction model training provided by the invention:
taking the heap memory after the recovery of the java program as an example,monitoring data within 24 hours before the current moment of the target equipment can be collected, the collection frequency is once in 10 seconds, and 8640 pieces of data are collected in total. The collected data comprises 5 monitoring index data of the CPU utilization rate, the memory utilization rate, the handle number of a user starting the program, the heap memory value after program recovery and the heap memory value before program recovery of a server where the java program is located. In this embodiment, 144 pieces of data may be selected from 8640 pieces of collected data as sample monitoring data PdataSample monitoring data PdataCorresponding label PlabelIncluding heap memory values reclaimed by 48 java programs 24 hours after the current time.
Besides, the 8640 pieces of collected data can be removed from the sample monitoring data PdataThe other data are divided into a test set and a verification set, and the proportion of the test set and the verification set can be divided according to actual requirements, which is not specifically limited here.
In this implementation, data P may be monitored for the sampledataAnd sample monitoring data PdataCorresponding label PlabelThe normalization process is performed and then the discretization process is performed, specifically, when the discretization coefficient is 100, the definition domain of any monitoring index data is divided into 100 equal parts, and 100 coordinates of any monitoring index data (scale range: [0,100,100)]) Scale division
Figure BDA0003442682350000181
All satisfy:
Figure BDA0003442682350000182
to PdataIn any data, the original coordinate can be replaced by the discrete coordinate scale with the shortest Euclidean distance:
Figure BDA0003442682350000183
wherein the content of the first and second substances,
Figure BDA0003442682350000184
for the replaced coordinate values, the sample monitoring data after the discrete processing is as follows:
Figure BDA0003442682350000185
Plabel=(x(θ+1)j,x(θ+2)j,...,x(θ+48)j)
s.t.s+ε≤60=59;θ>s+ε;δ≥0
then, a high-dimensional sample space can be determined: let there be a hypercube Λ,2, in the 5-dimensional Euclidean space Ψ, Ψ5The coordinate value of each coordinate in the vertex coordinates satisfies: x is the number ofm0 or xm1,2, 5, that is, each dimension side length of the hypercube is 1, and the hypercube is a high-dimensional sample space. The sample monitoring data is then mapped to a high-dimensional sample space.
In this embodiment, 5-dimensional hypercube convolution filters Ω can be determined12,...,Ω5Side length L of hypercube convolution filter in dimension of ' heap memory value after program recovery ' and ' handle number of user starting programp、Lp′Satisfies the following conditions:
Figure BDA0003442682350000186
the hypercube convolution filter has a side length of 1 in the remaining 3 dimensions. The values in each hypercube convolution filter were initialized with a gaussian random number with a mean of 0 and a standard deviation of 0.01.
Then, a hypercube convolution filter can be used to perform a convolution operation on the high dimensional sample space: performing a two-dimensional convolution operation on the high-dimensional sample space Lambda by using 5 hypercube filters with 5 dimensions, wherein the sliding convolution operation is performed at LpAnd Lp′And (4) performing on the determined plane to obtain 5 sample two-dimensional images. In order to ensure that the length and the width of each characteristic graph are consistent, filling pixel filling can be carried out during convolutionAnd (4) performing charging operation. Size S of the image subjected to the hypercube convolution filter process described above:
Figure BDA0003442682350000191
the sliding step size of the hypercube convolution filter is 1, i.e.
Figure BDA0003442682350000192
After the index prediction model processing, the image S with 5 channel sides of 101 is formed. Then, feature extraction can be carried out on the image S, and linear regression analysis is carried out by using the extracted features, so that the predicted use condition of the reclaimed heap memory of the java program in 24 days after the current time is obtained. Then through PlabelAnd the predicted use condition of the reclaimed heap memory of the java program in 24 days after the current time, determining a model training loss value and adjusting model parameters. When the model converges, an index prediction model is obtained. Using the above index prediction model, the results of comparing the migratory learning effects of this example under VGG-16, inclusion V3, and ResNet with those of the conventional index prediction model 1 with the memory recovery value RMSE (Root Mean square Error) as an evaluation index, and using a common two-dimensional encoder are shown in table 1:
table 1: comparison table for migration learning effect
Figure BDA0003442682350000193
Figure BDA0003442682350000201
The embodiment shows that the index prediction model obtained by training in the embodiment of the invention is intersected with the traditional method, and has a greatly advanced prediction effect; compared with the common two-dimensional encoder, the method also has a leading prediction effect.
By adopting the method provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
Corresponding to the method for predicting the use condition of the device resource, the embodiment of the present invention further provides a device for predicting the use condition of the device resource, and the following introduces the image fusion device provided by the embodiment of the present invention. Fig. 4 is a schematic structural diagram of an apparatus for predicting device resource usage according to an embodiment of the present invention, as shown in fig. 4, the apparatus includes:
a data obtaining module 401, configured to obtain monitoring data of a target device in a first target time period, where the monitoring data includes monitoring index data of a resource to be predicted of the target device and monitoring index data of at least one associated resource of the resource to be predicted;
a condition prediction module 402, configured to input the monitoring data into a pre-trained index prediction model, so that the index prediction model maps the monitoring index data of the resource to be predicted in the monitoring data and the monitoring index data of each associated resource into two-dimensional images, predicts a usage condition of the resource to be predicted in a second target time period based on the two-dimensional images, and outputs the usage condition, where the index prediction model is obtained based on sample monitoring data and a label corresponding to the sample monitoring data through pre-training;
a result obtaining module 403, configured to obtain the usage of the index prediction model output as a prediction result.
By adopting the device provided by the embodiment of the invention, the monitoring data of the target equipment in the first target time period is obtained, the monitoring data is input into the pre-trained index prediction model so as to enable the index prediction model to respectively map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images, the service condition of the resource to be predicted in the second target time period is predicted based on the two-dimensional images, the service condition is output, and the service condition output by the index prediction model is obtained and used as a prediction result. The method can convert the service condition prediction task of the resource to be predicted into a processing task aiming at the image data, fully utilizes the advantages of wide application range and strong feature extraction capability of a mature model in the field of image processing, improves the prediction accuracy of the service condition of the resource to be predicted, has few parameters to be adjusted, and can be widely applied in different index prediction scenes, namely the index prediction model provided by the embodiment of the invention has high universality.
Optionally, the situation prediction module includes:
the normalization submodule is used for performing normalization processing on the monitoring data to obtain the monitoring data after the normalization processing;
the discrete processing submodule is used for carrying out discretization processing on the monitoring data after the normalization processing to obtain discretized monitoring data;
the data mapping sub-module is used for mapping the discretized monitoring data to a high-dimensional Euclidean space, wherein the resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimension in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimension number being consistent with a first preset number, and the first preset number is the sum of the number of the resource to be predicted and each associated resource;
and the convolution submodule is used for performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space by using the first preset number of hypercube convolution filters to obtain a two-dimensional image with the number of channels being the first preset number, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the number of dimensions being the first preset number.
Optionally, the discrete processing sub-module is specifically configured to, for each piece of data in the normalized monitoring data, determine a coordinate scale value closest to the piece of data on a coordinate axis corresponding to a resource to which the piece of data belongs as a discretized numerical value corresponding to the piece of data, and obtain discretized monitoring data, where the coordinate axes corresponding to the resource to be predicted and each associated resource are equally divided into a second preset number of intervals, and values at two ends of each interval are the coordinate scale values of the coordinate axis where the interval is located.
Optionally, the data mapping sub-module is specifically configured to map the discretized monitoring data to a high-dimensional european space by using the following formula:
Figure BDA0003442682350000221
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in a high-dimensional Euclidean space, k is a first preset number, | | p | | luminancekIs the k-th norm of p.
Optionally, the convolution sub-module is specifically configured to perform convolution processing on planes determined by any two dimensions in the high-dimensional euclidean space by using the first preset number of hypercube convolution filters; filling the two-dimensional image with the number of channels obtained after convolution processing being the first preset number by using preset filling pixels so as to enable the sizes of all channels of the obtained two-dimensional image to be consistent, wherein the two-dimensional image isSize S, S ═ r ((gamma + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
Optionally, the condition prediction module is specifically configured to extract image features of the two-dimensional image; and performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in a second target time period.
Optionally, the apparatus further includes a model training model, configured to obtain the index prediction model by training in the following training manner:
obtaining sample monitoring data, and obtaining monitoring index data of specified resources in a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data comprises monitoring index data of a plurality of sample resources in the first preset time period, and the plurality of sample resources comprise the specified resources;
inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicting the predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputting the predicted use condition;
calculating a loss value of an index prediction model to be trained based on the label and the predicted use condition;
judging whether the loss value is smaller than a preset loss threshold value or not, if so, determining that the training of the index prediction model to be trained is completed, and obtaining the index prediction model; and if not, updating the parameters of the index prediction model to be trained, returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
An embodiment of the present invention further provides an electronic device, as shown in fig. 5, which includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, where the processor 501, the communication interface 502 and the memory 503 complete mutual communication through the communication bus 504,
a memory 503 for storing a computer program;
the processor 501 is configured to implement the steps of the method for predicting the usage of any of the above-described device resources when executing the program stored in the memory 503.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the above methods for predicting a usage of a device resource.
In another embodiment, the present invention further provides a computer program product containing instructions, which when run on a computer, causes the computer to execute the method for predicting the usage of any of the above-mentioned device resources.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to them, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.

Claims (16)

1. A method for predicting usage of device resources, comprising:
acquiring monitoring data of target equipment in a first target time period, wherein the monitoring data comprises monitoring index data of resources to be predicted of the target equipment and monitoring index data of at least one associated resource of the resources to be predicted;
inputting the monitoring data into a pre-trained index prediction model so that the index prediction model maps the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images respectively, predicting the use condition of the resource to be predicted in a second target time period based on the two-dimensional images, and outputting the use condition, wherein the index prediction model is obtained based on sample monitoring data and a corresponding label through pre-training;
and obtaining the use condition output by the index prediction model as a prediction result.
2. The method according to claim 1, wherein the mapping the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data to two-dimensional images respectively comprises:
normalizing the monitoring data to obtain normalized monitoring data;
discretizing the monitoring data after the normalization processing to obtain discretized monitoring data;
mapping the discretized monitoring data to a high-dimensional Euclidean space, wherein the resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimension in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimension number being consistent with a first preset number, and the first preset number is the sum of the number of the resource to be predicted and each associated resource;
and performing convolution processing on planes determined by any two dimensionalities in the high-dimensional Euclidean space by using the first preset number of hypercube convolution filters to obtain a two-dimensional image with the channel number being the first preset number, wherein the two hypercube convolution filters are convolution filters with different convolution kernels and the dimensionality number being the first preset number.
3. The method according to claim 2, wherein the discretizing the normalized monitoring data to obtain discretized monitoring data includes:
and for each piece of data in the monitoring data after the normalization processing, determining a coordinate scale value closest to the data on a coordinate axis corresponding to the resource to which the data belongs as a discretized numerical value corresponding to the data to obtain the discretized monitoring data, wherein the coordinate axes corresponding to the resource to be predicted and the associated resources are divided into a second preset number of intervals, and values at two ends of each interval are the coordinate scale values of the coordinate axis where the interval is located.
4. The method of claim 2, wherein the mapping the discretized monitored data into a high-dimensional Euclidean space comprises:
mapping the discretized monitoring data to a high-dimensional Euclidean space by adopting the following formula:
Figure FDA0003442682340000021
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in a high-dimensional Euclidean space, k is a first preset number, | | p | | luminancekIs the k-th norm of p.
5. The method according to claim 2, wherein the performing convolution processing on the planes determined by any two dimensions in the high-dimensional euclidean space by using the first preset number of hypercube convolution filters to obtain the two-dimensional images with the first preset number of channels comprises:
respectively performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space by using the hypercube convolution filters with the first preset number;
filling the two-dimensional image with the number of channels obtained after the convolution processing being the first preset number by using preset filling pixels so as to enable the sizes of the channels of the obtained two-dimensional image to be consistent, wherein the size of the two-dimensional image is S, and S ═ r ((gamma + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
6. The method according to claim 1, wherein the predicting the usage of the resource to be predicted in a second target time period based on the two-dimensional image comprises:
extracting image features of the two-dimensional image;
and performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in a second target time period.
7. The method according to any one of claims 1 to 6, wherein the training of the metric predictive model comprises:
obtaining sample monitoring data, and obtaining monitoring index data of specified resources in a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data comprises monitoring index data of a plurality of sample resources in the first preset time period, and the plurality of sample resources comprise the specified resources;
inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicting the predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputting the predicted use condition;
calculating a loss value of an index prediction model to be trained based on the label and the predicted use condition;
judging whether the loss value is smaller than a preset loss threshold value or not, if so, determining that the training of the index prediction model to be trained is completed, and obtaining the index prediction model; and if not, updating the parameters of the index prediction model to be trained, returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
8. An apparatus for predicting usage of a device resource, comprising:
the data acquisition module is used for acquiring monitoring data of target equipment in a first target time period, wherein the monitoring data comprises monitoring index data of resources to be predicted of the target equipment and monitoring index data of at least one associated resource of the resources to be predicted;
the condition prediction module is used for inputting the monitoring data into a pre-trained index prediction model so as to enable the index prediction model to map the monitoring index data of the resource to be predicted and the monitoring index data of each associated resource in the monitoring data into two-dimensional images respectively, predicting the service condition of the resource to be predicted in a second target time period based on the two-dimensional images and outputting the service condition, wherein the index prediction model is obtained by pre-training based on sample monitoring data and corresponding labels;
and the result obtaining module is used for obtaining the use condition output by the index prediction model as a prediction result.
9. The apparatus of claim 8, wherein the condition prediction module comprises:
the normalization submodule is used for performing normalization processing on the monitoring data to obtain the monitoring data after the normalization processing;
the discrete processing submodule is used for carrying out discretization processing on the monitoring data after the normalization processing to obtain discretized monitoring data;
the data mapping sub-module is used for mapping the discretized monitoring data to a high-dimensional Euclidean space, wherein the resource to be predicted and each associated resource in the monitoring data respectively correspond to one dimension in the high-dimensional Euclidean space, the high-dimensional Euclidean space is a cubic space with the dimension number being consistent with a first preset number, and the first preset number is the sum of the number of the resource to be predicted and each associated resource;
and the convolution submodule is used for performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space by using the first preset number of hypercube convolution filters to obtain a two-dimensional image with the number of channels being the first preset number, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the number of dimensions being the first preset number.
10. The apparatus according to claim 9, wherein the discretization processing sub-module is specifically configured to, for each piece of data in the normalized monitoring data, determine a coordinate scale value closest to the data on a coordinate axis corresponding to a resource to which the piece of data belongs as a discretized numerical value corresponding to the piece of data, to obtain the discretized monitoring data, where the coordinate axes corresponding to the resource to be predicted and each associated resource are equally divided into a second preset number of intervals, and values at two ends of each interval are coordinate scale values of the coordinate axis where the interval is located.
11. The apparatus according to claim 9, wherein the data mapping sub-module is specifically configured to map the discretized monitoring data into a high-dimensional euclidean space using the following formula:
Figure FDA0003442682340000041
wherein F1(P) is each coordinate point obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space, P "mFor the discretized monitoring data, p is a coordinate point in a high-dimensional Euclidean space, k is a first preset number, | | p | | luminancekIs the k-th norm of p.
12. The apparatus according to claim 9, wherein the convolution sub-module is specifically configured to convolve the planes determined by any two dimensions in the high-dimensional euclidean space with the first predetermined number of hypercube convolution filters, respectivelyProcessing; filling the two-dimensional image with the number of channels obtained after the convolution processing being the first preset number by using preset filling pixels so as to enable the sizes of the channels of the obtained two-dimensional image to be consistent, wherein the size of the two-dimensional image is S, and S ═ r ((gamma + 1)/Conv)step)2R is the number of channels of the two-dimensional image, γ is the second preset number, γ +1 is the side length of the two-dimensional image, ConvstepIs the step size of the convolution operation.
13. The apparatus according to claim 8, wherein the situation prediction module is specifically configured to extract image features of the two-dimensional image; and performing linear regression analysis based on the image characteristics to obtain the use condition of the resource to be predicted in a second target time period.
14. The apparatus according to any one of claims 8 to 13, further comprising a model training model for training the index prediction model by:
obtaining sample monitoring data, and obtaining monitoring index data of specified resources in a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data comprises monitoring index data of a plurality of sample resources in the first preset time period, and the plurality of sample resources comprise the specified resources;
inputting the sample monitoring data into an index prediction model to be trained, so that the index prediction model to be trained maps the monitoring index data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicting the predicted use condition of the specified resource in a second preset time period based on the sample two-dimensional image, and outputting the predicted use condition;
calculating a loss value of an index prediction model to be trained based on the label and the predicted use condition;
judging whether the loss value is smaller than a preset loss threshold value or not, if so, determining that the training of the index prediction model to be trained is completed, and obtaining the index prediction model; and if not, updating the parameters of the index prediction model to be trained, returning to the step of executing the steps of obtaining the sample monitoring data and obtaining the monitoring index data of the specified resource in a second preset time period as a label corresponding to the sample monitoring data.
15. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the method steps of any of claims 1 to 7 when executing a program stored in the memory.
16. A computer-readable storage medium, characterized in that a computer program is stored in the computer-readable storage medium, which computer program, when being executed by a processor, carries out the method steps of any one of claims 1 to 7.
CN202111637154.8A 2021-12-29 2021-12-29 Method and device for predicting equipment resource use condition and electronic equipment Pending CN114398228A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111637154.8A CN114398228A (en) 2021-12-29 2021-12-29 Method and device for predicting equipment resource use condition and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111637154.8A CN114398228A (en) 2021-12-29 2021-12-29 Method and device for predicting equipment resource use condition and electronic equipment

Publications (1)

Publication Number Publication Date
CN114398228A true CN114398228A (en) 2022-04-26

Family

ID=81229541

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111637154.8A Pending CN114398228A (en) 2021-12-29 2021-12-29 Method and device for predicting equipment resource use condition and electronic equipment

Country Status (1)

Country Link
CN (1) CN114398228A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130768A (en) * 2023-02-25 2023-11-28 荣耀终端有限公司 Frequency modulation relation table generation method and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117130768A (en) * 2023-02-25 2023-11-28 荣耀终端有限公司 Frequency modulation relation table generation method and electronic equipment

Similar Documents

Publication Publication Date Title
US11030415B2 (en) Learning document embeddings with convolutional neural network architectures
US11526799B2 (en) Identification and application of hyperparameters for machine learning
CN108073902B (en) Video summarizing method and device based on deep learning and terminal equipment
CN108563739B (en) Weather data acquisition method and device, computer device and readable storage medium
EP3620982B1 (en) Sample processing method and device
WO2018031097A1 (en) Systems and methods for multi-instance learning-based classification for streaming inputs
CN114414935A (en) Automatic positioning method and system for feeder fault area of power distribution network based on big data
US9454457B1 (en) Software test apparatus, software test method and computer readable medium thereof
CN114553681B (en) Device state abnormality detection method and device and computer device
CN111159481B (en) Edge prediction method and device for graph data and terminal equipment
CN114398228A (en) Method and device for predicting equipment resource use condition and electronic equipment
CN114463587A (en) Abnormal data detection method, device, equipment and storage medium
CN110543869A (en) Ball screw service life prediction method and device, computer equipment and storage medium
CN110334262B (en) Model training method and device and electronic equipment
CN116166967B (en) Data processing method, equipment and storage medium based on meta learning and residual error network
CN116451081A (en) Data drift detection method, device, terminal and storage medium
CN116415989A (en) Gigabit potential customer prediction method, gigabit potential customer prediction device, computer equipment and storage medium
CN113609445A (en) Multi-source heterogeneous monitoring data processing method, terminal device and readable storage medium
US20210241147A1 (en) Method and device for predicting pair of similar questions and electronic equipment
CN115565115A (en) Outfitting intelligent identification method and computer equipment
CN112667754B (en) Big data processing method and device, computer equipment and storage medium
CN114881343A (en) Short-term load prediction method and device of power system based on feature selection
CN114997070B (en) Training method of control chart pattern recognition model and control chart pattern recognition method
CN111835830B (en) Data perception system, method and device
CN117292304B (en) Multimedia data transmission control method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination