Index prediction method, device, equipment and computer program product

By performing sequence fusion feature processing on indicator data and constructing a prediction model based on the Transformer architecture, the problems of high prediction latency and high resource consumption in traditional elastic scaling solutions are solved, achieving faster and more accurate indicator prediction and supporting real-time elastic scaling and resource optimization.

CN120909888APending Publication Date: 2025-11-07CHINA MERCHANTS BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511012467.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-22
Publication Date
2025-11-07

Smart Images

  • Figure CN120909888A_ABST
    Figure CN120909888A_ABST
Patent Text Reader

Abstract

The invention discloses an index prediction method, device and equipment and a computer program product, and relates to the technical field of data prediction, and the method comprises the steps: carrying out the sequence fusion feature processing of first index data, and generating an application-level feature of the first index data; and constructing a target prediction model based on the application-level features, performing index prediction on second index data through the target prediction model, and generating an index prediction value of the second index data. According to the method, the application-level features are generated through sequence fusion feature processing, the target prediction model is further constructed based on the application-level features, and the index prediction speed of the target prediction model can be increased.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of data prediction, in particular to an index prediction method and device, equipment and computer program product. BACKGROUND

[0002] Under the background of rapid development of cloud computing and containerization technology, elastic scaling has become a key means to improve resource utilization. At present, the traditional elastic scaling scheme mainly relies on static threshold or prediction method based on simple time series model. These methods usually predict future resource demand by fitting historical data, and adjust resource allocation according to the prediction result. However, in the multi-application multi-instance scenario, due to inconsistent instance life cycle, large data scale and dynamic change, the traditional method needs to frequently re-fit the model, resulting in high prediction delay and large calculation resource consumption, which is difficult to meet the real-time elastic scaling demand.

[0003] The above content is only used to assist in understanding the technical solutions of the present application, and does not represent the acknowledgement of the above content as prior art. SUMMARY

[0004] The main purpose of the present application is to provide an index prediction method, device, equipment and computer program product, which aims to solve the technical problem of slow index prediction speed.

[0005] To achieve the above purpose, the present application provides an index prediction method, which comprises:

[0006] The first index data is subjected to sequence fusion feature processing to generate application level features of the first index data.

[0007] Based on the application level features, a target prediction model is constructed, and the second index data is subjected to index prediction by the target prediction model to generate index prediction values of the second index data.

[0008] In an embodiment, before the step of subjecting the first index data to sequence fusion feature processing to generate application level features of the first index data, the method further comprises:

[0009] Obtaining initial index data;

[0010] The initial index data is subjected to preprocessing operation to generate first index data;

[0011] The first index data is subjected to data incremental synchronization based on a data progressive lake entry strategy, and the first index data after data incremental synchronization is stored in a first storage module.

[0012] In an embodiment, the step of subjecting the first index data to sequence fusion feature processing to generate application level features of the first index data comprises:

[0013] Resample the first index data based on a target time frequency, sequence align the first index data in the resampling process, and generate intermediate index data of the first index data;

[0014] Perform feature fusion processing on the intermediate index data to generate application-level features of the first index data.

[0015] In an embodiment, the step of performing feature fusion processing on the intermediate index data to generate application-level features of the first index data includes:

[0016] Determine target index data of a target instance in the intermediate index data, calculate the average value and the maximum value of the target index data, and generate index average value and index maximum value;

[0017] Generate an index total value of the target instance based on the instance quantity of the target instance and the index average value;

[0018] Fuse the index average value, the index maximum value, and the index total value to generate an application-level feature corresponding to the target instance.

[0019] In an embodiment, the step of constructing a target prediction model based on the application-level feature and performing index prediction on second index data through the target prediction model to generate an index prediction value of the second index data includes:

[0020] Construct an initial prediction model, train the initial prediction model based on the application-level feature, and generate a target prediction model;

[0021] Obtain second index data under a target scenario, perform index prediction on the second index data through the target prediction model, and generate an index prediction result of the second index data.

[0022] In an embodiment, the step of training the initial prediction model based on the application-level feature includes:

[0023] Smooth the application-level feature through a logarithmic function and / or a natural logarithmic function;

[0024] Input the smoothed application-level feature into the initial prediction model for model training to generate an initial training prediction value;

[0025] Perform inverse transformation on the initial training prediction value through the logarithmic function and / or the natural logarithmic function to generate a target training prediction value.

[0026] In an embodiment, after the step of constructing a target prediction model based on the application-level features, performing index prediction on the second index data by the target prediction model to generate an index prediction value of the second index data, the method further comprises:

[0027] comparing the index prediction value with a preset scale-out / scale-in threshold range, and when the index prediction value exceeds the scale-out / scale-in threshold range, generating a container scale-out / scale-in instruction according to the index prediction value;

[0028] sending the container scale-out / scale-in instruction to the target container, so that the target container performs a scale-out / scale-in operation according to the container scale-out / scale-in instruction.

[0029] In addition, to achieve the above-mentioned purpose, the present application further provides an index prediction device, which comprises:

[0030] a feature generation module configured to perform sequence fusion feature processing on the first index data to generate application-level features of the first index data;

