A method, device and electronic device for predicting device resource usage

By mapping the device monitoring data into two-dimensional images and using pre-trained indicator prediction models for prediction, the problem of inaccurate and non-universal prediction of device resource usage in the prior art is solved, and higher prediction accuracy and better prediction Wide application scenarios.

CN114398228BActive Publication Date: 2025-02-11CHINA TELECOM CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111637154.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-29
Publication Date
2025-02-11
Estimated Expiration
2041-12-29

AI Technical Summary

Technical Problem

In the prediction of equipment resource usage, the existing technology has problems such as insufficient extraction of monitoring indicator features, insufficient prediction capabilities and lack of universality, resulting in a decrease in prediction performance in different hardware environments, operating systems or software scenarios.

Method used

Using a prediction method of device resource usage, the monitoring data of the target device is obtained, and inputted into a pre-trained index prediction model, and mapped into two-dimensional images. Based on these images, the usage of the resources to be predicted in the future time period is predicted. . The method includes data normalization, discretization, mapping to high-dimensional Euclidean space, and convolution processing using a hypercube convolution filter to generate a two-dimensional image.

Benefits of technology

This improves the prediction accuracy of equipment resource usage, enhances the universality of the model, and significantly improves the prediction efficiency in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114398228B_ABST
    Figure CN114398228B_ABST
Patent Text Reader

Abstract

The embodiment of the present invention provides a method, device and electronic device for predicting the usage of equipment resources. The method includes: obtaining monitoring data of a target device in a first target time period, 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 usage of the resource to be predicted in a second target time period based on the two-dimensional image, and outputting the usage, and obtaining the usage output by the index prediction model as a prediction result. The method improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of IT operation and maintenance technology, and in particular to a method, device and electronic equipment for predicting device resource usage. Background Art

[0002] In order to evaluate the performance of devices such as servers, it is usually necessary to predict the occupancy, usage, and IO of objects such as CPU, memory, disk, and Java process heap memory. Currently, time series analysis is often used to predict various monitoring indicators of objects such as CPU and memory through self-built models.

[0003] However, this method has widespread problems such as insufficient feature extraction of monitoring indicators, weak prediction ability of monitoring indicators, and lack of universality. For example, this method requires a specific hardware environment, operating system, or even software scenario to achieve practical predictions for individual monitoring indicators, while the prediction efficiency drops sharply when switched to other scenarios. In addition, this method of using time series analysis and directly encoding time series data into a two-dimensional matrix for model learning through self-built models is difficult to reflect the characteristics of multiple variables in high-dimensional space, resulting in low prediction accuracy of the learned model. Summary of the invention

[0004] The purpose of the embodiments of the present invention is to provide a method, an apparatus and an electronic device for predicting the usage of equipment resources, so as to improve the prediction accuracy of the usage of predicted resources.

[0005] In a first aspect, an embodiment of the present invention provides a method for predicting device resource usage, comprising:

[0006] Acquire monitoring data of a target device within a first target time period, wherein the monitoring data includes monitoring indicator data of a resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted;

[0007] Input the monitoring data into a pre-trained indicator prediction model, so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each associated resource in the monitoring data into two-dimensional images, predicts the usage of the resource to be predicted within a second target time period based on the two-dimensional images, and outputs the usage, wherein the indicator prediction model is pre-trained based on sample monitoring data and its corresponding labels;

[0008] The usage situation output by the indicator prediction model is obtained as a prediction result.

[0009] Optionally, mapping the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each associated resource in the monitoring data into two-dimensional images respectively includes:

[0010] Normalizing the monitoring data to obtain normalized monitoring data;

[0011] Performing discretization processing on the normalized monitoring data to obtain the discretized monitoring data;

[0012] Mapping the monitoring data after discretization processing to a high-dimensional Euclidean space, wherein the resource to be predicted and each of the associated resources in the monitoring data correspond to a dimension in the high-dimensional Euclidean space respectively, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is 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 of the associated resources;

[0013] Using the first preset number of hypercube convolution filters, convolution processing is performed on the planes determined by any two dimensions in the high-dimensional Euclidean space to obtain a two-dimensional image with the first preset number of channels, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the first preset number of dimensions.

[0014] Optionally, the performing discretization processing on the normalized monitoring data to obtain the discretized monitoring data includes:

[0015] For each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs, which is closest to the data, is determined as the discretized value corresponding to the data, to obtain the monitoring data after discretization, wherein the coordinate axes corresponding to the resource to be predicted and each of the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located.

[0016] Optionally, mapping the discretized monitoring data to a high-dimensional Euclidean space includes:

[0017] The following formula is used to map the discretized monitoring data into a high-dimensional Euclidean space:

[0018]

[0019] Among them, F1(p) is the coordinate point obtained by mapping the discretized monitoring data into the high-dimensional Euclidean space, P” m is the monitoring data after discretization, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, ||p|| kis the k-order norm of p.

[0020] Optionally, using the first preset number of hypercube convolution filters to perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space respectively to obtain a two-dimensional image with the first preset number of channels includes:

[0021] Using the first preset number of hypercube convolution filters, respectively performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space;

[0022] The two-dimensional image with the first preset number of channels obtained after the convolution process is padded with preset padding pixels 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, S = 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, Conv step is the stride of the convolution operation.

[0023] Optionally, predicting the usage of the resource to be predicted within a second target time period based on the two-dimensional image includes:

