Event prediction method and system based on time sequence hypergraph
By constructing a temporal hypergraph and combining causal discovery and graph neural networks, the lack of causal mechanisms in existing technologies is addressed, achieving high-precision and interpretable event prediction while avoiding the security risks of cross-regional data dependence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANXI UNIV
- Filing Date
- 2025-11-18
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies lack causal mechanism modeling, resulting in low accuracy and poor interpretability in event prediction, and their reliance on cross-regional data poses data security risks.
A temporal hypergraph-based approach is adopted, which constructs a causal graph between variables through a causal discovery algorithm, and combines it with a graph neural network for learning to uniformly model causal relationships and temporal evolution. Dynamic filtering and multi-band learning mechanisms are used to achieve independent prediction for a single region.
It improves the accuracy and interpretability of event prediction, protects data privacy, and enables precise modeling of specific regions.
Smart Images

Figure CN121959094A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of event prediction technology, specifically relating to an event prediction method and system based on a temporal hypergraph. Background Technology
[0002] Early research on event prediction relied heavily on traditional statistical models (such as autoregressive models and logistic regression) and shallow machine learning algorithms. These methods typically require complex manual feature engineering and struggle to effectively capture the nonlinear features and high-dimensional dependencies present in event data.
[0003] Although deep learning models, especially recurrent neural networks (RNNs), convolutional neural networks (CNNs), and graph neural networks (GNNs), have demonstrated superior performance in modeling spatiotemporal dependencies in recent years and have been widely applied in the field of social event prediction, existing technologies still have significant limitations:
[0004] First, most models primarily learn correlations or spatial propagation patterns in historical event sequences, lacking explicit modeling of the multivariate causal mechanisms underlying these events. Events are often driven by multiple socioeconomic variables; predictive models relying solely on correlations are unstable when data distribution changes, their decision-making processes lack interpretability, and they are difficult to provide credible evidence for decision-making.
[0005] Secondly, at the modeling technique level, existing methods typically model temporal dependencies separately from or simply superimpose the structured dependencies between variables. For example, some studies use time series models to process univariate time series and then use models such as graph neural networks to aggregate spatial information, but fail to construct a unified framework to simultaneously and interactively capture the causal relationships between variables and the evolutionary dynamics at time points. This fragmented modeling limits the model's ability to understand and characterize the dynamics of complex social systems.
[0006] Furthermore, in event prediction scenarios, existing technologies typically rely on auxiliary data from other regions to improve performance. However, with increasingly stringent data privacy protection requirements, this cross-regional reliance poses data security risks and also ignores the unique social dynamics that may exist within a region.
[0007] Therefore, there is an urgent need for an event prediction method and system that can explicitly model the causal relationships of variables within a region, deeply integrate temporal evolution information, and provide more reliable and interpretable prediction results. Summary of the Invention
[0008] To address the problems of low prediction accuracy and poor interpretability caused by the lack of causal mechanism modeling and the separation of temporal and structural dependencies in existing technologies, this invention provides an event prediction method and system based on temporal hypergraphs.
[0009] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0010] In a first aspect, the present invention provides an event prediction method based on a temporal hypergraph, comprising the following steps:
[0011] Step 1: Obtain multi-source heterogeneous data of the target region and preprocess it to generate time-series feature sequences of various variables in the region;
[0012] Preprocessing includes: defining a unified time index; aggregating historical data reflecting the occurrence of events according to the time index to generate a binary classification target variable sequence; aligning numerical external data to the time index; and converting unstructured text data into a numerical feature sequence using natural language processing techniques and aligning it with the time index.
[0013] Step 2: Based on the causal discovery algorithm, analyze the time-series feature sequence and construct a causal graph among variables within the target region;
[0014] The causal discovery algorithm includes: calculating the cross power spectral density of variable pairs to screen out frequency components with significant coupling; determining the causal direction and time lag between variables at the significant coupling frequencies based on phase analysis; and quantifying the strength of the direct causal effect between variables under controlled confounding variables by calculating the frequency domain conditional mutual information.
[0015] Furthermore, the calculation of frequency domain conditional mutual information specifically involves constructing a condition set for calculating frequency domain conditional mutual information through a recursive filtering strategy, in order to isolate indirect causal relationships.
[0016] Step 3: Construct a temporal hypergraph structure. First, define nodes, defining the state of each variable under each time index as an independent node. Then, construct causal relationship edges, establishing connections between nodes corresponding to different variables according to the causal graph to form causal relationship edges. Finally, construct temporal evolution edges: for the same variable, establish directed connections between nodes at adjacent time points according to the order of their time indices to form temporal evolution edges.
[0017] The edges of the graph structure include: causal relationship edges established between different variable nodes based on the causal graph, and temporal evolution edges established between adjacent time point nodes for the same variable.
[0018] Step 4: Perform spectral domain filtering on the node features of the temporal hypergraph structure using a dynamic filter;
[0019] Step 5: Use a graph neural network to learn the filtered graph structure in order to integrate causal and temporal information and capture its complex internal patterns.
[0020] Step 6: Perform binary classification prediction based on the learned graph representation and output the probability of future events occurring in the region.
[0021] Furthermore, the dynamic filter is a dual-path dynamic filter, including a causal filtering path and a temporal filtering path, as well as a fusion unit. The causal filtering path is used to enhance the spectral features of the input signal based on the structural information of the causal graph to extract causal patterns. The temporal filtering path is used to perform gating selection processing on the spectral features of the input signal based on temporal evolution relationships to extract temporal patterns. The fusion unit is used to perform weighted fusion of the outputs of the causal filtering path and the temporal filtering path through learnable parameters to generate a joint representation containing causal and temporal information.
[0022] Furthermore, the graph neural network integrates a multi-band learning mechanism.
[0023] Furthermore, the multi-band learning mechanism includes:
[0024] The spectrum partitioning step divides the spectral domain representation of the graph structure into multiple independent frequency bands according to frequency levels.
[0025] The frequency band modulation step involves assigning a learnable gating vector to each frequency band and then performing adaptive weighted modulation on the signal components of the corresponding frequency band using the gating vector.
[0026] The feature aggregation step sums all modulated frequency band signal components and outputs a deep feature representation that integrates cross-causal-temporal structure and cross-frequency information.
[0027] Furthermore, the social event prediction method based on causal discovery is implemented independently for each region, and the model training and prediction process does not depend on data from any other region.
[0028] Secondly, the present invention provides a social event prediction system based on causal discovery, the system comprising a data acquisition and preprocessing module, a causal graph construction module, a graph structure construction module, a graph structure filtering module, a graph neural network learning module, and a prediction output module;
[0029] The data acquisition and preprocessing module is used to acquire multi-source heterogeneous data of the target region and preprocess it to generate time-series feature sequences of various variables in the region.
[0030] The causal graph construction module is used to construct a causal graph between variables within the target region through the causal discovery module;
[0031] The graph structure construction module is used to construct a graph structure containing causal relationship edges and temporal evolution edges;
[0032] The graph structure filtering module is used to filter the graph structure to fuse causal and temporal information;
[0033] The graph neural network learning module is used to learn the filtered graph structure;
[0034] The prediction output module is used to predict events based on the learned graph representation and output the probability of future events occurring in the region.
[0035] Compared with the prior art, the present invention has the following advantages:
[0036] This invention unifies the modeling of causal relationships and temporal evolution relationships between variables by constructing a temporal hypergraph, overcoming the limitation of existing technologies that treat the two separately, and can more completely depict the dynamic evolution mechanism of events.
[0037] This invention improves prediction accuracy and enhances model interpretability by introducing causal discovery, dynamic filtering, and multi-band learning mechanisms, thus providing causal basis for decision-making.
[0038] This invention adopts a single-region independent prediction model, which does not require cross-regional data, thus ensuring data privacy and achieving accurate modeling for specific regions. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram of the method flow of the present invention;
[0041] Figure 2 This is a schematic diagram of the overall model training process of the present invention;
[0042] Figure 3 This is a system structure diagram of the event prediction system of the present invention. Detailed Implementation
[0043] To gain a deeper understanding of this invention, we will provide a comprehensive and detailed description. However, this invention has various implementations and is not limited to the specific examples listed herein. These examples are presented to enhance a full understanding of the disclosure of this invention.
[0044] This invention provides an event prediction system based on a temporal hypergraph, comprising: a data acquisition and preprocessing module, a causal graph construction module, a graph structure construction module, a graph structure filtering module, a graph neural network learning module, and a prediction output module;
[0045] The data acquisition and preprocessing module is used to acquire multi-source heterogeneous data of the target region and perform preprocessing to generate time-series feature sequences of each variable; the preprocessing includes defining a unified time index and aligning or converting event data, numerical data and unstructured text data into feature sequences corresponding to the time index respectively;
[0046] The causal graph construction module is used to analyze the time-series feature sequence based on the frequency domain counterfactual conditional mutual information algorithm and construct a causal graph between variables within the target region.
[0047] A temporal hypergraph construction module is used to embed the causal graph and the temporal evolution relationship of the variables together to construct a temporal hypergraph structure; the nodes of the temporal hypergraph structure represent the state of the variables at a specific time point, and the edges include causal relationship edges and temporal evolution edges;
[0048] The dynamic filtering module is used to filter the temporal hypergraph using a dual-path dynamic filter to generate a joint representation that integrates causal and temporal information.
[0049] The graph learning module is used to learn the filtered temporal hypergraph using a graph neural network with integrated multi-band spectral gating mechanism in order to capture its complex causal and temporal patterns.
[0050] The prediction output module is used to perform binary classification prediction based on the learned graph representation and output the probability of future events occurring in the region.
[0051] This invention discloses an event prediction method based on temporal hypergraphs, which is described below in conjunction with... Figure 1 , Figure 2 and Figure 3 The specific implementation process of the present invention will be described in detail below.
[0052] Step 1: Obtain multi-source heterogeneous data of the target region and perform preprocessing to generate time-series feature sequences of various variables in the region.
[0053] Acquire multi-source heterogeneous data for the target region (e.g., "City A"). This data includes, but is not limited to:
[0054] Historical event data: Event A and Event B records obtained from the database, used as labels for model training and validation.
[0055] Numerical data: monetary data from the World Bank's WDI database, and daily temperature and precipitation data from meteorological departments.
[0056] Text data: News reports related to the region, extracted from online social media platforms and local news media.
[0057] The preprocessing process is specifically as follows:
[0058] First, define a unified time index. For example, using "days" as the granularity, a continuous date sequence from the start date to the end date can be generated.
[0059] Next, the historical event data is indexed according to the stated time. Perform aggregation: If on date If relevant events occur in this region, then the target variable... The target variable is marked as 1 if it is not 0 otherwise, thus generating a binary sequence of target variables.
[0060] For numerical data, if it is daily data (such as temperature), it is directly aligned to the time index. If the data is low-frequency, a forward-fill method is used, filling all dates within that quarter with the quarterly value to ensure that each time index is filled. Each of them has a corresponding feature value.
[0061] For text data, a pre-trained BERT model is used to perform sentiment analysis on all news articles of the day, calculating the daily average sentiment score. This score is then used as a new numerical feature sequence, along with the time index. Alignment.
[0062] Step 2: Based on the time-series feature sequence, construct a causal graph of variables within the target region.
[0063] Based on the time-series feature sequence generated in step 1, a causal graph between variables is constructed using the frequency-domain counterfactual conditional mutual information algorithm. The specific implementation process is as follows:
[0064] Frequency domain coupling screening: for variable pairs Calculate its different frequencies Cross-power spectral density (CPSD) Set a significance threshold to filter out... Frequency components exceeding this threshold are considered as candidate components for subsequent analysis.
[0065] Causal Direction and Time Lag Judgment: In the evolution of an event, the causal influence of one variable on another usually does not occur instantaneously, but with a time lag. This lag information is encoded in the frequency at which there is significant coupling between the two variables. Within the phase. Based on this, it can be obtained through the cross-power spectral density. Phase information to determine variables and The causal direction between them is determined, and different frequencies are quantified using the following formula. Causal time lag :
[0066] (1)
[0067] In the formula, Compared to The phase difference indicates the temporal lead relationship between variables. Based on the general physical system principle that the "cause" precedes the "effect," it is possible to... The causal direction is inferred as "variable". → Variable The time lag calculated using formula (1) This refers to the specific, time-based quantification of the leading relationship in the time domain.
[0068] Causality Strength Quantization: Calculate frequency-domain conditional mutual information (FCMI) to quantify causal strength. For " → The causal direction of "" is calculated as follows:
[0069] (2)
[0070] in, and Variables and After time-frequency transformation, the time-series signal is at a frequency of Both the frequency domain components contain the amplitude and phase information of the variable at that frequency; H(⋅) is the conditional entropy, estimated using the K-nearest neighbor (KNN) method. Condition set Constructed through a recursive filtering strategy, i.e., the previous condition set. Gradually add to frequency Upper phase leading Candidate variables are selected, and if their inclusion leads to a significant decrease in the FCMI value, they are retained; otherwise, they are removed.
[0071] Counterfactual verification: Construct a control variable using the IAAFT (Iterative Amplitude Adjusted Fourier Transform) method. This method preserves statistical properties, i.e., the control variable, while severing the causal path. Relative to the original variable It satisfies three key properties: maintaining frequency domain amplitude, maintaining time domain distribution, and disrupting time phase structure.
[0072] Next, the original signals were processed separately. and control signal By applying random perturbations, the corresponding counterfactual signals are obtained. and The changes in FCMI for the experimental group and the control group are defined as follows:
[0073] (3)
[0074] (4)
[0075] The perturbation of the control group was repeated N times to construct a null distribution. If the following conditions are met, then at frequency The above confirms that causality is established:
[0076] (5)
[0077] That is, the change in FCMI of the original signal. The zero distribution formed by the change exceeding that of the control group is at the 95th percentile (this standard corresponds to a significance level). ).
[0078] Finally, all verified causal paths are integrated to form a causal graph with time-delay information. .
[0079] Step 3: Construct a temporal hypergraph structure to jointly embed the causal relationships and temporal evolution relationships between variables.
[0080] Construct a temporal hypergraph Specifically, it includes:
[0081] Define nodes: index each variable at each time point. The state under each time point is defined as an independent node. Therefore, if there are M variables and T time points, a total of M×T nodes will be generated.
[0082] Constructing causal edges: Based on the causal graph obtained in step 2 If the cause-and-effect diagram There exists a variable to variable The causal relationship and the lag is At each time step, the supergraph... From the node (variable At time step The state on the node) points to the node Directed edges are formed, and all such edges together constitute a causal adjacency matrix. .
[0083] Constructing temporal evolution edges: for any variable Between its own nodes in consecutive time steps (such as from point to Establishing connections, these edges reflect the internal time dependency structure of variables and form a temporal adjacency matrix. .
[0084] Step 4: Filter the time-series hypergraph using a dynamic filter.
[0085] Using a dual-path dynamic filter for timing hypergraph The node features are filtered. The input to this filter is the spectral domain representation of the node features. .
[0086] Causal Path Filtering: Based on Causal Laplacian Matrix (Source) ),use The activation function performs filtering and outputs... The calculation is as follows:
[0087] (6)
[0088] In the formula, and All are learnable parameters. This represents the Hadamard product. This operation aims to non-negatively enhance signal components related to causal structures.
[0089] Temporal path filtering: Based on temporal Laplacian matrix (Source) ),use The activation function acts as a gate, outputting... The calculation is as follows:
[0090] (7)
[0091] In the formula, and All of these are learnable parameters. This operation aims to selectively filter out important timing patterns.
[0092] Adaptive fusion: The dual-path outputs are spliced together and passed through a multilayer perceptron (MLP). Generate fusion weights Finally, a joint representation is generated. The calculation is as follows:
[0093] (8)
[0094] (9)
[0095] in, This represents vector concatenation. for function.
[0096] Step 5: Construct a graph neural network to learn the filtered temporal hypergraph in order to integrate causal and temporal information and capture its complex internal patterns.
[0097] The filtered joint representation The input is fed into a graph neural network that integrates a multi-band spectral gating (MSG) mechanism for learning.
[0098] Spectrum partitioning: Frequency bands are partitioned based on the spectral domain representation of the time-series hypergraph. Specifically, the singular value spectrum representing the frequency components is obtained by decomposing the Laplacian matrix of the hypergraph. This singular value spectrum is then divided into multiple independent frequency bands according to frequency, in order to capture mode features at different time scales.
[0099] Band modulation: for each frequency band Assign a learnable gating vector The signal components of this frequency band are modulated using the Hadamard product.
[0100] Feature aggregation: Aggregate the modulation results of all frequency bands to obtain the updated first feature. Layer diagram representation The calculation is as follows:
[0101] (10)
[0102] In the formula, the frequency response matrix The singular value diagonal matrix obtained by SVD from the Laplacian matrix of the hypergraph reflects the signal strength of different frequency bands. Each frequency band Corresponding to a frequency band mask , By using a spectral diagonal matrix Only the first one is retained in the middle. It is constructed from the diagonal elements of the frequency band. This process involves extracting and modulating the signal components of that frequency band. It not only captures long-term trends in low frequencies and short-term disturbances in high frequencies, but also simultaneously processes causal and temporal information to obtain a deeper level of node representation.
[0103] Step 6: Perform binary classification prediction based on the learned graph representation and output the probability of future events occurring in the region.
[0104] Global average pooling is applied to the final graph representation learned in step 5, and the graph-level representation is input into a fully connected layer. Finally, it is processed... The function outputs a probability value between 0 and 1, representing the probability that the target event will occur in the region within a specific future time window. When this probability exceeds a preset threshold, it is determined that an event has occurred.
[0105] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. Content not described in detail in this specification belongs to prior art known to those skilled in the art. Although illustrative specific embodiments of the present invention have been described above to facilitate understanding by those skilled in the art, it should be understood that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, various modifications are obvious as long as they fall within the spirit and scope of the invention as defined and determined by the appended claims. All inventions utilizing the concept of this invention are within the scope of protection.
Claims
1. An event prediction method based on a temporal hypergraph, characterized in that: Includes the following steps: Step 1: Obtain multi-source heterogeneous data of the target region, define a unified time index and perform preprocessing to generate time series feature sequences of various variables in the region; Step 2: Based on the causal discovery algorithm, analyze the time-series feature sequence and construct a causal graph among variables within the target region; Step 3: Construct a temporal hypergraph structure, wherein the edges of the graph structure include: causal relationship edges established between different variable nodes based on the causal graph, and temporal evolution edges established between adjacent time point nodes for the same variable; Step 4: Perform spectral domain filtering on the node features of the temporal hypergraph structure using a dynamic filter; Step 5: Use a graph neural network to learn the filtered graph structure in order to integrate causal and temporal information and capture its complex internal patterns. Step 6: Perform binary classification prediction based on the learned graph representation and output the probability of future events occurring in the region.
2. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: The preprocessing in step 1 specifically includes: aggregating historical data reflecting the occurrence of events according to the time index to generate a binary classification target variable sequence; aligning numerical external data to the time index; and converting unstructured text data into numerical feature sequences using natural language processing techniques and aligning them with the time index.
3. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: The causal discovery algorithm specifically includes: Calculate the cross-power spectral density of the variable pairs to screen out frequency components with significant coupling; Based on phase analysis, the causal direction and time lag between variables at the significant coupling frequency are determined. By calculating the conditional mutual information in the frequency domain, the strength of the direct causal effect between variables is quantified under the condition of controlling for confounding variables.
4. The event prediction method based on a temporal hypergraph according to claim 3, characterized in that: The calculation of frequency domain conditional mutual information specifically involves constructing a condition set for calculating frequency domain conditional mutual information using a recursive filtering strategy, in order to isolate indirect causal relationships.
5. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: Step 3, which involves constructing a temporal hypergraph structure, specifically involves: Define nodes: Define the state of each variable under each time index as an independent node; Construct causal relationship edges: Based on the causal graph, establish connections between nodes corresponding to different variables to form causal relationship edges; Construct temporal evolution edges: For the same variable, establish directed connections between nodes at adjacent time points according to the order of their time indices to form temporal evolution edges.
6. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: The dynamic filter is a dual-path dynamic filter; Causal filtering path is used to enhance the spectral features of the input signal based on the structural information of the causal graph in order to extract causal patterns; The temporal filtering path is used to perform gated selection processing on the spectral features of the input signal based on the temporal evolution relationship in order to extract the temporal pattern; the fusion unit is used to perform weighted fusion of the outputs of the causal filtering path and the temporal filtering path through learnable parameters to generate a joint representation containing causal and temporal information.
7. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: The graph neural network described herein integrates a multi-band learning mechanism.
8. The event prediction method based on a temporal hypergraph according to claim 7, characterized in that: Multi-band learning mechanisms include: The spectrum partitioning step divides the spectral domain representation of the graph structure into multiple independent frequency bands according to frequency levels. The frequency band modulation step involves assigning a learnable gating vector to each frequency band and then performing adaptive weighted modulation on the signal components of the corresponding frequency band using the gating vector. The feature aggregation step sums all modulated frequency band signal components and outputs a deep feature representation that integrates cross-causal-temporal structure and cross-frequency information.
9. The event prediction method based on a temporal hypergraph according to claim 1, characterized in that: The method is executed independently for each region, and the model training and prediction process does not depend on data from any other region.
10. A social event prediction system based on causal discovery, characterized in that, The system includes a data acquisition and preprocessing module, a causal graph construction module, a graph structure construction module, a graph structure filtering module, a graph neural network learning module, and a prediction output module; The data acquisition and preprocessing module is used to acquire multi-source heterogeneous data of the target region and preprocess it to generate time-series feature sequences of various variables in the region. The causal graph construction module is used to construct a causal graph between variables within the target region through the causal discovery module; The graph structure construction module is used to construct a graph structure containing causal relationship edges and temporal evolution edges; The graph structure filtering module is used to filter the graph structure to fuse causal and temporal information; The graph neural network learning module is used to learn the filtered graph structure; The prediction output module is used to predict events based on the learned graph representation and output the probability of future events occurring in the region.