[0031] an index prediction module configured to construct a target prediction model based on the application-level features, and perform index prediction on second index data by the target prediction model to generate an index prediction value of the second index data.

[0032] In addition, to achieve the above-mentioned purpose, the present application further provides an index prediction device, which comprises: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the index prediction method as described above.

[0033] In addition, to achieve the above-mentioned purpose, the present application further provides a storage medium, which is a computer-readable storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the index prediction method as described above.

[0034] In addition, to achieve the above-mentioned purpose, the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the index prediction method as described above.

[0035] The one or more technical solutions provided by the present application have at least the following technical effects:

[0036] This application proposes an indicator prediction method, apparatus, device, and computer program product. It performs sequence fusion feature processing on first indicator data to generate application-level features of the first indicator data; constructs a target prediction model based on the application-level features; and uses the target prediction model to predict the indicator value of second indicator data. This application improves the speed of indicator prediction by generating application-level features through sequence fusion feature processing and further constructing a target prediction model based on these features. Attached Figure Description

[0037] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0038] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0039] Figure 1 This is a flowchart illustrating the first embodiment of the indicator prediction method of this application.

[0040] Figure 2 A comparison curve of the prediction effect provided in one embodiment of this application;

[0041] Figure 3 A comparison curve of the prediction effect provided for another embodiment of this application;

[0042] Figure 4 A simplified flowchart illustrating a specific embodiment of the indicator prediction method provided in this application;

[0043] Figure 5 This is a schematic diagram of the module structure of the indicator prediction device according to an embodiment of this application;

[0044] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the indicator prediction method in the embodiments of this application.

[0045] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0046] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0047] For better understanding of the technical solutions of the present application, the following will be described in detail in combination with the drawings of the specification and specific embodiments.

[0048] The main solution of the embodiment of the present application is: performing sequence fusion feature processing on first index data to generate application-level features of the first index data; constructing a target prediction model based on the application-level features, and performing index prediction on second index data through the target prediction model to generate index prediction values of the second index data.

[0049] In the embodiment, for the convenience of description, the following describes the index prediction device as the execution subject.

[0050] Under the background of rapid development of cloud computing and containerization technology, elastic scaling has become a key means to improve resource utilization. At present, the traditional elastic scaling scheme mainly relies on static threshold or prediction method based on simple time series model. These methods usually predict future resource demand by fitting historical data, and adjust resource allocation according to the prediction result. However, in the multi-application multi-instance scenario, due to inconsistent instance life cycle, large data scale and dynamic change, the traditional method needs to frequently re-fit the model, resulting in high prediction delay and large calculation resource consumption, which is difficult to meet the real-time elastic scaling demand.

[0051] The present application provides a solution. The present application generates application-level features through sequence fusion feature processing, and further constructs a target prediction model based on the application-level features, which can improve the speed of index prediction by the target prediction model.

[0052] It should be noted that the execution subject of the embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an index prediction device, etc. The following takes the index prediction device as an example to describe the embodiment and each of the following embodiments.

[0053] Based on this, the embodiment of the present application provides an index prediction method, which refers to Figure 1 , Figure 1 The flowchart of the first embodiment of the index prediction method of the present application is shown in the figure.

[0054] In the embodiment, the index prediction method includes steps S11-S12:

[0055] Step S11, performing sequence fusion feature processing on first index data to generate application-level features of the first index data.

[0056] It should be noted that the first index data refers to the data of the original collected time series index data (such as CPU usage, memory occupation, etc.) after preprocessing.

[0057] Additionally, it should be noted that sequence fusion feature processing refers to aligning and fusing the index data of multiple instances according to time sequence to generate more representative application-level features. It can be understood that the purpose of sequence fusion feature processing is to integrate the index data of multiple instances to generate features that can reflect the overall application state. In this way, the complexity of the data can be reduced while retaining key information, thereby improving the training efficiency and accuracy of the subsequent prediction model. The effect is to generate more representative and stable application-level features, providing high-quality input data for subsequent index prediction.

[0058] Additionally, it should be noted that application-level features refer to comprehensive features that reflect the overall application state generated by aggregating the index data of multiple instances (such as average, maximum, etc.), such as the CPU average of all instances, peak value, etc.

[0059] Specifically, first index data is collected from system logs, monitoring tools or other data sources. These data may include CPU usage, memory usage, disk I / O and other performance indicators. The collected first index data is cleaned to remove noise, fill in missing values, and formatted to make it suitable for subsequent feature processing. The first index data of different instances is resampled according to time frequency (such as every minute, every hour), and the data is aligned in time through interpolation and padding methods. The aligned data is processed for feature fusion, calculating statistics (such as average, maximum, sum) and generating application-level features. For example, assuming the first index data is the CPU usage data of multiple servers in the past 24 hours. Through time sequence alignment, the data of all servers is resampled according to the time frequency of every hour, and then the average and maximum of the CPU usage of all servers are calculated every hour to generate application-level features.

