Event causality identification method and apparatus, computer device, and storage medium
By perceiving the system topology structure and combining event timing information to identify causal relationships, the problems of low efficiency and poor application of event causal relationship recognition in the prior art are solved, and efficient causal relationship recognition in large-scale event timing data are achieved.
Patent Information
- Application Number
- PCT/CN2024/078551
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-05-11
- Filing Date
- 2024-02-26
- Publication Date
- 2024-11-14
AI Technical Summary
Existing event causality recognition algorithms are inefficient in large-scale event timing data and cannot effectively utilize topological structure information, especially in the absence of system topological information.
By obtaining event timing information, perceiving the system topology structure, generating a system topology matrix, and combining event timing information to identify causal relationships, generating a causal relationship matrix. This matrix is used to indicate the causal relationship between events, solving the problems of low efficiency and poor application.
It improves the efficiency and accuracy of event causal relationship recognition, and is suitable for diverse practical application scenarios, especially when topological structure information cannot be provided, which significantly improves the application of the algorithm.
Smart Images

Figure CN2024078551_14112024_PF_FP_ABST
Abstract
Description
Event causal relationship identification method, device, computer equipment and storage medium
[0001] Cross-references
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on May 11, 2023, with application number 202310526502.7 and titled “Event Causality Identification Method, Device, Computer Equipment and Storage Medium”. The entire contents of that application are incorporated herein by reference. Technical Field
[0003] The embodiments of the present application relate to the field of big data knowledge mining, and in particular to a method, apparatus, computer equipment, and storage medium for identifying event causal relationships. Background Art
[0004] In the field of big data knowledge mining technology in artificial intelligence, there are many methods for using event time series data to discover causal knowledge between events, such as supervised learning methods, unsupervised mining algorithms, and Hawkes process model algorithms (such as ttpm causal mining algorithms, PC algorithms, graph neural network model algorithms, etc.).
[0005] However, the above algorithm models have certain limitations in practical applications. For example, the basic principle of the TTPM causal mining algorithm is to construct all possible causal hypotheses for the event set in the current dataset, and then verify the credibility of each causal hypothesis in the currently collected data in turn, and obtain the causal hypothesis with the greatest credibility as the causal knowledge output of the event set. However, this algorithm is time-inefficient and only applicable to scenarios with small event dimensions. In scenarios with large event dimensions, the mining efficiency is unacceptable. Furthermore, without system topology information, the algorithm cannot exploit the topological information hidden in the data itself and does not fully utilize event information. The PC algorithm's basic principle is to construct a fully connected graph of the current event set to initialize a causal hypothesis, assuming that all events are causally related. Then, using the conditional independence assumption, the credibility of each edge in the causal hypothesis is verified using collected data to determine whether the edge should be retained or removed. After traversing all edges, the retained causal hypothesis is output as causal knowledge. However, this algorithm is suitable for scenarios where the data exhibits collinearity and follows a Gaussian distribution. However, in real-world scenarios, it is difficult to guarantee the distribution and correlation of data. Therefore, it performs poorly in real-world applications and also suffers from low mining efficiency. Graph neural network-based algorithms for identifying causal relationships between event entities in text require supervised model training and require a large number of labeled samples. However, in real-world scenarios, labeled causal examples are difficult or even impossible to provide. Therefore, a more adaptable approach is needed to accommodate diverse real-world scenarios.
[0006] Summary of the Invention
[0007] The present invention provides a method, apparatus, device, and storage medium for identifying event causal relationships. These methods can fully utilize the collected information corresponding to each event, addressing the need to obtain causal relationships between events from a large amount of event time series information while also resolving the problem of poor practical applicability of algorithms in certain scenarios due to the lack of topological structure information. The technical solution is as follows:
[0008] On the one hand, a method for identifying event causal relationships is provided, the method comprising: obtaining event timing information of each event, the event timing information being used to represent event attributes and time attributes of the event; perceiving the system topology structure between nodes based on the event timing information of each event, and obtaining a system topology matrix, the system topology matrix being used to characterize the adjacency between nodes where events occur; identifying the causal relationship between events based on the system topology matrix and the event timing information of each event, and obtaining a causal relationship matrix, the causal relationship matrix being used to indicate the causal relationship between each event.
[0009] On the other hand, an event causal relationship identification device is provided, which includes: an information acquisition module, used to obtain event timing information of each event, and the event timing information is used to represent the event attributes of the event and the time attributes of the event; a topology structure perception module, used to perceive the system topology structure between nodes based on the event timing information of each event, and obtain a system topology matrix, and the system topology matrix is used to characterize the adjacency between nodes where the event occurs; a causal relationship identification module, used to identify the causal relationship between events based on the system topology matrix and the event timing information of each event, and obtain a causal relationship matrix, and the causal relationship matrix is used to indicate the causal relationship between each event.
[0010] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the above-mentioned event causal relationship identification method.
[0011] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The computer program is loaded and executed by a processor to implement the above-mentioned event causal relationship identification method.
[0012] On the other hand, a computer program product is provided, which includes at least one computer program, and the computer program is loaded and executed by a processor to implement the event causal relationship identification method provided in the various optional implementations above.
[0013] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0015] FIG1 is a schematic diagram showing a causal hypothesis relationship provided by an exemplary embodiment of the present application;
[0016] FIG2 is a schematic diagram showing a system topology structure provided by an exemplary embodiment of the present application;
[0017] FIG3 shows a schematic diagram of an event causal relationship identification system provided by an exemplary embodiment of the present application;
[0018] FIG4 shows a flow chart of a method for identifying event causal relationships provided by an exemplary embodiment of the present application;
[0019] FIG5 shows a flow chart of a method for identifying event causal relationships provided by an exemplary embodiment of the present application;
[0020] FIG6 is a schematic diagram showing the degree of adjacency between nodes provided by an exemplary embodiment of the present application;
[0021] FIG7 is a schematic diagram showing a matrix value accumulation process provided by an exemplary embodiment of the present application;
[0022] FIG8 is a schematic diagram showing a matrix value accumulation process provided by an exemplary embodiment of the present application;
[0023] FIG9 is a schematic diagram showing a process of generating a system topology matrix according to an exemplary embodiment of the present application;
[0024] FIG10 is a schematic diagram showing the degree of causal relationship between events provided by an exemplary embodiment of the present application;
[0025] FIG11 is a schematic diagram showing a matrix value accumulation process provided by an exemplary embodiment of the present application;
[0026] FIG12 is a schematic diagram showing a matrix value accumulation process provided by an exemplary embodiment of the present application;
[0027] FIG13 is a schematic diagram showing a process of generating a causal perception ratio matrix according to an exemplary embodiment of the present application;
[0028] FIG14 shows a schematic diagram of a generation process of a causal relationship matrix according to an exemplary embodiment of the present application;
[0029] FIG15 shows a schematic diagram of a first system topology diagram provided by an exemplary embodiment of the present application;
[0030] FIG16 shows a schematic diagram of a second system topology directed graph provided by an exemplary embodiment of the present application;
[0031] FIG17 shows a schematic diagram of an event causal relationship identification system provided by an exemplary embodiment of the present application;
[0032] FIG18 is a schematic diagram showing a comparison of the time consumption of event causal relationship identification based on the event causal relationship identification system provided by the present application and the ttpm algorithm;
[0033] FIG19 shows a schematic diagram of a system event topology graph G2 provided by an exemplary embodiment of the present application;
[0034] FIG20 shows a block diagram of an event causal relationship identification device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0035] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
[0036] First, the terms used in this application are explained:
[0037] 1) Causal hypothesis:
[0038] The causal hypothesis is used to represent the causal relationship of events (alarms), which is a directed acyclic graph. The arrow represents the causal direction relationship, which is usually represented by an adjacency matrix. The rows represent the cause events and the columns represent the effect events. The corresponding position value of the event with a causal relationship is set to 1, otherwise it is set to 0; Figure 1 shows a schematic diagram of the causal hypothesis relationship provided by an exemplary embodiment of the present application. Assume that there are 3 types of events (alarms) in the current scenario: A, B, and C, and their causal relationship is A causes B, and B causes C, as shown in part (a) of Figure 1. The arrows in the directed acyclic graph point from A to B and from B to C, as shown in part (b) of Figure 1. In the adjacency matrix corresponding to the directed acyclic graph, setting 1 in row A and column B indicates that there is a causal relationship between A and B, and A is the cause event and B is the effect event. Setting 1 in row B and column C indicates that there is a causal relationship between B and C, and B is the cause event and C is the effect event.
[0039] 2) System topology:
[0040] The system topology represents the directed relationships such as data flow and service calls between sub-services or components within the system. It is usually represented by a directed graph. The constituent unit is a node set, which consists of two nodes and connecting edges. The node represents the component or sub-service, and the directed edge represents the data flow relationship or service call relationship. The specific mathematical representation is represented by an adjacency matrix, with the rows as the source node and the columns as the target node. If there is a service call or data flow relationship between the nodes, the corresponding matrix value is set to 1, otherwise it is set to 0. Figure 2 shows a system provided by an exemplary embodiment of the present application. A schematic diagram of the topological structure is shown in Figure 2. Assume that there are three components X, Y, and Z in the current system, and there is a data flow relationship between them, with X flowing to Y and Y flowing to Z, as shown in part (a) of Figure 2. The arrows in the directed graph point from X to Y and from Y to Z, as shown in part (b) of Figure 2. In the adjacency matrix corresponding to the directed graph, setting 1 in row X and column Y indicates that there is a data flow relationship between component X and component Y, and the data flows from component X to component Y. Setting 1 in row Y and column Z indicates that there is a data flow relationship between component Y and component Z, and the data flows from component Y to component Z.
[0041] FIG3 shows a schematic diagram of an event causal relationship identification system provided by an exemplary embodiment of the present application. As shown in FIG3 , the causal relationship identification system may include a terminal 310 and a server 320 .
[0042] The terminal 310 can be an electronic device such as a mobile phone, desktop computer, tablet computer, game console, e-book reader, multimedia player, laptop computer, etc. The terminal 310 has a display function and an interactive function. In the embodiment of the present application, a user can upload an event sequence data packet to the server 320 through the web application interface displayed on the terminal 310, so that the server can perform event causal relationship identification based on the data in the event sequence data packet.
[0043] The server 320 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. In an embodiment of the present application, the server 320 receives an event sequence data packet uploaded by the terminal 110, and after performing event causal relationship recognition based on the data in the event sequence data packet, returns the recognition result to the terminal 310, wherein the recognition result may include event causal knowledge. In the embodiment of the present application, the event causal knowledge is represented by a causal relationship matrix. Furthermore, the recognition result may also include an event root cause location result, which may be represented by a root cause voting matrix. The process of the server performing event causal relationship recognition based on the data in the event sequence data packet can refer to the following embodiment.
[0044] The terminal and the server are connected via a communication network. In one embodiment, the communication network is a wired network or a wireless network.
[0045] In one embodiment, the above-mentioned wireless network or wired network uses standard communication technologies and / or protocols. The network is typically the Internet, but it can also be any network, including but not limited to a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or any combination of a virtual private network. In some embodiments, technologies and / or formats including Hypertext Markup Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged over the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) can also be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies can also be used to replace or supplement the above-mentioned data communication technologies. This application is not limited here.
[0046] FIG4 shows a flow chart of a method for identifying event causal relationships provided by an exemplary embodiment of the present application. The method can be executed by a computer device, which can be implemented as a server as shown in FIG3. As shown in FIG4, the method for identifying event causal relationships can include the following steps:
[0047] Step 410: Acquire event sequence information of each event. The event sequence information is used to represent event attributes and time attributes of the event.
[0048] In an embodiment of the present application, the computer device can obtain the event timing information of each event from the event sequence data packet received from the terminal; or, the computer device can obtain the event timing information of each event from the event sequence database; the way in which the computer device obtains the event timing information of each event can be determined based on the actual business scenario, and the present application does not limit this.
[0049] The event time sequence information of each event can be stored in, but is not limited to, a CSV file format, where each row corresponds to the event time sequence information of one event.
[0050] In the embodiment of the present application, the event attributes include the event type and the node where the event occurs, and the time attributes include the occurrence time of the event and the end time of the event.
[0051] In one embodiment, the time attribute may further include a duration, which is the difference between the end time and the occurrence time.
[0052] In an embodiment of the present application, the event type of an event can be represented in the form of a code, the time can be represented in the form of a timestamp, and the node where the event occurs can be represented by a node identifier (ID). Table 1 shows a data table of event timing information of various events provided by an exemplary embodiment of the present application. As shown in Table 1, the first event is an event with an event type code of 10, the fourth event is an event with an event type code of 1, and so on. The occurrence time and the end time are represented in the form of a timestamp, and the duration is calculated based on the occurrence time and the end time in the timestamp format; wherein, the computer device can convert the representation of the occurrence time and the end time from the time format to the timestamp format during the data processing stage.
[0053] Table 1
[0054] Step 420 , based on the event sequence information of each event, the system topology structure between the nodes is perceived to obtain a system topology matrix, which is used to represent the adjacency between the nodes where the event occurs.
[0055] A first basic assumption is provided in an embodiment of the present application: in a topological system, after an event occurs at a node, the event will propagate along the system topology structure, causing corresponding events to occur at its adjacent nodes.
[0056] Based on the event timing information of each event, the node corresponding to each event can be obtained. As shown in Table 1, the node where the first to third events occurred is node 13, the node where the fourth and fifth events occurred is node 16, and so on. Therefore, the total number of nodes involved in each event is 4, namely node 13, node 16, node 4, and node 7. Based on the above basic assumptions, the system topology structure between nodes is perceived based on the event timing information. The adjacency between the above four nodes can be obtained, and the adjacency relationship between the above nodes can be represented by the system topology matrix.
[0057] Step 430 : Identify the causal relationship between events based on the system topology matrix and the event sequence information of each event, and obtain a causal relationship matrix. The causal relationship matrix is used to indicate the causal relationship between each event.
[0058] The embodiments of this application provide a second basic assumption: when an event occurs at a node in a topological system, the event propagates along the system topology, causing corresponding events to occur at adjacent nodes. If a set of events occurs in a certain order in temporal and topological space, then the set of events is considered to have a causal relationship. The event set is a set of two events that occurred adjacently in time.
[0059] Based on the above second basic assumption, when it is determined that the two nodes corresponding to two events in the event set indicated by the system topology matrix are adjacent, it can be determined whether the two events are correlated in the time space based on the occurrence time and end time in the event timing information of the two events. If correlated, it means that there is a causal relationship between the two events; if not correlated, it means that there is no causal relationship between the two events, and a causal relationship matrix is used to indicate whether there is a causal relationship between the two events in the event set; wherein, the correlation between two events in the time space may mean that there is a temporal overlap between the two events during the ongoing process.
[0060] To sum up, the embodiments of the present application provide a method for identifying event causal relationships, which uses the event timing information of each event to perceive the system topology information of the node where the event occurs, and integrates the perception results of the system topology structure into the process of identifying event causal relationships, making full use of the collected information corresponding to each event. While solving the need to obtain causal relationships between events from a large amount of event timing information, it also solves the problem of poor practical applicability of the algorithm in certain scenarios due to the inability to provide topology structure information.
[0061] In one possible implementation, the computer device may output the acquired causal relationship matrix to obtain event causal relationship knowledge; in another possible implementation, after obtaining the causal relationship matrix, the computer device may further locate the root cause of the event based on the causal relationship matrix, the system topology matrix, and the event timing information of each event to determine the root cause event and the root cause node of an event or each event, and output the location result indicating the root cause node and the root cause event of the corresponding event, i.e., the root cause voting matrix. Figure 5 shows a flowchart of an event causal relationship identification method provided by an exemplary embodiment of the present application, which method can be executed by a computer device, which can be implemented as a server as shown in Figure 3. As shown in Figure 5, the event causal relationship identification method may include the following steps:
[0062] Step 510: Acquire event sequence information of each event. The event sequence information is used to represent event attributes and time attributes of the event.
[0063] In an embodiment of the present application, when a computer device obtains an event collection data set consisting of initial event time sequence information of multiple events, it preprocesses and cleans the data in the event collection data set to reduce unnecessary data processing and improve the accuracy of causal relationship identification. Based on this, in an embodiment of the present application, the process of obtaining event time sequence information for each event may include:
[0064] Acquire an event collection data set; the event collection data set includes event collection data corresponding to event time sequence information of multiple events;
[0065] Sort the data in the event collection data set according to the occurrence time of each event;
[0066] Based on the sequence after sorting, data preprocessing is performed on the event collection data set to obtain event time sequence information of each event after data preprocessing.
[0067] When sorting the data, the data in the event collection data set may be sorted in ascending order according to the occurrence time of each event, or in descending order according to the occurrence time of each event.
[0068] In the embodiment of the present application, when the sorting process is ascending process, the data preprocessing performed on the event collection data set includes at least one of the following:
[0069] Delete the event collection data that is repeated with the previous event collection data;
[0070] Delete event collection data whose difference between the occurrence time and the event time corresponding to the previous event collection data is less than the first difference threshold and whose end time, event occurrence node, and event type are the same;
[0071] The difference between the occurrence times of the merged events is less than the second difference threshold, and the nodes and event types of the events are the same in multiple event collection data; the occurrence time corresponding to the merged event collection data is the earliest occurrence time in the multiple event collection data, and the end time corresponding to the merged event collection data is the latest end time in the multiple event collection data;
[0072] Deleting flash data, which is event data collected when the time difference between the end time and the occurrence time is less than a third difference threshold;
[0073] Delete low-frequency data and / or high-frequency data. Low-frequency data refers to event collection data corresponding to event types whose occurrence times in the event collection data set are lower than the first number threshold. High-frequency data refers to event collection data corresponding to event types whose occurrence times in the event collection data set are higher than the second number threshold.
[0074] When the sorting process is descending, the data preprocessing performed on the event collection data set includes at least one of the following:
[0075] Delete the event collection data that is repeated with the next event collection data;
[0076] Delete event collection data whose difference between the occurrence time and the next event collection data is less than the first difference threshold and whose end time, event occurrence node and event type are the same;
[0077] The difference between the occurrence times of the merged events is less than the second difference threshold, and the nodes and event types of the events are the same in multiple event collection data; the occurrence time corresponding to the merged event collection data is the earliest occurrence time in the multiple event collection data, and the end time corresponding to the merged event collection data is the latest end time in the multiple event collection data;
[0078] Deleting flash data, which is event data collected when the time difference between the end time and the occurrence time is less than a third difference threshold;
[0079] Delete low-frequency data and / or high-frequency data. The low-frequency data refers to the event collection data corresponding to the event type whose number of occurrences in the event collection data set is lower than the first number threshold, and the high-frequency data refers to the event collection data corresponding to the event type whose number of occurrences in the event collection data set is higher than the second number threshold.
[0080] That is, for repeated event collection data, only one is retained; for event collection data with the difference between occurrence times less than the first difference threshold and other attributes being the same, the event collection data with the earliest occurrence time is retained and the rest are deleted.
[0081] Taking ascending sorting as an example, Table 2 shows a data table corresponding to an event collection data set provided by an exemplary embodiment of the present application, and Table 3 shows a clean data table obtained after data preprocessing provided by an exemplary embodiment of the present application.
[0082] Table 2
[0083] Table 3
[0084] The data in row 2 of Table 2 is repeated with the data in row 3. Therefore, the data in row 3 is deleted and the data in row 2 is retained, corresponding to the data in row 2 of Table 3. If the first difference threshold is 10, the difference between the occurrence time of the data in row 6 and row 7 of Table 2 is less than the first difference threshold, and the end time, node identifier, and event type are the same, then the data in row 7 is deleted and the data in row 6 is retained, corresponding to the data in row 5 of Table 3. If the second difference threshold is 10, the difference between the occurrence time of the data in row 10 and row 11 of Table 2 is less than the second difference threshold, and the node identifier and event type are the same but the end time is different, then the data in rows 10 and 11 are merged, and the merged data corresponds to the data in row 8 of Table 3. If the third difference threshold is 5, the duration of the data in row 14 of Table 2 is 2, which is less than the third difference threshold. Therefore, the data in row 14 is deleted. After the above data preprocessing, the preprocessed data table shown in Table 3 is obtained.
[0085] It should be noted that the above examples of the first difference threshold, the second difference threshold, and the third difference threshold are illustrative only, and this application does not limit the values of the various difference thresholds. In addition, the first and second frequency thresholds used in determining low-frequency data and high-frequency data can also be set to different values based on actual needs, with the first frequency threshold being smaller than the second frequency threshold.
[0086] The subsequent steps are to identify causal relationships based on the event timing information of each event in the preprocessed data table. Based on the first basic assumption and the second basic assumption provided in this application, it can be seen that the node where the event occurs earlier is more likely to be the source node, and the event that occurs earlier is more likely to be the cause event. Therefore, in order to facilitate the subsequent data processing description, this application uses the ascending processing method to sort the data in the event collection data set as an example.
[0087] Step 520 : Based on the event sequence information of each event, the system topology structure between nodes is perceived to obtain a system topology matrix. The system topology matrix is used to represent the adjacency between the nodes where the event occurs.
[0088] In one possible implementation, the system topology structure between nodes is perceived based on the event timing information of each event. The process of obtaining the system topology matrix can be implemented as the following sub-steps 1)-3):
[0089] 1) According to the chronological order of the occurrence of each event, at least one node set type is determined based on the nodes where each event occurs. Each node set type contains at least one node set; the node set is a set consisting of the nodes where two events with adjacent occurrence times are located.
[0090] Since there may be differences between the occurrence nodes of various events, different node set types will appear, such as node set type 1 composed of node 1 and node 2, node set type 2 composed of node 2 and node 3, and so on; further, due to the different order of occurrence time of events in the nodes, different node set types will also be caused. For example, when the occurrence time of the event in node 1 is earlier than the occurrence time of the event in node 2, there is node set type 1 composed of node 1 and node 2. When the occurrence time of the event in node 2 is earlier than the occurrence time of the event in node 1, there is node set type 2 composed of node 2 and node 1, and so on.
[0091] Table 4 shows a data table of event timing information of each current event. As shown in Table 4, in ascending order of occurrence time, node set 0-2, node set 2-1, node set 1-0 and node set 0-1 can be obtained. The number of node set types is 4, and each node set type contains a corresponding node set.
[0092] Table 4
[0093] It should be noted that the number of node sets contained in each node set type can be one or more. The situation shown in Table 4 is only for illustration and does not limit the number of node set types in this application and the number of node sets under the node set type.
[0094] 2) Based on the event timing information of each event, calculate the cumulative adjacency strength coefficient corresponding to at least one node set type; the cumulative adjacency strength coefficient is the cumulative value of the adjacency strength coefficient of at least one node set under a node set type, and the adjacency strength coefficient is used to characterize the degree of adjacency between two nodes.
[0095] The cumulative adjacency strength coefficient value of a node set type is the cumulative value of the adjacency strength coefficients corresponding to each node set contained in the node set type. Therefore, it is necessary to first calculate the adjacency strength coefficient of each node set. In the embodiment of the present application, the process of calculating the adjacency strength coefficient of the node set can be implemented as follows:
[0096] Obtaining, from the event timing information of each event, a third occurrence time and a third end time of a third event occurring in a third node, and a fourth occurrence time and a fourth end time of a fourth event occurring in a fourth node; the third node and the fourth node are two nodes in a target node set, and the third occurrence time corresponding to the third node is earlier than the fourth occurrence time corresponding to the fourth node; the target node set is any one of at least one node set included in a target node set type, and the target node set type is any one of at least one node set type;
[0097] The ratio between the third difference and the fourth difference is obtained as the adjacency strength coefficient of the target node set; the third difference is the difference between the third end time and the fourth occurrence time, and the fourth difference is the difference between the fourth end time and the third occurrence time.
[0098] After the adjacency strength coefficient of the target node set is calculated, the adjacency strength coefficient of the target node set is accumulated to the accumulated adjacency strength coefficient of the target node set type.
[0099] Based on the first basic assumption of this application, this application provides an assumption for calculating the strength of the adjacency relationship between nodes: if an event occurs at node A first, and then an event occurs at node B immediately afterwards, the event at node A ends first, and the event at node B is also nearing completion, then it can be considered that the event at node A caused the occurrence of the event at node B, and then it can be considered that node A and node B are adjacent, with node A pointing to node B, and the greater the temporal co-occurrence rate of the events, the stronger the adjacency relationship of the node set; wherein the temporal co-occurrence rate of the events is used to indicate the degree of temporal overlap of the two events; the calculation formula for the adjacency strength coefficient of the node set is:
[0100] Among them, t as is the occurrence time of the A node event, t bs is the occurrence time of the B node event, t ae is the end time of the A node event, t be is the end time of the B node event, adj_intensity is the adjacency strength coefficient of the node set. The closer it is to 1.0, the stronger the adjacency strength between node A and node B. If it is less than or equal to 0, it means that there is no adjacency relationship between the node sets, and adj_intensity is 0.
[0101] Figure 6 shows a schematic diagram of the degree of adjacency between nodes provided by an exemplary embodiment of the present application. As shown in Figure 6, in the two nodes corresponding to part (a) of Figure 6, the adjacency strength coefficient of the node set composed of node A and node B is adj_intensity = (8-2) / (9-1) = 0.75, indicating that node A and node B are strongly adjacent; in the two nodes corresponding to part (b) of Figure 6, the adjacency strength coefficient of the node set composed of node A and node B is adj_intensity = (7-5) / (9-1) = 0.375, indicating that node A and node B are weakly adjacent; in the two nodes corresponding to part (c) of Figure 6, the adjacency strength coefficient of the node set composed of node A and node B is adj_intensity = (5-6) / (9-1) = -0.125<0, indicating that node A and node B have no adjacency relationship.
[0102] After calculating the adjacency strength coefficient of each node set, the adjacency strength coefficient of each node set is accumulated to the accumulated adjacency strength coefficient of the corresponding node set type.
[0103] In another possible implementation, when calculating the cumulative adjacency strength coefficients of each node set type, the computer device may divide two adjacent nodes into a node set according to the order of occurrence time. After determining the node set type based on the combination of each node set, the node set type with an adjacency relationship is first determined based on the occurrence time and end time of the event in the node, and the cumulative adjacency strength coefficients of the node set types without an adjacency relationship are set to 0. Then, the cumulative adjacency strength coefficients of the node set types with an adjacency relationship are calculated, that is, judgment is performed first and calculation is performed later to reduce the amount of calculation. Among them, the node set type with an adjacency relationship refers to a node set type in which the continuous processes of the events corresponding to two nodes in the same node set partially overlap in time sequence. Partial overlap in time sequence means that the occurrence time of the second event is later than the occurrence time of the first event but earlier than the end time of the first event. The node set type without an adjacency relationship refers to the node set type in which the continuous processes of the events corresponding to two nodes in each node set do not overlap in time sequence, that is, the occurrence time of the second event is later than the end time of the first event.
[0104] It should be noted that when the computer device calculates the cumulative adjacency strength coefficient of the node set type, it can first determine the node set type with adjacency relationship based on the occurrence time and end time of the event in the node, set the cumulative adjacency strength coefficient of the node set type that does not have an adjacency relationship to 0, and calculate the cumulative adjacency strength coefficient of the node set type with an adjacency relationship, that is, first judge and then calculate; or, the computer device can also directly calculate the cumulative strength coefficient of each node set type to determine which node sets under which node set types have adjacency relationship and which node sets under which node set types do not have adjacency relationship based on the calculation results of the cumulative adjacency strength coefficient.
[0105] 3) Generate a system topology matrix based on the accumulated adjacency strength coefficient corresponding to at least one node set type.
[0106] The process of generating the system topology matrix can be implemented as follows:
[0107] Constructing a topology-aware matrix based on the accumulated adjacency strength coefficient of at least one node set type; the rows of the topology-aware matrix are used to represent source nodes, and the columns of the topology-aware matrix are used to represent target nodes; the occurrence time of the event in the source node is earlier than the occurrence time of the event in the target node;
[0108] generating a topology-aware ratio matrix based on the topology-aware matrix; the topology-aware ratio matrix is used to indicate a degree of adjacency of at least one node set type;
[0109] The topology perception ratio matrix is binarized based on a second threshold to generate a system topology matrix.
[0110] Schematically, when constructing a topology perception matrix, an initialization matrix of a topology perception matrix can be established first. The number of rows and columns of the initialization matrix is consistent with the number of nodes. When a bidirectional graph with self-loop is considered, the initialization matrix can be an all-1 matrix. It should be noted that the initialization matrix can have different settings according to actual needs, such as an all-0 matrix, etc., and this application does not limit this. Taking the data table shown in Table 4 as an example, the initialization matrix corresponding to the topology perception matrix T is:
[0111] Initialize the matrix T
[0112] Since Table 4 contains three nodes, node 0, node 1, and node 2, the initialization matrix T is a 3*3 all-1 matrix, where rows represent source nodes and columns represent target nodes.
[0113] When traversing nodes in the order of the occurrence time of events, when traversing to the current node, 1 is accumulated to the value corresponding to the current node in the topology perception matrix. Figure 7 shows a schematic diagram of the matrix value accumulation process provided by an exemplary embodiment of the present application. As shown in Figure 7, assuming that the current event is the event in the first row of Table 4, and its node identifier is 0, 1 is accumulated in the topology perception matrix T[0, 0].
[0114] After calculating the cumulative adjacency strength coefficient corresponding to each node set type, the cumulative adjacency strength coefficient corresponding to each node set type is added to the corresponding value of the topology perception matrix to obtain the final topology perception matrix. For example, taking the data table shown in Table 4 as an example, the corresponding final topology perception matrix T is:
[0115] Topology awareness matrix T
[0116] In one possible implementation, the computer device may also, after calculating the adjacency strength coefficient of a node set under a node set type, accumulate the adjacency strength coefficient of the node set in real time to the position of the node set type corresponding to the node set in the topology perception matrix. Taking the data table shown in Table 4 as an example, Figure 8 shows a schematic diagram of the matrix value accumulation process provided by an exemplary embodiment of the present application. As shown in Figure 8, after calculating the adjacency strength coefficient corresponding to the node set 0-2 as 0.73, based on the topology perception matrix T shown in Figure 7, 0.73 is accumulated to the value of the topology perception matrix T[0, 2]. If there are still node sets under the node set type 0-2, after calculating the adjacency strength coefficient of the node set, the corresponding value is accumulated to the value of the topology perception matrix T[0, 2] until the traversal is completed to finally obtain the accumulated adjacency strength coefficient of the node set type.
[0117] It should be noted that when a computer device writes a value into a topology perception matrix, it can first calculate the cumulative adjacency strength coefficient of the node set type and then write the topology perception matrix as a whole. Alternatively, after calculating the adjacency strength coefficient of a node set under a node set type, it can add the adjacency strength coefficient to the corresponding value of the topology perception matrix in real time and accumulate the adjacency strength coefficients of subsequent node sets under the node set type at this position.
[0118] After obtaining the topology perception matrix, the topology perception ratio matrix TR is generated according to the first matrix transformation formula. The first matrix transformation formula is:
[0119] Wherein, TR[x, y] represents the value of the xth row and yth column in the topology-aware ratio matrix, and T[x, y] represents the value of the xth row and yth column in the topology-aware matrix.
[0120] FIG8 shows a schematic diagram of a topology perception ratio matrix generation process according to an exemplary embodiment of the present application. As shown in FIG8 , taking the data table shown in Table 4 as an example, after processing the corresponding topology perception matrix T based on the first matrix transformation formula, the topology perception ratio matrix TR is obtained:
[0121] Topology-aware ratio matrix TR
[0122] After obtaining the topology perception ratio matrix TR, the topology perception ratio matrix is binarized based on a second threshold to obtain a system topology matrix TT.
[0123] Among them, the second threshold can be a binarization threshold obtained based on the topology perception ratio matrix. The second threshold can be one of the parameters such as variance, mean, median, etc. of the topology perception ratio matrix TR, or it can also be set by relevant personnel based on actual needs.
[0124] Schematically, the formula for binarizing the topology perception ratio matrix based on the second threshold can be expressed as:
[0125] Where TT[x, y] represents the value of the xth row and yth column in the topology-aware ratio matrix.
[0126] FIG9 shows a schematic diagram of a system topology matrix generation process shown in an exemplary embodiment of the present application. As shown in FIG9 , taking the data table shown in Table 4 and the second threshold being the variance of the topology perception ratio matrix as an example, the second threshold is calculated based on the topology perception ratio matrix in Table 4 to be 0.73. Therefore, after processing the corresponding topology perception ratio matrix TR based on the second threshold, the corresponding system topology matrix TT is obtained:
[0127] System topology matrix TT
[0128] The system topology matrix is used to indicate the adjacency between each node. Taking the system topology matrix TT corresponding to Table 4 above as an example, the system topology matrix indicates that node 0 and node 1 have an adjacency relationship, and node 1 and node 0 are bidirectionally connected, that is, the data flow can be directed from node 1 to node 0, or from node 0 to node 1; node 0 and node 2 have an adjacency relationship, and the connection is bidirectional; node 1 and node 2 do not have an adjacency relationship.
[0129] Step 530 : Identify the causal relationship between events based on the system topology matrix and the event sequence information of each event, and obtain a causal relationship matrix. The causal relationship matrix is used to indicate the causal relationship between each event.
[0130] In one possible implementation, the causal relationship between events is identified based on the system topology matrix and the event timing information of each event. The process of obtaining the causal relationship matrix can be implemented as the following sub-steps 1)-3):
[0131] 1) According to the chronological order of the occurrence of each event, at least one event set type is determined, and each event set type contains at least one event set; the event set is a set consisting of two events with adjacent occurrence times.
[0132] Since there may be differences between the event types of each event, different event set types will appear, such as event set type 1 consisting of event type 1 and event type 2, event set type 2 consisting of event type 2 and event type 3, and so on; further, due to the different order of occurrence time of events, different event set types will also be caused. For example, when the occurrence time of the event of event type 1 (event 1) is earlier than the occurrence time of the event of event type 2 (event 2), there is event set type 1 consisting of event type 1 and event type 2; when the occurrence time of event 2 is earlier than the occurrence time of event 1, there is an event set consisting of event type 2 and event type 1, and so on.
[0133] Still taking the data table shown in Table 4 as an example, in ascending order of occurrence time, we can obtain event set 2-1, event set 1-2, event set 2-0, and event set 2-1. The total number of event set types is 4, and each event set type contains one event set.
[0134] It should be noted that the number of event sets contained in each event set type can be one or more. The situation shown in Table 4 is only for reference and does not limit the number of event set types in this application and the number of event sets under the event set type.
[0135] 2) Based on the system topology matrix and the event timing information of each event, calculate the cumulative causal strength coefficient corresponding to at least one event set type; the cumulative causal strength coefficient is the cumulative value of the causal strength coefficient of at least one event set under an event set type, and the causal strength coefficient is used to characterize the degree of causal relationship between two events in the event set during the ongoing process.
[0136] The cumulative causal strength coefficient value of an event set type is the cumulative value of the causal strength coefficients corresponding to each event set under the event set type. Therefore, it is necessary to first calculate the causal strength coefficient of each event set. In this embodiment of the present application, the process of calculating the causal strength coefficient of the event set can be implemented as follows:
[0137] When the system topology matrix indicates that a first node where a first event occurs has an adjacency relationship with a second node where a second event occurs, obtaining a first occurrence time and a first end time of the first event, and a second occurrence time and a second end time of the second event from event timing information of each event; the first event and the second event are two events that occur successively in a target event set; the target event set is any one of at least one event set included in a target event set type; and the target event set type is any one of at least one event set type.
[0138] The ratio between the first difference and the second difference is obtained as the causal strength coefficient of the target event set; the first difference is the difference between the first end time and the second occurrence time, and the second difference is the difference between the second end time and the first occurrence time;
[0139] After the causal strength coefficient of the target event set is calculated, the causal strength coefficient of the target event set is added to the accumulated causal strength coefficient of the target event set type.
[0140] Based on the second basic assumption of this application, this application provides an assumption for calculating the causal strength coefficient between events: first, ensure that there is an adjacency relationship between the two nodes corresponding to the event set, that is, the corresponding value in the system topology matrix TT is 1; on this basis, if event A occurs, and then event B occurs immediately, event A ends first, and event B also ends immediately, then it can be considered that the occurrence of event A leads to the occurrence of event B, that is, event set AB has a causal relationship, and A is the cause event, and B is the effect event. Moreover, the greater the temporal topological co-occurrence rate of the events, the stronger the causal relationship between event set AB; the calculation formula for the causal strength coefficient of the event set is:
[0141] Among them, t as is the time when event A occurs, t bs is the time when event B occurs, t ae is the end time of event A, t be is the end time of event B, causal_intensity is the causal intensity coefficient of the event set. The closer it is to 1.0, the stronger the causal intensity of event A and event B. If it is less than or equal to 0, it means that there is no causal relationship between the event sets, and causal_intensity is 0.
[0142] Figure 10 shows a schematic diagram of the degree of causal relationship between events provided by an exemplary embodiment of the present application. As shown in Figure 10, in the two events corresponding to part (a) of Figure 10, the causal intensity coefficient causal_intensity of the event set consisting of event A and event B is 0.75, indicating that event A and event B have a strong causal relationship; in the two events corresponding to part (b) of Figure 10, the causal intensity coefficient causal_intensity of the event set consisting of event A and event B is 0.375, indicating that event A and event B have a weak causal relationship; in the two events corresponding to part (c) of Figure 10, the causal intensity coefficient causal_intensity of the event set consisting of event A and event B is 0.125<0, indicating that there is no causal relationship between event A and event B.
[0143] After calculating the causal strength coefficient of each event set, the causal strength coefficient of each event set is accumulated into the accumulated causal strength coefficient of the corresponding event set type.
[0144] In another possible implementation, when calculating the cumulative causal strength coefficients of each event set type, the computer device may divide two adjacent events into an event set according to the order of their occurrence time. After determining the event set type based on the combination of each event set, the event set type with a causal relationship is first determined based on the occurrence time and end time of the event, and the cumulative causal strength coefficients of the event set types without a causal relationship are set to 0. Then, the cumulative strength coefficients of the event set types with a causal relationship are calculated, that is, judgment is performed first, and calculation is performed later to reduce the amount of calculation. Among them, the event set type with a causal relationship refers to an event set type in which the continuous processes of two events in the same event set partially overlap in time sequence. Partial overlap in time sequence means that the occurrence time of the second event is later than the occurrence time of the first event but earlier than the end time of the first event. In this case, the event set consisting of the first event and the second event can be called a co-occurrence event set. An event set type that does not have a causal relationship refers to an event set in which the duration of the two events in each event set does not overlap in time sequence, that is, the occurrence time of the second event is later than the end time of the first event. In this case, the event set consisting of the first event and the second event can be called a non-co-occurrence event set.
[0145] It should be noted that when determining the cumulative causal strength coefficient of an event set type, the computer device can first determine the event set type with a causal relationship based on the occurrence time and end time of the event, set the cumulative causal strength coefficient of the event set type that does not have a causal relationship to 0, and calculate the cumulative causal strength coefficient of the event set type with a causal relationship, that is, first judge and then calculate; or, the computer device can also directly calculate the cumulative strength coefficient of each event set type to determine which event sets under which event set types have a causal relationship and which event set types under which nodes do not have a causal relationship based on the calculation results of the cumulative causal strength coefficient.
[0146] In one possible case, when the system topology matrix indicates that there is no adjacency relationship between a first node where a first event occurs and a second node where a second event occurs, the causal strength coefficient corresponding to the first event occurring in the first node and the second event occurring in the second node is determined to be 0.
[0147] That is to say, when the two nodes where an event occurs do not have an adjacency relationship based on the system topology matrix, it can be directly determined that there is no causal relationship between the two events, and the corresponding causal strength coefficient is set to 0.
[0148] 3) Generate a causal relationship matrix based on the accumulated causal strength coefficients corresponding to at least one event set type.
[0149] The process of generating the causal relationship matrix can be implemented as follows:
[0150] Based on the accumulated causal strength coefficients of at least one event set type, a causal perception matrix is constructed; the rows in the causal perception matrix are used to represent the cause event type, and the columns in the causal perception matrix are used to represent the effect event type; the occurrence time of events of the cause event type is earlier than the occurrence time of events of the effect event type; a causal perception ratio matrix is generated based on the causal perception matrix; the causal perception ratio matrix is used to characterize the degree of causal relationship of at least one event set type; the causal perception ratio matrix is binarized based on a first threshold to generate a causal relationship matrix.
[0151] Schematically, when constructing a causal perception matrix, an initialization matrix of the causal perception matrix can be established first. The number of rows and columns of the initialization matrix is consistent with the number of event types. When considering a bidirectional graph with self-loops, the initialization matrix can be an all-1 matrix. It should be noted that, depending on actual needs, the initialization matrix can have different settings, such as an all-0 matrix, etc., and this application does not limit this. Taking the data table shown in Table 4 as an example, the initialization matrix corresponding to the causal perception matrix C is:
[0152] Initialize the matrix C
[0153] Since Table 4 includes three event types, event type 0, event type 1, and event type 2, the initialization matrix C is a 3*3 all-1 matrix, where rows represent cause events and columns represent effect events.
[0154] When traversing events in the order of their occurrence time, when traversing to the current event, 1 is accumulated to the value corresponding to the current event in the causal perception matrix. Figure 11 shows a schematic diagram of the matrix value accumulation process provided by an exemplary embodiment of the present application. As shown in Figure 11, assuming that the current event is the event in the first row of Table 4, and its event type is 2, 1 is accumulated in the causal perception matrix C[2, 2].
[0155] After calculating the cumulative causal strength coefficient corresponding to each event set type, the cumulative causal strength coefficient corresponding to each event set type is added to the corresponding value of the causal perception matrix to obtain the final causal perception matrix. For example, taking the data table shown in Table 4 as an example, the corresponding final causal perception matrix C is:
[0156] Causal perception matrix C
[0157] In one possible implementation, the computer device may also, after calculating the adjacency causal coefficient of an event set under an event set type, accumulate the adjacency causal coefficient of the event set in real time to the position of the event set type corresponding to the event set in the causal perception matrix. Taking the data table shown in Table 4 as an example, Figure 12 shows a schematic diagram of the matrix value accumulation process provided by an exemplary embodiment of the present application. As shown in Figure 12, after calculating the causal strength coefficient corresponding to the event set 2-1 as 0.73, on the basis of the causal perception matrix C shown in Figure 11, 0.73 is accumulated to the value of the causal perception matrix C[2, 1]. If there is still a node set under the event set type 2-1, after calculating the causal strength coefficient of the node set, the corresponding value is accumulated to the value of the causal perception matrix C[2, 1] until the traversal is completed to finally obtain the accumulated causal strength coefficient of the event set type.
[0158] It should be noted that when a computer device writes a numerical value into the causal perception matrix, it can first calculate the cumulative causal strength coefficient of the event set type and then write it into the causal perception matrix as a whole. Alternatively, it can calculate the causal strength coefficient of an event set under the event set type and then add the causal strength coefficient to the corresponding value of the causal perception matrix in real time, and then add the causal strength coefficients of subsequent event sets under the event set type at this position.
[0159] After obtaining the causal perception matrix, the causal perception ratio matrix CR is generated according to the second matrix transformation formula. The second matrix transformation formula is:
[0160] Wherein, CR[x, y] represents the value of the xth row and yth column in the causal perception ratio matrix, and C[x, y] represents the value of the xth row and yth column in the causal perception matrix.
[0161] FIG13 shows a schematic diagram of a generation process of a causal perception ratio matrix according to an exemplary embodiment of the present application. As shown in FIG13 , taking the data table shown in Table 4 as an example, the corresponding causal perception matrix C is processed based on the second matrix transformation formula to obtain the causal perception ratio matrix CR:
[0162] Causal Perception Ratio Matrix CR
[0163] After obtaining the causal perception ratio matrix CR, the causal perception ratio matrix CR is binarized based on a first threshold to obtain a causal relationship matrix CT.
[0164] Among them, the first threshold can be a binarization threshold obtained based on the causal perception ratio matrix. The first threshold can be one of the parameters such as the variance, mean, median, etc. of the causal perception ratio matrix CR, or it can also be set by relevant personnel based on actual needs.
[0165] Schematically, the formula for binarizing the causal perception ratio matrix based on the first threshold can be expressed as:
[0166] Where CT[x, y] represents the value of the xth row and yth column in the causal perception ratio matrix.
[0167] FIG14 is a schematic diagram showing a generation process of a causal relationship matrix according to an exemplary embodiment of the present application. As shown in FIG14 , taking the data table shown in Table 4 and the first threshold being the variance of the causal perception ratio matrix as an example, the first threshold is calculated based on the causal perception ratio matrix in Table 4 to be 0.48. Therefore, after processing the corresponding causal perception ratio matrix CR based on the first threshold, the corresponding causal relationship matrix CT is obtained:
[0168] Cause and Effect Matrix CT
[0169] The causal relationship matrix is used to indicate the causal relationship between various event types. Taking the causal relationship matrix CT corresponding to Table 4 above as an example, the causal relationship matrix indicates that event type 2 has a causal relationship with event type 0, and the event of event type 2 is the cause event, and the event of event type 0 is the effect event; event type 2 has a causal relationship with event type 1, and the event of event type 2 is the cause event, and the event of event type 1 is the effect event; there is no causal relationship between event type 0 and event type 1.
[0170] In one feasible implementation, after obtaining the causal relationship matrix, the causal relationship matrix can be output as the learned causal knowledge; or, in another feasible implementation, the root cause of the event can be further located based on the causal relationship matrix, the system topology matrix and the event timing information of each event to determine the root cause node and root cause event of a certain event. This process is shown in step 540.
[0171] Step 540 , root cause location is performed based on the system topology matrix, the causal relationship matrix, and the event sequence information of each event to obtain the root cause node and root cause event of the target event; the target event is the event to be analyzed for root cause location among the events.
[0172] This application provides a third basic assumption: when an event occurs at a node in a topological system, the event will propagate along the topological structure and event causal relationship, causing corresponding events to occur in adjacent nodes. Therefore, when an event occurs in a topological system, the root cause event and root cause node can be located through random walk and random voting mechanisms with the help of the system topological structure and event causal relationship.
[0173] Based on the third basic assumption above, root cause location is performed based on the system topology matrix, the causal relationship matrix, and the event time sequence information of each event. The process of obtaining the root cause node and root cause event of the target event can be implemented as follows: sub-steps 1)-6):
[0174] 1) Create a root cause voting matrix for the target event. The rows of the root cause voting matrix are used to represent the event type, and the columns of the root cause voting matrix are used to represent the nodes where the event occurs.
[0175] In the embodiment of the present application, the root cause voting matrix V=number of event types×number of node types.
[0176] 2) Creating a first system topology directed graph according to the system topology matrix. The first system topology directed graph includes nodes and directed edges. The directed edges are used to indicate data flow relationships or service call relationships between nodes.
[0177] Figure 15 shows a schematic diagram of a first system topology diagram provided by an exemplary embodiment of the present application. As shown in Figure 15, assuming that the system topology matrix indicates that there is an adjacency relationship between node 1 and node 2, there is an adjacency relationship between node 1 and node 4, there is an adjacency relationship between node 2 and node 3, and there is no adjacency relationship between node 1 and node 3, a first system topology diagram 1510 can be created. In the first system topology diagram 1510, taking the directed edge indicating the data flow relationship between nodes as an example, the data flow flows from node 2 to node 1, the data flow flows from node 4 to node 1, and the data flow flows from node 3 to node 2.
[0178] 3) The event sequence information of each event is stored in the corresponding node to obtain the second system topology directed graph.
[0179] Figure 16 shows a schematic diagram of a second system topology directed graph provided by an exemplary embodiment of the present application. As shown in Figure 16, the event timing information of each event is stored in the corresponding node to obtain a second system topology directed graph 1610. In this second system topology directed graph, node 1 stores the event timing information of two events whose event types are event type 1 and event type 2, respectively; node 2 stores the event timing information of two events whose event types are event type 2 and event type 1, respectively; node 3 stores the event timing information of an event whose event type is event type 0; and node 4 stores the event timing information of an event whose event type is event type 1.
[0180] 4) Obtain a target node set, where each target node in the target node set is a node where an event of the target event type occurs.
[0181] The target node set is the set of nodes where the events that need to be analyzed and located are located. Schematically, taking the second system topology directed graph shown in Figure 16 as an example, if the selected event to be analyzed and located is event type 1, the target nodes included in the determined target node set are node 1, node 2 and node 4. If the selected target node is 2, the target nodes included in the determined target node set are node 1 and node 2.
[0182] 5) Taking the target node in the target node set as the starting node, perform at least one walking vote according to the causal relationship matrix and the second system topology directed graph, and write the voting result of at least one walking vote into the root cause voting matrix.
[0183] Taking the walking process with a target node in the target node set as the starting node as an example, the judgment process in any analysis node in the process can be implemented as follows:
[0184] 1) Get the analysis event under the current analysis node.
[0185] When the current analysis node is the starting node, the current analysis node is any one of the target nodes in the target node set.
[0186] Select the analysis event under the current analysis node, for example: current analysis node = node 1, current analysis event = event 1, and obtain the event timing information of the current analysis node-event. For example, the event timing information of node 1-event 1 is [occurrence time = 5, end time = 13].
[0187] 2) Based on the second system topology directed graph, obtain the parent node set of the current analysis node, the parent node set includes at least one parent node, and the direction of the directed edge between the parent node and the current analysis node is from the parent node to the current analysis node.
[0188] As shown in the second system topology directed graph shown in Figure 16, the parent nodes included in the parent node set of node 1 are node 2 and node 4, that is, the parent node of node 1 = [2, 4]; the parent node set of node 2 includes node 3; node 3 and node 4 have no parent node.
[0189] 3) Perform a random walk with equal probability to the parent nodes in the parent node set of the current analysis node.
[0190] In one possible implementation, when the parent node set contains multiple parent nodes, the user can simultaneously wander to each parent node. Alternatively, the user can randomly select one parent node to wander to first, and then randomly select another parent node to wander to, until all parent nodes in the parent node set are wandered.
[0191] 4) If it is determined based on the causal relationship matrix that there is a matching event in the wandering node that has a causal relationship with the analysis event under the current analysis node, cumulative voting is performed on the matching events under the wandering node in the root cause voting matrix; the wandering node is the parent node to which the current random walk reaches.
[0192] 5) The matching event under the wandering node is obtained as the analysis event under the new current analysis node.
[0193] The above process is repeated until there is no matching event in the wandering node, or the wandering node has no parent node.
[0194] The computer device can determine whether to vote and accumulate for the current wandering node based on whether there is an event matching the current analysis node-event in the wandering node, and use the matching event as the inherited event for subsequent wandering. For example, when locating the root cause of event type 1, first take node 1 in the target node set of event type 1 as the starting node, and use node 1-event 1 as the starting analysis node-analysis event. With equal probability, a node is randomly selected from the parent node [2, 4] of node 1 for wandering. Assuming that the wandering node is selected to wander to node 2, all events in node 2 are traversed, starting with event 2 of node 2, and checking the causal relationship matrix CT:
[0195] Cause and Effect Matrix CT
[0196] From the above causal relationship matrix CT, it can be seen that CT[2,1]=1, that is, there is a causal relationship between the event of event type 2 and the event of event type 1, and based on the occurrence time of each event, it can be seen that node 2-event 2 occurs before node 1-event 1, and node 2-event 2 ends before node 1 event 1. Therefore, the vote for event 2 of node 2 is accumulated as 1, and node 2-event 2 is taken as the inherited event to continue wandering; the second is event 1 in node 2, and the event causal relationship matrix CT[1,1]=0, so the vote for event 1 of node 2 is accumulated as 0.
[0197] Then, we enter the wandering process with node 2-event 2 as the analysis event under the current analysis node. Taking the second system topology directed graph shown in Figure 16 as an example, the parent node of node 2 is node 3. We wander to node 3 and traverse all events in node 3, that is, event 0 in node 3. We check the causal relationship matrix CT[0, 2]=1, and node 3-event 0 occurs before node 2-event 2, and node 3-event 0 ends before node 2-event 2. Therefore, the vote for event 0 of node 3 is accumulated as 1, and node 3-event 0 is taken as the inherited event. Since node 3 has no parent node, the current wandering ends.
[0198] When randomly walking to another parent node of node 1, that is, node 4, all events in node 4 are traversed, that is, event 1 in node 4, and the causal relationship matrix CT[1, 1] = 0 is checked. Therefore, the vote accumulation of event 1 in node 4 is 0. Since there is no matching event in node 4, the current walk ends.
[0199] Afterwards, another target node in the target node set of event type 1, that is, node 2, is used as the starting node, and node 2-event 1 is used as the starting analysis node-analysis event. Since node 2 has a parent node, that is, node 3, therefore, walk to node 3, traverse all events in node 3, that is, node 0 in node 3, and check the causal relationship matrix CT[0, 1] = 1. Therefore, the vote for the event of node 3 is accumulated by 1. Since node 3 has no parent node, the current walk ends.
[0200] After the walk process starting from each target node in the target node set of event type 1 is completed, the root cause voting matrix corresponding to event type 1 can be obtained:
[0201] Root Cause Voting Matrix
[0202] It should be noted that the number of nodes and event types included in the second system topology diagram shown in Figure 16 are for illustration only. In actual applications, a system topology diagram may include more nodes and event types. When the number of nodes and event types is large or more complex, in a possible implementation method, a wandering number threshold may be preset in the computer device. When the wandering number reaches the wandering number threshold, the wandering is stopped and the following sub-step 6) is executed. Otherwise, the above wandering process continues.
[0203] 6) Based on the voting results in the root cause voting matrix, the root cause node and root cause event of the target event are determined.
[0204] In an embodiment of the present application, the root cause nodes and root cause events of the target event are determined based on the voting results in the root cause voting matrix, including: sorting the corresponding node event sets in the root cause voting matrix based on the voting results in the root cause voting matrix to obtain a sorting result; and determining the root cause nodes and root cause events of the target event based on the top n node event sets with the highest number of votes in the sorting result, where n is a positive integer.
[0205] That is, the nodes in the selected node event set are the root cause nodes of the target event, and the events in the node event set are the root cause events of the target event.
[0206] In one embodiment, each node-event set can be sorted in descending order according to the voting results indicated by the root cause voting matrix, and the top n node-event sets can be selected as the root cause node-root cause event output according to needs. Taking the root cause voting matrix corresponding to the second system topology diagram shown in Figure 16 above as an example, if the top 1 node-event set is selected as the root cause node-root cause event output, the root cause node of event type 1 is determined to be node 3, and the root cause event is the event of event type 0, that is, node 3-event 0; if the top 2 node-event sets are selected as the root cause node-root cause event output, the root cause node-root cause event of event type 1 is determined to be node 3-event 0 and node 2-event 2.
[0207] It should be noted that the above only describes the root cause location process for event type 1. You can continue to perform root cause location analysis for other event types based on actual needs. The analysis process is similar to that of event type 1 and is not repeated here.
[0208] In summary, the application embodiment provides a method for identifying event causal relationships, which uses the event timing information of each event to perceive the system topology information of the node where the event occurs, and integrates the perception results of the system topology structure into the event causal relationship identification process, making full use of the collected information corresponding to each event. While solving the need to obtain causal relationships between events from a large amount of event timing information, it also solves the problem of poor practical applicability of the algorithm in certain scenarios due to the inability to provide topology structure information.
[0209] Furthermore, after obtaining the event causal relationship, the root cause event and root cause node of the event can be automatically analyzed and located based on the event causal relationship, which can improve the efficiency of root cause investigation.
[0210] Based on the relevant content of the embodiment shown in Figure 4 or Figure 5, Figure 17 shows a schematic diagram of an event causal relationship identification system provided by an exemplary embodiment of the present application. As shown in Figure 17, the system includes a data cleaning module 1710, a system topology perception module 1720, an event causal knowledge discovery module 1730 and an event root cause analysis module 1740.
[0211] Based on the above event causal relationship identification system, the implementation process is as follows:
[0212] 1) Obtain event time series data (including but not limited to: event type, event occurrence time, event end time, event duration, and event occurrence node).
[0213] 2) The data cleaning module 1710 is used to remove or merge noise events in the data to obtain clean data.
[0214] 3) The topology structure of the clean data is perceived through the system topology perception module 1720 to obtain the adjacency relationship between the nodes within the system and obtain the system topology matrix.
[0215] 4) The causal relationship matrix between events is mined and obtained through the event causal knowledge discovery module 1730 and combined with the system topology matrix and the cleaned clean data, and the causal relationship matrix is obtained as causal knowledge output or input into the event root cause analysis module 1740.
[0216] 5) The event root cause analysis module 1740 performs the event root cause location process, locates the root cause event and node of the event through the clean data of the current event collection data, the system topology matrix and the causal relationship matrix, and outputs the location result.
[0217] The event causal relationship identification system provided by this application has high causal mining accuracy, and its performance exceeds the ttpm algorithm and the PC algorithm in some scenarios. Figure 18 shows a schematic diagram comparing the time consumption of event causal relationship identification based on the event causal relationship identification system provided by this application and the ttpm algorithm. As shown in Figure 18, when the number of events is the same, the time consumption for causal relationship identification based on the event causal relationship identification system provided by this application is much lower than the time consumption for causal relationship identification based on the ttmp algorithm, and the more events there are, the more obvious the reduction in time consumption.
[0218] Take the alarm data in a network system alarm scenario as an example, that is, the event is an alarm event, such as the event time series data of the network system alarm event shown in Table 5. The event time series information included is: event type, node ID, occurrence time, end time and duration, among which the number of alarm event categories = 3, and the number of node ID types = 4.
[0219] Table 5
[0220] First, if the first number threshold (event low frequency threshold) LH = 0.1% and the second number threshold (event high frequency threshold) HH = 50%, after the server reads the data file uploaded through the terminal, it sorts the data in Table 5 from small to large according to the occurrence time based on the data preprocessing method provided in the embodiment shown in Figure 5 and performs data cleaning.
[0221] The data cleaning process includes at least one of the following methods:
[0222] Delete duplicate rows in the alarm data;
[0223] Delete rows with the same event type, node ID, and end time;
[0224] Merge rows with adjacent event types, node IDs, and occurrence times;
[0225] Delete the flash current;
[0226] The rows corresponding to events with too low a frequency are deleted according to the event low-frequency threshold LH, and the rows corresponding to events with too high a frequency are deleted according to the event high-frequency threshold HH.
[0227] After the above data cleaning, the clean data D obtained is shown in Table 6:
[0228] Table 6
[0229] Second, the system topology is identified using the clean data D and the system topology perception module, including the following sub-steps 1)-9):
[0230] 1) Obtain clean event data D, and obtain the number of event types = 3, the number of node types = 3, and the total number of event rows = 21.
[0231] 2) Create a system topology perception matrix T = [3*3].
[0232] 3) Traverse the clean event data D from small to large according to the occurrence time; since the data has been sorted, it is sufficient to traverse the data from top to bottom, and initialize i=0.
[0233] 4) Select the current event row i, whose information is [node ID = 1, occurrence time = 1, end time = 15].
[0234] 5) Traverse the subsequent events that occur later and whose occurrence time is less than the end time of the current event (for example, for the event data in the first row in Table 6, its subsequent events are the second and third rows), and then calculate the adjacency strength coefficient adj_intensity between the current event node and the subsequent event node based on the calculation formula of the adjacency strength coefficient of the node set according to the occurrence and end time of the current event and the subsequent event, and accumulate it to the corresponding value of the system topology perception matrix according to the ID of the subsequent event node of the current event.
[0235] 6) i=i+1, and determine whether i is greater than the total number of event rows. If so, output the topology perception matrix T and execute S2207; otherwise, execute S2204.
[0236] Topology awareness matrix T
[0237] 7) The topology perception matrix is processed according to the first matrix transformation formula to obtain the topology perception ratio matrix TR:
[0238] Topology-aware ratio matrix TR
[0239] 8) Calculate the first threshold for obtaining the topology-aware ratio matrix TR: variance σ=2.23.
[0240] 9) Binarizing the topology perception ratio matrix according to the first threshold value to obtain the system topology matrix TT:
[0241] System topology matrix TT
[0242] Third, the causal knowledge of events is mined using the clean data D, the system topology matrix TT, and the event causal knowledge discovery module, including the following sub-steps 1)-8):
[0243] 1) The number of event types in the clean data D = 3, and an event causal perception matrix C = [3*3] is created.
[0244] 2) Traverse the clean event data D from small to large according to the occurrence time. Since the data has been sorted, it is sufficient to traverse the data from top to bottom. Initialize i=0.
[0245] 3) Select the event sequence information of the current event row i as [event type = 0, node ID = 1, occurrence time = 1, end time = 15].
[0246] 4) Traverse the subsequent events that occur later and whose occurrence time is less than the end time of the current event (for example, for the event data in the first row in Table 6, its subsequent events are the second and third rows), and then calculate the causal intensity coefficient causal_intensity between the current event and the subsequent events according to the calculation formula of the causal intensity coefficient of the event set based on the occurrence and end time of the current event and the subsequent events. Then, determine whether the current event node and the subsequent event node are adjacent based on the system topology matrix TT. If they are adjacent, the subsequent event node ID of the current event is added to the corresponding value of the event causal perception matrix, otherwise it is not added.
[0247] 5) i = i + 1, and determine whether i is greater than the total number of event rows. If so, output the causal perception matrix C and execute sub-step 6), otherwise execute sub-step 3).
[0248] Causal perception matrix C
[0249] 6) The causal perception matrix is processed according to the second matrix transformation formula to obtain the causal perception ratio matrix CR:
[0250] Causal Perception Ratio Matrix CR
[0251] 7) Calculate the variance σ of the causal perception ratio matrix CR to obtain 1.04.
[0252] 8) Binarize the causal perception ratio matrix according to the second threshold value to obtain the causal relationship matrix CT:
[0253] Cause and Effect Matrix CT
[0254] Output the causal relationship matrix CT.
[0255] If further root cause node-root cause event location is required, root cause location analysis is further performed based on the clean data D, the system topology matrix TT, and the causal relationship matrix CT.
[0256] The following describes the root cause location process using a new example:
[0257] Fourth, the root cause of the specified event is located using the event causality matrix CT, the system topology matrix TT, and the event root cause analysis module, including the following sub-steps 1)-15):
[0258] 1) Receive the event time series data file uploaded by the user, as shown in Table 7:
[0259] Table 7
[0260] 2) The above event time series data is cleaned to obtain clean data (the same as the data shown in Table 7), the number of nodes = 3, and the number of alarms = 3.
[0261] 3) Create the root cause voting matrix V = 3*3:
[0262] Root cause voting matrix V
[0263] 4) Create a system topology directed graph G1 based on the system topology matrix TT, and store each event data in the clean data into its corresponding node to obtain a system event topology graph G2. Figure 19 shows a schematic diagram of the system event topology graph G2 provided by an exemplary embodiment of the present application.
[0264] 5) Analyze the root cause of event type 1.
[0265] 6) The node set N containing event type 1 is {0, 2}.
[0266] 7) Set the initial node of the walk to node 0 and the result event to event 1.
[0267] 8) Obtain the parent node of the initial node of the walk according to the system topology matrix TT, which is node 1 in FIG19 . If there is no parent node, execute S2312 .
[0268] 9) Get the event set in the parent node, which is events {0, 2} in Figure 19.
[0269] 10) Check whether the events in the parent node have a legitimate causal relationship with the result event of the initial node. In Figure 19, event 0 in node 1 occurs before event 1 in node 0 and ends before event 1 in node 0. Moreover, the causal relationship matrix CT[0,1] = 1. Event 0 in node 1 has a legitimate causal relationship with event 1 in node 0, so the root cause voting matrix V[0,1] accumulates 1. However, event 1 in node 0 occurs before event 2 in node 1 and is not a subsequent event of event 2 in node 1. Therefore, it does not have a legitimate causal relationship with event 1 in node 0, so voting recognition is not performed.
[0270] 11) Reset the initial node of the walk to node 1, the result event to event 0, and execute S2308.
[0271] 12) Whether the node set N is traversed completely, if so, jump to S2313 to execute, otherwise set the remaining nodes as the initial nodes of the traversal, if the event = the analysis event type, and jump to S2308 to continue execution.
[0272] 13) Output root cause voting matrix V:
[0273] Root cause voting matrix V
[0274] 14) Sort the voting results of all node-event sets from high to low, and take the top 1 node-event set as the root cause node-root cause event output according to the requirements. In the above root cause voting matrix V, node 1 is the root cause node, and event 0 is the root cause event.
[0275] 15) Feedback the root cause node and root cause event location results to the user.
[0276] In network system alarm scenarios, the above method can quickly identify the root cause node and root cause event that caused the alarm event, providing a basis for system fault troubleshooting, facilitating relevant technical personnel to handle the alarm event, and reducing human resource consumption.
[0277] Figure 20 shows a block diagram of an event causal relationship identification device provided by an exemplary embodiment of the present application. The event causal relationship identification device can execute all or part of the steps of the embodiment shown in Figure 4 or Figure 5. As shown in Figure 20, the device includes: an information acquisition module 2010, used to obtain event timing information of each event, and the event timing information is used to represent the event attributes of the event and the time attributes of the event; a topology structure perception module 2020, used to perceive the system topology structure between nodes based on the event timing information of each event, and obtain a system topology matrix, and the system topology matrix is used to characterize the adjacency between nodes where events occur; a causal relationship identification module 2030, used to identify the causal relationship between events based on the system topology matrix and the event timing information of each event, and obtain a causal relationship matrix, and the causal relationship matrix is used to indicate the causal relationship between each event.
[0278] In a possible implementation, the event attributes include the event type and the node where the event occurs, and the time attributes include the occurrence time of the event and the end time of the event.
[0279] In one possible implementation, the causal relationship identification module 2030 includes: a first type determination submodule, which is used to determine at least one event set type according to the chronological order of the occurrence time of the events, and each event set type contains at least one event set; the event set is a set consisting of two events with adjacent occurrence times; a first coefficient calculation submodule, which is used to calculate the cumulative causal strength coefficient corresponding to each of the at least one event set types based on the system topology matrix and the event timing information of each event; the cumulative causal strength coefficient is the cumulative value of the causal strength coefficient of each of the at least one event set under the event set type, and the causal strength coefficient is used to characterize the degree of causal relationship between the two events in the event set during the ongoing process; a first matrix generation submodule, which is used to generate the causal relationship matrix based on the cumulative causal strength coefficient corresponding to each of the at least one event set types.
[0280] In one possible implementation, the first coefficient calculation submodule is used to obtain the first occurrence time and the first end time of the first event, and the second occurrence time and the second end time of the second event from the event timing information of each event when the system topology matrix indicates that there is an adjacency relationship between the first node where the first event occurs and the second node where the second event occurs; the first event and the second event are two events that occur successively in the target event set; the target event set is any one of the at least one event set contained under the target event set type; the target event set type is any one of at least one event set type; obtain the ratio between the first difference and the second difference as the causal strength coefficient of the target event set; the first difference is the difference between the first end time and the second occurrence time, and the second difference is the difference between the second end time and the first occurrence time; and accumulate the causal strength coefficient of the target event set to the accumulated causal strength coefficient of the target event set type.
[0281] In one possible implementation, the first coefficient calculation submodule is used to determine that the causal strength coefficient corresponding to the first event occurring in the first node and the second event occurring in the second node is 0 when the system topology matrix indicates that there is no adjacency relationship between the first node where the first event occurs and the second node where the second event occurs.
[0282] In one possible implementation, the first matrix generation submodule is used to construct a causal perception matrix based on the accumulated causal strength coefficient of the at least one event set type; the rows in the causal perception matrix are used to represent the cause event type, and the columns in the causal perception matrix are used to represent the effect event type; the occurrence time of the event of the cause event type is earlier than the occurrence time of the event of the effect event type; a causal perception ratio matrix is generated based on the causal perception matrix; the causal perception ratio matrix is used to characterize the degree of causal relationship of the at least one event set type; the causal perception ratio matrix is binarized based on a first threshold to generate the causal relationship matrix.
[0283] In one possible implementation, the topology structure perception module 2020 includes: a second type determination submodule, which is used to determine at least one node set type based on the nodes where each event occurs in accordance with the chronological order of the occurrence of each event, and each node set type contains at least one node set; the node set is a set composed of the nodes where two events with adjacent occurrence times are located; a second coefficient calculation submodule, which is used to calculate the cumulative adjacency strength coefficient corresponding to at least one node set type based on the event timing information of each event; the cumulative adjacency strength coefficient is the cumulative value of the adjacency strength coefficient of at least one node set under the node set type, and the adjacency strength coefficient is used to characterize the degree of adjacency between two nodes; a second matrix generation submodule, which is used to generate the system topology matrix based on the cumulative adjacency strength coefficient corresponding to at least one node set type.
[0284] In one possible implementation, the second coefficient calculation submodule is used to obtain the third occurrence time and the third end time of the third event occurring in the third node, and the fourth occurrence time and the fourth end time of the fourth event occurring in the fourth node from the event timing information of each event; the third node and the fourth node are two nodes in the target node set, and the third occurrence time corresponding to the third node is earlier than the fourth occurrence time corresponding to the fourth node; the target node set is any one of at least one node set contained in the target node set type, and the target node set type is any one of at least one node set type; the ratio between the third difference and the fourth difference is obtained as the adjacency strength coefficient of the target node set; the third difference is the difference between the third end time and the fourth occurrence time, and the fourth difference is the difference between the fourth end time and the third occurrence time; the adjacency strength coefficient of the target node set is accumulated to the accumulated adjacency strength coefficient of the target node set type.
[0285] In one possible implementation, the second matrix generation submodule is used to construct a topology-aware matrix based on the accumulated adjacency strength coefficient of at least one node set type; the rows of the topology-aware matrix are used to represent source nodes, and the columns of the topology-aware matrix are used to represent target nodes; the occurrence time of the event in the source node is earlier than the occurrence time of the event in the target node; a topology-aware ratio matrix is generated based on the topology-aware matrix; the topology-aware ratio matrix is used to indicate the degree of adjacency relationship of at least one node set type; the topology-aware ratio matrix is binarized based on a second threshold to generate the system topology matrix.
[0286] In one possible implementation, the information acquisition module 2010 includes: a data set acquisition submodule, used to acquire an event collection data set; the event collection data set contains event collection data corresponding to the event timing information of multiple events; a sorting submodule, used to sort the data in the event collection data set according to the occurrence time of each event; and a data preprocessing submodule, used to perform data preprocessing on the event collection data set based on the order after sorting, and obtain the event timing information of each event after data preprocessing.
[0287] In a possible implementation, when the sorting process is ascending, the data preprocessing of the event collection data set includes at least one of the following: deleting event collection data that is repeated with the previous event collection data; deleting event collection data whose difference between the occurrence time corresponding to the previous event collection data is less than a first difference threshold and whose end time, event occurrence node, and event type are the same; merging multiple event collection data whose difference between the occurrence time of the events is less than a second difference threshold, and whose event occurrence node and event type are the same; the occurrence time corresponding to the merged event collection data is the earliest occurrence time among the multiple event collection data, and the end time corresponding to the merged event collection data is the latest end time among the multiple event collection data; deleting flash data, wherein the flash data is event collection data whose time difference between the end time and the occurrence time is less than a third difference threshold; deleting low-frequency data and / or high-frequency data, wherein the low-frequency data refers to event collection data corresponding to an event type whose number of occurrences in the event collection data set is less than a first number threshold, and the high-frequency data refers to event collection data corresponding to an event type whose number of occurrences in the event collection data set is greater than a second number threshold.
[0288] In one possible implementation, the device also includes: a root cause location module, which is used to perform root cause location based on the system topology matrix, the causal relationship matrix and the event timing information of each event, and obtain the root cause node and root cause event of the target event; the target event is the event in each event for which event root cause location analysis is to be performed.
[0289] In a possible implementation, the root cause location module includes: a matrix creation submodule, configured to create a root cause voting matrix for the target event, wherein the rows of the root cause voting matrix are used to represent event types, and the columns of the root cause voting matrix are used to represent nodes where events occur; a first graph creation submodule, configured to create a first system topology directed graph based on the system topology matrix, wherein the first system topology directed graph includes nodes and directed edges, wherein the directed edges are used to indicate data flow relationships or service call relationships between nodes; and a second graph creation submodule, configured to store event timing information of each event in a corresponding node. A second system topology directed graph is obtained; a set acquisition submodule is used to obtain a target node set, where each target node in the target node set is a node where an event of the target event type occurs; a voting submodule is used to sequentially use the target nodes in the target node set as starting nodes, perform at least one wandering vote according to the causal relationship matrix and the second system topology directed graph, and write the voting results of the at least one wandering vote into the root cause voting matrix; a root cause positioning submodule is used to determine the root cause node and root cause event of the target event based on the voting results in the root cause voting matrix.
[0290] In one possible implementation, the voting submodule is configured to obtain an analysis event under a current analysis node; obtain a parent node set of the current analysis node based on the second system topology directed graph, wherein the parent node set includes at least one parent node, and the direction of the directed edge between the parent node and the current analysis node is from the parent node to the current analysis node; perform an equal-probability random walk toward the parent nodes in the parent node set of the current analysis node; if it is determined based on the causal relationship matrix that there is a matching event in the walking node that has a causal relationship with the analysis event under the current analysis node, perform cumulative voting on the matching events under the walking node in the root cause voting matrix; the walking node is the parent node to which the current random walk reaches; obtain the matching event under the walking node as the analysis event under the new current analysis node; and repeat the above process until the matching event no longer exists in the walking node, or the walking node has no parent node; wherein, when the current analysis node is the starting node, the current analysis node is any one of the target nodes in the target node set.
[0291] In one possible implementation, the root cause positioning submodule is used to sort the corresponding node event sets in the root cause voting matrix based on the voting results in the root cause voting matrix to obtain a sorting result; and determine the root cause node and root cause event of the target event based on the top n node event sets with the highest number of votes in the sorting result, where n is a positive integer.
[0292] To sum up, the embodiments of the present application provide an event causal relationship identification device, which uses the event timing information of each event to perceive the system topology information of the node where the event occurs, and integrates the perception results of the system topology structure into the event causal relationship identification process, making full use of the collected information corresponding to each event. While solving the need to obtain causal relationships between events from a large amount of event timing information, it also solves the problem of poor practical applicability of the algorithm in certain scenarios due to the inability to provide topology structure information.
[0293] In an exemplary embodiment, a computer device is provided, which can be implemented as a target device in the present application, or an external monitoring device, or a remote control device; the computer device includes a processor core memory, which stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement all or part of the steps of the above-mentioned event causal relationship identification method.
[0294] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein the computer-readable storage medium stores at least one computer program, which is loaded and executed by a processor to implement all or part of the steps in the above-mentioned event causal relationship identification method. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, or the like.
[0295] In an exemplary embodiment, a computer program product is also provided, which includes at least one computer program, which is loaded by a processor and executes all or part of the steps of the event causal relationship identification method shown in any of the embodiments of Figure 4 or Figure 5 above.
[0296] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of the present application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered merely as exemplary, and the true scope and spirit of the present application are indicated by the claims.
[0297] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for identifying event causal relationships, the method comprising: Acquire event timing information of each event, where the event timing information is used to represent event attributes of the event and time attributes of the event; Based on the event timing information of each event, the system topology structure between nodes is perceived to obtain a system topology matrix, wherein the system topology matrix is used to characterize the adjacency between nodes where the event occurs; The causal relationship between events is identified based on the system topology matrix and the event timing information of each event, and a causal relationship matrix is obtained, where the causal relationship matrix is used to indicate the causal relationship between each event.
2. The method according to claim 1, wherein: The event attributes include the event type and the node where the event occurs, and the time attributes include the event occurrence time and the event end time.
3. The method according to claim 1, wherein: The step of identifying the causal relationship between events based on the system topology matrix and the event timing information of each event to obtain a causal relationship matrix includes: According to the chronological order of occurrence of the events, at least one event set type is determined, each event set type includes at least one event set; the event set is a set consisting of two events with adjacent occurrence times; Based on the system topology matrix and the event timing information of each event, the cumulative causal strength coefficient corresponding to each of the at least one event set type is calculated; the cumulative causal strength coefficient is the cumulative value of the causal strength coefficient of each of the at least one event set under the event set type, and the causal strength coefficient is used to characterize the degree of causal relationship between two events in the event set during the continuous process; The causal relationship matrix is generated based on the accumulated causal strength coefficients corresponding to each of the at least one event set types.
4. The method according to claim 3, wherein: The calculating, based on the system topology matrix and the event timing information of each event, the cumulative causal strength coefficient corresponding to each of the at least one event set types comprises: When the system topology matrix indicates that there is an adjacency relationship between a first node where a first event occurs and a second node where a second event occurs, a first occurrence time and a first end time of the first event, and a second occurrence time and a second end time of the second event are obtained from the event timing information of each event; the first event and the second event are two events that occur successively in a target event set; the target event set is any one of the at least one event set included in the target event set type; the target event set type is any one of the at least one event set type; The ratio between the first difference and the second difference is obtained as the causal strength coefficient of the target event set; the first difference is the difference between the first end time and the second occurrence time, and the second difference is the difference between the second end time and the first occurrence time; The causal strength coefficient of the target event set is accumulated into the accumulated causal strength coefficient of the target event set type.
5. The method according to claim 4, wherein: The method further comprises: When the system topology matrix indicates that there is no adjacency relationship between the first node where the first event occurs and the second node where the second event occurs, the causal strength coefficient corresponding to the first event occurring in the first node and the second event occurring in the second node is determined to be 0.
6. The method according to claim 3, wherein: The generating the causal relationship matrix based on the accumulated causal strength coefficients corresponding to each of the at least one event set types comprises: Based on the accumulated causal strength coefficient of the at least one event set type, a causal perception matrix is constructed; the rows in the causal perception matrix are used to represent the cause event type, and the columns in the causal perception matrix are used to represent the effect event type; the occurrence time of the event of the cause event type is earlier than The time of occurrence of the event of the said event type; Generate a causal perception ratio matrix based on the causal perception matrix; the causal perception ratio matrix is used to characterize the degree of causal relationship of the at least one event set type; The causal perception ratio matrix is binarized based on a first threshold to generate the causal relationship matrix.
7. The method according to claim 1, wherein: The sensing of the system topology structure between nodes based on the event timing information of each event to obtain a system topology matrix includes: According to the chronological order of occurrence of each event, at least one node set type is determined based on the nodes where each event occurs, and each node set type includes at least one node set; the node set is a set consisting of the nodes where two events with adjacent occurrence times are located; Based on the event sequence information of each event, calculating the cumulative adjacency strength coefficient corresponding to at least one node set type; the cumulative adjacency strength coefficient is the cumulative value of the adjacency strength coefficient of at least one node set under the node set type, and the adjacency strength coefficient is used to characterize the degree of adjacency relationship between two nodes; The system topology matrix is generated based on the accumulated adjacency strength coefficients corresponding to at least one node set type.
8. The method according to claim 7, wherein: The calculating, based on the event timing information of each event, the cumulative adjacency strength coefficient corresponding to at least one node set type, comprises: The third occurrence time and the third end time of the third event occurring in the third node, and the fourth occurrence time and the fourth end time of the fourth event occurring in the fourth node are obtained from the event timing information of each event; the third node and the fourth node are two nodes in the target node set, and the third occurrence time corresponding to the third node is earlier than the fourth occurrence time corresponding to the fourth node; the target node set is any one of at least one node set included in the target node set type, and the target node set type is any one of at least one node set type; The ratio between the third difference and the fourth difference is obtained as the adjacency strength coefficient of the target node set; the third difference is the difference between the third end time and the fourth occurrence time, and the fourth difference is the difference between the fourth end time and the third occurrence time; The adjacency strength coefficient of the target node set is accumulated into the accumulated adjacency strength coefficient of the target node set type.
9. The method according to claim 7, wherein: The generating the system topology matrix based on the accumulated adjacency strength coefficients corresponding to at least one node set type respectively includes: Based on the accumulated adjacency strength coefficient of at least one node set type, a topology perception matrix is constructed; the rows of the topology perception matrix are used to represent source nodes, and the columns of the topology perception matrix are used to represent target nodes; the occurrence time of the event in the source node is earlier than the occurrence time of the event in the target node; Generate a topology-aware ratio matrix based on the topology-aware matrix; the topology-aware ratio matrix is used to indicate the degree of adjacency of at least one node set type; The topology perception ratio matrix is binarized based on a second threshold to generate the system topology matrix.
10. The method according to claim 2, wherein: The obtaining of event timing information of each event includes: Acquire an event collection data set; the event collection data set includes event collection data corresponding to the event time sequence information of multiple events; Sorting the data in the event collection data set according to the occurrence time of each event; Based on the sequence after the sorting process, data preprocessing is performed on the event collection data set to obtain the event timing information of each event after the data preprocessing.
11. The method according to claim 10, wherein: In the case where the sorting process is an ascending process, the data preprocessing of the event collection data set includes at least one of the following: Delete the event collection data that is repeated with the previous event collection data; Delete the event collection data whose difference between the occurrence time corresponding to the previous event collection data and the end time, the node where the event occurs and the event type are the same; The difference between the occurrence times of the merged events is less than the second difference threshold, and the nodes where the events occur and the event types are the same in multiple event collection data; the occurrence time corresponding to the merged event collection data is the earliest occurrence time among the multiple event collection data, and the end time corresponding to the merged event collection data is the latest end time among the multiple event collection data; Deleting flash data, where the flash data is event collection data whose time difference between the end time and the occurrence time is less than a third difference threshold; Delete low-frequency data and / or high-frequency data, wherein the low-frequency data refers to the event collection data corresponding to the event type whose occurrence times in the event collection data set are lower than the first number threshold, and the high-frequency data refers to the event collection data corresponding to the event type whose occurrence times in the event collection data set are higher than the second number threshold.
12. The method according to claim 1, wherein: The method further comprises: Root cause location is performed based on the system topology matrix, the causal relationship matrix and the event timing information of each event to obtain the root cause node and root cause event of the target event; the target event is the event to be analyzed for event root cause location in each event.
13. The method according to claim 12, wherein: The root cause location is performed based on the system topology matrix, the causal relationship matrix and the event timing information of each event to obtain the root cause node and root cause event of the target event, including: Creating a root cause voting matrix of the target event, wherein the rows of the root cause voting matrix are used to represent event types, and the columns of the root cause voting matrix are used to represent nodes where events occur; Creating a first system topology directed graph according to the system topology matrix, wherein the first system topology directed graph includes nodes and directed edges, wherein the directed edges are used to indicate data flow relationships or service call relationships between nodes; The event timing information of each event is stored in the corresponding node to obtain the second system topology Directed graphs; Obtain a target node set, where each target node in the target node set is a node where an event of a target event type occurs; Taking the target node in the target node set as a starting node, performing at least one walking vote according to the causal relationship matrix and the second system topology directed graph, and writing the voting result of the at least one walking vote into the root cause voting matrix; Based on the voting results in the root cause voting matrix, the root cause nodes and root cause events of the target event are determined.
14. The method according to claim 13, wherein: The step of sequentially taking the target node in the target node set as a starting node, performing at least one walking vote according to the causal relationship matrix and the second system topology directed graph, and writing the result of the at least one walking vote into the root cause voting matrix includes: Get the analysis events under the current analysis node; Based on the second system topology directed graph, obtaining a parent node set of the current analysis node, wherein the parent node set includes at least one parent node, and the direction of the directed edge between the parent node and the current analysis node is from the parent node to the current analysis node; Performing a random walk with equal probability toward the parent nodes in the parent node set of the current analysis node; If it is determined based on the causal relationship matrix that there is a matching event in the wandering node that has a causal relationship with the analysis event under the current analysis node, cumulative voting is performed on the matching event under the wandering node in the root cause voting matrix; the wandering node is the parent node to which the current random walk reaches; Acquire the matching event under the wandering node as the analysis event under the new current analysis node; Repeat the above process until the matching event does not exist in the wandering node, or the wandering node does not have a parent node; Wherein, when the current analysis node is the starting node, the current analysis node is any one of the target nodes in the target node set.
15. The method according to claim 13, wherein: The determining the root cause node and the root cause event of the target event based on the voting result in the root cause voting matrix includes: Based on the voting results in the root cause voting matrix, sorting the corresponding node event sets in the root cause voting matrix to obtain a sorting result; The root cause nodes and root cause events of the target event are determined based on the first n node event sets with the highest number of votes in the sorting result, where n is a positive integer.
16. An event causal relationship identification device, the device comprising: An information acquisition module, used to acquire event timing information of each event, wherein the event timing information is used to represent event attributes and time attributes of the event; A topology perception module, used to perceive the system topology between nodes based on the event timing information of each event, and obtain a system topology matrix, wherein the system topology matrix is used to characterize the adjacency between nodes where the event occurs; The causal relationship identification module is used to identify the causal relationship between events based on the system topology matrix and the event timing information of each event, and obtain a causal relationship matrix, wherein the causal relationship matrix is used to indicate the causal relationship between each event.
17. A computer device, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the event causal relationship identification method as described in any one of claims 1 to 15.
18. A computer-readable storage medium, wherein at least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the event causal relationship identification method as described in any one of claims 1 to 15.
Citation Information
Patent Citations
A method and system for intelligent substation intrusion scene restoration based on spatio-temporal similarity matching
CN109241989A
Association analysis method, association analysis device and association analysis equipment of alarming faults
CN109687999A
Method and device for detecting low-efficiency service process
CN110825784A
Alarm association method and device, equipment and storage medium
CN115865616A
Event causal relationship identification method and device, computer equipment and storage medium
CN116628200A
Cited By
Intelligent acquisition, analysis and processing method for transformer cross-cut sheet stock detection data
CN119848028A
An intelligent acquisition, analysis and processing method for detection data of transformer cross-cut sheet materials
CN119848028B
Multi-device joint simulation method, computer device and storage device
CN119918253A
Multi-device Joint Simulation Method, Computer Device, Storage Device
CN119918253B
Geological disaster knowledge graph construction method and system based on artificial intelligence
CN120598007A