[0024] extracting image features of the two-dimensional image;

[0025] A linear regression analysis is performed based on the image features to obtain usage of the resource to be predicted within a second target time period.

[0026] Optionally, the training method of the indicator prediction model includes:

[0027] Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources includes the specified resource;

[0028] Inputting the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each of the sample resources in the sample monitoring data into sample two-dimensional images respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional images, and outputs the predicted usage;

[0029] Based on the label and the predicted usage, calculating a loss value of the indicator prediction model to be trained;

[0030] Determine whether the loss value is less than a preset loss threshold. If so, determine that the training of the indicator prediction model to be trained is completed and obtain the indicator prediction model; if not, update the parameters of the indicator prediction model to be trained, and return to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

[0031] In a second aspect, an embodiment of the present invention provides a device for predicting device resource usage, including:

[0032] A data acquisition module, configured to acquire monitoring data of a target device within a first target time period, wherein the monitoring data includes monitoring indicator data of a resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted;

[0033] A situation prediction module, used for inputting the monitoring data into a pre-trained indicator prediction model, so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each of the associated resources in the monitoring data into two-dimensional images, and predicts the usage of the resource to be predicted within a second target time period based on the two-dimensional images, and outputs the usage, wherein the indicator prediction model is pre-trained based on sample monitoring data and its corresponding labels;

[0034] The result acquisition module is used to obtain the usage output by the indicator prediction model as a prediction result.

[0035] Optionally, the situation prediction module includes:

[0036] A normalization submodule, used to perform normalization processing on the monitoring data to obtain normalized monitoring data;

[0037] The discrete processing submodule is used to discretize the normalized monitoring data to obtain the discretized monitoring data;

[0038] A data mapping submodule, used for mapping the monitoring data after discretization processing to a high-dimensional Euclidean space, wherein the resource to be predicted and each of the associated resources in the monitoring data respectively correspond to a dimension in the high-dimensional Euclidean space, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is 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 of the associated resources;

[0039] A convolution submodule is used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space, respectively, to obtain a two-dimensional image with the first preset number of channels, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the first preset number of dimensions.

[0040] Optionally, the discrete processing submodule is specifically used to determine, for each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs, which is closest to the data, as the discretized value corresponding to the data, so as to obtain the monitoring data after discretization, wherein the coordinate axes corresponding to the resource to be predicted and each of the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located.

[0041] Optionally, the data mapping submodule is specifically used to map the discretized monitoring data to a high-dimensional Euclidean space using the following formula:

[0042]

[0043] Among them, F1(p) is the coordinate point obtained by mapping the discretized monitoring data into the high-dimensional Euclidean space, P” m is the monitoring data after discretization, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, ||p|| k is the k-order norm of p.

[0044] Optionally, the convolution submodule is specifically used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space respectively; use preset filling pixels to fill the two-dimensional image whose number of channels after the convolution processing is the first preset number, so that the size of each channel of the obtained two-dimensional image is consistent, wherein the size of the two-dimensional image is S, S = 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, Conv step is the stride of the convolution operation.

[0045] Optionally, the situation prediction module is specifically used to extract image features of the two-dimensional image; perform linear regression analysis based on the image features to obtain the usage of the resource to be predicted within the second target time period.

[0046] Optionally, the device further includes a model training model, which is used to train the indicator prediction model using the following training method:

[0047] Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources includes the specified resource;

[0048] Inputting the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each of the sample resources in the sample monitoring data into sample two-dimensional images respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional images, and outputs the predicted usage;

[0049] Based on the label and the predicted usage, calculating a loss value of the indicator prediction model to be trained;

[0050] Determine whether the loss value is less than a preset loss threshold. If so, determine that the training of the indicator prediction model to be trained is completed and obtain the indicator prediction model; if not, update the parameters of the indicator prediction model to be trained, and return to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

[0051] 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, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0052] Memory, used to store computer programs;

[0053] The processor is used to implement any method step described in the first aspect when executing the program stored in the memory.

[0054] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

[0055] Beneficial effects of the embodiments of the present invention:

[0056] The method provided by the embodiment of the present invention is adopted to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0057] Of course, it is not necessary to achieve all of the advantages described above at the same time to implement any product or method of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0059] Figure 1 A flow chart of a method for predicting device resource usage provided by an embodiment of the present invention;

[0060] Figure 2 An image mapping flow chart provided for an embodiment of the present invention;

[0061] Figure 3 Training flow chart of the indicator prediction model provided by the embodiment of the present invention

[0062] Figure 4 A schematic diagram of a structure of a device for predicting device resource usage provided by an embodiment of the present invention;

[0063] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0064] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field based on this application belong to the scope of protection of the present invention.

[0065] In order to improve the prediction accuracy of resource usage, embodiments of the present invention provide a method, apparatus, electronic device, computer-readable storage medium, and computer program product for predicting device resource usage.

[0066] The device resource usage prediction method provided in the embodiment of the present invention can be applied to any electronic device that can analyze and process indicators such as CPU, memory, disk and Java process heap memory occupancy, usage, IO, etc., for example, it can be computers, mobile phones and other devices, etc., without specific limitation here.

[0067] Figure 1 A flow chart of a method for predicting device resource usage provided by an embodiment of the present invention, such as Figure 1 As shown, the method includes:

[0068] Step 101: Acquire monitoring data of a target device within a first target time period.

[0069] The monitoring data includes monitoring indicator data of the resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted.