[0060] For example, assuming that CPU usage data is obtained from the monitoring system of multiple servers, which is recorded every minute. Through time sequence alignment, the data is converted into average and maximum values every hour to generate application-level features. For example, the average CPU usage of all servers in a certain hour is 50%, and the maximum value is 80%, which will be used as application-level features for subsequent model training.

[0061] Step S12, based on the application-level features, a target prediction model is constructed, and the second index data is predicted by the target prediction model to generate the index prediction value of the second index data.

[0062] It should be noted that the target prediction model refers to a prediction model constructed based on application-level features for predicting future index data.

[0063] Additionally, it should be noted that the second index data refers to real-time data that needs to be predicted, usually from the current running state of the system.

[0064] Additionally, it should be noted that the index prediction value refers to the future index value generated after the second index data is predicted by the target prediction model.

[0065] It can be understood that the purpose of building a target prediction model is to train a model that can accurately predict future indicators using application-level features. In this way, the accuracy and efficiency of prediction can be improved, thereby better supporting the needs of real-time elasticity.

[0066] Specifically, an initial prediction model is built based on the Transformer architecture, and application-level features are input into the initial prediction model. Through the training process, the model parameters are adjusted so that they can learn the rules in the data. According to the training results, the model is optimized, and the hyperparameters (such as network layers, receptive field size) are adjusted to improve the prediction performance of the model. Real-time second index data is obtained, which is the performance indicator at the current time. The second index data is preprocessed, including formatting and normalization processing, to make it consistent with the data format when training the model. The preprocessed second index data is input into the target prediction model, and the model generates index prediction values based on the rules it has learned before.

[0067] The above-mentioned scheme, through the sequence fusion feature processing, generates application-level features, and based on these features, a target prediction model is built, which can significantly improve the speed and accuracy of index prediction. By reducing the complexity of the data and retaining the key information, the application-level features provide high-quality input data for model training. At the same time, the target prediction model based on the Transformer architecture can effectively utilize the long-term dependence characteristics of time series data, further improving the accuracy of prediction. This technical solution can better support the needs of real-time elasticity, improve resource utilization and system response speed.

[0068] Based on the above implementation, in a feasible implementation, the step of performing sequence fusion feature processing on the first index data to generate application-level features of the first index data further includes S21-S23 before the step:

[0069] Step S21, obtaining initial index data.

[0070] It should be noted that the initial index data refers to the original collected time series index data, such as CPU usage, memory usage, etc. These data usually come from system logs, monitoring tools or other data sources.

[0071] Specifically, initial indicator data is obtained from system logs, monitoring tools, sensors, or other data sources. These data may come from different time points and different instances. For example, assume that CPU usage, memory usage, and disk I / O, etc. indicator data are obtained from the monitoring systems of multiple servers. These data may be recorded every second or every minute, forming initial indicator data.

[0072] Step S22, pre-processing operation is performed on the initial indicator data to generate first indicator data.

[0073] Specifically, the collected data is first subjected to preliminary verification to ensure data integrity and validity. Noise and outliers in the initial indicator data are removed to ensure data accuracy. For missing data points, interpolation or other methods are used to fill in to ensure data integrity. Then, according to business requirements and data analysis goals, define data filtering rules, and filter data based on filtering rules. Finally, according to the analysis target and model requirement, define the data conversion rule, such as data aggregation, feature engineering, etc., apply the defined conversion rule to the filtered data set, and perform data conversion to generate the first indicator data.

[0074] Step S23, based on the data incremental lake strategy, the first indicator data is subjected to data incremental synchronization, and the first indicator data after data incremental synchronization is stored to the first storage module.

[0075] It should be noted that the data incremental lake strategy is a data processing strategy that collects, integrates and stores data from various sources into a centralized data warehouse or data lake. This process includes cleaning, converting and integrating data from different sources to ensure data consistency and accuracy. The integrated data is stored in a centralized storage, which usually has massive storage capacity and can support multiple types of data (structured, semi-structured and unstructured). In an embodiment of the present application, second-level performance indicator data (CPU / memory / disk) is collected from a container platform (such as Kubernetes) in real time, written to a cache (such as Redis) or a message queue (such as Kafka), and a synchronization job is triggered at a fixed interval (such as every hour) to synchronize to an offline platform such as HDFS, and stored by time partitioning.

[0076] Additionally, it should be noted that the first storage module refers to an offline platform, which is a storage unit for storing the first indicator data after pre-processing and incremental synchronization, and is usually a database or data warehouse.

[0077] Specifically, the storage structure and configuration of the data lake are set to ensure efficient storage and query of data. According to the set time interval (such as every hour or every day), the first indicator data increment is synchronized to the data lake. Each synchronization only processes new data to avoid repeated storage. The synchronized first indicator data is stored in the first storage module to facilitate subsequent feature processing and model training.

[0078] Through the above scheme, the initial indicator data is obtained, the preprocessing operation is performed, and the data increment synchronization is performed based on the data progressive lake strategy, which can efficiently collect, process and store data. The preprocessing operation improves the quality and availability of data, and the data progressive lake strategy avoids repeated storage and processing of data, improving the efficiency and reliability of data storage.

