AI model input data preprocessing method for intelligent operation and maintenance

By preprocessing multi-indicator time-series data, missing values ​​are filled in, the numerical cardinality is scaled, and the data is compressed. This solves the problems of inconsistency in AI model input data and excessive storage space, improves data quality and storage efficiency, and ensures the accuracy of AI models.

CN114416799BActive Publication Date: 2024-09-06NANJING LINKESLA INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210073013.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-21
Publication Date
2024-09-06
Estimated Expiration
2042-01-21

AI Technical Summary

Technical Problem

In existing technologies, time series data collectors for indicators suffer from problems such as missed data collection, data loss due to network fluctuations, inconsistencies in time series data, excessive time differences and numerical base differences between time series points, and excessively large time series data storage space, which affect the data quality of AI models.

Method used

The multi-indicator time-series data is preprocessed through training and prediction steps, including imputing missing values, scaling the numerical base, and compressing the data. The missing points are fitted using the difference moving average function, the median is used as the scaling base, and the data is compressed using the Zlib algorithm to generate binary index data storage.

Benefits of technology

It solves the problems of missing time-series data, excessive differences in numerical cardinality, and excessive storage space, and provides more regular and higher-quality data input to AI models, thereby improving the prediction accuracy and data storage efficiency of the models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416799B
    Figure CN114416799B
Patent Text Reader

Abstract

The present invention discloses an AI model input data preprocessing method for intelligent operation and maintenance, including a training step and a prediction step. The training step includes: respectively querying from an ES database to obtain the time series indicator values ​​of the number of real-time processes and the number of real-time threads in a specified time period that requires incremental training, and traversing the time series indicator data according to the indicator type; judging whether the sequence of each indicator type contains missing values; if the median is less than 10, changing the median to 10, and then uniformly dividing all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥10, uniformly dividing all the time series indicator values ​​of the indicator type by the median to reduce them; obtaining a new time series data list; and then querying the previously saved bytes object from a MySQL database, directly adding the list obtained after deserialization to the new time series data list to obtain the full amount of data for this training, and then inputting the full amount of data for this training into the model for training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a data preprocessing method for AI model input for intelligent operation and maintenance, and more specifically to a preprocessing method based on multi-indicator time series data, which belongs to the field of computer technology. Background Art

[0002] With the development of intelligent operation and maintenance, more and more AI models require the support of big data, and real-time indicator time series data is the valuable asset of AI models.

[0003] Real-time indicator data is generally collected by a collector at the collection end to monitor the indicators of the machine, but the inventor of the present application found that the above technology has at least the following technical problems:

[0004] The data collected by the indicator time series collector often has problems. For example, the collector may miss data collection, network fluctuations may cause data loss, and other problems may lead to inconsistency of multi-indicator data. For multi-indicator AI models, the time series data of multiple indicators must be at the same time or within a certain range of a certain time to be meaningful. However, the time series data between different indicators may have problems such as missing time points, large deviations in the value base size, and too large storage space for time series data. How to deal with these problems in order to input more valuable data into the AI ​​model is particularly important for intelligent operation and maintenance.

[0005] In order to solve the above problems, a more general method is needed to pre-process multi-indicator time series data problems in order to provide better quality data to the AI ​​model. Summary of the invention

[0006] In view of the above technical problems, the present invention provides a preprocessing method based on multi-indicator time series data to solve the problems of missing time series data, large difference in numerical cardinality and excessive storage space for time series data.

[0007] The embodiment of the present application provides an AI model input data preprocessing method for intelligent operation and maintenance, which is characterized by comprising a training step and a prediction step, wherein the training step comprises:

[0008] Step 101, respectively query from the ES database to obtain the timing indicator values ​​of the number of real-time processes and the number of real-time threads in the specified time period that requires incremental training;

[0009] Step 102: traverse the time series indicator data according to the indicator type;

[0010] Step 103: determine whether the sequence of each indicator type contains missing values;

[0011] Step 104: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function;

[0012] Step 105: Obtain the median of the indicator as the scaling base according to the indicator type. If the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; obtain a new time series data list; then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the new time series data list, obtain the full amount of data for this training, and then input it into the model for training;

[0013] Step 106, binary indicator data generated in step 105 of the text sequence;

[0014] Step 107, compress the serialized binary index data with Zlib;

[0015] Step 108, store it as a bytes object and save it in MySQL for next use;

[0016] The present invention is further limited in that the prediction step comprises:

[0017] Step 201: read a multidimensional array of time series indicator values ​​of the number of real-time processes and the number of real-time threads within the time range of this prediction from the redis database;

[0018] Step 202: Load the processing indicator parameters stored when the training model of the corresponding indicator is loaded from the model repository;