[0070] Specifically, the resources of the target device may include hardware resources and software resources of the target device. The resource to be predicted may be the CPU, memory, disk or java process heap memory of the target device. The associated resources of the resource to be predicted are resources that have an impact on the usage 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. In an embodiment of the present invention, for any resource of the target device, all resources other than the resource may be determined as associated resources of the resource. In an embodiment of the present invention, for any resource of the target device, at least one resource that has a greater impact on the usage of the resource may be specified from other resources other than the resource as an associated resource of the resource. For example, if the resource to be predicted is the "heap memory after recycling of the java program" of the target device, the CPU, memory, heap memory before recycling of the java program and other resources in the target device may be determined in advance as associated resources of the "heap memory after recycling of the java program".

[0071] The monitoring indicator data of the resource to be predicted may be the occupancy rate, usage rate and IO of the resource to be predicted, and the monitoring indicator data of each associated resource of the resource to be predicted may be the occupancy rate, usage rate and IO of the associated resource.

[0072] In an embodiment of the present invention, the target device may be an electronic device that executes the device resource usage prediction method provided in an embodiment of the present invention, or may be other electronic devices. The target device may specifically be a computer, a mobile phone, an iPad or a server, etc.

[0073] The first target time period is a specified time period before the current time. For example, the current time is "December 24, 2021 13:53:02", and the first target time period can be the time period [December 23, 2021 13:53:02, December 24, 2021 13:53:02].

[0074] Step 102: input the monitoring data into a pre-trained indicator prediction model so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted in the monitoring data and the monitoring indicator data of each of the associated resources into two-dimensional images respectively, predicts the usage of the resource to be predicted within the second target time period based on the two-dimensional image, and outputs the usage.

[0075] The indicator prediction model is pre-trained based on sample monitoring data and its corresponding labels.

[0076] Step 103, obtaining the usage output by the indicator prediction model as a prediction result.

[0077] The method provided by the embodiment of the present invention is adopted to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0078] In one possible implementation, Figure 2 The image mapping flow chart provided by the embodiment of the present invention is as follows: Figure 2 As shown, the monitoring indicator data of the resource to be predicted in the monitoring data and the monitoring indicator data of each associated resource are mapped into a two-dimensional image respectively, including:

[0079] Step 201 , normalizing the monitoring data to obtain normalized monitoring data.

[0080] In the embodiment of the present invention, the monitoring data P of the target device within the first target time period can be obtained. m :P m ={(x 11 ,x 12 ,…,x 1k ),(x 21 ,x 22 ,…,x 2k ),…,(x m1 ,x m2 ,…,x mk )}.