[0079] Based on the above implementation scheme, in a feasible implementation, the step of performing sequence fusion feature processing on the first indicator data to generate application-level features of the first indicator data includes S31-S32:

[0080] Step S31, resampling the first indicator data based on a target time frequency, and performing sequence alignment on the first indicator data during the resampling process to generate intermediate indicator data of the first indicator data.

[0081] It should be noted that the target time frequency refers to the time frequency of resampling, such as every hour, every day, etc. In time series analysis, resampling refers to changing the time frequency of data, such as converting minute data to hour data. Sequence alignment refers to ensuring that time series data from different sources are consistent on the time axis.

[0082] In addition, it should be noted that the intermediate indicator data refers to data processed by resampling and sequence alignment.

[0083] It can be understood that the purpose of resampling and sequence alignment is to unify data of different time frequencies to the same time frequency and ensure alignment of data on the time axis. In this way, the complexity of data can be reduced, the consistency and availability of data can be improved, and a basis for subsequent feature fusion processing is provided.

[0084] Specifically, the time frequency of resampling is determined according to the analysis requirements, such as every hour, every day, etc. Statistical methods (such as average, sum, maximum, minimum, etc.) are used to resample the original data to match the new time frequency. For example, if the original data is the server CPU usage recorded every minute, and the analysis requirement is hourly data, then the data every minute is converted to hourly data by averaging.

[0085] Further, the timestamp information is extracted from the data to ensure that each data point corresponds to the correct time. The data points are adjusted by interpolation and padding to match the uniform timestamps. The resampled and sequence-aligned data is integrated into a new dataset, i.e., the intermediate indicator data.

[0086] Illustratively, assuming that the original data is server CPU usage data recorded every minute, and the analysis requirement is data per hour. The per-minute data is converted to per-hour data by averaging, and the data points are adjusted by interpolation and padding to match the uniform timestamps, to generate the intermediate indicator data.

[0087] In step S32, the intermediate indicator data is subjected to feature fusion processing to generate the application-level feature of the first indicator data.

[0088] Specifically, a suitable feature fusion method is selected according to the data characteristics and analysis target, such as principal component analysis, feature weighting, etc., to combine multiple features into a comprehensive feature, so as to facilitate model training and prediction. For example, for the intermediate indicator data, it can include features such as CPU usage, memory usage, and disk I / O. By calculating the weighted average of these features, a comprehensive application-level feature is generated, which can reflect the overall performance of the server. The result of the feature fusion processing is output as the final application-level feature for subsequent model training and prediction.

[0089] Illustratively, assuming that the intermediate indicator data includes features such as CPU usage, memory usage, and disk I / O. By calculating the weighted average of these features, a comprehensive application-level feature is generated, for example: application-level feature = [0.4 CPU usage + 0.3 memory usage + 0.3 * disk I / O].

[0090] The above scheme is used in this embodiment to process and integrate time series data from different sources to generate more representative application-level features, which not only reflect the changes of a single indicator, but also integrate the information of multiple indicators, providing more abundant and accurate input for the indicator prediction model, thereby improving the accuracy and reliability of the prediction.

[0091] Based on the above implementation scheme, in a feasible implementation, the step of subjecting the intermediate indicator data to feature fusion processing to generate the application-level feature of the first indicator data includes S41-S43:

[0092] In step S41, the target indicator data of the target instance is determined in the intermediate indicator data, the average value and the maximum value of the target indicator data are calculated, and the indicator average value and the indicator maximum value are generated.

[0093] It should be noted that the target instance refers to a specific object or entity selected in data analysis, for example, in server performance monitoring, the target instance may be a specific server or server group. The target indicator data refers to the performance indicator data related to the target instance, such as CPU usage, memory usage, etc.

[0094] Additionally, it should be noted that the indicator average value refers to the average value of the target indicator data within a certain time range, reflecting the general level of the performance indicator of the target instance. The indicator maximum value refers to the maximum value of the target indicator data within a certain time range, reflecting the peak level of the performance indicator of the target instance.

[0095] It can be understood that the purpose of calculating the indicator average value and the indicator maximum value is to extract the key performance indicators of the target instance, reflecting its general level and peak level. In this way, it can provide basic data for subsequent feature fusion.

[0096] Specifically, according to the analysis requirements, a specific target instance is selected, such as a specific server or service. From the intermediate indicator data, the performance indicator data related to the target instance is extracted. The average value within the time range is calculated for the extracted target indicator data to generate the indicator average value; the maximum value within the time range is calculated for the extracted target indicator data to generate the indicator maximum value. For example, if the target instance is a group of database servers, the CPU usage data of these servers is extracted from the intermediate indicator data, and the average value and maximum value of the past one hour are calculated for the extracted database server CPU usage data.

[0097] Exemplarily, assuming that the target instance is a group of database servers, the CPU usage data of these servers is extracted from the intermediate indicator data, and the average value of the past one hour is calculated as 50%, and the maximum value is 80%.

[0098] Step S42, based on the instance quantity of the target instance and the indicator average value, generating the indicator total value of the target instance.

