Classification method of kpis sequence and monitoring method thereof
By measuring the similarity of KPI sequences and clustering them, representative subsequences are selected, solving the problems of insufficient computing power and excessive time consumption for large numbers and high-dimensional KPI sequences, and realizing fast and accurate monitoring system analysis.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-03-27
AI Technical Summary
Existing technologies struggle to effectively process large and high-dimensional KPI sequences, leading to insufficient computing power and excessive processing time.
By measuring the similarity of KPI sequences, clustering is performed, representative subsequences are selected, a subset of key KPI sequences is constructed, and subsequences are extracted by sliding window to extract representative subsequences for clustering. This is then combined with network topology for monitoring.
It enables fast and accurate large-scale KPI sequence similarity analysis and clustering, solving the problems of insufficient computing power and excessive processing time, and improving the sensitivity and accuracy of the monitoring system.
Smart Images

Figure CN117312974B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the control field, in particular to a KPIs sequence classification method and a monitoring method thereof. BACKGROUND
[0002] The KPIs sequence is explosively increasing with the continuous evolution of modern IT system architecture, due to the continuous expansion of business scale, the explosive growth of entity number, and the like, and needs to be continuously collected at fixed time intervals, so that the KPIs sequence itself has a high-dimensional characteristic.
[0003] It can be seen that the KPIs sequence has the dual characteristics of large quantity and high dimension. Meanwhile, the KPIs sequence can be regarded as a special type of time series data, and compared with ordinary time series data, the distribution of the KPIs sequence is often more difficult to capture, and is usually accompanied by abnormal values, noise points, and the like. Therefore, the traditional similarity analysis and clustering algorithm based on time series data is difficult to be directly deployed and implemented on the KPIs sequence, and the similarity measurement and clustering thereof face the challenge of excessively high space-time complexity, and problems such as insufficient computer computing power and excessively long time consumption occur.
[0004] Therefore, how to measure the similarity and cluster the KPIs sequence with large quantity and high dimension and difficult to capture, so as to effectively compress the KPIs sequence with large quantity and high dimension, and avoid problems such as insufficient computing power and excessively long time consumption, is a technical problem to be solved in the field. SUMMARY
[0005] To solve the above technical problems, the present application provides a KPIs sequence classification method, comprising:
[0006] S1: measuring the similarity of each KPIs sequence in the KPIs sequence set, and clustering and grouping each KPIs sequence in the KPIs sequence set according to the similarity measurement result;
[0007] S2: selecting a plurality of KPIs sequences in each group to construct a key KPIs sequence subset;
[0008] S3: for each KPIs sequence in the key KPIs sequence subset, a subsequence of a certain length is intercepted to form a candidate subsequence set;
[0009] S4: in the candidate subsequence set, X representative subsequences from different KPIs sequences are extracted and labeled as X categories; X is the number of representative subsequences;
[0010] S5: measure the similarity of each KPIs sequence in the KPIs sequence set with the representative sub-sequence, and according to the similarity measurement result, classify each KPIs sequence in the KPIs sequence set into one of the X categories, so as to perform new clustering grouping on each KPIs sequence in the KPIs sequence set.
[0011] Further, step S1 comprises:
[0012] S11: randomly select a certain KPIs sequence in the KPIs sequence set as a starting point;
[0013] S12: calculate the distance of other KPIs sequences from the starting point;
[0014] S13: if the distance is less than a set threshold, cluster into the same group;
[0015] S14: if the distance is greater than the set threshold, take the first KPIs sequence with a distance greater than the set threshold as a new starting point, exclude the KPIs sequences that have completed grouping from the KPIs sequence set, and return to step S12 for execution, so as to traverse all KPIs sequences in the KPIs sequence set and complete the clustering grouping.
[0016] Further, step S1 comprises:
[0017] S11': calculate the distance between each pair of KPIs sequences to obtain a distance feature.
[0018] S12': according to the distance feature, determine the KPIs sequence corresponding to the minimum distance of each KPIs sequence to obtain the nearest neighbor of each KPIs sequence;
[0019] S13': recursively link the values with the nearest neighbor relationship to form a similarity graph, and classify the KPIs sequences in the same similarity graph into one group and the KPIs sequences in different similarity graphs into different groups to complete the clustering grouping.
[0020] Further, step S13' comprises:
[0021] S131': represent the distance feature with a distance matrix, index the distance matrix through the nearest neighbor of each KPIs sequence, set the minimum position of the row or column in the distance matrix to 1 and other positions to 0 to obtain a distance feature matrix;
[0022] S132': according to the value of the distance feature matrix, traverse the nearest neighbor KPIs sequence of each KPIs sequence in turn, and judge whether the distance is greater than a set threshold, if yes, list it in the same similarity graph, and if not, list it in different similarity graphs.
[0023] Further, in step S3, each KPIs sequence in the KPIs sequence subset is divided into several candidate subsequences in a sliding window manner, and the candidate subsequences are aggregated to form a candidate subsequence set.
[0024] Further, step S4 includes:
[0025] S41: In the candidate subsequence set, the similarity of each candidate subsequence from the same KPIs sequence to the KPIs sequence is measured respectively;
[0026] S42: In the candidate subsequence from the same KPIs sequence, the candidate subsequence with the maximum similarity is retained, and the other candidate subsequences are discarded, to update the candidate subsequence set;
[0027] S43: In the updated candidate subsequence set, X subsequences are extracted as representative subsequences, and are labeled as X categories.
[0028] Further, it also includes: S6: If a new KPIs sequence is obtained, the similarity of the new KPIs sequence to each representative subsequence is calculated, and the minimum similarity value is determined; if the minimum similarity value is less than a set threshold, the new KPIs sequence is classified into the category to which the representative subsequence corresponding to the minimum similarity belongs; if the minimum similarity is not less than the set threshold, the new KPIs sequence is classified into a new category.
[0029] On the other hand, the application also provides a KPIs sequence-based monitoring method, which includes:
[0030] P1: Obtain the topology structure and KPIs sequence set of a system to be monitored;
[0031] P2: Use any of the above KPIs sequence classification methods to perform new clustering grouping on the KPIs sequences in the KPIs sequence set;
[0032] P3: Determine the current state of the system to be monitored according to the network topology structure and the new clustering grouping result.
[0033] Further, the system to be monitored is any one or more of a cloud native system based on a microservice architecture, a web service quality monitoring system, and a data center network management system.
[0034] The application relates to a KPIs sequence classification method and a monitoring method thereof, in order to realize rapid and accurate large-scale KPIs sequence similarity analysis and clustering, a coarse-fine combined clustering grouping framework is given: under the coarse-fine combined clustering grouping framework, large-scale KPIs sequence similarity analysis and clustering can be rapidly and accurately completed, the problems of KPIs sequence number explosion and high dimension are solved, and the problems of insufficient computing power and too long computing time in actual calculation are solved. BRIEF DESCRIPTION OF DRAWINGS
[0035] Figure 1 Flow chart of an embodiment of the classification method of KPIs sequences of the present application;
[0036] Figure 2 Structural schematic diagram of an embodiment of the system to be monitored of the present application. DETAILED DESCRIPTION
[0037] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0038] It should be noted that if the embodiments of the present application involve directional indications, such as up, down, left, right, front, back, etc., the directional indications are only used to explain the relative position relationship, movement condition, etc. between components in a certain posture, and if the certain posture changes, the directional indications also change accordingly. In addition, if the embodiments of the present application involve descriptions such as “first, second”, “P1, S1”, “step one, step two” and the like, such descriptions are only for description purposes, and cannot be understood as indicating or implying the relative importance of the indicated technical features or the number of indicated technical features or indicating the execution order of the method, etc. Those skilled in the art can understand that any change within the technical concept of the present application without deviating from the essential points of the present application should be included in the protection scope of the present application.
[0039] As shown in FIG. 1, Figure 1 The present application provides a classification method of KPIs sequences, which can be optionally but not limited to applied in the state monitoring of an IT system, and the following will be explained and described taking this as an example, but not limited thereto.
[0040] For example, when applied in the state monitoring of an IT system, the following can be optionally but not limited to:
[0041] P1, obtaining the topology structure of the system to be monitored and a KPIs sequence set S;
[0042] Specifically, the state monitoring of an IT system can be optionally but not limited to taken as an example, but not limited thereto. More specifically, the IT system can be optionally but not limited to: a cloud native system based on micro-service architecture, a web service quality monitoring system, a data center network management system, etc.
[0043] First, obtain the topology of the monitoring system, such as the IT system mentioned above. This includes identifying which monitoring objects the system comprises and the connections and interactions between them, thus obtaining its complete topology. For example, this might include hundreds or thousands of monitoring objects such as routers, servers, containers, and networks. More specifically, consider the connection and interaction between routers and servers. Figure 2 As shown, an example is given, illustrating which cloud servers routers 1-3 are connected to respectively.
[0044] Based on the obtained topology of the system to be monitored, several parameters can be selected for each monitored object, and KPI sequences for each parameter can be continuously monitored and collected to obtain the KPI sequence set of the monitored system. For example, taking a server as an example, parameters such as CPU, hard disk, disk, Ethernet, and Wi-Fi can be monitored 24 / 7 to obtain continuous monitoring curves, thereby collecting KPI sequences for each monitored object and each parameter, forming a KPI sequence set.
[0045] More specifically, this set of KPI sequences can be, but is not limited to, represented as: S = (s1, s2…s…) n (n) represents the number of KPI sequences, where n represents the monitoring results of each indicator parameter for each monitored object; then, each element s in the KPI sequence set S... i 1≤i≤n, which is a sequence of KPIs, which can be, but is not limited to, represented as: s i =(s i1 s i2 …s it ), where t represents the length of the KPI sequence. For example, taking 24 / 7 CPU monitoring as an example, if data is recorded every two hours, the length of this KPI sequence is: 7 * 24 / 2 = 8. It's worth noting that in practical applications, the length of each KPI sequence is very large. For example, if data is recorded every 5 seconds, then the length of this KPI sequence is: 7 * 24 * 60 * 60 / 5 = 1209609.
[0046] More specifically, the n KPI sequences S1 to S2 in the KPI sequence set S. n The KPIs may originate from the same monitored object or from different monitored objects; depending on the number of monitored objects, the KPI sequence set S can be further represented as: S = (S1, S2…S…) m ), where m is the number of monitored objects; then each element in the KPIs sequence set S, such as S j If 1 ≤ j ≤ m, then the KPIs sequence belongs to the same monitored object. Therefore, the KPIs sequence S of this monitored object... j, possibly only includes a KPIs sequence such as s1, which is a KPIs sequence of one parameter index of a monitoring object; possibly includes multiple KPIs sequences such as s1 to s5, which are KPIs sequences of five parameter indexes of a monitoring object. Specifically, KPIs sequences belonging to the same monitoring object in the KPIs sequence set S j , specifically includes how many KPIs sequences, which is optional but not limited to being determined by how many parameter indexes of the monitoring object need to be monitored. It is worth noting that for a monitoring system, the number n of KPIs sequences in the KPIs sequence set S=(s1, s2…s n ) is the same as the sum of the number of KPIs sequences of the m monitoring objects in S=(S1, S2…S m ), that is, equal to the total number of sequences in S1- to S m .
[0047] More specifically, taking the above to be monitored system, such as an IT system, as an example, when continuously monitoring each parameter index of each monitoring object (such as server equipment, router equipment, network, etc.), several KPIs sequence abnormalities may occur, and then how to perform clustering analysis on the KPIs sequence set is a problem to be solved by the present application. For example, during Double 11, when Alipay crashes, is it a server or router problem, or is it a container or network problem? Further, taking the server problem as an example, is it a CPU problem or a hard disk problem? Then clustering analysis needs to be performed according to the KPIs sequence of more than 100 million.
[0048] More popular examples, taking a person's temperature, blood routine, throat, nose, and stomach as monitoring objects; temperature with temperature value as one parameter index, blood routine with white blood cells and CRP as two parameter indexes, throat with whether red or not and whether sputum or not as two parameter indexes, nose with whether runny nose, clear runny nose, or pus runny nose as three parameter indexes, and stomach with diarrhea, stomach pain, and stomach bloating as three parameter indexes. Then continuously collecting the specific results of each parameter index of these monitoring objects is similar to obtaining a KPIs sequence set, and then how to extract the similarity of these KPIs sequence sets can reflect the linkage of individual physical symptoms. For example, if the linkage appears: temperature, throat, nose, blood routine abnormality, and stomach normality, the doctor can diagnose that the person has a cold, and then diagnose whether it is a common cold or a viral cold according to whether the temperature is low or high, whether the white blood cells are slightly high or doubled, and whether the CRP is abnormal; and then according to whether the throat is red or has sputum, whether the nose is clear or thick, the doctor can diagnose whether it is cold or hot, and then treat the symptoms accordingly; and then for example, if the linkage appears: temperature, throat, and nose are normal, but blood routine and stomach are abnormal, the doctor can diagnose that the person has enteritis, and then diagnose whether it is a chill, poisoning, or viral infection according to whether the person has diarrhea, whether the stomach hurts, and whether the white blood cells are slightly high or doubled.
[0049] Then, for the IT system we monitor, by continuously collecting each parameter index of each monitoring object, the KPIs sequence set is obtained, and the similarity of each KPIs sequence can also be analyzed to find the internal linkage relationship, so as to locate which monitoring object in the to-be-monitored system has an abnormality, which parameter index of the monitoring object has an abnormality, and how to deal with it according to the network topology structure. It is worth noting that the core of the application is in steps S1 coarse-grained clustering and S2 fine-grained clustering, how to analyze the clustering of the KPIs sequence of more than 100 million, so as to compress the number and dimension of the KPIs sequence, extract similar sequences in so many and high-dimensional KPIs sequences, and find the internal linkage relationship of the monitoring system. Further, in step S3, according to the network topology structure and the clustered KPIs sequence, the current state of the to-be-monitored system is identified and located, such as whether it is abnormal, which monitoring object is abnormal, and which parameter index of the abnormal monitoring object is abnormal.
[0050] It is worth noting that the above takes the IT system as the to-be-monitored object as an example, introduces the classification method of the KPIs sequence provided by the application, but the application range and the technical problems that can be solved are not limited to this. The core of the application is to provide a similarity measurement and clustering of key performance indicators, so as to classify the large-scale and high-dimensional KPIs sequence, to compress it, and to avoid technical problems such as insufficient computer calculation and long processing time in subsequent processing.
[0051] Specifically, the classification method of the KPIs sequence of the application comprises:
[0052] S1: measuring the similarity of each KPIs sequence in the KPIs sequence set, and clustering and grouping each KPIs sequence in the KPIs sequence set according to the similarity measurement result.
[0053] Specifically, the similarity measurement of each KPIs sequence can be selected but is not limited to distance measurement. More specifically, the distance measurement method can be selected but is not limited to Euclidean distance or other distance calculation methods.
[0054] For example, taking distance measurement as an example, step S1 can be selected but is not limited to comprising:
[0055] S11: randomly selecting a KPIs sequence as a starting point in the KPIs sequence set;
[0056] S12: calculating the distance between other KPIs sequences and the starting point;
[0057] S13: if the distance is less than a set threshold, clustering to the same group;
[0058] S14: If the distance is greater than the set threshold, take the first KPIs sequence with a distance greater than the set threshold as the new starting point, exclude the KPIs sequences that have been grouped in the KPIs sequence set, return to step S12 to execute, traverse all KPIs sequences in the KPIs sequence set, and complete the clustering grouping.
[0059] Steps S11-S14 above are a preferred embodiment for completing clustering grouping using distance metric as an example. In another embodiment, step S1 may optionally include, but is not limited to, the following:
[0060] S11': Calculate the distance between any two KPI sequences to obtain the distance feature.
[0061] Specifically, the distance feature can be represented by, but is not limited to, a distance matrix D; it can also be represented by a mapping such as a lookup table.
[0062] More specifically, the distance matrix D, based on the number of KPI sequences n in the KPI sequence set, is an n*n dimensional matrix, which can be, but is not limited to, represented as... :
[0063]
[0064] More specifically, using the distance matrix One element D in ab For example, s represents a s b — KPI sequence set S = (s1, s2…s n The distance between any two KPI sequences in ) is 1≤a, b≤n; it is optional but not limited to using the Euclidean distance calculation formula (2) to calculate the distance D between any two KPI sequences. ab Obviously s a s b Distance D between ab , and s b s a Distance D between ba They are equal.
[0065] (2)
[0066] More specifically, and optionally but not limited to examples like those in formula (3), assuming n=3, the distance between any two KPI sequences is D. 3*3 The value in the text. Of course, in practical applications, n should be on the order of tens of thousands or more, and cannot be equal to 3. This is just a simple example for explanation:
[0067] = (3)
[0068] S12': according to the distance feature, determine the KPIs sequence corresponding to the minimum distance of each KPIs sequence, and obtain the nearest neighbor of each KPIs sequence;
[0069] Specifically, also optionally but not limited to taking the distance matrix shown in formula (3) as an example, for the first KPIs sequence s1, the KPIs sequence corresponding to the minimum distance is the second KPIs sequence s2, for the second KPIs sequence s2, the KPIs sequence corresponding to the minimum distance is the third KPIs sequence s3, and for the third KPIs sequence s3, the KPIs sequence corresponding to the minimum distance is the second. It can be seen that for each KPIs sequence s a , assuming that the KPIs sequence corresponding to the minimum distance is s b , but for the KPIs sequence s b , the KPIs sequence corresponding to the minimum distance is not necessarily s a , that is, the nearest neighbor relationship between sequences is asymmetric. Who is the nearest neighbor corresponding to each KPIs sequence is determined according to the distance between it and other KPIs sequences, and the KPIs sequence with the minimum distance is selected as the nearest neighbor.
[0070] S13': recursively link the values with the nearest neighbor relationship to a similarity graph, classify the KPIs sequences in the same similarity graph into a group, and classify the KPIs sequences in different similarity graphs into different groups, complete clustering grouping, and perform classification marking.
[0071] More specifically, step S13' can optionally but not limited to include:
[0072] S131': taking the distance matrix as an example according to the distance feature, indexing the distance matrix through the nearest neighbor of each KPIs sequence, setting the minimum position of the row or column in the distance matrix to 1, and setting other positions to 0, to obtain a distance feature matrix;
[0073] S132': according to the value of the distance feature matrix, sequentially traverse the nearest neighbor KPIs sequence of each KPIs sequence, judge whether the distance is greater than a set threshold, if yes, list it in the same similarity graph, if not, list it in different similarity graphs.
[0074] S2: select several KPIs sequences in each group to construct a key KPIs sequence subset S'.
[0075] Specifically, the number of KPIs sequences selected in each group can be optionally but not limited to arbitrarily set according to monitoring sensitivity requirements, current computer computing power, time requirements, etc., and one KPIs sequence can be selected in each group, or multiple KPIs sequences can be selected in each group.
[0076] In this embodiment, steps S1, S2, give many preferred embodiments of coarse-grained clustering, which take distance metrics as an example, through steps S11-S14 or steps S11'-S13', each sequence S1 to S n in the original KPIs sequence set S=(s1, s2...s n is classified into different groups. Taking the above monitoring objects, parameter indicators as an example, the different groups can be selected but not limited to representing different monitoring objects or different parameter indicators of the same monitoring object, and grouping and classifying them is beneficial to the positioning analysis of the subsequent monitoring system.
[0077] More specifically, taking n=10 as an example, of course, in actual application, n should be in the order of tens of thousands or more, it is impossible to equal to 10, here is only a simple example for explanation and illustration, assuming that the original KPIs sequence set S=(s1, s2...s n , only includes 10 KPIs sequences s1 to s 10 , then after steps S11-S14 or S11'-S13', the classification and grouping of these 10 KPIs can be completed, assuming that it is divided into 3 groups, the first group includes KPIs sequences s1, s7, s8; the second group includes KPIs sequences s3, s4, s6; the third group includes KPIs sequences s2, s5, s9, s 10 . Then, step S2, can be selected but not limited to randomly selecting one or more KPIs sequences in each group as representative KPIs sequences to form a new key KPIs sequence subset S'=(s'1, s'2...s' k ), which can be selected but not limited to including: s1, s3, s4, s9, s 10 , to get more representative and fewer key KPIs sequences. That is, the number k of KPIs sequences in the key KPIs sequence subset S' should be less than the number n of KPIs sequences in the original KPIs sequence set S. It is worth noting that the above is only an example for explanation and illustration with n=10, in actual application, n should be in the order of hundreds of millions or more, and k should be much smaller than n, that is, after step S11-S14 or S11'-S13' classification, each group includes many similar KPIs sequences, step S2, selects a small number of representative sequences in each group to form a key KPIs sequence subset S', which can greatly reduce the number of original KPIs sequences, and get a key KPIs sequence subset S' which is both reduced in quantity and representative, and the accuracy of subsequent analysis will not be greatly affected.
[0078] S3: For each KPIs sequence in the key KPIs sequence subset S', a subsequence of a certain length is intercepted to form a candidate subsequence set sub;
[0079] Specifically, as defined in step P1, the KPI sequence set S = (s1, s2…s…) n Any KPI sequence in ) is denoted as s i =(s i1 s i2 …s it ), where t represents the length of the KPI sequence; similarly, any KPI sequence in the subset S' of the key KPI sequences can also be represented as s. i’ =(s i1’ s i2’ …s it’ ), t represents the length of the KPIs sequence.
[0080] Therefore, optional but not limited to, for each KPI sequence in the subset S' of key KPI sequences, a sliding window approach is used to truncate it by a length c, dividing each KPI sequence into ⌈t / c⌉ candidate subsequences. The mathematical symbol ⌈⌉ represents Ceiling, i.e., rounding up, to obtain the candidate subsequence set, the number of which is: k*⌈t / c⌉, i.e., sub = (sub1, ..., sub... k*⌈t / c⌉ ), where each element, such as sub1, has a length of c.
[0081] For example, a subset of key KPI sequences S' = (s'1, s'2, ..., s'...) k For example, if k=5 and a KPI sequence is 10 in length, and the truncation length is 3, then a KPI sequence of length 10 will be truncated into 4 subsequences; 5 key KPI sequences can yield a total of 5*4=20 candidate sequence subsets sub=(sub1, ..., sub... 20 ).
[0082] S4: In the candidate subsequence set, extract X representative subsequences from different KPIs sequences and label them as X categories; X is the number of representative subsequences.
[0083] Specifically, taking the example above: a subset of key KPI sequences S' = (s'1, s'2, ..., s'5), where a KPI sequence is 10 in length and a truncation length of 3 is used as an example, in step S3, 20 candidate sequences are extracted, forming a subset of candidate sequences sub = (sub1, ..., sub...). 20 Then, optional, but not limited to, sub1 to sub... 20 Extract X representative subsequences (e.g., 2) from different KPI sequences, labeled as Category 1 and Category 2. It's worth noting that when extracting X representative subsequences from different KPI sequences, the candidate subsequence set sub = (sub1, ..., sub...) 20In this case, there may be multiple candidate subsequences belonging to the same KPIs. For example, assuming sub1, sub2, and sub3 are subsequences extracted from the same KPIs, then step S4 may include, but is not limited to:
[0084] S41: In the candidate subsequence set, measure the similarity of each candidate subsequence from the same KPIs sequence with that KPIs sequence;
[0085] Specifically, as in the example above, suppose in step S3, 20 candidate sequences were extracted, forming a subset of candidate sequences sub = (sub1, ..., sub2). 20 ); while the sequences sub1-sub4, sub5-sub8, sub9-sub 12 ,sub 13 -sub 16 ,sub 17 -sub 20 The KPIs are s'1, s'2, ..., s'5, respectively, from the subset S' of the key KPIs sequence. Then, for candidate subsequences from the same KPIs sequence, such as candidate subsequences sub1-sub4 from s'1, it is possible, but not limited to, calculating the similarity between each candidate subsequence sub1-sub4 and the KPIs sequence s'1, such as calculating the distance between them to measure their similarity.
[0086] S42: Among the candidate subsequences from the same KPIs sequence, retain the candidate subsequence with the highest similarity and discard the other candidate subsequences to update the candidate subsequence set;
[0087] Specifically, among the candidate subsequences sub1-sub4 from the same key KPI sequence s'1, if sub1 is closest to the original KPI sequence, then candidate subsequence s1 is retained, while other candidate subsequences s2-s3 are discarded. Further selection is made sequentially in sub5-sub8, sub9-sub... 12 ,sub 13 -sub 16 ,sub 17 -sub 20 Four candidate subsequences are selected, let's say they are sub7, sub... 10 ,sub 13 ,sub 19 Therefore, the updated candidate subsequence set is obtained as follows: (sub1, sub7, sub...) 10 ,sub 13 ,sub 19 ).
[0088] S43: In the updated candidate sub-sequence set, extract X sub-sequences as representative sub-sequences and label them as X categories.
[0089] Specifically, in the updated candidate sub-sequence set of the above example: (sub1, sub7, sub 10 , sub 13 , sub 19 ), assuming X = 2, two sub-sequences can be randomly selected from sub1, sub7, sub 10 , sub 13 , sub 19 , such as sub7 and sub 10 , as representative sequences and labeled as category 1 and category 2.
[0090] In this embodiment, step S4 is given, how to extract the preferred embodiment of X representative sub-sequences from different KPIs sequences, steps S41-S43, first, in the candidate sub-sequences, according to the similarity measure, only the most similar candidate sub-sequences are retained from the candidate sub-sequences of the same KPIs sequence, and the other candidate sub-sequences are discarded, to update the candidate sub-sequence set; then in the updated candidate sub-sequence set, only the candidate sub-sequences from different KPIs sequences are included, and X sub-sequences are extracted from them, that is, the representative sub-sequences, and labeled as X categories.
[0091] S5: Measure the similarity of each KPIs sequence in the KPIs sequence set to the representative sub-sequence, and according to the similarity measure result, classify each KPIs sequence in the KPIs sequence set into one of the X categories, to perform new clustering grouping on each KPIs sequence in the KPIs sequence set;
[0092] Specifically, but not limited to, the distance measure is also used as an example of similarity measure, the distance between each KPIs sequence in the KPIs sequence set and each representative sub-sequence, such as sub7 and sub 10 in the above example, is calculated, the smaller the distance, the higher the similarity, each KPIs sequence in the KPIs sequence set is classified into the category represented by the representative sub-sequence with the highest similarity, for example, the similarity between each KPIs sequence and each representative sub-sequence sub7, sub 10 is judged, the similarity with sub7 is higher, and it is classified into category 1 corresponding to sub7, the similarity with sub 10 is higher, and it is classified into category 2 corresponding to sub 10 .
[0093] In this embodiment, the classification method of the KPIs sequence of the application is given, which gives a coarse and fine combined clustering grouping framework in order to realize fast and accurate large-scale KPIs sequence similarity analysis and clustering:
[0094] Step S1 and step S2 are coarse-grained clustering, this process quickly groups the input KPIs sequence set S, and removes a large number of redundant sequences by selecting a representative sequence in each group to form a key KPIs sequence subset S', to solve the problem of KPIs number explosion, thereby greatly compressing the data space of subsequent subsequence extraction, in addition, the coarse-grained clustering process also provides a preliminary classification label for the subsequent subsequence extraction algorithm, so as to improve the existing supervised subsequence extraction method, and more accurately obtain the subsequent subsequence;
[0095] Step S3-Step S5 are fine-grained clustering, this process takes the key KPIs sequence subset S' obtained by the coarse-grained clustering process as input, extracts a candidate subsequence set sub of the key KPIs sequence subset S', and then extracts a representative subsequence to obtain a representative subsequence set, to solve the problem of high dimension of KPIs sequence, and then the original KPIs sequence can be re-clustered by calculating the distance of the representative subsequence.
[0096] Under this coarse and fine combined clustering grouping framework, large-scale KPIs sequence similarity analysis and clustering can be quickly and accurately completed, the problems of KPIs sequence number explosion and high dimension are solved, and the problems of insufficient computing power and too long computing time in actual monitoring process are solved.
[0097] Preferably, the KPIs sequence classification method of the application can also be selected but not limited to including:
[0098] S6: If a new KPIs sequence is obtained, the similarity between the new KPIs sequence and each representative subsequence is calculated, and the minimum similarity value is determined; if the minimum similarity value is less than the set threshold, the new KPIs sequence is classified into the category to which the representative subsequence corresponding to the minimum similarity belongs; if the minimum similarity is not less than the set threshold, the new KPIs sequence is classified into a new category.
[0099] Specifically, in the process of continuously monitoring the to-be-monitored system, in addition to obtaining the existing historical data, new KPIs sequences can also be continuously obtained. For the new KPIs sequences, the distance between the new KPIs sequences and each representative sub-sequence can be optionally but not limited to calculated to determine which representative sub-sequence the new KPIs sequence is most similar to. For example, if the distance with the above-mentioned representative sub-sequence sub7 is the smallest, it is determined whether the distance is smaller than the set threshold value. If yes, the new KPIs sequence is classified into the category 1 corresponding to the sub7; if no, it is represented that the new KPIs sequence does not belong to any of the original labeled categories, i.e., does not belong to the existing category, and needs to be re-labeled.
[0100] More specifically, the similarity threshold value and the distance threshold value can be optionally but not limited to set by a person skilled in the art. More specifically, if the minimum similarity value, such as the minimum distance, is not smaller than the set threshold value and needs to be re-labeled, the new category can be optionally but not limited to labeled by an operation and maintenance engineer, and the new category is added to the original category to update the original representative sub-sequence set and the category. When the new KPIs sequence is obtained subsequently, the clustering grouping of step S6 is performed based on the updated representative sub-sequence set and the category.
[0101] On the other hand, the application gives a specific application example of the classification method of the KPIs sequence of the application, and also provides a monitoring method based on the KPIs sequence, which comprises:
[0102] P1: obtaining the topology structure of the to-be-monitored system and the KPIs sequence set; see the example above P1 for details.
[0103] P2: using the above-mentioned classification method of the KPIs sequence to perform new clustering grouping on the KPIs sequence in the KPIs sequence set; see steps S1-S5 for details.
[0104] P3: determining the current state of the to-be-monitored system according to the network topology structure and the new clustering grouping result.
[0105] Specifically, the clustering grouping result of the KPIs sequence is obtained according to the classification result in steps S1-S5. According to the category, it can be optionally but not limited to determined that the KPIs sequence of this category represents the current state of which parameter index of which monitoring object in the network topology structure, which is normal or abnormal. If it is abnormal, the specific monitoring object and parameter index can be located according to the classification to provide guidance for subsequent maintenance. It is worth noting that the above-mentioned example of classifying the KPIs sequence into category 1 and category 2 is only for simple explanation and description. In actual application, the category can be tens, hundreds or even thousands of data. It can cluster and group thousands of monitoring objects and their parameter indexes to locate each parameter index of each monitoring object.
[0106] The KPIs sequence-based monitoring method provided by the application first acquires the topology structure of the object to be monitored and the KPIs sequence set, then performs clustering grouping through step P2, i.e., the classification method of the application, and finally further improves the sensitivity and accuracy of the whole monitoring according to the network topology structure and the accurate and rapid KPIs clustering grouping result through step P3. It is worth noting that the application example is only for illustration and does not limit the application scope of the KPIs sequence classification method of the application.
[0107] In another aspect, the application further provides a computer storage medium storing executable program codes; the executable program codes are used for executing the KPIs sequence classification method or the KPIs sequence-based monitoring method.
[0108] In another aspect, the application further provides a terminal device including a memory and a processor; the memory stores program codes executable by the processor; the program codes are used for executing the KPIs sequence classification method or the KPIs sequence-based monitoring method.
[0109] For example, the program codes can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the application. The one or more modules / units can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the program codes in the terminal device.
[0110] The terminal device can be a desktop computer, a notebook computer, a palm computer, a cloud server and other computing devices. The terminal device can include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the terminal device can also include input / output devices, network access devices, buses and the like.
[0111] The processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0112] The memory can be an internal storage unit of the terminal device, such as a hard disk or a memory. The memory can also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Further, the memory can also include both an internal storage unit and an external storage device of the terminal device. The memory is used to store the program code and other programs and data required by the terminal device. The memory can also be used to temporarily store data that has been output or will be output.
[0113] The above-mentioned monitoring method based on the KPIs sequence, the computer storage medium and the terminal device based on the classification method of the KPIs sequence are created, and the technical effects and advantages will not be repeated here. The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of each technical feature in the above-mentioned embodiments are not described. However, as long as the combination of these technical features does not exist, it should be considered as the scope of the present application.
[0114] The above-mentioned embodiments only express several embodiments of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of the present application. Therefore, the scope of protection of the present application should be subject to the appended claims.
Claims
1. A method of classifying a sequence of KPIs, characterized in that, Comprise: S1: measure the similarity of each KPIs sequence in the KPIs sequence set, and according to the similarity measurement result, each KPIs sequence in the KPIs sequence set is clustered and grouped; S2: select several KPIs sequences in each group to construct a key KPIs sequence subset; S3: for each KPIs sequence in the key KPIs sequence subset, a certain length of subsequence is intercepted to form a candidate subsequence set; S4: in the candidate subsequence set, X representative subsequences from different KPIs sequences are extracted and labeled as X categories; X is the number of representative subsequences; S5: measure the similarity of each KPIs sequence in the KPIs sequence set and the representative subsequence, and according to the similarity measurement result, each KPIs sequence in the KPIs sequence set is classified into one of the X categories, so as to perform new clustering and grouping on each KPIs sequence in the KPIs sequence set; Step S1, comprising: S11: in the KPIs sequence set, randomly select a KPIs sequence as the starting point; S12: calculate the distance between other KPIs sequences and the starting point; S13: if the distance is less than the set threshold, cluster to the same group; S14: if the distance is greater than the set threshold, take the first KPIs sequence with a distance greater than the set threshold as a new starting point, exclude the KPIs sequences that have completed grouping in the KPIs sequence set, return to step S12 for execution, traverse all KPIs sequences in the KPIs sequence set, and complete the clustering and grouping; Or, step S1, comprising: S11': calculate the distance between each two KPIs sequences to obtain the distance feature; S12': according to the distance feature, determine the KPIs sequence corresponding to the minimum distance of each KPIs sequence to obtain the nearest neighbor of each KPIs sequence; S13': recursively link the values with the nearest neighbor relationship to form a similarity graph, and classify the KPIs sequences in the same similarity graph into a group and the KPIs sequences in different similarity graphs into different groups to complete the clustering and grouping.
2. The method of claim 1, wherein, Step S13', comprising: S131': express the distance feature as a distance matrix through the nearest neighbor of each KPIs sequence, index in the distance matrix, set the minimum position of the row or column in the distance matrix to 1, and set other positions to 0 to obtain the distance feature matrix; S132': according to the value of the distance feature matrix, traverse the nearest neighbor KPIs sequence of each KPIs sequence in turn, judge whether its distance is greater than the set threshold, if yes, list it in the same similarity graph, if not, list it in different similarity graphs.
3. The KPIs sequence classification method according to claim 1, characterized in that, In step S3, the sliding window method is used to divide each KPIs sequence in the key KPIs sequence subset into several candidate subsequences, which are collected to form a candidate subsequence set.
4. The method of claim 1, wherein, Step S4 comprises: S41: in the candidate subsequence set, measure the similarity of the candidate subsequences from the same KPIs sequence with the KPIs sequence respectively; S42: in the candidate subsequences from the same KPIs sequence, keep the candidate subsequence with the maximum similarity and discard the other candidate subsequences to update the candidate subsequence set; S43: In the updated candidate subsequence set, extract X subsequence as representative subsequence and mark as X categories.
5. The method of classifying a sequence of KPIs according to any one of claims 1-4, characterized in that, Also include: S6: If a new KPIs sequence is obtained, calculate the similarity between the new KPIs sequence and each representative subsequence, and determine the minimum similarity value; If the minimum similarity value is less than the set threshold, the new KPIs sequence is classified into the category to which the representative subsequence corresponding to the minimum similarity belongs; if the minimum similarity is not less than the set threshold, the new KPIs sequence is classified into a new category.
6. A method of monitoring based on a sequence of KPIs, characterized in that, Include: P1: Obtain the topology structure and KPIs sequence set of the system to be monitored; P2: Use the KPIs sequence classification method of any one of claims 1-5 to perform new clustering grouping on the KPIs sequence in the KPIs sequence set; P3: Determine the current state of the system to be monitored according to the network topology structure and the new clustering grouping result.
7. The method of claim 6, wherein, The system to be monitored is any one or more of: a cloud native system based on microservice architecture, a web service quality monitoring system, and a data center network management system.
Citation Information
Patent Citations
Time series data classification method based on multi-level shape
CN111814897A
Abnormal reason obtaining method based on fine-grained events and KPIs analysis
CN112363891A