[0081] Among them, the monitoring data P m Includes a data sequence of m moments with a fixed acquisition frequency: (x 11 ,x 12 ,…,x 1k )、(x 21 ,x 22 ,…,x 2k ),…,(x m1 ,x m2 ,…,x mk The first target time period includes m equal-spaced moments, and the data in each data sequence are collected at the same time. The data sequence (x 11 ,x 12 ,…,x 1k )、(x 21 ,x 22 ,…,x 2k ),…,(x m1 ,x m2 ,…,x mk ) are collected at the 1st, 2nd, and mth moments in the first target time period. The data sequence collected at the i-th moment in the first target time period is (t i ,x i1 ,x i2 ,…,x ik ), the data sequence is (t i ,x i1 ,x i2 ,…,x ik ) is the k monitoring indicator data of the target device at the i-th moment, 1≤i≤m.

[0082] In the embodiment of the present invention, the monitoring data may be normalized to obtain normalized monitoring data. m ={(x 11 ,x 12 ,…,x 1k ),(x 21 ,x 22 ,…,x 2k ),…,(x m1 ,x m2 ,…,x mk )} are normalized to the data in the interval [0,1], and the normalized monitoring data P' is obtained m .

[0083] The specific normalization processing method may refer to any existing normalization processing algorithm and is not specifically limited here.

[0084] Step 202, discretize the normalized monitoring data to obtain discretized monitoring data.

[0085] In an embodiment of the present invention, for each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs and which is closest to the data can be determined as the discretized value corresponding to the data to obtain the discretized monitoring data.

[0086] The coordinate axes corresponding to the resource to be predicted and the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located. The second preset number can be set to 100 or 200 according to actual application conditions, and is not specifically limited here.

[0087] In the embodiment of the present invention, each resource of the target device may correspond to a coordinate axis. For example, the “CPU” resource of the target device may correspond to the coordinate axis ax1, and the “memory” resource of the target device may correspond to the coordinate axis ax2.

[0088] The value range of the normalized monitoring data is [0,1], that is, the domain of the coordinate axis corresponding to each resource of the target device is [0,1]. Then the domain of the coordinate axis of each resource [0,1] can be divided into the second preset number of intervals, and the second preset number plus 1 coordinate scale is obtained. The qth coordinate scale from left to right on the coordinate axis satisfies: x q =(q-1) / γ, q is 1, 2, ..., γ, (γ+1), where γ is the second preset number.

[0089] In the embodiment of the present invention, for each data in the normalized monitoring data, if the data belongs to the resource to be predicted, the coordinate scale value on the coordinate axis corresponding to the resource to be predicted that is closest to the data can be determined as the discretized value corresponding to the data; if the data belongs to the associated resource of the resource to be predicted, the coordinate scale value on the coordinate axis corresponding to the associated resource that is closest to the data can be determined as the discretized value corresponding to the data. Through this method, the monitoring data can be discretized to obtain the monitoring data after discretization.

[0090] For example, for the normalized monitoring data P' m For each data, if the data belongs to the resource to be predicted, the coordinate scale value on the coordinate axis corresponding to the resource to be predicted that is closest to the data can be determined as the discretized value corresponding to the data; if the data belongs to the associated resource of the resource to be predicted, the coordinate scale value on the coordinate axis corresponding to the associated resource that is closest to the data can be determined as the discretized value corresponding to the data, and the monitoring data P after discretization processing is obtained. m .

[0091] Step 203: Map the discretized monitoring data to a high-dimensional Euclidean space.

[0092] Among them, the resource to be predicted and each of the associated resources in the monitoring data correspond to a dimension in the high-dimensional Euclidean space respectively, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is consistent with the first preset number, and the first preset number is the sum of the number of the resource to be predicted and each of the associated resources. For example, the monitoring data of the target device includes five monitoring indicator data, namely, the CPU usage rate, memory usage rate, number of handles of the user who starts the program, heap memory value after recycling of the java program, and heap memory value before recycling of the java program. Among them, the heap memory value after recycling of the java program is the monitoring indicator data of the resource to be predicted, then the first preset number can be set to 5, that is, the monitoring data after discretization can be mapped to a high-dimensional Euclidean space with a dimension of 5.

[0093] Suppose there is a k-dimensional high-dimensional Euclidean space ψ, in which there exists a hypercube ∧, and the coordinate values ​​of each of the 2k vertex coordinates of the hypercube ∧ satisfy: m =0 or x m =1, m=1,2,…,k. That is, the length of each dimension of the hypercube ∧ is 1, and the hypercube ∧ can be called a high-dimensional Euclidean space.

[0094] In the embodiment of the present invention, mapping the monitoring data after discretization processing to the high-dimensional Euclidean space may specifically include: mapping the monitoring data after discretization processing to the high-dimensional Euclidean space using the following formula:

[0095]

[0096] Among them, F1(p) is the coordinate point obtained by mapping the discretized monitoring data into the high-dimensional Euclidean space, P” m is the monitoring data after discretization processing, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, and ||p||k is the k-th order norm of p.

[0097] In the embodiment of the present invention, the monitoring indicator data of the resource to be predicted is highly correlated with the monitoring indicator data of the associated resources adjacent to the resource to be predicted. The existence of the function can enhance the mapping value of the monitoring indicator data collected later in P”m in the high-dimensional Euclidean space. The high-dimensional Euclidean space after mapping the data is close to the representation of a sparse matrix.

[0098] Step 204: Use the first preset number of hypercube convolution filters to perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space, respectively, to obtain a two-dimensional image with the first preset number of channels.

[0099] Among them, any two hypercube convolution filters are convolution filters with different convolution kernels and the number of dimensions being the first preset number.

[0100] 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 in another dimension is p and L p’ satisfy:

[0101]

[0102] 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 may be different or the same, and γ is a second preset number.

[0103] In the embodiment of the present invention, the use of the first preset number of hypercube convolution filters to perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space to obtain a two-dimensional image having the first preset number of channels may specifically include the following steps A1-A2:

[0104] Step A1: Use the first preset number of hypercube convolution filters to perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space.

[0105] Step A2, using preset filling pixels to fill the two-dimensional image with the first preset number of channels obtained after the convolution process, 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, S = 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, Conv step is the stride of the convolution operation.

[0106] Using a first preset number of hypercube convolution filters, a two-dimensional convolution operation is performed on a plane determined by any two dimensions in the high-dimensional Euclidean space. For example, the sparse matrix corresponding to the monitoring indicator data of the resource to be predicted in the high-dimensional Euclidean space is L p The sparse matrix corresponding to the monitoring index data of any associated resource of the resource to be predicted in the high-dimensional Euclidean space is L p’ , then we can use the first preset number of hypercube convolution filters to filter L p and L p’ A two-dimensional convolution operation is performed on the determined plane. After the convolution operation of the first preset number of hypercube convolution filters, a two-dimensional image with a first preset number of channels can be obtained.

[0107] To ensure that the length and width of the two-dimensional images of each channel are consistent, padding (filling pixels) can be performed during convolution to make the size of each channel of the obtained two-dimensional image consistent, where the size of the two-dimensional image is S, S = 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, Conv step is the stride of the convolution operation.

[0108] The monitoring data after discretization is processed by the convolution encoder to become a two-dimensional image with a first preset number of channels, which converts the indicator prediction task in the IT monitoring field into an image recognition task.

[0109] The method provided by the embodiment of the present invention is adopted to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0110] In a possible implementation manner, predicting the usage of the resource to be predicted within the second target time period based on the two-dimensional image may include the following steps B1-B2:

[0111] Step B1, extracting image features of the two-dimensional image.

[0112] Specifically, the method for extracting image features may refer to any existing image feature extraction algorithm. The image feature extraction algorithm is generally based on a convolutional neural network, which is not specifically limited here.

[0113] Step B2: performing a linear regression analysis based on the image features to obtain the usage of the resource to be predicted within a second target time period.

[0114] Specifically, the hypercube convolution filter can be input into a specific convolutional neural network to output multi-channel features, and a linear regression analysis can be performed on the output multi-channel features to obtain the usage of the resource to be predicted in the second target time period.

