Scheduling anomaly analysis model training method and device, equipment and storage medium
By preprocessing and clustering the error logs, training the regression prediction model, and performing incremental learning, the problem of late problem handling and long operation and maintenance time in the scheduling exception analysis model was solved, and the real-time and adaptability of the model were improved. Matching nature.
Patent Information
- Application Number
- CN202410858364.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-01
AI Technical Summary
The existing scheduling anomaly analysis model lacks real-time monitoring and intelligent diagnosis functions, resulting in untimely problem processing, long operation and maintenance time, and it is difficult for the log analysis algorithm to perform incremental iterative learning, affecting performance.
By obtaining error logs, perform text processing and vectorization, use clustering algorithms for classification, train regression prediction models, and perform incremental training on the models to adapt to new anomalies.
It improves the real-time and automation level of the scheduling exception analysis model, reduces operation and maintenance time, enhances the adaptability and accuracy of the model, and provides quick processing suggestions.
Smart Images

Figure CN118734096A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information processing technology, and in particular to a scheduling anomaly analysis model training method, device, equipment and storage medium. Background Art
[0002] As the number of credit card job scheduling platform accesses continues to increase, more and more problems arise, including:
[0003] 1. Problems are not handled in a timely manner: The existing scheduling anomaly analysis model lacks effective real-time monitoring and intelligent diagnosis functions. Therefore, when a job is abnormal, developers need to check the logs of the virtual machine or container to locate the problem. The problem cannot be located in time, resulting in delayed problem handling.
[0004] 2. Long operation and maintenance time: The existing scheduling anomaly analysis model is inadequate in problem identification and root cause analysis, and lacks the ability to effectively learn and summarize historical anomalies. As a result, operation and maintenance personnel need to spend time repeatedly handling the same problem, resulting in a long operation and maintenance time.
[0005] 3. It is difficult to achieve incremental iterative learning after the existing log analysis algorithms are launched: Currently, most log analysis algorithms require retraining of the model to optimize performance, and this can easily affect the performance of the current model.
[0006] In summary, how to improve the performance of the scheduling anomaly analysis model has become one of the hot issues that need to be solved. Summary of the invention
[0007] The main purpose of this application is to provide a scheduling anomaly analysis model training method, device, equipment and storage medium, aiming to solve the technical problem of how to improve the performance of the scheduling anomaly analysis model.
[0008] To achieve the above objectives, the present application proposes a scheduling anomaly analysis model method, the method comprising:
[0009] Obtain an error log, process the error log, and obtain an unlabeled log vector;
[0010] Using a clustering algorithm to cluster and classify the unlabeled log vectors to obtain labeled log vectors;
[0011] The labeled log vector is used for training a regression prediction model to obtain a trained regression prediction model.
[0012] In one embodiment, the step of processing the error log to obtain an unlabeled log vector includes:
[0013] Performing text processing on the error log to obtain an error log with correct part of speech;
[0014] The error log with correct part of speech is vectorized by a statistical method to obtain an unlabeled log vector.
[0015] In one embodiment, the step of performing text processing on the error log to obtain an error log with correct part of speech includes:
[0016] Eliminate noise information in the error log by using text features to obtain an error log processed by text features;
[0017] Performing word segmentation processing on the error log after text feature processing to obtain an error log after word segmentation processing;
[0018] According to different part-of-speech meanings in the error log after word segmentation processing, the error log after word segmentation processing is tagged with parts of speech using a pre-trained hidden Markov model to obtain an error log with correct parts of speech.
[0019] In one embodiment, the error log includes an English error log and a Chinese error log, and the step of performing word segmentation processing on the error log after text feature processing to obtain the error log after word segmentation processing includes:
[0020] Segment the English error log using a byte pair encoding (BPE) algorithm to obtain an error log after segmentation; or
[0021] Dividing the Chinese error log into longer phrases using a maximum matching algorithm;
[0022] The Viterbi algorithm is used to analyze the longer phrase to obtain an optimal subsequence.
[0023] In one embodiment, the step of clustering and classifying the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors includes:
[0024] Clustering algorithms are used to classify unlabeled log vectors to obtain different log clusters.
[0025] Label each log cluster to obtain a labeled log vector.
[0026] In one embodiment, the step of clustering and classifying the unlabeled log vectors by a clustering algorithm to obtain different log clusters includes:
[0027] Taking the unlabeled log vector as an initial log cluster;
[0028] Splitting the initial log cluster by a binary method to obtain log sub-clusters;
[0029] Calculate the sum of squares of errors corresponding to the log sub-clusters to obtain the sum of squares of errors with the largest value;
[0030] The log sub-cluster corresponding to the largest square error is divided until the number of log sub-clusters is equal to the preset number of clusters;
[0031] The preset number of clusters is compared with the error sum of squares by the elbow method to confirm the final number of log clusters.
[0032] In one embodiment, the step of performing incremental training on the trained regression prediction model based on the new error log includes:
[0033] When a new error log is identified, preprocessing the new error log;
[0034] Calculate the distance between the preprocessed new error log and each log cluster, and select the log cluster corresponding to the minimum distance from the distances;
[0035] Compare the log cluster corresponding to the minimum distance with a preset threshold;
[0036] If the log cluster corresponding to the minimum distance is smaller than the preset threshold, the log cluster corresponding to the minimum distance is used as the log cluster with the closest distance;
[0037] If the log cluster corresponding to the minimum distance is greater than the preset threshold, the log cluster corresponding to the minimum distance is used as a new error log type;
[0038] The log cluster with the closest distance and the log cluster corresponding to the new error type are input as new parameters into the regression prediction model for multiple training iterations.
[0039] In addition, to achieve the above purpose, the present application also proposes a scheduling anomaly analysis model training device, the scheduling anomaly analysis model training device comprising:
[0040] A processing module, used for acquiring error logs, processing the error logs, and obtaining unlabeled log vectors;
[0041] A classification module, used for clustering and classifying the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors;
[0042] A training module, used for using the labeled log vectors for training a regression prediction model to obtain a trained regression prediction model;
[0043] The training module is also used to perform incremental training on the trained regression prediction model based on new error logs.
[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a scheduling anomaly analysis model training device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the scheduling anomaly analysis model training method as described above.
[0045] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the scheduling anomaly analysis model training method described above are implemented.
[0046] The embodiment of the present application provides a method, device, equipment and storage medium for training a scheduling anomaly analysis model, including: obtaining error logs, processing the error logs, and obtaining unlabeled log vectors; clustering and classifying the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors; using the labeled log vectors for training a regression prediction model to obtain a trained regression prediction model; and incrementally training the trained regression prediction model based on new error logs. The solution reduces the feature dimensions of the error logs and enhances the semantic relevance between words by performing preprocessing operations on the error logs; improves the level of business automation through clustering and classification, and uses the trained regression prediction model to analyze the error logs, providing developers with appropriate processing suggestions and accelerating operation and maintenance; at the same time, by incrementally learning the model, more newly emerging anomalies can be adapted to improve the real-time performance of the scheduling anomaly analysis model. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0048] In order to more clearly illustrate the embodiments of the present application 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0049] Figure 1 A flowchart of the first embodiment of the scheduling anomaly analysis model training method of the present application is provided;
[0050] Figure 2 This is a K-SSE comparison diagram involved in Example 1 of the scheduling anomaly analysis model training method of this application;
[0051] Figure 3A schematic diagram of the process of incremental training involved in Example 1 of the scheduling anomaly analysis model training method of the present application;
[0052] Figure 4 A flow chart of the second embodiment of the scheduling anomaly analysis model training method of the present application;
[0053] Figure 5 This is a schematic diagram of the error log preprocessing process involved in the embodiment of the scheduling anomaly analysis model training method of this application;
[0054] Figure 6 A schematic diagram of the automated scheduling anomaly analysis model architecture involved in an embodiment of the scheduling anomaly analysis model training method of the present application;
[0055] Figure 7 A schematic diagram of the module structure of a scheduling anomaly analysis model training device according to an embodiment of the present application;
[0056] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the scheduling anomaly analysis model training method in the embodiment of the present application.
[0057] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0058] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0059] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0060] The main solution of the embodiment of the present application is: pre-process the acquired error log to obtain an unlabeled log vector; use a clustering algorithm to cluster and classify the unlabeled log vector to obtain a labeled log vector; use the labeled log vector to train a regression prediction model to obtain a trained regression prediction model; based on the new error log, perform incremental training on the trained regression prediction model.
[0061] As the number of credit card operation scheduling platforms connected to the existing technology continues to increase, more and more problems arise, including:
[0062] 1. Problems are not handled in a timely manner: The existing scheduling anomaly analysis model lacks effective real-time monitoring and intelligent diagnosis functions. Therefore, when a job is abnormal, developers need to check the logs of the virtual machine or container to locate the problem. The problem cannot be located in time, resulting in delayed problem handling.
[0063] 2. Long operation and maintenance time: The existing scheduling anomaly analysis model is inadequate in problem identification and root cause analysis, and lacks the ability to effectively learn and summarize historical anomalies. As a result, operation and maintenance personnel need to spend time repeatedly handling the same problem, resulting in long operation and maintenance time.
[0064] 3. It is difficult to achieve incremental iterative learning after the existing log analysis algorithms are launched: Currently, most log analysis algorithms require retraining of the model to optimize performance, and this can easily affect the performance of the current model.
[0065] This application provides a solution. Based on the current operation and maintenance status of the team job scheduling platform, an automatic analysis scheme for job scheduling anomalies is established. A clustering algorithm is used to automatically classify the error logs generated during the job operation process, and then a regression test model is used to analyze specific problem solutions. Then, through incremental learning, the regression test model can automatically use the newly generated abnormal data for automatic iterative optimization online, adapt to more newly emerging abnormal data, and no offline training is required before going into production, thereby improving real-time performance.
[0066] It should be noted that the execution subject of this 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, etc. The following takes a personal computer as an example to illustrate this embodiment and the following embodiments.
[0067] Based on this, the embodiment of the present application provides a scheduling anomaly analysis model training method, referring to Figure 1 , Figure 1 This is a flow chart of the first embodiment of the scheduling anomaly analysis model training method of the present application.
[0068] In this embodiment, the scheduling anomaly analysis model training method includes steps S10 to S40:
[0069] Step S10, obtaining an error log, processing the error log, and obtaining an unlabeled log vector;
[0070] It should be noted that the scheduling exception handling solution provided in this embodiment is applied to the scheduling exception analysis model.
[0071] In addition, it should be noted that log vectors usually refer to the conversion of original log file contents into numerical vector forms that can be efficiently processed by computers in the fields of natural language processing (NLP) and data analysis.
[0072] In this embodiment, the error log needs to be processed first, including text processing and vectorization processing, and the text processing includes text feature processing, word segmentation and part-of-speech tagging to reduce the feature dimension of the error log and enhance the semantic relevance between words.
[0073] In a feasible implementation, step S10 may include steps S11 to S12:
[0074] Step S11, performing text processing on the error log to obtain an error log with correct part of speech;
[0075] It should be noted that, in this embodiment, text processing also includes operations such as text feature processing, word segmentation, and part-of-speech tagging.
[0076] In a feasible implementation, step S11 may include steps A11 to A13:
[0077] Step A11, eliminating noise information in the error log by using text features to obtain an error log processed by text features;
[0078] It should be noted that text features refer to quantitative attributes extracted from original error log text data that can represent certain aspects of the error log text data. These features are used for error log text data analysis.
[0079] Specifically, since the error log contains a lot of noise information such as punctuation, HTML (HyperText Markup Language), date, thread, etc., these noise information will affect the learning and prediction accuracy of the regression prediction model. Therefore, it is necessary to remove these noise information in the error log that interferes with the regression prediction model by adopting a series of preprocessing measures.
[0080] For example, deduplicate the error logs and remove identical error log entries to avoid over-emphasis on the same problem during statistical analysis; use regular expressions or specialized HTML parsing libraries to remove HTML tags in error logs to ensure that the regression prediction model only processes the actual text content rather than the display format; or use regular expressions to remove or replace unnecessary punctuation and special characters, such as commas, periods, brackets, etc., to reduce meaningless interference information; identify and extract date and time information in the logs and convert them into a unified format, or remove them directly as needed.
[0081] Step A12, performing word segmentation processing on the error log after the text feature processing to obtain the error log after the word segmentation processing;
[0082] The complete error log contains too much information and needs to be segmented. A word is the smallest unit that can express a complete meaning and does not contain too much information. Therefore, segmentation is very important for error log analysis.
[0083] It should be noted that the error log contains not only English but also a large amount of Chinese. The word segmentation methods of Chinese and English are completely different, so they need to be segmented separately.
[0084] In a feasible implementation, step A12 may include steps a11 to a13:
[0085] Step a11, segmenting the English error log by a byte pair encoding (BPE) algorithm to obtain an error log after segmentation;
[0086] The word segmentation process of English error logs is relatively simple, and the traditional BPF (Byte Pair Encoding) algorithm can be used. The BPF algorithm constructs a vocabulary by counting the frequency of adjacent character pairs in the text, thereby achieving word segmentation or encoding of the text.
[0087] Step a12, dividing the Chinese error log into longer phrases using a maximum matching algorithm;
[0088] It should be noted that the maximum matching algorithm is a commonly used text segmentation method, especially suitable for Chinese word segmentation.
[0089] Chinese error logs are also quite different from ordinary texts. They are often not complete sentences and do not even conform to traditional grammar, which brings a lot of inconvenience to word segmentation. Simply using lexical or semantic analysis cannot obtain the optimal word segmentation sequence.
[0090] In this embodiment, the maximum matching algorithm in lexical analysis is first used to divide the Chinese error log into longer phrases. The basic idea of the maximum matching algorithm is to find the longest word in the Chinese error log and match it one by one from left to right. If a character or word that cannot be matched is encountered, it will fall back and find the second longest word to match, and this cycle will be repeated until the entire error log is divided.
[0091] Step a13, using the Viterbi algorithm to analyze the longer phrase to obtain an optimal subsequence.
[0092] It should be noted that the Viterbi algorithm is a method for finding the most likely sequence path, and is particularly effective when dealing with sequence problems with hidden states, such as in a hidden Markov model (HMM).
[0093] Through the Viterbi algorithm, the most likely series of hidden states, that is, the error type sequence, can be determined, which represents the error development path or classification that best meets the model's expectations under a given log phrase.
[0094] Step A13, according to different part-of-speech meanings in the error log after the word segmentation processing, using a pre-trained hidden Markov model to perform part-of-speech tagging on the error log after the word segmentation processing, to obtain an error log with correct part-of-speech;
[0095] It should be noted that the hidden Markov model is a statistical model that is mainly used to describe a Markov process with unknown (or hidden) parameters.
[0096] In the error log, different parts of speech of the same word have different meanings, so it is necessary to mark the part of speech of each word. Whether in Chinese or English, the same words may have different meanings with different parts of speech. It is impossible to distinguish the part of speech of a single word, and it is necessary to combine the context of the word.
[0097] This embodiment uses a hidden Markov model to perform part-of-speech tagging. The hidden Markov model can make judgments based on the contextual content of words in the error log after word segmentation processing to obtain the most accurate part-of-speech.
[0098] Step S12, vectorizing the error log with correct part of speech by using a statistical method to obtain an unlabeled log vector.
[0099] Since the error log text cannot be directly used for the training of the regression prediction model, the error log with the correct part of speech needs to be vectorized. If the error log with the correct part of speech is directly converted into a vector, the dimension of the vector will be too high, and the key points of the error log cannot be highlighted, which will interfere with the training of the regression prediction model.
[0100] Therefore, this embodiment selects the TF-IDF algorithm for text vectorization of error logs. The TF-IDF (Term Frequency-Inverse Document Frequency) algorithm is a statistical method used for information retrieval and text mining, which aims to evaluate the importance of a word to a document or a specific document in a document set.
[0101] The TF-IDF algorithm is implemented through statistical methods. It can not only vectorize error log text with correct parts of speech, but also calculate the importance of a word to the text set.
[0102] Through this step, not only can the error log text with correct parts of speech be converted into vectors, but also the important features of the text can be highlighted, reducing the dimension of the feature space, which is conducive to improving the performance of the abnormal scheduling analysis model.
[0103] Step S20, clustering and classifying the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors;
[0104] After the error log is preprocessed, a set of unlabeled log vectors is obtained, but it cannot be directly used for the training of the regression prediction model. Each preprocessed error log needs to be labeled. Direct manual labeling will consume a lot of manpower. Therefore, the embodiment of the present application selects an unsupervised clustering algorithm to classify the unlabeled log vectors.
[0105] The clustering algorithm will run in the container for a long time and perform incremental training continuously. We cannot only focus on the efficiency of the regression prediction model. Therefore, we choose the K-means algorithm as the basis for error log classification. The K-means algorithm has a fast convergence speed and a good clustering effect. However, the biggest problem is that it has local convergence and cannot find the global optimum.
[0106] Therefore, in this embodiment, an improvement is made to the method of clustering and classifying unlabeled log vectors based on a clustering algorithm.
[0107] In a feasible implementation, step S20 may include steps S21 to S22:
[0108] Step S21, clustering and classifying the unlabeled log vectors by a clustering algorithm to obtain different log clusters;
[0109] It should be noted that clustering algorithm is an unsupervised learning method that aims to automatically group objects or instances in a data set into multiple categories, called clusters, so that the data objects within a cluster are similar to each other, while the data objects between different clusters are quite different.
[0110] In addition, it should be noted that log clusters refer to different groups or categories that are automatically formed according to the similarity and internal structure of log contents after processing unlabeled log vectors through clustering algorithms.
[0111] In the clustering process, the clustering algorithm analyzes the similarity between log vectors and gathers logs with high similarity into a cluster. Logs in different clusters have large differences in characteristics. Each cluster can be regarded as a collection of logs with common characteristics, which may be error type, occurrence time, affected module, or specific keywords in the log.
[0112] Step S22: Label each log cluster to obtain a labeled log vector.
[0113] After all unlabeled logs are divided into different log clusters, you only need to use the previous operation and maintenance experience of relevant technicians to manually label the logs of each cluster and give reasonable suggestions for the problems that appear in the logs.
[0114] Step S30, using the labeled log vector for training a regression prediction model to obtain a trained regression prediction model;
[0115] After preprocessing and clustering classification, a set of labeled log vectors are obtained, and the labeled log vectors are input into the regression prediction model as training parameters for model training.
[0116] Therefore, it is particularly important to choose a suitable regression prediction model. Currently, regression algorithms are roughly divided into three categories: traditional machine learning algorithms, neural networks, and deep learning. Log vectors are nonlinear data, so only neural networks and deep learning algorithms can be used. Deep learning algorithms cannot run at high performance on containers. Considering the comprehensive prediction accuracy and resource consumption, this embodiment selects the BP (Backpropagation Neural Network) neural network.
[0117] This solution uses a four-layer neural network, including an input layer, an output layer, and two network layers. The input layer is used to receive the labeled log vector, the network layer is used to process and judge the labeled log vector, and finally the output layer displays the prediction results. The activation function used in the training process of the regression prediction model is the sigmoid (S-type) function.
[0118] During the iterative training of the regression prediction model, the nonlinear mapping ability, adaptive ability and stability of the network are continuously improved through the activation function, and finally a BP neural network regression prediction model suitable for error log classification is obtained. For unknown types of error logs, they only need to be preprocessed and predicted, and the classification of the error log can be determined through the trained BP neural network regression prediction model, and reasonable suggestions can be provided to users, who can quickly locate the problem and deal with it in time according to the suggestions.
[0119] Step S40: performing incremental training on the trained regression prediction model based on the new error log.
[0120] Due to the large number of connected systems, a huge amount of logs are generated every day. Therefore, only selecting some representative error logs for training the regression prediction model may result in low recognition of some error logs and inability to identify new error log types. Because, in order to improve the performance of the regression prediction model, it is necessary to continuously iterate and update the regression prediction model to adapt to different types of error logs.
[0121] If the full amount of data (new error log data + old error log data) is used for retraining, not only will a lot of time be wasted on the regression prediction model training, but it may also affect the previous training results. Therefore, this embodiment also proposes a method for incremental training of a regression prediction model that has been trained. Only new error log data is used to train the regression prediction model that has been trained, thereby improving the performance of the regression prediction model while retaining the previous training results. A specific flowchart of incremental training is shown in FIG. Figure 3 shown.
[0122] In a feasible implementation, step S40 may include steps S41 to S46:
[0123] Step S41, when a new error log is identified, pre-processing the new error log;
[0124] When an application generates a new error log, the new error log is first preprocessed, including text feature processing, word segmentation, part-of-speech tagging, and text vectorization.
[0125] Step S42, calculating the distance between the pre-processed new error log and each log cluster, and taking out the log cluster corresponding to the minimum distance from the distances;
[0126] After preprocessing the new error log, it needs to be clustered and classified.
[0127] First, we can use the formula: (C i -x) 2 Calculate the distance from the new error log after preprocessing to each log cluster. i represents the center vector of the i-th log cluster, and x represents the new error log vector after preprocessing.
[0128] After calculating the distances from the new error log after preprocessing to each log cluster, take out the smallest value in the calculation result, that is, the log cluster corresponding to the minimum distance, recorded as min(C i -x) 2 .
[0129] Step S43, comparing the log cluster corresponding to the minimum distance with a preset threshold;
[0130] Then, the preset threshold is recorded as λ, and the minimum corresponding log cluster is compared with the preset threshold, which can be: min(C i -x) 2 <λ.
[0131] Step S44, if the log cluster corresponding to the minimum distance is smaller than the preset threshold, the log cluster corresponding to the minimum distance is used as the log cluster with the closest distance;
[0132] If the log cluster corresponding to the minimum distance is less than a preset threshold, this usually means that although the new error log may not completely match any existing cluster, it is still closely related. In this case, min(C i -x) 2 is the cluster to which the new error log belongs, that is, it is considered to be the nearest log cluster.
[0133] Step S45, if the log cluster corresponding to the minimum distance is greater than the preset threshold, the log cluster corresponding to the minimum distance is used as a new error log type;
[0134] If the log cluster corresponding to the minimum distance is greater than the preset threshold, this indicates that the new log is significantly different from all known log clusters and may represent a new, previously unobserved error log type. i -x) 2 Marks a new error log type.
[0135] Step S46: input the log cluster with the closest distance and the log cluster corresponding to the new error type as new parameters into the regression prediction model for multiple training iterations.
[0136] Finally, the new error logs after preprocessing and clustering classification are input into the regression prediction model for incremental training. The new error logs are received through the input layer of the regression prediction model. The first layer of the network adaptively generates prototype neurons to represent the new data. The second layer of the network calculates the distance between the new data and the original regression prediction model and uses it as a parameter for training again. After multiple training iterations, the performance and prediction accuracy of the regression prediction model will be improved.
[0137] The above steps use the incremental learning method. The regression prediction model can be continuously iterated and optimized online. When new error logs appear, there is no need to train and then put it into production. The regression prediction model will automatically train the adaptability errors, improve the efficiency of anomaly positioning, and ensure the smooth operation of platform tasks.
[0138] Through the above-mentioned embodiment method, the error log is obtained, and the error log is processed to obtain an unlabeled log vector; the unlabeled log vector is clustered and classified using a clustering algorithm to obtain a labeled log vector; the labeled log vector is used to train the regression prediction model to obtain a trained regression prediction model; based on the new error log, the trained regression prediction model is incrementally trained. This solution processes the error log to reduce the feature dimension of the error log and enhance the semantic relevance between words; improves the level of business automation through clustering and classification, and uses the regression prediction model to analyze the error log, providing developers with appropriate processing suggestions and accelerating operation and maintenance; at the same time, the regression prediction model is incrementally learned to adapt to new anomalies and improve the real-time performance of the scheduling anomaly analysis model.
[0139] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S21 also includes steps B11 to B15:
[0140] Step B11, using the unlabeled log vector as an initial log cluster;
[0141] All unlabeled log vectors are considered as a whole and an initial large cluster, which is the starting point of the clustering process.
[0142] Step B12, dividing the initial log cluster by binary division to obtain log sub-clusters;
[0143] In this embodiment, the idea of binary division is used to divide the initial log cluster into two log sub-clusters. This process is repeated continuously, and each time the current largest cluster is divided until the preset number of clusters is reached.
[0144] Step B13, calculating the sum of squares of errors corresponding to the log sub-clusters, and obtaining the sum of squares of errors with the maximum value;
[0145] It should be noted that the Error Sum of Squares (ESS) is a method to measure the difference within a cluster, which calculates the sum of the squares of the distances of all log vectors in each cluster to the center of the cluster (such as the cluster mean).
[0146] After each split, the sum of squared errors of all log subclusters is calculated, and the log subcluster with the largest value is found, which reflects the most uneven or scattered situation within the cluster.
[0147] Step B14, dividing the log sub-cluster corresponding to the error square with the largest value until the number of the log sub-clusters is equal to the preset number of clusters;
[0148] Based on the result of step B13, only the log sub-cluster that causes the maximum sum of squared errors (SSE) is subjected to binary segmentation. This process continues until the number of all log sub-clusters reaches the preset number of clusters (K value).
[0149] Step B15, comparing the preset number of clusters with the error sum of squares by the elbow method to determine the final number of log clusters.
[0150] It should be noted that the elbow method is a classic method for determining the optimal number of clusters. By plotting the number of clusters against the sum of squared errors of the corresponding population (or similar cost functions), the "elbow" position on the curve is found, that is, the point where the rate of decrease of the sum of squared errors slows down significantly. The number of clusters corresponding to this point is usually considered to be optimal.
[0151] In this embodiment, the final number of log clusters is determined by the elbow method. The experiment can be repeated by selecting different K values to obtain the following Figure 2 K-SSE comparison chart shown.
[0152] Depend on Figure 2 It can be seen that when K>30, the decrease of SSE value tends to be flat, and the final number of classifications of error logs can be further determined, that is, the final number of log clusters is 30.
[0153] Through the above-mentioned embodiment method, by clustering and classifying error logs, the error log processing flow of the scheduling anomaly analysis model can be optimized, the data processing efficiency and accuracy can be improved, and the error logs can be clustered into different clusters, which helps to better understand and analyze the error logs, thereby improving the readability and analyticity of the scheduling anomaly analysis model for error logs.
[0154] For example, in order to help understand the implementation process of the scheduling anomaly analysis model training method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 5 , Figure 5 A schematic diagram of the error log preprocessing process of a model training method is provided, specifically:
[0155] In this embodiment, when the abnormal scheduling analysis model receives the input of the error log, it will first use it as a training set for training the abnormal scheduling analysis model, and the error log will be pre-processed during the training process.
[0156] Specifically, first, the error log will be preprocessed, including text feature processing of the error log and removal of noise information in the error log.
[0157] Then, the Chinese error logs are segmented, including using forward matching segmentation, that is, the maximum matching algorithm to divide the text content of the error log into longer phrases, and then using the Viterbi algorithm to find the optimal subsequence in the longer phrases.
[0158] Next, the part-of-speech tagging is performed on each word in the optimal subsequence through the Hidden Markov Model (HMM) to obtain the part-of-speech that best matches the text content of the error log, that is, the most accurate part-of-speech.
[0159] Finally, the TF-IDF algorithm is used to statistically convert the error log text into a vector to highlight the important features of the error log and reduce the dimension of the feature space, which is conducive to improving the performance of the abnormal scheduling analysis model.
[0160] By processing the error logs, the feature dimensions of the error logs are reduced, the semantic relevance between words is enhanced, and the performance of the scheduling anomaly analysis model is optimized.
[0161] For example, to help understand the implementation process of the model training method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 6 , Figure 6 A schematic diagram of the automated scheduling anomaly analysis model architecture of a model training method is provided, specifically:
[0162] In this embodiment, the scheduling anomaly analysis model is mainly divided into three parts. First, the error log needs to be preprocessed, including text feature processing, word segmentation, part-of-speech tagging, and text vectorization representation to reduce the feature space dimension of the error log and enhance the semantic relevance between words; then the clustering algorithm is used to perform cluster analysis on the processed error log; finally, the classified error log is used to train the regression model to obtain a regression prediction model for error log analysis and prediction. After the regression prediction model is launched, incremental training will continue to be performed to improve the performance of the entire scheduling anomaly analysis model and continue to provide users with more accurate and useful exception handling suggestions.
[0163] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the model training method of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.
[0164] This application also provides a scheduling anomaly analysis model training device, please refer to Figure 7 , the scheduling anomaly analysis model training device comprises:
[0165] The processing module 10 is used to pre-process the acquired error log to obtain an unlabeled log vector;
[0166] A classification module 20, configured to cluster and classify the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors;
[0167] A training module 30 is used to use the labeled log vector to train a regression prediction model to obtain a trained regression prediction model;
[0168] The training module 30 is further used to perform incremental training on the trained regression prediction model based on new error logs.
[0169] The scheduling anomaly analysis model training device provided by the present application adopts the model training method in the above embodiment, which can solve the technical problem of how to improve the performance of the scheduling anomaly analysis model. Compared with the prior art, the beneficial effects of the scheduling anomaly analysis model training device provided by the present application are the same as the beneficial effects of the model training method provided by the above embodiment, and the other technical features in the scheduling anomaly analysis model training device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0170] The present application provides a scheduling anomaly analysis model training device, which includes: at least one processor; and a memory communicatively connected to 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 so that the at least one processor can execute the scheduling anomaly analysis model training method in the above-mentioned embodiment one.
[0171] Reference below Figure 8 , which shows a schematic diagram of the structure of a scheduling anomaly analysis model training device suitable for implementing the embodiment of the present application. The scheduling anomaly analysis model training device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 8 The scheduling anomaly analysis model training device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0172] like Figure 8As shown, the scheduling abnormality analysis model training device may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM: Read Only Memory) 1002 or the program loaded from the storage device 1003 to the random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the xxx device are also stored. The processing device 1001, ROM1002 and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the scheduling anomaly analysis model training device to communicate wirelessly or wired with other devices to exchange data. Although the figure shows a scheduling anomaly analysis model training device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or provided instead.
[0173] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0174] The scheduling anomaly analysis model training device provided by the present application adopts the scheduling anomaly analysis model training method in the above embodiment, which can solve the technical problem of how to improve the performance of the scheduling anomaly analysis model. Compared with the prior art, the beneficial effects of the scheduling anomaly analysis model training device provided by the present application are the same as the beneficial effects of the scheduling anomaly analysis model training method provided by the above embodiment, and the other technical features in the scheduling anomaly analysis model training device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0175] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0176] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0177] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the scheduling anomaly analysis model training method in the above-mentioned embodiment.
[0178] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more 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 this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0179] The above-mentioned computer-readable storage medium may be included in the scheduling anomaly analysis model training device; or it may exist independently without being assembled into the scheduling anomaly analysis model training device.
[0180] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the scheduling anomaly analysis model training device, the scheduling anomaly analysis model training device:
[0181] Preprocess the acquired error logs to obtain unlabeled log vectors;
[0182] Using a clustering algorithm to cluster and classify the unlabeled log vectors to obtain labeled log vectors;
[0183] Using the labeled log vector for training a regression prediction model to obtain a trained regression prediction model;
[0184] Based on the new error log, incremental training is performed on the trained regression prediction model.
[0185] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0186] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0187] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0188] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned scheduling anomaly analysis model training method, and can solve the technical problem of how to improve the performance of the scheduling anomaly analysis model. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the scheduling anomaly analysis model training method provided in the above-mentioned embodiment, and will not be repeated here.
[0189] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned scheduling anomaly analysis model training method when executed by a processor.
[0190] The computer program product provided in this application can solve the technical problem of how to improve the performance of the scheduling anomaly analysis model. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the scheduling anomaly analysis model training method provided in the above embodiment, which will not be repeated here.
[0191] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A scheduling anomaly analysis model training method, characterized in that: The method comprises: Obtain an error log, process the error log, and obtain an unlabeled log vector; Using a clustering algorithm to cluster and classify the unlabeled log vectors to obtain labeled log vectors; Using the labeled log vector for training a regression prediction model to obtain a trained regression prediction model; Based on the new error log, incremental training is performed on the trained regression prediction model.
2. The method according to claim 1, characterized in that The step of processing the error log to obtain an unlabeled log vector includes: Performing text processing on the error log to obtain an error log with correct part of speech; The error log with correct part of speech is vectorized by a statistical method to obtain an unlabeled log vector.
3. The method according to claim 2, characterized in that The step of performing text processing on the error log to obtain an error log with correct part of speech includes: Eliminate noise information in the error log by using text features to obtain an error log processed by text features; Performing word segmentation processing on the error log after text feature processing to obtain an error log after word segmentation processing; According to different part-of-speech meanings in the error log after word segmentation processing, the error log after word segmentation processing is tagged with parts of speech using a pre-trained hidden Markov model to obtain an error log with correct parts of speech.
4. The method according to claim 3, characterized in that The error log includes an English error log and a Chinese error log, and the step of performing word segmentation processing on the error log after text feature processing to obtain the error log after word segmentation processing includes: Segment the English error log using a byte pair encoding (BPE) algorithm to obtain an error log after segmentation; or Dividing the Chinese error log into longer phrases using a maximum matching algorithm; The Viterbi algorithm is used to analyze the longer phrase to obtain an optimal subsequence.
5. The method according to claim 1, characterized in that The step of clustering and classifying the unlabeled log vectors by using a clustering algorithm to obtain labeled log vectors includes: Clustering algorithms are used to classify unlabeled log vectors to obtain different log clusters. Label each log cluster to obtain a labeled log vector.
6. The method according to claim 5, characterized in that The step of clustering and classifying the unlabeled log vectors by a clustering algorithm to obtain different log clusters includes: Taking the unlabeled log vector as an initial log cluster; Splitting the initial log cluster by a binary method to obtain log sub-clusters; Calculate the sum of squares of errors corresponding to the log sub-clusters to obtain the sum of squares of errors with the largest value; The log sub-cluster corresponding to the error square with the largest value is divided until the number of the log sub-clusters is equal to the preset number of clusters; The preset number of clusters is compared with the error sum of squares by the elbow method to confirm the final number of log clusters.
7. The method according to claim 1, characterized in that The step of performing incremental training on the trained regression prediction model based on the new error log comprises: When a new error log is identified, preprocessing the new error log; Calculate the distance between the preprocessed new error log and each log cluster, and select the log cluster corresponding to the minimum distance from the distances; Compare the log cluster corresponding to the minimum distance with a preset threshold; If the log cluster corresponding to the minimum distance is smaller than the preset threshold, the log cluster corresponding to the minimum distance is used as the log cluster with the closest distance; If the log cluster corresponding to the minimum distance is greater than the preset threshold, the log cluster corresponding to the minimum distance is used as a new error log type; The log cluster with the closest distance and the log cluster corresponding to the new error type are input as new parameters into the regression prediction model for multiple training iterations.
8. A scheduling anomaly analysis model training device, characterized in that: The device comprises: A processing module, used for acquiring error logs, processing the error logs, and obtaining unlabeled log vectors; A classification module, used for clustering and classifying the unlabeled log vectors using a clustering algorithm to obtain labeled log vectors; A training module, used for using the labeled log vectors for training a regression prediction model to obtain a trained regression prediction model; The training module is also used to perform incremental training on the trained regression prediction model based on new error logs.
9. A scheduling anomaly analysis model training device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the model training method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the scheduling anomaly analysis model training method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Terminal abnormal behavior identification method based on machine learning algorithm
CN112488226A
Error log processing method and device, electronic equipment and readable storage medium
CN117874236A
Server fault diagnosis method, product, computer equipment and storage medium
CN118211170A
Intelligent updating and data processing for deployed machine learning models
US20220405619A1
Cited By
Non-analysis log anomaly detection method and device based on space-time semantic features
CN121210235A