[0019] Step 203, traverse the time series indicator data according to the indicator type;

[0020] Step 204: determine whether the sequence of each indicator type contains missing values;

[0021] Step 205: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function;

[0022] Step 206, step 206, respectively obtain the median of the indicator as the scaling base according to the indicator type, if the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; obtain a new time series data list; then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the new time series data list, obtain the full amount of data for this training, and then input the model for training;

[0023] Step 207, loading the model of the number of real-time processes and the number of real-time threads in the model library;

[0024] Step 208: predict the processed indicator data according to the machine learning model corresponding to the indicator, and return the prediction result;

[0025] Step 209: Return the alarm logic according to the alarm rule interface, and the prediction processing process ends.

[0026] Technical effect: The preprocessing method based on multi-index time series data provided by the present invention can solve the problems of missing time series data, large value cardinality difference, and excessive time series data storage space, and provide more regular and higher quality data for AI model input. The present invention can be applied to the field of intelligent operation and maintenance and has broad application prospects. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 Schematic diagram of the training process in an embodiment of the present invention.

[0028] Figure 2 Schematic diagram of the model prediction process after adding the preprocessing method in an embodiment of the present invention.

[0029] Figure 3 This is a schematic diagram of the model prediction results after adding the preprocessing algorithm in an embodiment of the present invention.

[0030] Figure 4 This is a schematic diagram of the prediction results of the comparison model without the preprocessing algorithm. DETAILED DESCRIPTION

[0031] This embodiment provides an AI model input data preprocessing method for intelligent operation and maintenance, more specifically, a preprocessing method based on multi-indicator time series data. This method obtains the indicator data to be predicted from the redis database, obtains the full amount of indicator data from the ES database, and saves the preprocessed bytes object data in the mysql database, where the median of each indicator is extracted from the full amount of data of the indicator item at intervals by a scheduled task and then stored in the mysql database.

[0032] The operation and maintenance indicators selected in this embodiment are two indicators, namely, the number of real-time processes and the number of real-time threads, selected from the operation and maintenance indicators of the Linux system, and the time interval between the indicator points is 1 hour.

[0033] The preprocessed data in this embodiment is output to the STL model, the isolation forest model, and the histogram model, and the three models are mixed for prediction.

[0034] Regarding the issue of missing time series data:

[0035] 1) In the time series of the same indicator data, the continuous time series data is broken and the middle point data is omitted. The solution adopted in this embodiment is to fit the difference moving average based on the adjacent time series point data, and fill in the middle point based on the time difference and the moving average function.

[0036] 2) There is a problem of excessive deviation in the numerical cardinality of different indicator data, that is, the data of indicators a and b are equal among the three indicators a, b, and c, while the numerical cardinality of indicator c is much larger or smaller than that of indicators a and b, which causes the rigid data of different dimensions to be mixed together during model training, resulting in large deviations in the training results and prediction results of the final model. The adopted solution is to use the median of the historical full data of the indicator as the scaling cardinality, first extract the median of the full data of the indicator, and if the median is less than 10, then take 10 as the median. This approach is for data with too small a numerical cardinality of the indicator. A median that is too small will also cause sensitive deviations in the scaled data. The time series values ​​that need to be trained or predicted are divided by the median and rounded, and then the time series values ​​are output to the model, which can greatly reduce the problem of sensitive data prediction results caused by large data cardinality deviations.

[0037] 3) For the problem of ultra-large data storage, that is, the data storage after multi-time preprocessing occupies too much space. After the multi-dimensional indicator data json array is serialized into text, a binary sequence object is obtained, and then the serialized data is compressed by the zlib algorithm. This can save half of the data storage space on the basis of storing the original data separately, and save a lot of time and bandwidth in data reading and network transmission.

[0038] The present invention is described below in conjunction with more specific embodiments.

[0039] The preprocessing method based on multi-index time series data in this embodiment is divided into a training step and a prediction step, wherein

[0040] like Figure 1 As shown, the training steps include:

[0041] Step 101, respectively query from the ES database to obtain the timing indicator values ​​of the number of real-time processes and the number of real-time threads in the specified time period that requires incremental training;

[0042] Step 102: traverse the time series indicator data according to the indicator type;

[0043] Step 103: determine whether the sequence of each indicator type contains missing values;

[0044] Step 104: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function;

[0045] Step 105: Obtain the median of the indicator as the scaling base according to the indicator type. If the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥ 10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; and obtain a new time series data list;

[0046] Then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the sequence list generated after scaling in step 105, and you can get the full amount of data for this training, and then input it into the model for training.

[0047] Step 106, text serialization of the binary indicator data generated in step 105;