[0115] The second target time period is a time period after the first target time period, and can be a specified time period after the current time. For example, if the current time is "December 24, 2021 16:13:49", the second target time period can be [December 24, 2021 16:13:49, December 25, 2021 16:13:49].

[0116] The method provided by the embodiment of the present invention is adopted to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0117] Figure 3 The training flow chart of the indicator prediction model provided by the embodiment of the present invention is as follows: Figure 3 As shown, the training method of the indicator prediction model includes:

[0118] Step 301: Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data.

[0119] The sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources include the designated resource.

[0120] The first preset time period and the second preset time period are both time periods before the current moment.

[0121] In the embodiment of the present invention, a monitoring data set D within a first preset time period T may be collected in advance:

[0122] D={(t1,x 11 ,x 12 ,...,x 1k ),(t2,x 21 ,x 22 ,...,x 2k ),...,(t n ,x n1 ,x n2 ,...,x nk )}n≥1;k≥1

[0123] The data set D includes n time series sample points with a fixed acquisition frequency. For one of the sample points:

[0124] (t i ,xi1 ,x i2 ,...,x ik )1≤i≤n;t i ∈T

[0125] t i is the acquisition time of the sample point, x i1 ,x i2 ,...,x ik is the k-item monitoring index data of the sample point. If the prediction task of the present invention is, within the second preset time period H, the trend of the p-th monitoring index data~

[0126] D:

[0127]

[0128] According to the above prediction task, sample monitoring data and test monitoring data can be constructed based on the data set D. For any of the training, the sample monitoring data P data The label P corresponding to the sample monitoring data label is defined as:

[0129] P data ={(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 )}

[0130] P label =(x (θ+1)p ,x (θ+2)p ,...,x (θ+δ)p )

[0131] sts+ε≤n; 1≤p≤kθ>s+ε; δ≥0

[0132] Among them, ε determines P data The number of samples in , δ determines the size of the prediction window. The prediction task can be a single-step univariate prediction or a multi-step univariate prediction.

[0133] In an embodiment of the present invention, the sample monitoring data and the labels corresponding to the sample monitoring data may be normalized, and then the normalized sample monitoring data and the labels corresponding to the sample monitoring data may be discretized to obtain the discretized sample monitoring data and the labels corresponding to the sample monitoring data.

[0134] Step 302: input the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each sample resource in the sample monitoring data into a sample two-dimensional image respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional image, and outputs the predicted usage.

[0135] Specifically, the discretized sample monitoring data can be mapped to a high-dimensional sample space, wherein the specified resource and each associated resource of the specified resource in the sample monitoring data correspond to a dimension in the high-dimensional sample space, and the high-dimensional sample space is a cubic space with the same number of dimensions as the sum of the number of the specified resource and each associated resource of the specified resource in the sample monitoring data.

[0136] In the embodiment of the present invention, the following formula can be used to map the discretized sample monitoring data to the high-dimensional sample space:

[0137]

[0138] Among them, F(p) is the coordinate points obtained by mapping the discretized sample monitoring data to the high-dimensional sample space. is the sample monitoring data after discretization, p is the coordinate point in the high-dimensional sample space, k is the sum of the number of the specified resource and each associated resource of the specified resource in the sample monitoring data, ||p|| k is the k-order norm of p.

[0139] After the discretized sample monitoring data is mapped to the high-dimensional sample space, multiple hypercube convolution filters can be used to perform convolution processing on the 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 designated resources and each associated resource of the designated resource in the sample monitoring data, and the number of hypercube convolution filters is also the sum of the number of designated resources and each associated resource of the designated resource in the sample monitoring data.

[0140] Then, the sample monitoring data is converted into sample two-dimensional images, which converts the indicator prediction task in the IT monitoring field into an image recognition task.

[0141] The specific mapping process can be found in Figure 2 The method described.

[0142] After obtaining the sample two-dimensional image, image features of the sample two-dimensional image can be extracted, and linear regression analysis can be performed based on the image features extracted by the convolutional neural network to obtain the predicted usage of the specified resource within the second preset time period.

[0143] Step 303: Calculate the loss value of the indicator prediction model to be trained based on the label and the predicted usage.

[0144] Since the label reflects the actual usage of the monitoring indicator data of the specified resource in the second preset time period, after obtaining the predicted usage of the specified resource in the second preset time period, the loss value of the indicator prediction model to be trained can be calculated based on the label and the predicted usage. Specifically, any loss function in the field of image processing, such as the cross entropy loss function, can be referred to to calculate the loss value of the indicator prediction model to be trained and optimize it, which is not specifically limited here.

[0145] Step 304, determining whether the loss value is less than a preset loss threshold.

[0146] If the judgment result is yes, execute step 305, if the judgment result is no, execute step 306.

[0147] Among them, the preset loss threshold can be set according to the actual application situation and is not specifically limited here.

[0148] Step 305, determining whether the indicator prediction model to be trained is trained is completed, and obtaining the indicator prediction model.

[0149] Step 306, updating the parameters of the indicator prediction model to be trained, and returning to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

[0150] Specifically, parameters related to image feature extraction in the indicator prediction model to be trained and parameters related to data mapping in the high-dimensional sample space may be updated.

[0151] The following is a specific application example of the indicator prediction model training provided by the present invention:

[0152] Taking the prediction of the heap memory after the Java program is recycled as an example, the monitoring data within 24 hours before the current time of the target device can be collected, and the collection frequency is once every 10 seconds, totaling 8640 data. The collected data includes five monitoring indicator data: CPU usage rate, memory usage rate, number of handles of the user who started the program, heap memory value after the program is recycled, and heap memory value before the program is recycled. In this embodiment, 144 data can be selected from the 8640 collected data as sample monitoring data P data , sample monitoring data P data The corresponding label P label Includes the heap memory values ​​of 48 Java programs after recycling within 24 hours after the current time.

[0153] In addition, the sample monitoring data P can be removed from the 8640 pieces of data collected. data The data outside the test set is divided into a test set and a validation set. The ratio of the test set to the validation set can be divided according to actual needs and is not specifically limited here.

[0154] In this implementation, the sample monitoring data P data and sample monitoring data P data The corresponding label P label All are normalized and then discretized. Specifically, the discrete coefficient can be set to γ ​​= 100, and the domain of any monitoring indicator data is divided into 100 equal parts. Then the scale of 100 coordinates of any monitoring indicator data (scale range: [0,100]) All meet the following requirements:

[0155]

[0156] P data For any data in , you can use the discrete coordinate scale with the closest Euclidean distance to replace the original coordinates:

[0157]

[0158] in, is the coordinate value after replacement, and the sample monitoring data after discrete processing is:

[0159]

[0160] P label =(x (θ+1)j ,x (θ+2)j ,...,x (θ+48)j )

[0161] sts+ε≤60=59; θ>s+ε; δ≥0

[0162] Then, we can determine the high-dimensional sample space: suppose there is a 5-dimensional Euclidean space Ψ, in which there is a hypercube Λ, whose 2 5 The coordinate values ​​of each vertex coordinate satisfy: m =0 or x m =1m=1,2,...,5, that is, the side length of each dimension of the hypercube is 1, and the hypercube Λ is a high-dimensional sample space. Then, the sample monitoring data is mapped to the high-dimensional sample space.

[0163] In this embodiment, five 5-dimensional hypercube convolution filters Ω1, Ω2, ..., Ω5 can be determined, and the side length L of the hypercube convolution filter in the dimension of "heap memory value after program recycling" and the dimension of "number of handles of the user who started the program" is p , Lp′ satisfy:

[0164]

[0165] The side length of the hypercube convolution filter in the remaining three dimensions is 1. Gaussian random numbers with a mean of 0 and a standard deviation of 0.01 are used to initialize the values ​​in each hypercube convolution filter.

[0166] Then, the hypercube convolution filter can be used to perform convolution operations on the high-dimensional sample space: Use 5 5-dimensional hypercube filters to perform a two-dimensional convolution operation on the high-dimensional sample space Λ, and the sliding convolution operation is performed on L p and L p′ The convolution operation is performed on the determined plane to obtain 5 sample two-dimensional images. To ensure that the length and width of each feature map are consistent, the pixel padding operation can be performed during convolution. The size S of the image processed by the above hypercube convolution filter is:

[0167]

[0168] The sliding step size of the hypercube convolution filter is 1, that is, After being processed by the indicator prediction model, it becomes an image S with 5 channels and a side length of 101. Then, the image S can be feature extracted, and the extracted features can be used for linear regression analysis to obtain the predicted usage of "heap memory after recycling of Java program" within 24 hours after the current moment. Then, P label The predicted usage of "heap memory after recycling of java program" within 24 hours after the current moment is used to determine the model training loss value and adjust the model parameters. When the model converges, the indicator prediction model is obtained. Using the above indicator prediction model, the RMSE (Root Mean Squared Error) of the memory recycling value is used as the evaluation indicator to compare the transfer learning effect of this example under VGG-16, Inception V3, and ResNet, and the comparison results with ResNet using an ordinary two-dimensional encoder and the existing indicator prediction model 1 are shown in Table 1:

[0169] Table 1: Comparison of transfer learning effects

[0170]

[0171]

[0172] This embodiment shows that the indicator prediction model trained by the embodiment of the present invention has a significantly leading prediction effect compared with the traditional method; and compared with the ordinary two-dimensional encoder, it also has a leading prediction effect.

[0173] The method provided by the embodiment of the present invention is adopted to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0174] Corresponding to the above-mentioned method for predicting the usage of equipment resources, an embodiment of the present invention further provides a device for predicting the usage of equipment resources. The image fusion device provided by the embodiment of the present invention is introduced below. Figure 4 A schematic diagram of a structure of a device for predicting device resource usage provided by an embodiment of the present invention, such as Figure 4 As shown, the device comprises:

[0175] The data acquisition module 401 is used to acquire monitoring data of a target device within a first target time period, wherein the monitoring data includes monitoring indicator data of a resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted;

[0176] A situation prediction module 402 is used to input the monitoring data into a pre-trained indicator prediction model, so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each of the associated resources in the monitoring data into two-dimensional images, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, wherein the indicator prediction model is pre-trained based on the sample monitoring data and its corresponding labels;

[0177] The result obtaining module 403 is used to obtain the usage output by the indicator prediction model as a prediction result.