[0099] It should be noted that the instance quantity refers to the total number of target instances. The indicator total value refers to the sum calculated based on the instance quantity of the target instance and the indicator average value, used to reflect the overall performance indicator of the entire target instance group.

[0100] Specifically, the total number of target instances is counted, and the indicator average value is multiplied by the instance quantity to obtain the indicator total value. For example, if the target instance is a group of database servers containing 10 servers, and the indicator average value of CPU usage is 50%, then the indicator total value is 50% x 10 = 500%.

[0101] Step S43, fusing the indicator average value, the indicator maximum value and the indicator total value to generate an application level feature corresponding to the target instance.

[0102] Specifically, in one embodiment of the present application, the indicator average value, the indicator maximum value and the indicator total value are combined into a feature vector, for example: application level feature = [indicator average value, indicator maximum value, indicator total value], and the feature vector is written into a feature library (such as Redis) or directly input into an initial prediction model.

[0103] In another embodiment of the present application, a suitable fusion method is selected according to the analysis target, such as weighted summation, principal component analysis, etc., to fuse the indicator average value, the maximum value and the total value to generate a comprehensive application level feature. For example, by using the weighted summation method, the indicator average value, the indicator maximum value and the indicator total value of the CPU usage rate are fused into a comprehensive score as the application level feature. Exemplarily, assuming that the target instance is a group of database servers, the indicator average value is 50%, the indicator maximum value is 80%, and the indicator total value is 500%. By using the weighted summation method, the application level feature is generated: comprehensive score = 0.4*50% + 0.3*80% + 0.3*500% = 178%.

[0104] The above scheme is used in the present embodiment to extract and calculate the key performance indicators of the target instance from the intermediate indicator data, and then fuse these indicators to generate an application level feature that can comprehensively reflect the performance of the target instance. In this way, not only detailed analysis of individual indicators can be provided, but also a higher level of performance overview can be provided by fusing multiple indicators, providing more abundant and accurate input data for the indicator prediction model, thereby improving the accuracy and reliability of the prediction.

[0105] Based on the above implementation scheme, in one feasible implementation, the step of constructing a target prediction model based on the application level feature, and performing indicator prediction on second indicator data by using the target prediction model to generate an indicator prediction value of the second indicator data includes steps S51-S52:

[0106] Step S51, constructing an initial prediction model, training the initial prediction model based on the application level feature to generate a target prediction model.

[0107] It should be noted that the initial prediction model is a time series prediction model based on the Transformer architecture, which is used to learn the rules in the data and make predictions, and the number of network layers and the size of the receptive field are dynamically adjusted according to the day, hour and minute periods of the application level feature.

[0108] Specifically, according to the periodic characteristics (minute, hour, day) of the time series data, the number of layers and the size of each layer of the Transformer network are designed, the weights and biases of the model are randomly initialized, or the parameters of the pre-trained model are used as the starting point, the loss function suitable for time series prediction (such as mean square error) is selected, and the optimizer (such as Adam or SGD) and its parameters are defined. The application level feature data is divided into training set, validation set and test set; the initial prediction model is trained using the training set data, the model parameters are adjusted by the back propagation algorithm to minimize the loss function; the model performance is evaluated on the validation set, and the model structure or hyperparameters are adjusted as needed; the model performance is tested on the test set to ensure the generalization ability of the model; after sufficient training and verification, the final target prediction model is obtained.

[0109] Further, the prediction effect of the prediction model based on the Transformer network architecture and the prediction model based on the Xgboost network architecture is compared. As shown in Figure 2 The prediction result comparison of the CPU usage rate of a service unit is shown, and the training set data contains 30 days of data. The CPU usage rate of the future 24 hours is predicted, Figure 2 In (a), the prediction error curve diagram of the prediction model based on the Xgboost network architecture is shown, and the comprehensive error rate is 5.23%; Figure 2 In (b), the prediction error curve diagram of the prediction model based on the Transformer network architecture is shown, and the comprehensive error rate is 4.1%.

[0110] Further, as shown in Figure 3 The prediction result comparison of the CPU usage rate of a service unit is shown, and the training set data contains 7 days of historical data of the previous month. The CPU usage rate of the 30th day of the month is predicted, Figure 3 In (c), the prediction error curve diagram of the prediction model based on the Xgboost network architecture is shown, and the comprehensive error rate is 20.64%; Figure 3 In (d), the prediction error curve diagram of the prediction model based on the Transformer network architecture is shown, and the comprehensive error rate is 8.99%.

[0111] As can be seen from the above, the prediction effect of the prediction model based on the Transformer network architecture is more accurate than that of the prediction model based on the Xgboost network architecture.

[0112] Step S52, obtaining second index data under a target scene, performing index prediction on the second index data through the target prediction model, and generating an index prediction result of the second index data.

[0113] It should be noted that the target scenario refers to a situation where certain indicators need to be predicted to support decision-making under specific environmental or conditions. These scenarios usually involve analysis of real-time data or recently collected data to predict future trends or states. The target scenario can be based on different business needs, system performance requirements or specific operating conditions.