[0048] Step 107, compress the serialized indicator data with Zlib, saving data storage space and reducing network bandwidth and IO bandwidth for data transmission;

[0049] Step 108: Store as bytes object, and after obtaining the bytes object after preprocessing this batch of incremental data, store it in MySQL for next use. If the full amount of indicator data is directly queried from the ES library, the total time spent is 10 times the time spent by the method in this embodiment.

[0050] like Figure 2 As shown, the prediction step in this embodiment includes:

[0051] Step 201, read the multidimensional array of time series index values ​​of the number of real-time processes and the number of real-time threads within the time range of this prediction from the redis database;

[0052] Step 202: Load the processing index parameters stored when the training model of the corresponding index is loaded from the model repository; that is, load the trained model file corresponding to the model ID;

[0053] Step 203, traverse the time series indicator data according to the indicator type;

[0054] Step 204: determine whether the sequence of each indicator type contains missing values;

[0055] Step 205: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function;

[0056] Step 206: Obtain the median of the indicator as the scaling base according to the indicator type. If the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥ 10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; obtain a new time series data list; then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the new time series data list, obtain the full amount of data for this training, and then input the model for training; this implementation In this example, the number of real-time threads is obtained because the collector was interrupted for 3 hours, and the intermediate data will be missing 3 points. The value of the nearest point before the missing point is 920, and the value of the nearest point after the missing point is 936. According to the difference moving average, the interval value is 36 / (3+1)=4, so the points to be filled in the middle are 924, 928, and 932. The median of the total number of real-time threads is 512. Taking the 5 points here as an example, after dividing by the median and rounding, the 5 points are all 2. After the JSON data of the number of real-time processes and the number of real-time threads are processed by this preprocessing algorithm, the obtained data is provided to the three models;

[0057] Step 207, loading three models of the STL model of the number of real-time processes and the number of real-time threads in the model library, the isolation forest model, and the histogram model;

[0058] Step 208: predict the processed indicator data according to the machine learning model corresponding to the indicator, and return the prediction result

[0059] Step 209: Return the alarm logic according to the alarm rule interface; the prediction processing process ends.

[0060] Figure 3 and Figure 4 This is the comparison effect of the number of outliers predicted by the model before and after the preprocessing method is used. It can be seen from the figure that the method of this embodiment will have fewer false positive outliers than the existing method.

[0061] The above description is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements without departing from the principle of the present invention. These improvements should also be regarded as within the scope of protection of the present invention.

Claims

1. AI model input data preprocessing method for intelligent operation and maintenance, Features The method comprises a training step and a prediction step, wherein the training step comprises: Step 101, respectively query from the ES database to obtain the timing indicator values ​​of the number of real-time processes and the number of real-time threads in the specified time period that requires incremental training; Step 102: traverse the time series indicator data according to the indicator type; Step 103: determine whether the sequence of each indicator type contains missing values; Step 104: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function; Step 105: Obtain the median of the indicator as the scaling base according to the indicator type. If the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; obtain a new time series data list; then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the new time series data list, obtain the full amount of data for this training, and then input it into the model for training; Step 106, text serialization of the binary indicator data generated in step 105; Step 107, compress the serialized binary index data with Zlib; Step 108: Store the bytes object in MySQL for next use.

2. According to the AI ​​model input data preprocessing method for intelligent operation and maintenance according to claim 1, It is characterized in that The prediction step includes: Step 201: read a multidimensional array of time series indicator values ​​of the number of real-time processes and the number of real-time threads within the time range of this prediction from the redis database; Step 202: Load the processing indicator parameters stored when the training model of the corresponding indicator is loaded from the model repository; Step 203, traverse the time series indicator data according to the indicator type; Step 204: determine whether the sequence of each indicator type contains missing values; Step 205: if there are missing values, fit the difference moving average according to the data of the adjacent time points before and after, and fill in the middle points according to the time difference and the moving average function; Step 206: Obtain the median of the indicator as the scaling base according to the indicator type. If the median is less than 10, change the median to 10, and then divide all the time series indicator values ​​of the indicator type by 10 to reduce them; if the median is ≥10, divide all the time series indicator values ​​of the indicator type by the median to reduce them; obtain a new time series data list; then query the previously saved bytes object from the MySQL database, directly add the list obtained after deserialization to the new time series data list, obtain the full amount of data for this training, and then input it into the model for training; Step 207, loading the model of the number of real-time processes and the number of real-time threads in the model library; Step 208: predict the processed indicator data according to the machine learning model corresponding to the indicator, and return the prediction result; Step 209: Return the alarm logic according to the alarm rule interface, and the prediction processing process ends.