[0178] The device provided by the embodiment of the present invention is used to obtain the monitoring data of the target device in the first target time period, and the monitoring data is input into the 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, and predicts the usage of the resource to be predicted in the second target time period based on the two-dimensional image, and outputs the usage, and obtains the usage output by the index prediction model as the prediction result. That is, the usage prediction task of the resource to be predicted can be converted into a processing task for image data, which makes full use of the advantages of the wide application range and strong feature extraction ability of the mature model in the field of image processing, improves the prediction accuracy of the usage of the resource to be predicted, and the index prediction model has only a few parameters that need to be adjusted, which can be widely used in different index prediction scenarios, that is, the index prediction model provided by the embodiment of the present invention has a high degree of versatility.

[0179] Optionally, the situation prediction module includes:

[0180] A normalization submodule, used to perform normalization processing on the monitoring data to obtain normalized monitoring data;

[0181] The discrete processing submodule is used to discretize the normalized monitoring data to obtain the discretized monitoring data;

[0182] A data mapping submodule, used for mapping the monitoring data after discretization processing to a high-dimensional Euclidean space, wherein the resource to be predicted and each of the associated resources in the monitoring data respectively correspond to a dimension in the high-dimensional Euclidean space, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is 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 of the associated resources;

[0183] A convolution submodule is used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space, respectively, to obtain a two-dimensional image with the first preset number of channels, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the first preset number of dimensions.

[0184] Optionally, the discrete processing submodule is specifically used to determine, for each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs, which is closest to the data, as the discretized value corresponding to the data, so as to obtain the monitoring data after discretization, wherein the coordinate axes corresponding to the resource to be predicted and each of the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located.

[0185] Optionally, the data mapping submodule is specifically used to map the discretized monitoring data to a high-dimensional Euclidean space using the following formula:

[0186]

[0187] Among them, F1(p) is the coordinate point obtained by mapping the discretized monitoring data into the high-dimensional Euclidean space, P” m is the monitoring data after discretization, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, ||p|| k is the k-order norm of p.

[0188] Optionally, the convolution submodule is specifically used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space respectively; use preset filling pixels to fill the two-dimensional image whose number of channels after the convolution processing is the first preset number, so that the size of each channel of the obtained two-dimensional image is consistent, wherein the size of the two-dimensional image is S, S = 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, Conv step is the stride of the convolution operation.

[0189] Optionally, the situation prediction module is specifically used to extract image features of the two-dimensional image; perform linear regression analysis based on the image features to obtain the usage of the resource to be predicted within the second target time period.

[0190] Optionally, the device further includes a model training model, which is used to train the indicator prediction model using the following training method:

[0191] Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources includes the specified resource;

[0192] Inputting the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each of the sample resources in the sample monitoring data into sample two-dimensional images respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional images, and outputs the predicted usage;

[0193] Based on the label and the predicted usage, calculating a loss value of the indicator prediction model to be trained;

[0194] Determine whether the loss value is less than a preset loss threshold. If so, determine that the training of the indicator prediction model to be trained is completed and obtain the indicator prediction model; if not, update the parameters of the indicator prediction model to be trained, and return to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

[0195] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.

[0196] Memory 503, used for storing computer programs;

[0197] The processor 501 is used to implement any step of the device resource usage prediction method when executing the program stored in the memory 503.

[0198] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0199] The communication interface is used for communication between the above electronic device and other devices.

[0200] 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 storage device located away from the aforementioned processor.

[0201] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0202] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned device resource usage prediction methods are implemented.

[0203] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute any method for predicting device resource usage in the above embodiments.

[0204] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can 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 the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.

[0205] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0206] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0207] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.

Claims

1. A method for predicting device resource usage, characterized in that: include: Acquire monitoring data of a target device within a first target time period, wherein the monitoring data includes monitoring indicator data of a resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted; Input the monitoring data into a pre-trained indicator prediction model, so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each associated resource in the monitoring data into two-dimensional images, predicts the usage of the resource to be predicted within a second target time period based on the two-dimensional images, and outputs the usage, wherein the indicator prediction model is pre-trained based on sample monitoring data and its corresponding labels; Obtaining the usage output by the indicator prediction model as a prediction result; The step of mapping the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each associated resource in the monitoring data into two-dimensional images respectively includes: Normalizing the monitoring data to obtain normalized monitoring data; Performing discretization processing on the normalized monitoring data to obtain the discretized monitoring data; Mapping the monitoring data after discretization processing to a high-dimensional Euclidean space, wherein the resource to be predicted and each of the associated resources in the monitoring data correspond to a dimension in the high-dimensional Euclidean space respectively, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is 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 of the associated resources; Using the first preset number of hypercube convolution filters, convolution processing is performed on the planes determined by any two dimensions in the high-dimensional Euclidean space to obtain a two-dimensional image with the first preset number of channels, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the first preset number of dimensions.

2. The method according to claim 1, characterized in that: The step of performing discretization processing on the normalized monitoring data to obtain the discretized monitoring data includes: For each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs, which is closest to the data, is determined as the discretized value corresponding to the data, to obtain the monitoring data after discretization, wherein the coordinate axes corresponding to the resource to be predicted and each of the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located.

3. The method according to claim 1, characterized in that Mapping the discretized monitoring data to a high-dimensional Euclidean space includes: The following formula is used to map the discretized monitoring data into a high-dimensional Euclidean space: , Among them, F1(p) is the coordinate points obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space. is the monitoring data after discretization, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, is the k-order norm of p.

4. The method according to claim 1, characterized in that: The method of using the first preset number of hypercube convolution filters to perform convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space to obtain a two-dimensional image with the first preset number of channels includes: Using the first preset number of hypercube convolution filters, respectively performing convolution processing on planes determined by any two dimensions in the high-dimensional Euclidean space; The two-dimensional image with the first preset number of channels obtained after the convolution process is filled with preset filling pixels 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, S=r , 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, is the stride of the convolution operation.