[0114] Additionally, it should be noted that the second indicator data refers to real-time or recently collected data used for prediction, which is similar to the first indicator data but used to predict future indicators.

[0115] Specifically, real-time or recent second indicator data under the target scenario is obtained; the same preprocessing steps as in training are performed on the second indicator data, and the preprocessed second indicator data is input into the target prediction model to generate indicator prediction values, and the final indicator prediction result is output.

[0116] For example, assume that the target scenario is to predict the CPU usage rate in the next 24 hours. The CPU usage rate data at the current time is obtained, preprocessed and input into the target prediction model, and the model outputs the CPU usage rate prediction value in the next 24 hours.

[0117] The above scheme is used to construct and train a target prediction model through the Transformer network architecture and application-level features, thereby achieving accurate prediction of the second indicator data, significantly improving the accuracy and efficiency of the prediction, and enabling the model to better understand and learn the complex patterns in the data, thereby providing more reliable prediction results.

[0118] Based on the above implementation, in a feasible implementation, the step of training the initial prediction model based on the application-level features includes S61-S63:

[0119] Step S61, smoothing the application-level features by a logarithmic function and / or a natural logarithmic function.

[0120] It should be noted that the logarithmic function refers to the log function, and the natural logarithmic function refers to the ln function. Smoothing refers to reducing random fluctuations in data through mathematical transformation to make the data smoother, thereby more easily identifying patterns and trends in the data.

[0121] Specifically, a logarithmic function or a natural logarithmic function is selected for smoothing, and the selected logarithmic function is applied to the application-level features for function transformation. For example, assume that the average CPU usage rate is 50%, the maximum is 80%, and the total is 500%. The features are transformed by the log function to generate smoothed features.

[0122] Step S62, input the application-level features after smoothing into the initial prediction model for model training, to generate initial training prediction values.

[0123] It should be noted that the initial training prediction values refer to the prediction results generated by the model during the training process, which are on a logarithmic scale before inverse transformation.

[0124] Specifically, the application-level features after logarithmic transformation are input into the model as training data to train the initial prediction model, and the model parameters are adjusted to minimize the prediction error; the trained model is used to predict the validation set or test set data to generate initial training prediction values.

[0125] Step S63, inverse transform the initial training prediction values by the logarithmic function and / or the natural logarithmic function to generate target training prediction values.

[0126] It should be noted that the target training prediction values refer to the prediction values after inverse transformation, which are restored to the scale of the original data and can be directly used for analysis and decision-making.

[0127] Specifically, according to the logarithmic function used before, the corresponding inverse transformation function is selected, such as the exponential function or the natural exponential function. Apply the inverse transformation function to the initial training prediction values to restore them from the logarithmic scale to the original scale. Output the prediction values after inverse transformation as the final prediction results to generate target training prediction values.

[0128] The above scheme, by smoothing the application-level features, inputting the smoothed features into the initial prediction model for training, generating initial training prediction values, and inverse transforming the initial training prediction values to generate target training prediction values. This technical solution can effectively reduce random fluctuations in the data, improve the training effect of the model, and enable the model to more accurately capture patterns and trends in the data. Through the inverse transformation process, the interpretability of the prediction results is ensured, so that the prediction values can be directly used for actual business decision-making.

[0129] Based on the above implementation scheme, in a feasible implementation, after the step of constructing a target prediction model based on the application-level features, performing index prediction on the second index data by the target prediction model to generate index prediction values of the second index data, the following steps are further included:

[0130] Step S71, compare the index prediction values with a preset scale-in / scale-out threshold range, and when the index prediction values exceed the scale-in / scale-out threshold range, generate a container scale-in / scale-out instruction according to the index prediction values.

[0131] It should be noted that the expansion and contraction threshold range is a pre-set index value range, which is used to determine whether the container needs to be expanded or contracted.

[0132] Additionally, it should be noted that the container expansion and contraction instruction refers to an instruction generated according to the comparison result of the index prediction value and the expansion and contraction threshold range, which is used to guide the expansion or contraction operation of the container.

[0133] Specifically, according to the system resources and business requirements, the threshold range of expansion and contraction is set; the prediction value of the second index data is obtained, and the prediction value is compared with the expansion and contraction threshold to determine whether the expansion and contraction operation is needed. For example, assuming that the expansion and contraction range of CPU usage is [20%, 80%], if the predicted CPU usage exceeds 80%, expansion is needed; if it is lower than 20%, contraction may be needed. When the prediction value exceeds the expansion threshold range, an instruction to increase the container resources is generated; when the prediction value is lower than the contraction threshold range, an instruction to reduce the container resources is generated.

[0134] In step S72, the container expansion and contraction instruction is sent to the target container to make the target container perform the expansion and contraction operation according to the container expansion and contraction instruction.

[0135] It should be noted that the target container refers to a container instance that needs to adjust resources according to the expansion and contraction instruction.

[0136] Specifically, the expansion and contraction instruction is sent to the target container or the container management system through the network or the API; after receiving the instruction, the target container adjusts its resource configuration according to the received instruction and performs the corresponding expansion and contraction operation.

