Event deduction and early warning method based on causal inference
The causal relationship diagram is constructed through Granger causality test and Bayesian network, combined with Markov decision-making process and deep learning model, and the problem of causality in event deduction is solved, and the accuracy and timeliness of event warning are improved.
Patent Information
- Application Number
- CN202510736379.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-04
- Publication Date
- 2025-07-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing event deduction methods are difficult to reveal the causal relationship between events, especially in complex event chains, which leads to inaccurate early warnings.
The Granger causality test and Bayesian network are used to construct a causal relationship diagram, combined with Markov decision-making process and deep learning deduction model, event deduction is performed, and early warning information is generated through the risk assessment model.
It improves the accuracy of event deduction and the timeliness of early warning, can identify potential risks in advance and provide timely reference, and is suitable for event warnings in multiple industries.
Smart Images

Figure CN120258155A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the fields of artificial intelligence and big data analysis, and particularly relates to a method for event deduction and early warning based on causal inference. Background Art
[0002] With the continuous development of information technology and big data analysis technology, event deduction and early warning have become an indispensable part of various systems. Most of the existing event deduction methods rely on traditional statistical models and machine learning methods, but these methods usually have difficulty revealing the causal relationships between events and often perform poorly in the face of complex event chains.
[0003] In fields such as finance and society, events are usually the result of the interaction of multiple factors, and the occurrence of each event is not only affected by current factors but may also be potentially affected by historical events. Traditional methods based on association analysis and time series analysis cannot effectively handle these causal relationships. Therefore, how to deduce and early warn events based on causal inference has become a technical problem to be solved urgently. Summary of the Invention
[0004] (I) Technical Problems to be Solved The technical problem to be solved by the present invention is how to provide a method for event deduction and early warning based on causal inference to solve the problem of event deduction and early warning based on causal inference.
[0005] (II) Technical Solutions To solve the above technical problems, the present invention proposes a method for event deduction and early warning based on causal inference, which includes: a causal inference stage, an event deduction stage, and an event early warning stage; The input of the causal inference stage is historical event data, time series data, and external environment data, which is used to reveal the causal relationships between historical events. The output is a causal relationship graph, a causal inference model, and an event dependency structure. The algorithms used are Granger causality test and Bayesian network; The input of the event deduction stage is the causal relationship graph, historical data, and current event state output by the causal inference stage. Based on the results of the causal inference stage, it deduces possible future events. The output is possible future events, event state transition probabilities, and deduction trajectories. The algorithms used are Markov decision process MDP and deep learning deduction model LSTM; The input of the event early warning stage is the deduction results output by the event deduction stage and the risk assessment of future events. By calculating the risk score of each future event and dividing the early warning level according to the score, it issues early warning information in advance before the event actually occurs. The output is risk scores, early warning levels, and countermeasures; The algorithms used are risk assessment models and early warning level division methods.
[0006] (3) Beneficial effects The present invention provides a method for event deduction and early warning based on causal inference. By using a causal inference model to reveal the causal relationships between events, the event deduction becomes more accurate, and early warning can be carried out in advance based on the deduction results, greatly improving the timeliness and accuracy of event early warning. The main advantages are as follows: (1) Analyzing historical event data based on the causal inference model can reveal the causal relationships between complex events and improve the accuracy of the deduction results.
[0007] (2) The present invention can identify potential risks in advance and generate early warning information to provide timely reference for decision-making.
[0008] (3) The present invention is applicable not only to military, financial and other fields, but also to event deduction and early warning in multiple industries such as society and environmental protection.
[0009] (4) Through the result feedback mechanism, the causal inference model is continuously optimized and adjusted to improve the adaptive ability of the system. Description of the drawings
[0010] Figure 1 It is the overall framework diagram of the present invention. Detailed implementation manners
[0011] To make the objectives, contents and advantages of the present invention clearer, the following further describes in detail the specific implementation manners of the present invention with reference to the drawings and embodiments.
[0012] The objective of the present invention is to provide a method for event deduction and early warning based on causal inference. By constructing a causal inference model to analyze the causal relationships between historical events, and then deduce the events that may occur in the future, and identify and predict potential risks in advance through an early warning mechanism. It mainly solves two problems. One is to use causal inference algorithms (Granger causality test, Bayesian network) to analyze historical event data and identify the causal relationships between events. By constructing a causal relationship map, determine the causal chain between different events; the other is to deduce the events that may occur in the future based on the constructed causal model using inference algorithms. According to the current event state and the causal relationships of historical events, deduce the subsequent events that may occur; the third is to conduct risk assessment on the deduced possible events, identify high-risk events, and generate corresponding early warning information. The early warning information includes warning level, event description, possible impact range, and countermeasures, etc.
[0013] The present invention provides a method for event deduction and early warning based on causal inference, which can be divided into three main parts, namely: causal inference stage, event deduction stage and event early warning stage. The data flow and dependency relationships between each stage are represented by arrows.
[0014] The input of the causal inference stage is historical event data, time series data, external environment data, etc., which is used to reveal the causal relationships between historical events. The output is a causal relationship graph, a causal inference model, and an event dependency structure. The algorithms used are the Granger causality test and Bayesian networks; The input of the event deduction stage is the causal relationship graph, historical data, and current event status output by the causal inference stage. Based on the results of the causal inference stage, it deduces possible future events. The output is possible future events, event state transition probabilities, and deduction trajectories. The algorithms used are the Markov decision process MDP and the deep learning deduction model LSTM; The input of the event early warning stage is the deduction results output by the event deduction stage and the risk assessment of future events. By calculating the risk score of each future event and dividing the warning levels based on the scores, it issues early warning information before the events actually occur. The output is risk scores, warning levels, and countermeasures. The algorithms used are the risk assessment model and the warning level division method. The overall framework diagram is as Figure 1 shown.
[0015] The core task of the causal inference stage is to reveal the causal relationships between historical events and provide a basis for subsequent deductions. To accurately capture the causal chains between different events, this stage adopts the Granger causality test and Bayesian network model.
[0016] The Granger causality test is used to identify the causal relationships between events in time series data. By performing a regression analysis on historical data, it determines whether one event can predict the future trend of another event. If the past state of one event can effectively predict the future state of another event, then a causal relationship can be considered to exist. The formula is as follows:
[0017] where, is the event to be predicted, is the possible causal event, is the constant term, is the regression coefficient, is the number of lags, is the error term. By testing whether is significant, it can be determined whether has a causal impact on
[0018] Then, optimize the causal relationship diagram through the Bayesian network. The Bayesian network optimizes the causal relationship diagram between events through probabilistic reasoning. Each node represents an event, and the edge represents the causal relationship between events. Through the learning of historical data, the Bayesian network can deduce the conditional dependence relationship between events, and the calculation formula is:
[0019] where, represents the probability of event occurring under the condition that event occurs, is the reverse conditional probability, and are the prior probabilities of events and .
[0020] By constructing the Bayesian network, an optimized causal relationship diagram between events can be obtained, and this causal relationship diagram is used to provide data support for the subsequent event deduction stage.
[0021] Taking historical stock market data as an example, the event sequence , where stock price, trading volume, growth rate. and are time series data (each data point is the market data of one day), then the following two regression models can be constructed:
[0022] where, Equation (3) is the model without causal hypothesis, and Equation (4) is the model with causal hypothesis.
[0023] Calculate the p-value. If it is found that , then reject the non-causal hypothesis and consider that the stock price has a Granger causal relationship with the trading volume . Use the Bayesian network to further optimize the causal relationship model. By analyzing historical data, obtain the conditional dependence relationship of each event on other events, and construct a causal relationship diagram. If the stock price affects the trading volume , and the trading volume is in turn affected by the GDP growth rate , then the final causal relationship diagram is as follows:
[0024] The final causal relationship diagram .
[0025]
[0026] Step 2: Event Deduction Stage The goal of the event deduction stage is to deduce possible future events based on the results of causal inference. To achieve this goal, this stage adopts the Markov decision process and the deep learning deduction model.
[0027] Using the causal relationship graph generated in the causal inference stage and historical data, the Markov decision process (MDP) and the deep learning deduction model (LSTM) are adopted to deduce possible future events. Through the deduction algorithm, combined with the current event state and historical data, the possibility and probability of future events are predicted, and a deduction trajectory is generated. The goal of this stage is to transform the causal relationship into an actual event dynamic model, providing a sequence of possible events for the event warning stage.
[0028] The Markov decision process is a mathematical model for modeling decision-making processes, suitable for deducing possible future event states based on the current state. MDP can deduce the future event trajectory according to the transition probability and decision rules of the current event state.
[0029] The basic model of MDP can be represented as a five-tuple <S, A, T, R, γ>, where: S is the state space, which is composed of the nodes in the causal relationship graph generated in the causal inference stage. Each node represents an observable or intervenable event state (such as "surge in traffic flow", "increase in equipment failure rate"). The state definition incorporates the key variable weights in the causal relationship graph. For example, the causal strength coefficient between nodes is used to screen high-influence states; A is the action space, corresponding to the intervenable actions that can be applied (such as "initiate the emergency plan", "adjust resource allocation"). The action candidate set is generated by reverse derivation from the intervenable nodes in the causal relationship graph, establishing an interpretable association between actions and causal links; T is the state transition probability, which is dynamically corrected based on the temporal transition law of event states in historical data, combined with the edge weights of the causal relationship graph. For example, when the edge weight of "A→B" in the causal relationship graph is high, the transition probability from state A to B will be significantly increased; R is the reward function, designed according to the warning goal (such as minimizing losses, suppressing risk diffusion). The reward value is determined by the end influence intensity of the causal path. For example, if the event deduction path points to a high-risk node, a negative reward is imposed on the actions on that path; $\gamma$ is the discount factor, which is used to adjust the time decay effect and is dynamically adjusted for different event types (e.g., $\gamma$ is lower for sudden events and higher for long-term risks).
[0030] The MDP model infers the optimal strategy for future events through the following Bellman equation:
[0031] where, $V(s)$ is the value at state $s$, $P(s'|s, a)$ is the state transition probability from state $s$ to state $s'$ after executing action $a$, $R(s, a)$ is the reward obtained after executing action $a$ at state $s$, $\gamma$ is the discount factor; Through the MDP model, the state of the current event can be modeled, and the subsequent possible events and their transition probabilities can be inferred.
[0032] To improve the accuracy of inference and capture the long-term causal dependencies in the event sequence, the present invention designs a causal enhanced LSTM (Causal-LSTM), which can capture the causal dependency relationships over a long time span through learning historical event data, thereby effectively inferring future events.
[0033] The input of Causal-LSTM is the historical event state sequence (time series data) and the causal relationship graph $G$. The output is the probability distribution of the event states in the next $N$ steps and the activation intensity of the key causal paths. The edge weights of the causal relationship graph are embedded in the forget gate and input gate of the traditional LSTM. The core formula is:
[0034] where, $\sigma$ are the activation functions of the forget gate, input gate and output gate respectively, $C$ is the cell state, $h$ is the output, $W$ and $b$ are the weight and bias terms. After training, the weights $W$ and $b$ contain the information of the causal coefficients. Causal-LSTM can effectively learn the long-term dependencies in the event sequence and infer future events based on these historical events.
[0035] Taking historical stock market data as an example, in MDP, the state space is defined as For different states of the market (e.g., high, low, stable stock prices, etc.), the action space For possible behaviors of the market (e.g., buy, sell, hold), the reward function is used to evaluate the payoff of taking a certain action in a certain state.
[0036] Define the state transition model: Assume is the probability of transitioning from the current state to the next state by taking the action For example, taking a "buy" operation may cause the stock price to rise.
[0037] Use the LSTM model to process historical market data, capture long-term dependencies, and predict future stock prices, trading volumes, etc. Based on past market data (such as stock prices and trading volumes in the past 100 days) and the corresponding causal relationship graph G, train the Causal-LSTM model:
[0038] Combining the time series features generated by the Causal-LSTM model and the state transition model of the MDP, deduce the future market fluctuations. If the current market state is: stock price , trading volume , GDP growth rate . Use the MDP and LSTM to predict the future state transitions, obtain the predicted stock price at the next moment, and calculate the possible future events according to the transition probabilities.
[0039] The goal of the event warning stage is to conduct risk assessment based on the deduced future events and generate warning information in a timely manner. To achieve this goal, the present invention adopts a risk assessment model and warning level classification.
[0040] Based on the event deduction, this stage conducts risk assessment on the deduction results. By calculating the risk scores of each future event and classifying the warning levels according to the scores, warning information can be sent in advance before the events actually occur. Using the risk assessment model and warning level classification method can not only identify potential high-risk events but also provide countermeasures for decision-makers. The finally generated warning information includes risk level, impact range, response plan, etc.
[0041] The risk assessment model quantifies factors such as the impact range and possibility of the deduced events to generate a risk score. The risk score is calculated by the following formula:
[0042] wherein, is the probability of an event occurring, is the degree of impact of the event on the system. By calculating the risk score , the potential harm degree of the event can be evaluated.
[0043] According to the magnitude of the risk score , the early warning levels are divided. Assuming the early warning levels are divided into four levels: low, medium, relatively high, and high, then the specific level division is as follows:
[0044] Taking historical stock market data as an example, according to historical data and event deduction results: the stock price and , through the risk assessment model, the risk score is obtained. Then, according to the risk level division, a "high - risk" early warning is generated, indicating that the future market volatility is large, the stock price is expected to fluctuate significantly, and the market risk is high.
[0045] The present invention reveals the causal relationship between events through a causal inference model, making event deduction more accurate, and being able to give early warnings based on the deduction results, greatly improving the timeliness and accuracy of event early warnings. The main advantages are reflected in the following aspects: (1) Analyzing historical event data based on the causal inference model can reveal the causal relationship between complex events and improve the accuracy of deduction results.
[0046] (2) The present invention can identify potential risks in advance and generate early warning information, providing timely reference for decision - making.
[0047] (3) The present invention is not only applicable to fields such as military and finance, but also applicable to event deduction and early warning in multiple industries such as society and environmental protection.
[0048] (4) Through the result feedback mechanism, continuously optimize and adjust the causal inference model to enhance the adaptive ability of the system.
[0049] The above - mentioned is only the preferred implementation manner of the present invention. It should be noted that for those of ordinary skill in the art in this technical field, without departing from the technical principle of the present invention, several improvements and deformations can be made, and these improvements and deformations should also be regarded as the protection scope of the present invention.
Claims
1. An event deduction and early warning method based on causal inference, characterized in that, The method includes: a causal inference stage, an event deduction stage, and an event early warning stage; The input of the causal inference stage is historical event data, time series data, and external environment data, which is used to reveal the causal relationships between historical events. The output is a causal relationship graph, a causal inference model, and an event dependency structure. The algorithms used are Granger causality test and Bayesian network; The input of the event deduction stage is the causal relationship graph, historical data, and current event status output by the causal inference stage. Based on the results of the causal inference stage, it deduces possible future events. The output is possible future events, event state transition probabilities, and deduction trajectories. The algorithms used are Markov decision process MDP and deep learning deduction model LSTM; The input of the event early warning stage is the deduction results output by the event deduction stage and the risk assessment of future events. By calculating the risk score of each future event and dividing the early warning levels according to the scores, it issues early warning information in advance before the event actually occurs. The output is risk scores, early warning levels, and countermeasures; The algorithms used are risk assessment models and early warning level division methods.
2. The method for event deduction and early warning based on causal inference according to claim 1, characterized in that, In the causal inference stage, the Granger causality test is used to identify the causal relationships between events in time series data; by performing regression analysis on historical data, it determines whether one event can predict the future trend of another event; if the past state of one event can effectively predict the future state of another event, then a causal relationship is considered to exist. The formula is as follows: Among them, is the event to be predicted, is the possible causal event, is the constant term, is the regression coefficient, is the number of lag periods, is the error term; by testing for significance, judge whether has a causal impact on 3. The method for event deduction and early warning based on causal inference according to claim 2, wherein In the causal inference stage, the causal relationship graph is optimized through a Bayesian network. The Bayesian network optimizes the causal relationship graph between events through probabilistic reasoning. Each node represents an event, and the edge represents the causal relationship between events; through the learning of historical data, the Bayesian network can deduce the conditional dependency relationships between events. The calculation formula is: Among them, represents the probability that event occurs given that the known event has occurred. is the reverse conditional probability, and are the prior probabilities of events and respectively. Through the construction of the Bayesian network, the optimized causal relationship graph between events is obtained, and this causal relationship graph is used to provide data support for the subsequent event deduction stage.
4. The method for event deduction and early warning based on causal inference according to claim 3, wherein In the event deduction stage, using the causal relationship graph generated in the causal inference stage and historical data, the Markov decision process MDP and the deep learning deduction model LSTM are used to deduce possible future events; through the deduction algorithm, combined with the current event status and historical data, it predicts the possibility and occurrence probability of future events and generates deduction trajectories; the goal of this stage is to transform the causal relationship into an actual event dynamic model and provide a sequence of possible events for the event early warning stage.
5. The method for event deduction and early warning based on causal inference according to claim 4, characterized in that The Markov Decision Process (MDP) infers future event trajectories based on the transition probabilities and decision rules of the current event state; the MDP model is represented as a five-tuple <S, A, T, R, γ>, where: is the state space, which is composed of the nodes in the causal relationship graph generated in the causal inference stage. Each node represents an observable or intervenable event state; the state definition incorporates the weights of the key variables in the causal relationship graph; is the action space, corresponding to the intervention actions that can be applied. The action candidate set is generated by reverse derivation from the intervenable nodes of the causal relationship graph, establishing an interpretable association between the actions and the causal links; is the state transition probability, which is dynamically corrected based on the temporal transition law of event states in historical data and combined with the edge weights of the causal relationship diagram; is a reward function, designed according to the warning target, and the reward value is determined by the influence intensity at the end of the causal path; is a discount factor used to adjust the time-series decay effect and is dynamically adjusted according to different event types; The MDP model deduces the optimal strategy for future events through the following Bellman equation: Among them, is the value at state . is the state transition probability from state to state after performing action . is the reward obtained after performing action at state . is the discount factor; The MDP model models the status of the current event and deduces the possible subsequent events and their transition probabilities.
6. The method for event deduction and early warning based on causal inference according to claim 5, characterized in that If the event deduction path points to a high-risk node, a negative reward is imposed on the actions on that path.
7. The method for event deduction and early warning based on causal inference according to claim 5, wherein The γ of sudden events is lower, while the γ of long-term risks is higher.
8. The method for event deduction and early warning based on causal inference according to claim 5, wherein The deep learning deduction model LSTM is a causality-enhanced LSTM, which captures long-term causal dependencies through the learning of historical event data, thus effectively deducing future events; The input of the causality-enhanced LSTM is the historical event state sequence and the causality graph G. The output is the probability distribution of the event states in the next N steps and the activation intensity of the key causal paths. The edge weights of the causality graph are embedded in the forget gate and the input gate. The core formula is as follows: Among them, are the activation functions of the forget gate, input gate, and output gate respectively, is the cell state, is the output, and are the weights and bias terms, and contain causal coefficients; Causal enhanced LSTM learns long-term dependencies in the event sequence and infers future events based on these historical events.
9. The method for event deduction and early warning based on causal inference according to claim 8, wherein In the event warning stage, the risk assessment model quantifies the scope of influence and likelihood factors of the deduced events to generate a risk score. Risk score Calculated by the following formula: Among them, is the probability of the event occurring, is the degree of impact of the event on the system; by calculating the risk score , the potential harm degree of the event is evaluated.
10. The method for event deduction and early warning based on causal inference according to claim 9, wherein The method for classifying early warning levels includes: based on the risk score , classify the early warning levels. Assuming that the early warning levels are divided into four levels: low, medium, relatively high, and high, the specific level classification is as follows: 。
Citation Information
Patent Citations
Natural gas pipeline third-party damage accident early warning method based on dynamic Bayesian network
CN114819384A
Military intelligence intelligent analysis and deduction method based on affair atlas
CN115878811A
Log anomaly prediction method based on dual deep Q network
CN118838740A
Causal and anti-fact sepsis auxiliary decision-making method of Transform
CN119339915A
Gas accident analysis system and method based on dynamic Bayesian network
CN119940926A