5. The method according to claim 1, characterized in that: The predicting, based on the two-dimensional image, usage of the resource to be predicted within a second target time period includes: extracting image features of the two-dimensional image; A linear regression analysis is performed based on the image features to obtain usage of the resource to be predicted within a second target time period.

6. The method according to any one of claims 1 to 5, characterized in that: The training method of the indicator prediction model includes: Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources includes the specified resource; Inputting the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each of the sample resources in the sample monitoring data into sample two-dimensional images respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional images, and outputs the predicted usage; Based on the label and the predicted usage, calculating a loss value of the indicator prediction model to be trained; Determine whether the loss value is less than a preset loss threshold. If so, determine that the training of the indicator prediction model to be trained is completed and obtain the indicator prediction model; if not, update the parameters of the indicator prediction model to be trained, and return to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

7. A device for predicting equipment resource usage, characterized in that: include: A data acquisition module, configured to acquire monitoring data of a target device within a first target time period, wherein the monitoring data includes monitoring indicator data of a resource to be predicted of the target device and monitoring indicator data of at least one associated resource of the resource to be predicted; A situation prediction module, used for inputting the monitoring data into a pre-trained indicator prediction model, so that the indicator prediction model maps the monitoring indicator data of the resource to be predicted and the monitoring indicator data of each of the associated resources in the monitoring data into two-dimensional images, and predicts the usage of the resource to be predicted within a second target time period based on the two-dimensional images, and outputs the usage, wherein the indicator prediction model is pre-trained based on sample monitoring data and its corresponding labels; A result obtaining module, used for obtaining the usage output by the indicator prediction model as a prediction result; The situation prediction module comprises: A normalization submodule, used for normalizing the monitoring data to obtain normalized monitoring data; The discrete processing submodule is used to discretize the normalized monitoring data to obtain the discretized monitoring data; A data mapping submodule, used for mapping the monitoring data after discretization processing to a high-dimensional Euclidean space, wherein the resource to be predicted and each of the associated resources in the monitoring data respectively correspond to a dimension in the high-dimensional Euclidean space, and the high-dimensional Euclidean space is a cubic space whose number of dimensions is 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 of the associated resources; A convolution submodule is used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space, respectively, to obtain a two-dimensional image with the first preset number of channels, wherein any two hypercube convolution filters are convolution filters with different convolution kernels and the first preset number of dimensions.

8. The device according to claim 7, characterized in that The discrete processing submodule is specifically used to determine, for each data in the normalized monitoring data, the coordinate scale value on the coordinate axis corresponding to the resource to which the data belongs, which is closest to the data, as the discretized value corresponding to the data, to obtain the monitoring data after discretization, wherein the coordinate axes corresponding to the resource to be predicted and each of the associated resources are equally divided into a second preset number of intervals, and the values ​​at both ends of each interval are the coordinate scale values ​​of the coordinate axis where the interval is located.

9. The device according to claim 7, characterized in that The data mapping submodule is specifically used to map the discretized monitoring data to a high-dimensional Euclidean space using the following formula: , Among them, F1(p) is the coordinate points obtained by mapping the discretized monitoring data to the high-dimensional Euclidean space. is the monitoring data after discretization, p is the coordinate point in the high-dimensional Euclidean space, k is the first preset number, is the k-order norm of p.

10. The device according to claim 7, characterized in that The convolution submodule is specifically used to use the first preset number of hypercube convolution filters to perform convolution processing on the planes determined by any two dimensions in the high-dimensional Euclidean space respectively; use preset filling pixels to fill the two-dimensional image with the first preset number of channels obtained after the convolution processing, 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, S=r , 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, is the stride of the convolution operation.

11. The device according to claim 7, characterized in that The situation prediction module is specifically used to extract image features of the two-dimensional image; perform linear regression analysis based on the image features to obtain the usage of the resource to be predicted within the second target time period.

12. The device according to any one of claims 7 to 11, characterized in that: The device also includes a model training model, which is used to train the indicator prediction model using the following training method: Acquire sample monitoring data, and acquire monitoring indicator data of a specified resource within a second preset time period as a label corresponding to the sample monitoring data, wherein the sample monitoring data includes monitoring indicator data of a plurality of sample resources within a first preset time period, and the plurality of sample resources includes the specified resource; Inputting the sample monitoring data into the indicator prediction model to be trained, so that the indicator prediction model to be trained maps the monitoring indicator data of each of the sample resources in the sample monitoring data into sample two-dimensional images respectively, predicts the predicted usage of the specified resource within a second preset time period based on the sample two-dimensional images, and outputs the predicted usage; Based on the label and the predicted usage, calculating a loss value of the indicator prediction model to be trained; Determine whether the loss value is less than a preset loss threshold. If so, determine that the training of the indicator prediction model to be trained is completed and obtain the indicator prediction model; if not, update the parameters of the indicator prediction model to be trained, and return to execute the step of obtaining the sample monitoring data, and obtaining the monitoring indicator data of the specified resource within the second preset time period as the label corresponding to the sample monitoring data.

13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Application control method and device, storage medium and electronic equipment

    CN107729143A

  • Operation and maintenance early warning method and device, electronic equipment and storage medium

    CN113672467A