[0137] The above-mentioned scheme is used to perform the expansion and contraction operation of the container based on the prediction result, which can improve the resource utilization rate and the response speed of the container; the resource allocation can be dynamically adjusted according to the real-time resource requirement, the cost can be optimized, and the user experience can be improved; through the automatic expansion and contraction mechanism, the manual intervention can be reduced, and the stability and reliability of the system can be improved.

[0138] Exemplarily, in order to facilitate understanding of the implementation process of a specific embodiment of the index prediction method obtained after combining the above-mentioned embodiment one, please refer to Figure 4 , Figure 4 A brief flowchart of a specific embodiment of the index prediction method is provided, specifically:

[0139] The implementation of the index prediction method mainly includes four steps: data collection, data storage, data modeling, and scene use. From the data collection stage, the message queue receives data from multiple instances of container performance indicators, and then enters the data processing application stage (preprocessing). Here, the data is processed by the service unit, filtered and converted, and after preparation, it is synchronized to the FlinkSql of the FLC platform to realize the storage of quasi-real-time data to the offline platform HIVE (Hadoop Infrastructure for Virtual Environment, a big data warehouse tool, equivalent to the first storage module). In the data storage stage, the system manages data through DGP (Data Governance Platform) job flow, including data extraction and data file transmission through the distributed SFTP (SSH File Transfer Protocol, Secure File Transfer Protocol). The data modeling stage involves organizing the tasks to be trained, merging and starting the training through the training task master control module, training the prediction model through pytorch, and then converting the format through onnx (Open Neural Network Exchange, an open standard format for storing and exchanging deep learning models) and uploading the prediction model to ECS (Elastic Compute Service) for model updating and inference. In the scene use stage, the system calls the Transformer model deployment to receive prediction requests, perform real-time prediction, and output the prediction results through the prediction interface. The whole process realizes the full automation from raw data collection to prediction result generation. At the same time, the system can compare the index prediction value with the preset scaling threshold range to automatically generate container scaling instructions to realize dynamic adjustment and optimization of resources, thereby improving resource utilization and system response speed.

[0140] It should be noted that the above examples are only for understanding the present application and do not limit the index prediction method of the present application. Based on this technical concept, more forms of simple changes are within the protection scope of the present application.

[0141] The present application also provides an index prediction device, please refer to Figure 5 , the index prediction device comprises:

[0142] The feature generation module 501 is configured to perform sequence fusion feature processing on the first index data to generate application-level features of the first index data.

[0143] The index prediction module 502 is configured to construct a target prediction model based on the application level features, perform index prediction on the second index data by using the target prediction model, and generate an index prediction value of the second index data.

[0144] The index prediction device provided in the present application adopts the index prediction method in the above embodiments, and can solve the technical problem of slow index prediction speed. Compared with the prior art, the index prediction device provided in the present application has the same beneficial effects as the index prediction method provided in the above embodiments, and other technical features in the index prediction device are the same as the features disclosed in the above embodiments, which will not be repeated here.

[0145] The present application provides an index prediction device, which comprises at least one processor and a memory connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the index prediction method in the above embodiment one.

[0146] Reference will now be made to the drawings, and specific examples thereof will be described herein below. Figure 6 which shows a structural diagram of an index prediction device suitable for implementing the embodiments of the present application. The index prediction device in the embodiments of the present application can include, but is not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 6 The index prediction device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.

[0147] As Figure 6As shown, the index prediction device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or loaded from a storage apparatus 1003 into a random access memory 1004. Various programs and data required for the operation of the index prediction device are also stored in the random access memory 1004. The processing apparatus 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input apparatuses 1007 including, for example, a touch panel, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the index prediction device to perform wireless or wired communication with other devices to exchange data. Although the index prediction device having various systems is shown in the figure, it should be understood that all of the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.

[0148] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication apparatus, or installed from the storage apparatus 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.

[0149] The index prediction device provided by the present disclosure adopts the index prediction method in the above-mentioned embodiments, and can solve the technical problem of slow index prediction speed. Compared with the prior art, the index prediction device provided by the present disclosure has the same beneficial effects as the index prediction method provided by the above-mentioned embodiments, and other technical features in the index prediction device are the same as the features disclosed in the previous embodiment method, which will not be described here.

[0150] It should be understood that parts of the present disclosure can be realized by hardware, software, firmware, or a combination thereof. In the description of the above-mentioned embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0151] The above merely provides the specific implementation of the present application, but the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of the changes or replacements within the technical range disclosed by the present application, which shall be covered within the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

[0152] The present application provides a computer readable storage medium having computer readable program instructions (i.e. computer programs) stored thereon, the computer readable program instructions being used to execute the index prediction method in the above embodiment.

[0153] The computer readable storage medium provided by the present application may, for example, be a U disk, but is not limited to an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system or device, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection having one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read only memory (ROM), an erasable programmable read only memory (EPROM or flash memory), an optical fiber, a portable compact disk read only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system or device. The program code contained on the computer readable storage medium can be transmitted by any suitable medium, including but not limited to an electric wire, an optical cable, an RF (Radio Frequency), etc., or any suitable combination of the above.

