Service anomaly early warning method based on time sequence correlation analysis and related device
By constructing an anomaly early warning model and using time-series correlation analysis to identify potential correlation anomalies in the microservice architecture, the problem of the inability to detect service correlation risks in advance in existing technologies is solved, and early warning and stability improvement of the system are achieved.
Patent Information
- Application Number
- CN202611339844.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-01
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2046-09-01
AI Technical Summary
Existing monitoring solutions cannot detect hidden risks between services in advance in a microservice architecture, resulting in insufficient system stability and an inability to effectively monitor the health status of the entire system.
A service anomaly early warning method based on time-series correlation analysis is adopted. By constructing an anomaly early warning model, and using the anomaly increment change rate and correlation analysis coefficient, potential correlated anomalies are identified and warned. This includes the calculation of the anomaly increment change rate, the determination of the correlation strength coefficient, and the use of improved incremental mutual information.
It can provide early warnings in the early stages of anomalies, accurately identify potential related anomalies, prevent production and service failures, improve system stability, and reduce false alarm rates.
Smart Images

Figure CN122845384B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of operation and maintenance technology, specifically to a service anomaly early warning method and related equipment based on time-series correlation analysis. Background Technology
[0002] With the rapid development of internet technology, enterprise application system architecture is gradually evolving from monolithic applications to microservice architecture. A system can consist of dozens or even hundreds of services, with complex call dependencies between them. To ensure system stability, monitoring software and log collection systems can be used to monitor server resources and service operation status.
[0003] Currently, mainstream monitoring and alarm solutions in the industry typically employ static threshold detection. This approach presets thresholds for various operational metrics in the monitoring software (e.g., CPU utilization exceeding 80%, memory usage exceeding 90%). When real-time collected data exceeds these thresholds, the system automatically triggers an alarm and notifies operations and maintenance personnel. While this approach has proven effective in locating single service failures, its limitations become increasingly apparent as system complexity increases. Specifically, in real-world production environments, a single anomaly (e.g., slow database queries) often triggers other anomalies, even causing a chain reaction across multiple downstream services (e.g., order service timeouts, payment interface failures). Existing monitoring solutions cannot proactively detect these hidden, interconnected risks, effectively monitor the overall system health, and thus, system stability needs improvement. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention provide a service anomaly early warning method and related equipment based on time-series correlation analysis to solve the problems existing in the prior art.
[0005] According to one aspect of the present invention, a service anomaly early warning method based on time-series correlation analysis is provided, the method comprising: The system monitors the operational metrics of multiple services in a predetermined system and determines a set of multiple anomalies in the system, wherein each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric. Based on the set, the system's anomaly early warning model is constructed. The anomaly early warning model includes anomaly increment change rate and correlation analysis coefficient. The anomaly increment change rate represents the change trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in the pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. The anomaly warning model is incrementally updated every predetermined time interval t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The system performs correlation early warning based on the updated abnormal increment change rate and the correlation analysis coefficient.
[0006] In one alternative approach, constructing the anomaly warning model of the system based on the set includes: Based on the set, determine the number of times the same anomaly occurs within the predetermined time t, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
[0007] In one alternative approach, the rate of change of abnormal increments Calculated using the following formula: ,in, The number of times the anomaly occurs within the current predetermined time t. The number of times the anomaly occurred within the previous predetermined time t1; Temporal conditional probability Calculated using the following formula: ,in, S1 represents the first number of times, S1 represents the first anomaly, and T1 represents the time pre-emptive window. S2 is the second number of times, S2 is the second anomaly, and T2 is the time lag window; The correlation strength coefficient R is calculated using the following formula: ,in, The second abnormality The prior probability of anomaly; The improved incremental mutual information I is calculated using the following formula: , in, The abnormal increment rate of change of the first anomaly. The abnormal increment rate of change of the second anomaly. For the joint probability, Let be the marginal probability of the first anomaly. This represents the marginal probability of the second anomaly.
[0008] In one alternative approach, the incremental update of the anomaly warning model at predetermined time intervals t includes: A time sliding window is initialized, and historical data of multiple anomalies in the system are loaded based on the time sliding window. The anomaly increment change rate and correlation analysis coefficient are initialized according to the historical data to initialize the anomaly early warning model. The time length of the time sliding window is equal to the sum of the time lengths of multiple predetermined time t. The time sliding window is slid at predetermined time intervals t, and incremental updates are performed based on the initialized anomaly warning model to obtain the updated anomaly incremental change rate and the correlation analysis coefficient.
[0009] In an alternative approach, the updated correlation analysis coefficients include a correlation strength coefficient R for the next predetermined time t, obtained using the following formula: , R1 is the correlation strength coefficient within the previous predetermined time t, and R2 is the correlation strength coefficient within the current predetermined time t. These are the weighting coefficients.
[0010] In one optional approach, the step of providing early warning of correlations to the system based on the updated abnormal incremental change rate and the correlation analysis coefficient includes: Analyze whether the updated abnormal increment change rate is greater than or equal to the increment threshold, whether the updated correlation strength coefficient is greater than or equal to the preset strength threshold, and whether the updated effective correlation coefficient is greater than or equal to the preset correlation threshold; If the analysis results are both yes, then determine whether the first anomaly and the second anomaly belong to the same service. If the first exception and the second exception belong to the same service, then an alert is triggered for the second exception; If the first exception and the second exception belong to different services, an alert will be triggered for the service to which the second exception belongs.
[0011] According to another aspect of the present invention, a service anomaly early warning device based on time-series correlation analysis is provided, the device comprising: The monitoring module is used to monitor the operational metrics of multiple services in the predetermined system and determine the set of multiple anomalies in the system. Each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric. The construction module is used to construct the anomaly warning model of the system based on the set. The anomaly warning model includes the anomaly increment change rate and the correlation analysis coefficient. The anomaly increment change rate represents the change trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in the pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. The update module is used to incrementally update the anomaly warning model at predetermined time intervals t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The early warning module is used to provide early warnings for the system based on the updated abnormal increment change rate and the correlation analysis coefficient.
[0012] In one alternative approach, the construction module is specifically configured to determine the number of times the same anomaly occurs within the predetermined time t based on the set, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
[0013] According to another aspect of the present invention, a computer device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform the method described above.
[0014] According to another aspect of the present invention, a computer-readable storage medium is provided, the storage medium storing at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the method described above.
[0015] This invention monitors the operational metrics of multiple services in a predetermined system and identifies a set of various system anomalies. Based on this set, an anomaly warning model is constructed. The anomaly warning model includes an anomaly increment change rate and a correlation analysis coefficient, whereby the correlation analysis coefficient represents the correlation between any two anomalies. The anomaly warning model is updated incrementally every predetermined time interval t. Based on the updated anomaly increment change rate and correlation analysis coefficient, the system is given a correlation warning. This allows for accurate statistical analysis of potential related anomalies or service anomalies based on the daily single-node anomalies of the system, and provides warnings to prevent production service failures, effectively monitor the health status of the entire system, and improve system stability.
[0016] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0017] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings: Figure 1 A flowchart illustrating the service anomaly early warning method based on time-series correlation analysis provided in an embodiment of the present invention is shown. Figure 2 A schematic diagram of a monitored e-commerce transaction system is shown. Figure 3 This diagram illustrates the structure of a service anomaly early warning device based on time-series correlation analysis provided in an embodiment of the present invention. Figure 4 A schematic diagram of the structure of a computer device provided in an embodiment of the present invention is shown. Detailed Implementation
[0018] Exemplary embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein.
[0019] Figure 1 This diagram illustrates a service anomaly early warning method based on time-series correlation analysis provided by an embodiment of the present invention. The method is executed by a computer device and can monitor and issue early warnings for one or more predetermined systems, such as... Figure 1 As shown, the method includes the following steps: Step 10: Monitor the operational metrics of multiple services in the predetermined system and determine the set of multiple anomalies in the system, wherein each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric.
[0020] The reservation system can be a business system or other non-business systems; no limitation is made here. The system includes multiple services, each a self-contained business / program unit. For example, a business system may include order services, user services, database services, and gateway services. A service may include one or more types of exceptions. The system has a set S = {S1, S2, ..., Sn} of n types of exceptions, with each type corresponding to an exception's operational metric. This embodiment can monitor operational metrics in real time by installing and deploying monitoring software (Zabbix / Promethus), log collection (ELK), etc., on computer devices. An exception policy is configured; each operational metric reaching a certain threshold may affect the stable operation of the service. This embodiment sets reasonable thresholds for different operational metrics of different services during monitoring; exceeding the threshold is considered an exception.
[0021] like Figure 2 As shown, taking an e-commerce transaction system as an example, it can include product services, order services, and database services. Possible anomalies in the product service include: slow query interface (S1), CPU overload in the service (S2); possible anomalies in the order service include: order creation failure (S3), memory leak in the order service (S4); and possible anomalies in the database service include: connection pool exhaustion (S5), surge in slow queries (S6), and database server I / O blocking (S7). The corresponding operational metrics to be monitored for S1-S7 are interface response time, CPU utilization, HTTP error rate, memory utilization, number of active connections, number of slow query logs, and disk I / O wait time. Anomalies corresponding to S1-S7 are determined to have occurred when the interface response time exceeds a preset time, CPU utilization exceeds a preset utilization for a certain period, HTTP error rate exceeds a preset error rate, memory utilization exceeds a preset threshold, the number of active connections exceeds a preset number, the number of slow query logs exceeds a preset number, or the disk I / O wait time exceeds a preset time threshold.
[0022] Step 20: Construct an anomaly warning model for the system based on the set. The anomaly warning model includes an anomaly increment change rate and a correlation analysis coefficient. The anomaly increment change rate represents the changing trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in a pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services.
[0023] The anomaly early warning model is used to provide early warnings of system anomalies. By using the rate of change of anomaly increments instead of absolute frequency, early warnings can be achieved at the nascent stage of anomalies. The effective correlation coefficient measures the effectiveness of the correlation between pairwise anomalies, while the correlation strength coefficient measures the net correlation strength between pairwise anomalies after excluding interference. In this embodiment, the correlation strength coefficient is constructed based on the time sequence of anomaly occurrences to distinguish the causal order of anomaly occurrences.
[0024] Furthermore, constructing the anomaly early warning model of the system based on the set includes: Based on the set, determine the number of times the same anomaly occurs within the predetermined time t, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
[0025] Specifically, the number of occurrences of each type of anomaly is extracted within a predetermined time t, and the rate of change of anomaly increment is calculated based on the number of anomaly occurrences. Calculated using the following formula: ,in, The number of times the anomaly occurs within the current predetermined time t. The number of times the anomaly occurred within the previous predetermined time t1. and Statistical analysis is performed on the same anomaly.
[0026] For an abnormal Si with a preset incremental threshold, if its abnormal incremental change rate If the value is greater than or equal to the incremental threshold, the anomaly is marked as an incremental anomaly, and the corresponding incremental anomaly status is determined. Otherwise, the anomaly is marked as incrementally normal, corresponding to an incrementally normal state Xi=0. An anomaly in the incrementally abnormal state indicates that the frequency of the anomaly is increasing. The incremental threshold is determined by learning from historical anomaly data; for example, it can be taken as the 90th percentile of the historical incremental change rate.
[0027] A pre-defined time window T1 and a time lag window T2 are used to form a temporal logic of "Si anomaly within T1 leading to Sj anomaly within T2". The pre-defined time window T1 and the time lag window T2 can be continuous or discontinuous. Taking the first anomaly as a benchmark, the temporal conditional probability is calculated based on historical data: First, determine the first number of times the first anomaly occurs as an incremental anomaly within the time window T1; then, after the first anomaly occurs as an incremental anomaly within the time window T1, determine the second number of times the second anomaly occurs as an incremental anomaly within the time lag window T2, and determine the temporal conditional probability based on the first and second counts.
[0028] Among them, time-series conditional probability Calculated using the following formula: ,in, S1 represents the first number of times, and S1 represents the first anomaly. S1 represents the second number of times, and S2 represents the second anomaly.
[0029] This embodiment calculates the temporal conditional probabilities of the first anomaly and the second anomaly. The temporal conditional probabilities can be used to measure the likelihood that the first anomaly leads the second anomaly in time, and to determine whether there is a causal possibility between the first anomaly and the second anomaly.
[0030] The association strength coefficient R is determined based on the time-series conditional probability and is calculated using the following formula: ,in, The second abnormality The prior anomaly probability is the probability of the second anomaly occurring naturally without the influence of the first anomaly. The correlation strength coefficient characterizes the net contribution of the first anomaly to the second anomaly. By using the correlation strength coefficient, the natural fluctuations of the second anomaly are eliminated, and only the risk brought by the first anomaly to the second anomaly is retained, thereby eliminating the interference of naturally frequent anomalies.
[0031] The joint probability is the probability that both the first and second anomalies occur simultaneously as incremental anomalies. The marginal probability of the first anomaly is the probability that it occurs alone as an incremental anomaly. The marginal probability of the second anomaly is the probability that it occurs alone as an incremental anomaly. The improved incremental mutual information I is calculated using the following formula: , in, The abnormal increment rate of change of the first anomaly. The abnormal increment rate of change of the second anomaly. For the joint probability, Let be the marginal probability of the first anomaly. This represents the marginal probability of the second anomaly.
[0032] The improved incremental mutual information measure is used to assess the degree of information coupling between the first and second anomalies at the incremental change level. When the improved incremental mutual information exceeds a preset threshold, it indicates a non-random statistical dependency between the first and second anomalies, thus confirming the validity of their association. Using the improved incremental mutual information as the effective association coefficient can filter out spurious associations and ensure a strong dependency between anomalies. As can be seen from the formula, when the probability of both the first and second anomalies occurring simultaneously in incremental changes is greater than the product of their marginal probabilities, the effective association coefficient is large, indicating a higher degree of binding between the first and second anomalies, thus constituting a valid association.
[0033] Existing mutual information metrics, which measure correlation based on absolute values, are susceptible to periodic data fluctuations, sensitive to data peaks, have high false alarm rates, and cannot provide early warnings. The improved incremental mutual information in this embodiment focuses on the abrupt changes in abnormal signals through the rate of change of abnormal increments. It is sensitive to abrupt changes in abnormalities, thereby identifying potential associated risks in the early stages before an anomaly fully manifests. This approach is suitable for early warning of sudden system failures and the nascent stages of operational anomalies.
[0034] The anomaly early warning model in this embodiment first determines the rate of change of the anomaly's incremental change. Then, it calculates the temporal conditional probabilities of the first and second anomalies and obtains the correlation strength coefficient by subtracting the prior probability of the second anomaly to eliminate interference from natural fluctuations. It also calculates the joint probability and marginal probability of the first and second anomalies to obtain improved incremental mutual information. Thus, the correlation strength coefficient is used to determine the causal probability between the anomalies, and the improved incremental mutual information is used to confirm the effectiveness of their correlation.
[0035] Step 30: Incrementally update the anomaly warning model every predetermined time interval t, wherein the incremental update of the anomaly warning model includes updating the anomaly increment change rate and the correlation analysis coefficient.
[0036] The anomaly warning model is updated incrementally every predetermined time interval t, including: A time sliding window is initialized, and historical data of multiple anomalies in the system are loaded based on the time sliding window. The anomaly increment change rate and correlation analysis coefficient are initialized according to the historical data to initialize the anomaly early warning model. The time length of the time sliding window is equal to the sum of the time lengths of multiple predetermined time t. The time sliding window is slid at predetermined time intervals t, and incremental updates are performed based on the initialized anomaly warning model to obtain the updated anomaly incremental change rate and the correlation analysis coefficient.
[0037] For systems with multiple services, their architecture is likely to change dynamically, leading to dynamic changes in the correlation of anomalies, resulting in low accuracy. This embodiment adopts a time-sliding window to update the anomaly warning model. By limiting the time range of the calculated data, the performance bottleneck caused by calculating all historical data is avoided. At the same time, through a periodic incremental update mechanism, the rate of change of anomaly increments and the correlation analysis coefficients can be adaptively adjusted with changes in the system's operating status, thereby ensuring accurate warnings at the early stage of anomaly increments.
[0038] In the updated correlation analysis coefficients, the correlation strength coefficient is the correlation strength coefficient R within the next predetermined time t, which is obtained through the following formula: , R1 is the correlation strength coefficient within the previous predetermined time t, and R2 is the correlation strength coefficient within the current predetermined time t. This is the weighting coefficient, and its value can range from 0.5 to 0.8.
[0039] Through weighting coefficients The system weights and fuses the historical correlation strength coefficient with the correlation strength coefficient calculated in the current window, so that the correlation strength coefficient can both inherit the long-term stable anomaly propagation pattern and quickly respond to recent changes in system behavior; at the same time, it avoids the performance overhead caused by recalculating all historical data and meets the needs of real-time early warning.
[0040] Step 40: Based on the updated abnormal increment change rate and the correlation analysis coefficient, the system is given an early warning of correlation.
[0041] This embodiment uses updated abnormal increment change rate and correlation analysis coefficients for correlation early warning. When the updated abnormal increment change rate is greater than or equal to the increment threshold, the updated correlation strength coefficient is greater than or equal to a preset strength threshold, and the updated effective correlation coefficient is greater than or equal to a preset correlation threshold, an early warning is issued for the second anomaly. The increment threshold, strength threshold, and correlation threshold can be obtained through self-learning from historical data, adapting to the anomaly characteristics of different business systems.
[0042] If only the correlation strength coefficient is used for early warning, anomalies with random statistical dependencies (such as synchronous anomalies caused by common external factors) are easily misjudged as causally related anomalies, resulting in false alarms. Therefore, this embodiment further adds an improved incremental mutual information mechanism as an effective correlation verification mechanism based on the correlation strength coefficient. Starting from the degree of information coupling at the incremental change level, it confirms the validity of the correlation between anomalies. Only when all three conditions mentioned above are met can a genuine propagation relationship between anomalies be confirmed, thereby significantly reducing the false alarm rate.
[0043] In addition, all triggered early warning notifications can be sent to a pre-established early warning call center, which will then send notifications to the receiving terminals via SMS, email, or WeChat Work. All early warning notifications will be recorded and archived to provide data support for subsequent statistical analysis.
[0044] Furthermore, based on the updated abnormal increment change rate and the correlation analysis coefficient, the system performs correlation early warning, including: Analyze whether the updated abnormal increment change rate is greater than or equal to the increment threshold, whether the updated correlation strength coefficient is greater than or equal to the preset strength threshold, and whether the updated effective correlation coefficient is greater than or equal to the preset correlation threshold; If the analysis results are both yes, then determine whether the first anomaly and the second anomaly belong to the same service. If the first exception and the second exception belong to the same service, then an alert is triggered for the second exception; If the first exception and the second exception belong to different services, an alert will be triggered for the service to which the second exception belongs.
[0045] In this embodiment, if the first anomaly and the second anomaly belong to the same service, the anomaly evolution path within the service can be identified; if the first anomaly and the second anomaly do not belong to the same service, cross-service anomaly propagation can be identified. This embodiment, through correlation analysis, can identify both the anomaly evolution patterns within a service and predict the risk of cross-service anomaly propagation.
[0046] Compared with existing technologies, the embodiments of the present invention monitor the operational indicators of multiple services in a predetermined system and determine a set of multiple types of system anomalies. Based on the set, an anomaly early warning model of the system is constructed. The anomaly early warning model includes an anomaly increment change rate and a correlation analysis coefficient. The correlation analysis coefficient represents the correlation between any two anomalies. The anomaly early warning model is updated incrementally every predetermined time t. Based on the updated anomaly increment change rate and correlation analysis coefficient, the system is given a correlation early warning. It can accurately statistically analyze potential related anomalies or service anomalies based on the daily single-node anomalies of the system and give early warnings to prevent production service failures, effectively monitor the health status of the entire system, and improve system stability.
[0047] Figure 3 A schematic diagram of the service anomaly early warning device based on time-series correlation analysis according to an embodiment of the present invention is shown. Figure 3 As shown, the device includes: The monitoring module 301 is used to monitor the operating indicators of multiple services in the predetermined system and determine the set of multiple anomalies of the system, wherein each service includes one or more anomalies, and each anomaly corresponds to an abnormal operating indicator. The construction module 302 is used to construct the anomaly warning model of the system based on the set. The anomaly warning model includes anomaly increment change rate and correlation analysis coefficient. The anomaly increment change rate represents the change trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in the pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. Update module 303 is used to incrementally update the anomaly warning model at predetermined time intervals t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The early warning module 304 is used to provide early warning for the system based on the updated abnormal increment change rate and the correlation analysis coefficient.
[0048] In one alternative approach, the construction module is specifically configured to determine the number of times the same anomaly occurs within the predetermined time t based on the set, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
[0049] The embodiments of the service anomaly early warning device based on time-series correlation analysis are basically the same as the embodiments of the service anomaly early warning method based on time-series correlation analysis described above, and can be referred to the above embodiments.
[0050] Figure 4 The diagram shows a structural schematic of an embodiment of the computer device of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computer device.
[0051] like Figure 4 As shown, the computer device may include: a processor 402, a communications interface 404, a memory 406, and a communications bus 408.
[0052] The processor 402, communication interface 404, and memory 406 communicate with each other via communication bus 408. Communication interface 404 is used to communicate with other computer devices, such as clients or other server network elements. The processor 402 executes program 410, specifically performing the relevant steps described above in the computer device embodiment.
[0053] Specifically, program 410 may include program code, which includes computer-executable instructions.
[0054] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention. The computer device includes one or more processors, which may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.
[0055] Memory 406 is used to store program 410. Memory 406 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0056] Specifically, program 410 can be called by processor 402 to cause the computer device to perform the following operations: The system monitors the operational metrics of multiple services in a predetermined system and determines a set of multiple anomalies in the system, wherein each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric. Based on the set, the system's anomaly early warning model is constructed. The anomaly early warning model includes anomaly increment change rate and correlation analysis coefficient. The anomaly increment change rate represents the change trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in the pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. The anomaly warning model is incrementally updated every predetermined time interval t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The system performs correlation early warning based on the updated abnormal increment change rate and the correlation analysis coefficient.
[0057] In one alternative approach, constructing the anomaly warning model of the system based on the set includes: Based on the set, determine the number of times the same anomaly occurs within the predetermined time t, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
[0058] In one alternative approach, the rate of change of abnormal increments Calculated using the following formula: ,in, The number of times the anomaly occurs within the current predetermined time t. The number of times the anomaly occurred within the previous predetermined time t1; Temporal conditional probability Calculated using the following formula: ,in, S1 represents the first number of times, S1 represents the first anomaly, and T1 represents the time pre-emptive window. S2 is the second number of times, S2 is the second anomaly, and T2 is the time lag window; The correlation strength coefficient R is calculated using the following formula: ,in, The second abnormality The prior probability of anomaly; The improved incremental mutual information I is calculated using the following formula: , in, The abnormal increment rate of change of the first anomaly. The abnormal increment rate of change of the second anomaly. For the joint probability, Let be the marginal probability of the first anomaly. This represents the marginal probability of the second anomaly.
[0059] In one alternative approach, the incremental update of the anomaly warning model at predetermined time intervals t includes: A time sliding window is initialized, and historical data of multiple anomalies in the system are loaded based on the time sliding window. The anomaly increment change rate and correlation analysis coefficient are initialized according to the historical data to initialize the anomaly early warning model. The time length of the time sliding window is equal to the sum of the time lengths of multiple predetermined time t. The time sliding window is slid at predetermined time intervals t, and incremental updates are performed based on the initialized anomaly warning model to obtain the updated anomaly incremental change rate and the correlation analysis coefficient.
[0060] In an alternative approach, the updated correlation analysis coefficients include a correlation strength coefficient R for the next predetermined time t, obtained using the following formula: , R1 is the correlation strength coefficient within the previous predetermined time t, and R2 is the correlation strength coefficient within the current predetermined time t. These are the weighting coefficients.
[0061] In one optional approach, the step of providing early warning of correlations to the system based on the updated abnormal incremental change rate and the correlation analysis coefficient includes: Analyze whether the updated abnormal increment change rate is greater than or equal to the increment threshold, whether the updated correlation strength coefficient is greater than or equal to the preset strength threshold, and whether the updated effective correlation coefficient is greater than or equal to the preset correlation threshold; If the analysis results are both yes, then determine whether the first anomaly and the second anomaly belong to the same service. If the first exception and the second exception belong to the same service, then an alert is triggered for the second exception; If the first exception and the second exception belong to different services, an alert will be triggered for the service to which the second exception belongs.
[0062] This invention provides a computer-readable storage medium storing at least one executable instruction that, when executed on a computer device, causes the computer device to perform any of the above-described method embodiments.
[0063] This invention provides a computer program that can be invoked by a processor to cause a computer device to execute any of the above-described method embodiments.
[0064] This invention provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions that, when executed on a computer, cause the computer to perform any of the above-described method embodiments.
[0065] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, the embodiments of the present invention are not directed to any particular programming language. It should be understood that the content of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the invention.
[0066] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0067] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this disclosure should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim.
[0068] Those skilled in the art will understand that modules in the computer device of the embodiments can be adaptively modified and placed in one or more computer devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or computer device so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0069] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A service anomaly early warning method based on time-series correlation analysis, characterized in that, The method includes: The system monitors the operational metrics of multiple services in a predetermined system and determines a set of multiple anomalies in the system, wherein each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric. An anomaly warning model for the system is constructed based on the set. The anomaly warning model includes an anomaly increment change rate and a correlation analysis coefficient. The number of times the same anomaly occurs within a predetermined time t is determined based on the set. The anomaly increment change rate is determined based on the number of anomalies. The anomaly increment change rate represents the trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in a pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. The anomaly warning model is incrementally updated every predetermined time interval t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The system is given an early warning based on the updated abnormal incremental change rate and the correlation analysis coefficient. The anomaly early warning model of the system constructed based on the set includes: Based on the set, determine the number of times the same anomaly occurs within the predetermined time t, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
2. The method according to claim 1, characterized in that, Abnormal incremental change rate Calculated using the following formula: ,in, The number of times the anomaly occurs within the current predetermined time t. The number of times the anomaly occurred within the previous predetermined time t1; Temporal conditional probability Calculated using the following formula: ,in, S1 represents the first number of times, S1 represents the first anomaly, and T1 represents the time pre-emptive window. S2 is the second number of times, S2 is the second anomaly, and T2 is the time lag window; The correlation strength coefficient R is calculated using the following formula: ,in, The second abnormality The prior probability of anomaly; The improved incremental mutual information I is calculated using the following formula: ; in, The abnormal increment rate of change of the first anomaly. The abnormal increment rate of change of the second anomaly. For the joint probability, Let be the marginal probability of the first anomaly. This represents the marginal probability of the second anomaly.
3. The method according to claim 1, characterized in that, The incremental update of the anomaly warning model at predetermined time intervals t includes: A time sliding window is initialized, and historical data of multiple anomalies in the system are loaded based on the time sliding window. The anomaly increment change rate and correlation analysis coefficient are initialized according to the historical data to initialize the anomaly early warning model. The time length of the time sliding window is equal to the sum of the time lengths of multiple predetermined time t. The time sliding window is slid at predetermined time intervals t, and incremental updates are performed based on the initialized anomaly warning model to obtain the updated anomaly incremental change rate and the correlation analysis coefficient.
4. The method according to claim 3, characterized in that, In the updated correlation analysis coefficients, the correlation strength coefficient is the correlation strength coefficient R within the next predetermined time t, which is obtained through the following formula: , R1 is the correlation strength coefficient within the previous predetermined time t, and R2 is the correlation strength coefficient within the current predetermined time t. These are the weighting coefficients.
5. The method according to any one of claims 1-4, characterized in that, The method of providing early warning of correlations to the system based on the updated abnormal incremental change rate and the correlation analysis coefficient includes: Analyze whether the updated abnormal increment change rate is greater than or equal to the increment threshold, whether the updated correlation strength coefficient is greater than or equal to the preset strength threshold, and whether the updated effective correlation coefficient is greater than or equal to the preset correlation threshold; If the analysis results are both yes, then determine whether the first anomaly and the second anomaly belong to the same service. If the first exception and the second exception belong to the same service, then an alert is triggered for the second exception; If the first exception and the second exception belong to different services, an alert will be triggered for the service to which the second exception belongs.
6. A service anomaly early warning device based on time-series correlation analysis, characterized in that, The device includes: The monitoring module is used to monitor the operational metrics of multiple services in the predetermined system and determine the set of multiple anomalies in the system. Each service includes one or more anomalies, and each anomaly corresponds to an abnormal operational metric. A construction module is used to construct an anomaly warning model for the system based on the set. The anomaly warning model includes an anomaly increment change rate and a correlation analysis coefficient. The number of times the same anomaly occurs within a predetermined time t is determined based on the set. The anomaly increment change rate is determined based on the number of anomalies. The anomaly increment change rate represents the changing trend of the anomaly. The correlation analysis coefficient represents the correlation relationship between any two anomalies, including the effective correlation coefficient between the first anomaly and the second anomaly in a pair of anomalies, and the correlation strength coefficient obtained based on the occurrence sequence of the first anomaly and the second anomaly. The first anomaly and the second anomaly belong to the same service or to different services. The update module is used to incrementally update the anomaly warning model at predetermined time intervals t, wherein the incremental update of the anomaly warning model includes updating the anomaly incremental change rate and the correlation analysis coefficient; The early warning module is used to provide early warnings for the system based on the updated abnormal incremental change rate and the correlation analysis coefficient; The construction module is specifically used to determine the number of times the same anomaly occurs within the predetermined time t based on the set, determine the anomaly increment change rate based on the number of anomalies, and if the anomaly increment change rate is greater than or equal to a preset increment threshold, then the anomaly is an incremental anomaly. Based on the first anomaly, a time pre-window and a time lag window are preset to determine the first number of incremental anomalies that occur within the time pre-window. The time lengths of the time pre-window and the time lag window are both equal to the sum of the time lengths of multiple predetermined times t. The time lag window is used to represent the period during which the second anomaly affected by the first anomaly also experiences incremental anomalies after the first anomaly occurs within the time pre-window. After the first anomaly occurs within the time window preceding the time, the second number of times the second anomaly occurs within the time window following the time lag is determined. The temporal conditional probability is determined based on the first number and the second number. The correlation strength coefficient is determined based on the temporal conditional probability; Based on the rate of change of the abnormal increment of the first abnormality and the rate of change of the abnormal increment of the second abnormality, determine the joint probability of the first abnormality and the second abnormality. The marginal probability of the first anomaly is determined based on the rate of change of the anomaly increment of the first anomaly. The marginal probability of the second anomaly is determined based on the rate of change of the anomalous increment of the second anomaly. The improved incremental mutual information of the first anomaly and the second anomaly is determined based on the joint probability, the marginal probability of the first anomaly, and the marginal probability of the second anomaly, and the improved incremental mutual information is used as the effective correlation coefficient.
7. A computer device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction that causes the processor to perform the method as described in any one of claims 1-5.
8. A computer-readable storage medium, characterized in that, The storage medium stores at least one executable instruction, which, when executed on a computer device, causes the computer device to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Early warning method and system for operation and maintenance delivery abnormal event based on cloud platform
CN120811863A
Industrial basic training method and system based on large model, product and medium
CN121030408A