[0154] The above computer readable storage medium can be included in the index prediction device; or can exist separately without being assembled into the index prediction device.

[0155] The above computer readable storage medium carries one or more programs, when the one or more programs are executed by the index prediction device, the index prediction device is caused to: perform sequence fusion feature processing on first index data to generate application level features of the first index data; construct a target prediction model based on the application level features, and perform index prediction on second index data through the target prediction model to generate an index prediction value of the second index data.

[0156] Computer program code for carrying out operations of the present application can be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).

[0157] The computer program instructions can also be loaded onto a computer, other programmable data processing apparatus, or other devices to cause a series of operational steps to be performed on the computer, other programmable apparatus or other devices to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide processes for implementing the functions / acts specified in the flowchart and / or block diagram block or blocks.

[0158] The modules involved in the embodiments of the present application can be implemented in software or hardware. In some cases, the name of the module does not constitute a limitation on the module itself.

[0159] The readable storage medium provided by the present application is a computer readable storage medium, which stores computer readable program instructions (i.e. computer program) for executing the above index prediction method, and can solve the technical problem of slow index prediction. Compared with the prior art, the computer readable storage medium provided by the present application has the same beneficial effects as the index prediction method provided by the above embodiments, which will not be described here.

[0160] The application further provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the index prediction method as described above.

[0161] The computer program product provided by the application can solve the technical problem of slow index prediction speed. Compared with the prior art, the beneficial effects of the computer program product provided by the application are the same as those of the index prediction method provided by the above-mentioned embodiments, and are not described here.

[0162] The above only describes some embodiments of the application, and does not limit the patent scope of the application. Any equivalent structural transformation made by using the content of the specification and drawings, or direct / indirect application in other related technical fields under the technical concept of the application is included in the patent protection scope of the application.

Claims

1. An index forecasting method characterized by comprising: The index prediction method comprises: performing sequence fusion feature processing on the first index data to generate application-level features of the first index data; constructing a target prediction model based on the application-level features, performing index prediction on second index data through the target prediction model, and generating index prediction values of the second index data.

2. The indicator forecasting method according to claim 1, characterized by, The step of performing sequence fusion feature processing on the first index data to generate application-level features of the first index data further comprises: obtaining initial index data; performing preprocessing operations on the initial index data to generate first index data; performing data incremental synchronization on the first index data based on a data progressive lake entry strategy, and storing the first index data after data incremental synchronization to a first storage module.

3. The index forecasting method according to claim 1, characterized by, The step of performing sequence fusion feature processing on the first index data to generate application-level features of the first index data comprises: resampling the first index data based on a target time frequency, performing sequence alignment on the first index data in the resampling process, and generating intermediate index data of the first index data; performing feature fusion processing on the intermediate index data to generate application-level features of the first index data.

4. The index forecasting method according to claim 3, characterized by, The step of performing feature fusion processing on the intermediate index data to generate application-level features of the first index data comprises: determining target index data of a target instance in the intermediate index data, calculating the average value and the maximum value of the target index data to generate an index average value and an index maximum value; generating an index total value of the target instance based on the instance quantity of the target instance and the index average value; fusing the index average value, the index maximum value, and the index total value to generate application-level features corresponding to the target instance.

5. The index forecasting method according to claim 3, characterized by, The step of constructing a target prediction model based on the application-level features, performing index prediction on second index data through the target prediction model, and generating index prediction values of the second index data comprises: constructing an initial prediction model, training the initial prediction model based on the application-level features to generate a target prediction model; obtaining second index data under a target scenario, performing index prediction on the second index data through the target prediction model, and generating index prediction results of the second index data.

6. The indicator forecasting method of claim 5, wherein, The step of training the initial prediction model based on the application-level features comprises: performing smoothing processing on the application-level features through a logarithmic function and / or a natural logarithmic function; inputting the smoothed application-level features into the initial prediction model for model training to generate initial training prediction values; performing inverse transformation on the initial training prediction values through the logarithmic function and / or the natural logarithmic function to generate target training prediction values.

7. The indicator forecasting method of claim 1, wherein, The step of constructing a target prediction model based on the application-level features, performing index prediction on second index data through the target prediction model, and generating index prediction values of the second index data further comprises: The index prediction value is compared with a preset scale-in / out threshold range, and when the index prediction value exceeds the scale-in / out threshold range, a container scale-in / out instruction is generated according to the index prediction value; The container scale-in / out instruction is sent to a target container, so that the target container performs a scale-in / out operation according to the container scale-in / out instruction.

8. An index forecasting device characterized by comprising: The index prediction device comprises: a feature generation module configured to perform sequence fusion feature processing on the first index data to generate application-level features of the first index data; an index prediction module configured to construct a target prediction model based on the application-level features, perform index prediction on second index data through the target prediction model, and generate an index prediction value of the second index data.

9. An index prediction device characterized by comprising: The device comprises a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the index prediction method according to any one of claims 1 to 7.

10. A computer program product, characterised in that, The computer program product comprises a computer program, and the computer program is executed by a processor to implement the steps of the index prediction method according to any one of claims 1 to 7.