Event sequence prediction method based on space-time diffusion generation network
By adopting a network generation method based on spatiotemporal diffusion in event sequence prediction, the problem of insufficient extraction of event spatial structure features in the prior art is solved, and higher accuracy of spatiotemporal prediction and capture of spatiotemporal correlation relationships is achieved.
Patent Information
- Application Number
- CN202411697397.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-25
AI Technical Summary
The existing event sequence prediction method does not extract the feature of the event spatial structure, and does not consider the networked propagation characteristics of the sequence event spatial structure in detail, and generally ignores the comprehensive consideration of the overall structure of the event.
The method of generating networks based on space-time diffusion is adopted to strengthen the modeling and extraction of event spatial structure information through graph structure, combine with the Transformer self-attention module to extract the time-related information of the event sequence, and use the diffusion learning module to obtain the event sequence prediction results.
It improves the spatio-temporal accuracy of event prediction, can effectively learn event spatial structure and temporal characteristics, adaptively capture spatio-temporal correlation relationships, and enhances the model's spatio-temporal modeling ability.
Smart Images

Figure CN119691544A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computers, and more specifically, to an event sequence prediction method based on a spatiotemporal diffusion generation network. Background Art
[0002] Event sequence prediction refers to the process of using historical event sequence data to predict and infer the trend of future events by establishing mathematical models, using statistical methods or machine learning algorithms. Event sequences involve all aspects of social life. For example, social platforms analyze user usage behaviors to infer user preferences and recommend personalized content to increase platform revenue; smart medical platforms issue early warnings based on patients' historical diagnostic information to minimize the impact of diseases on patients; financial platforms estimate future stock prices based on the historical price trends of a certain stock. With the continuous development of the basic theory of event prediction, related research has also been widely used in the fields of system failure warning, disease transmission analysis, crime prediction, earthquake prediction, etc. The analysis and prediction of event sequences can solve a variety of practical problems. Obtaining prediction information earlier and more accurately will effectively promote the development of many fields.
[0003] In real-life scenarios, the time and space information of historical events will affect the occurrence of future events, and the time and space of events are interdependent. For example, in the process of disease transmission, the time and place of the infected person's visit will directly affect the future infection situation; in earthquake activities, the time interval and spatial location of future earthquakes are very close to those of previous earthquakes. In addition to being highly correlated in time, adjacent events in this type of event sequence are also closely correlated in space, and the time and space information in the event are equally important.
[0004] Every event in real life can be regarded as a node propagating in a complex network structure. Existing event sequence prediction methods include two categories: traditional machine learning methods and deep learning methods. Traditional machine learning methods are a type of prediction method used in the early days of this field. Such methods require the construction of a modeling process for future events and the definition of an explicit parameterized intensity function, such as the Poisson process, Hawkes process, and kernel density estimation method. Deep learning-based methods propose a series of neural network structures to improve the model's fitting accuracy to the data distribution. According to the different model structures, they can be divided into methods based on recurrent neural networks, methods based on attention mechanisms, methods based on neural constant differentials, and methods based on diffusion generative networks, such as NHP, DeepSTPP, NJSDE, and DSTPP. Compared with traditional machine learning-based methods, deep learning-based methods have higher model versatility, stronger spatiotemporal modeling capabilities, and are more popular.
[0005] Through the investigation of existing spatiotemporal sequence prediction model methods, we found that the existing models do not pay enough attention to the spatial structure of events, do not consider in detail the network propagation characteristics of the spatial structure of sequence events, and usually ignore the comprehensive consideration of the overall structure of events. Summary of the invention
[0006] The purpose of the embodiments of the present disclosure is to provide an event sequence prediction method based on a spatiotemporal diffusion generation network. In order to solve the problem that the existing event sequence prediction method does not sufficiently extract the event spatial structure features, the present invention proposes a method that can optimize the modeling process according to the event spatial structure to improve the spatiotemporal accuracy of event prediction. First, a graph structure is used to strengthen the modeling and extraction of event spatial structure information, and at the same time, a Transformer self-attention module is used to extract the time correlation information of the event sequence, and finally a diffusion learning module is used to obtain the event sequence prediction result.
[0007] In a general aspect, a method for event sequence prediction based on a spatiotemporal diffusion generative network is provided, comprising two parts: spatiotemporal feature extraction of event sequences and a denoising diffusion module;
[0008] The spatiotemporal feature extraction of the event sequence includes three modules: event spatial association modeling module, event spatial association embedding module and event temporal association learning and embedding module;
[0009] The event spatial association modeling receives the spatial geographic location information of each node in the event sequence data, and adaptively obtains the spatial adjacency matrix and node spatial feature matrix of the event sequence through the constructed adaptive graph learning module; the event spatial association embedding module uses the graph attention network to extract the spatial association information and spatial features of the event, receives the spatial adjacency matrix and node spatial feature matrix generated by the event spatial association modeling module, uses the graph attention network to perform attention encoding on each node, and generates the spatial encoding information of the sequence;
[0010] The event time association learning and embedding module receives the event sequence, uses an encoder to extract the time features of the event sequence and forms time coding information;
[0011] The denoising diffusion module receives the sequence time coding information and space coding information generated by the spatiotemporal feature extraction module, uses the denoising diffusion model to predict the time and space information of the event, and uses the denoising network to jointly learn the spatiotemporal coding features through the reverse denoising step to obtain the time and space attention outputs respectively, and obtains the denoising results multiple times through the iterative calculation method to finally generate the spatiotemporal prediction results.
[0012] The event spatial association modeling module regards each event in the sequence as a node, and uses the spatial latitude and longitude information of the event as the initial structural feature of the event. First, the original structural feature matrix is converted into two node feature embeddings, which are used as the source node feature embedding and the target node feature embedding respectively. The unidirectional association relationship between the nodes is obtained by calculating the spatial dependency relationship between the source node and the target node.
[0013] The event space association embedding module uses a graph attention network to extract event space association information and spatial features. Specifically, 8 graph attention layers are set to obtain node feature outputs, and finally an output graph attention layer is set to integrate all attention outputs to obtain updated node spatial features.
[0014] The input of each graph attention layer is the node feature matrix h and the node adjacency matrix adj. First, a weight matrix W with a shape of (F, F′) is created and multiplied with the input feature matrix h to obtain the new node feature W h , and then find the attention coefficient e between nodes: Then the module uses a single-layer feedforward neural network mapping a with LeakyReLU as the activation function to obtain the normalized attention coefficient α of the node ij :
[0015]
[0016] To prevent the model from overfitting the data, the attention sampling loss rate of the aggregated node features is set to 0.1; the overall process of the model extracting node spatial features is:
[0017]
[0018] The output is the feature matrix h after attention encoding i ′, that is, the spatial encoding information of the event h s .
[0019] The event time association learning and embedding module uses the encoder module to extract the time features of the event sequence. First, the initial encoding time information is obtained using the sine and cosine function position encoding method:
[0020]
[0021] e in the formula t is the time code of each event in the sequence, and M is the number of embedding coding dimensions;
[0022] Then, the multi-head attention module is used to calculate the attention coefficient and further obtain the attention output. In each layer of the multi-head attention module, the model will encode the time E t Linear projection is the three matrices Q required for attention calculationi , K i 、V i , and then use the dot product calculation method to get the attention coefficient, and further calculate the attention output S i , concatenating the results of each layer can produce the output S of the multi-head attention layer; the specific process is as follows:
[0023] E t ={e t,1 , e t,2 , ..., e t,L}
[0024]
[0025] S i =Attention(Q i , K i , V i )V i
[0026] S = Concat(S1, S2, ..., S h )W o
[0027] Finally, the module uses the position forward feedback network h t =FFN(s)=max(0,sW1+b1)W2+b2Convert the attention output into a temporal feature code h t , and embed two normalization layers to speed up the model convergence and ensure the stability of the network;
[0028] The denoising diffusion module uses the denoising diffusion model to predict the time and space information of the event, where the spatiotemporal encoding information h of each event i is composed of h t and h s Composition; the spatiotemporal information x of the i-th event in the generated sequence i When the spatiotemporal coding information h of the i-1th event is i-1 As predictive regulatory information, it guides and optimizes the denoising process;
[0029] For each event x in the sequence i =(t i ,s i ), the diffusion process is modeled as a Markov process in the space-time domain. The event state in the K-step diffusion process can be expressed as In the forward diffusion process: In the original space-time distribution of event i, Gaussian noise with a ratio of βk is gradually added to The noise ratio is an increasing sequence {β1, ..., βK}, and finally get an isotropic standard Gaussian noise The forward process is respectively;
[0030] After the forward process is completed, reverse denoising is performed, that is, from Step-by-step reverse iteration generation The acquisition depends on the encoding feature h of the previous event i-1 And the spatiotemporal information obtained in the previous time step Each forecast step is modeled in an independent manner:
[0031]
[0032] Where p is the conditional probability distribution function, represents the spatial and temporal distribution of the k-1th time step of the ith event The spatiotemporal distribution at the kth time step and the coded information of the previous event h i-1 The probability distribution under the condition, θ and p θ are all parameters of the neural network, updated by the gradient descent method; They represent the time distribution and spatial distribution of the kth time step of the ith event respectively; the joint modeling process is obtained by sorting out:
[0033]
[0034] The reverse denoising network structure is implemented by using the same network structure in each denoising step and obtaining the temporal and spatial attention outputs at the same time:
[0035] e k =SinusoidalPosEmb(k)
[0036] α=Softmax(W a Concat(h i-1 , e k )+b a )
[0037]
[0038] Among them, SinusoidalPosEmb is the sine-cosine position encoding function, and the Concat function adds the time feature to the event encoding. a 、b a 、b sh 、b this a learnable parameter, α is a parameter that measures the spatiotemporal dependency of the model, and is used to indicate the influence of temporal and spatial features on the generation of spatiotemporal information in the sequence; after obtaining the attention weight output α, the model uses the forward feedback neural network to convert the spatiotemporal condition h i-1 Integrate into previous forecasts Finally, by integrating the results of each attention layer, the spatiotemporal weights and the weighted sum of the corresponding attention outputs are calculated, thus obtaining the spatiotemporal prediction noise added in each step. and The predicted denoising result of the current step can be further calculated based on the obtained spatiotemporal noise data and
[0039] x i =[x s,i , x t,i ]
[0040]
[0041] After obtaining the trained model and the hidden features h of the past i-1 events i-1 Afterwards, from the Gaussian noise At the beginning, the reverse denoising network iterates K times to predict the time information of the next event i and spatial information Predict data from the kth time step Generate prediction data for the k-1th time step The process is as follows:
[0042]
[0043] where β k is the Gaussian noise in the diffusion process, ∈ θ represents the trained reverse denoising network, z s 、z t is a random variable sampled from a standard Gaussian distribution; α k =1-β k is the scaling factor of the kth time step of the diffusion process, is the cumulative scaling factor for k time steps.
[0044] The technical effects to be achieved by the embodiments of the present invention are:
[0045] 1. Adaptive generation of event space structure. This method adaptively generates the structural relationship and spatial representation information between sequence events based on the spatial characteristics of the sequence, and has a good learning effect on data with different spatial distributions.
[0046] 2. Effective learning of spatiotemporal features. The model uses the Transformer encoding structure to encode the temporal features of the sequence and the graph attention network to encode the spatial features of the sequence, which fully grasps the spatiotemporal features of the sequence data.
[0047] 3. Strong spatiotemporal modeling capabilities. In addition to using different methods to encode spatiotemporal data according to their characteristics, the model uses a diffusion generative network to get rid of the modeling limitations of other models on spatiotemporal dependencies, and can adaptively capture spatiotemporal correlations, demonstrating strong spatiotemporal modeling capabilities. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The above and other objects and features of the present disclosure will become more apparent from the following description in conjunction with the accompanying drawings.
[0049] Figure 1 is a schematic diagram showing an architecture diagram of an event sequence prediction method based on a spatiotemporal diffusion generation network according to an embodiment of the present disclosure;
[0050] Figure 2 is a schematic diagram showing the overall structure of time association learning and embedding according to an embodiment of the present disclosure;
[0051] Figure 3 is a schematic diagram showing a denoising diffusion process for generating spatiotemporal information of an i-th event according to an embodiment of the present disclosure;
[0052] Figure 4 Schematic diagram of a spatiotemporal denoising network structure according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0053] The following specific embodiments are provided to help the reader obtain a comprehensive understanding of the methods, devices and / or systems described herein. However, after understanding the disclosure of the present application, various changes, modifications and equivalents of the methods, devices and / or systems described herein will be clear. For example, the order of operations described herein is only an example and is not limited to those orders set forth herein, but can be changed as will be clear after understanding the disclosure of the present application, except for operations that must occur in a specific order. In addition, for greater clarity and simplicity, the description of features known in the art may be omitted.
[0054] The features described herein can be implemented in different forms and should not be construed as being limited to the examples described herein. Rather, the examples described herein have been provided to illustrate only some of the many possible ways to implement the methods, devices, and / or systems described herein, which will be clear after understanding the disclosure of the present application.
[0055] As used herein, the term "and / or" includes any one of the associated listed items and any combination of any two or more.
[0056] Although terms such as "first", "second", and "third" may be used herein to describe various members, components, regions, layers, or portions, these members, components, regions, layers, or portions should not be limited by these terms. Instead, these terms are only used to distinguish one member, component, region, layer, or portion from another member, component, region, layer, or portion. Therefore, without departing from the teachings of the examples described herein, the first member, first component, first region, first layer, or first portion referred to in the examples may also be referred to as the second member, second component, second region, second layer, or second portion.
[0057] In the specification, when an element (such as a layer, a region or a substrate) is described as being “on”, “connected to” or “coupled to” another element, the element may be directly “on”, “connected to” or “coupled to” another element, or one or more other elements may be present therebetween. Conversely, when an element is described as being “directly on”, “directly connected to” or “directly coupled to” another element, there may be no other elements present therebetween.
[0058] The terms used herein are only used to describe various examples and are not intended to limit the disclosure. Unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. The terms "comprise", "include" and "have" indicate the presence of the described features, quantities, operations, components, elements and / or combinations thereof, but do not exclude the presence or addition of one or more other features, quantities, operations, components, elements and / or combinations thereof.
[0059] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by a person of ordinary skill in the art to which the present disclosure belongs after understanding the present disclosure. Unless explicitly defined as such herein, terms (such as those defined in a general dictionary) should be interpreted as having a meaning consistent with their meaning in the context of the relevant art and the present disclosure, and should not be interpreted in an idealized or overly formal manner.
[0060] Furthermore, in the description of examples, when it is considered that a detailed description of a well-known related structure or function would cause vague interpretation of the present disclosure, such a detailed description will be omitted.
[0061] Figure 1 is a schematic diagram showing an event sequence prediction method based on a spatiotemporal diffusion generation network according to an embodiment of the present disclosure.
[0062] In order to achieve the above-mentioned invention object, the technical framework adopted by the present invention is as follows Figure 1 As shown. For spatiotemporal sequence data, this method first extracts the temporal and spatial encoding feature information respectively, and then uses the diffusion model to jointly learn to obtain the prediction results. The technical solution is based on the diffusion generative network method. Through the event sequence time modeling and spatial modeling parts, the event spatiotemporal features and correlation relationships are extracted. Finally, the obtained spatiotemporal feature information is input into the denoising generation network module to obtain the sequence spatiotemporal prediction results.
[0063] Event sequences involve all aspects of social life. For example, social platforms analyze user behavior to infer user preferences and recommend personalized content to increase platform revenue; smart medical platforms provide early warnings based on patients' historical diagnostic information to minimize the impact of diseases on patients; earthquake prediction platforms analyze historical earthquake data to predict crustal activity and possible earthquake locations to reduce property losses; disease transmission regulatory departments analyze the visit records of disease-infected people to monitor the risk of disease outbreaks at target locations in advance, which can effectively control the spread of diseases. The analysis and prediction of event sequences can solve a variety of real-world problems. Getting prediction information earlier and more accurately will effectively promote the development of many fields.
[0064] The method mainly consists of two parts: spatiotemporal feature extraction of event sequences and denoising diffusion module.
[0065] Spatiotemporal feature extraction of event sequences: It includes three modules: event spatial association modeling, event spatial association embedding, and event temporal association learning and embedding:
[0066] Event spatial association modeling: The spatial association modeling part receives the spatial geographic location information of each node in the event sequence, and adaptively obtains the spatial adjacency matrix of the event sequence through the constructed adaptive graph learning module.
[0067] Event spatial correlation embedding: The spatial correlation embedding module uses the graph attention network (GAT) to extract the spatial correlation information and spatial features of events. It receives the spatial adjacency matrix and node spatial feature matrix generated by the spatial correlation modeling part, and uses the graph attention network to encode each node, thereby generating the spatial encoding information of the sequence.
[0068] Event time association learning and embedding: Considering the dependencies between different time points within the sequence, this module uses the Encoder part similar to Transformer to extract the temporal features of the event sequence.
[0069] Denoising Diffusion Module:
[0070] This module receives the sequence spatiotemporal coding information generated by the spatiotemporal feature extraction module and uses the denoising diffusion model to predict the time and space information of the event. The module reverse denoising step uses the denoising network to jointly learn the spatiotemporal coding features, obtain the temporal and spatial attention outputs respectively, and obtain the denoising results multiple times through iterative calculation methods, and finally generate spatiotemporal prediction data.
[0071] The event sequence prediction method based on the spatiotemporal diffusion generation network can fully grasp the spatiotemporal characteristic information of the event sequence and improve the accuracy of event prediction.
[0072] Event spatial correlation modeling module:
[0073] The spatial association modeling part of the present invention regards each event in the sequence as a node, and uses the spatial latitude and longitude information of the event as the initial structural feature of the event. This part first converts the original structural feature matrix into two node feature embeddings, which are used as the source node feature embedding and the target node feature embedding respectively. By calculating the spatial dependency relationship between the source node and the target node, the unidirectional association relationship between the nodes can be obtained. The specific calculation process is shown in Algorithm 1.
[0074] Table 1 Pseudocode of the algorithm for generating the event sequence adjacency matrix
[0075]
[0076] Where E is the original data feature matrix containing only longitude and latitude information, E0 is the converted high-dimensional feature matrix, θ1 and θ2 are model parameters, α is a hyperparameter for regulating the saturation rate of the activation function, and the argtopk(·) function returns the index values of the first k vectors.
[0077] As shown in lines 1 to 4 of Algorithm 1, given the initial node feature E, this module first uses a fully connected layer with an activation function of ReLU to convert it into a high-dimensional feature E0. Compared with the original two-dimensional feature E, the dimension of the high-dimensional feature E0 is 64, which will help the model to mine the internal features of the data and improve the expressiveness of the data. Next, the module converts the feature matrix E0 into two matrices M1 and M2, which can be regarded as the source node feature embedding and the target node feature embedding, respectively. By calculating The module obtains the spatial dependencies of the source nodes; similarly, by calculating The module obtains the spatial dependency of the target node. Subtracting the two spatial dependencies can obtain the unidirectional association between the nodes. Then, the unidirectional association is transformed by ReLU to obtain the regularized asymmetric adjacency matrix Adj.
[0078] As shown in lines 6-7 of Algorithm 1, the module then performs argtopk processing on each column in the Adj matrix, retaining the k maximum values and corresponding indexes in each column. In this paper, k is set to 20, that is, each node only retains the 20 most closely related adjacent nodes. This method of filtering adjacent information can reduce the computational complexity and reduce the impact of noise data that may exist in the original data on the composition of this module.
[0079] As shown in line 8 of Algorithm 1, after obtaining the adjacency matrix Adj, this module finally sets its upper triangular part to 0 to ensure that the i-th event in the sequence can only establish an association relationship with the event before the i-th event. After the above process, the model obtains the event sequence space adjacency matrix Adj through adaptive learning.
[0080] Event Space Correlation Embedding Module:
[0081] This part uses the graph attention network (GAT) to extract event spatial correlation information and spatial features. The graph attention network introduces the attention mechanism in the graph neural network processing and has a strong ability to extract graph structure data features. This module specifically sets 8 graph attention layers to obtain the feature output of the node, and finally sets an output graph attention layer to integrate all attention outputs to obtain the updated node spatial features.
[0082] The input of each graph attention layer is the node feature matrix h and the node adjacency matrix adj. First, a weight matrix W with a shape of (F, F′) is created and multiplied with the input feature matrix h to obtain the new node feature W h , and then find the attention coefficient e between nodes: Then the module uses a single-layer feedforward neural network mapping a with LeakyReLU as the activation function to obtain the normalized attention coefficient α of the node ij .
[0083]
[0084] To prevent the model from overfitting the data, the attention sampling missing rate of the aggregated top node features is set to 0.1; the overall process of the model extracting node spatial features is:
[0085]
[0086] The output is the feature matrix h after attention encoding i .
[0087] Event time association learning and embedding:
[0088] This module uses the Encoder module similar to the Transformer model to extract the time features of the event sequence. The overall structure is as follows: Figure 2 The module first uses the sine and cosine function position encoding method to obtain the initial encoding time information.
[0089]
[0090] where e t is the time code corresponding to each event in the sequence, and M is the number of dimensions of the embedded code.
[0091] Then the multi-head attention module is used to calculate the attention coefficient and further obtain the attention output; in each layer of the multi-head attention, the model first encodes the preliminary event information E t Linear projection is the three matrices Q required for attention calculation i , K i 、V i , and then use the dot product calculation method to get the attention coefficient, and use the Concat function to concatenate and calculate to get the attention output S:
[0092] E t ={e t,1 , e t,2 , ..., e t,L}
[0093]
[0094] S i =Attention(Q i , K i , V i )V i
[0095] S = Concat(S1, S2, ..., S h )W o
[0096] Finally, the position-forward feedback network is used to convert the attention output into the temporal feature encoding h of the event t ,Two normalization layers are embedded in the module to speed up the convergence of the model and ensure the stability of the network.
[0097] Denoising Diffusion Module:
[0098] This module mainly uses the denoising diffusion model (DDPM) to predict the time and spatial information of the event. The spatial and temporal information x of the i-th event in the generated sequence i When the module converts the spatiotemporal encoding information h of the i-1th event i-1 As predictive control information, it guides and optimizes the denoising process. The overall process is as follows Figure 3 shown.
[0099] Specifically, for each event x in the sequence i =(t i ,s i ), the diffusion process is modeled as a Markov process in the space-time domain. The event state in the K-step diffusion process can be expressed as In the forward diffusion process: In the original space-time distribution of event i, Gradually add a proportion of β k Gaussian noise, which is added to The noise ratio is an increasing sequence {β1, ..., β K}, and finally get an isotropic standard Gaussian noise
[0100] After the forward process is completed, reverse denoising is performed, that is, from Step-by-step reverse iteration generation The acquisition depends on the encoding feature h of the previous event i-1 And the spatiotemporal information obtained in the previous time step Each forecast step is modeled in an independent manner:
[0101]
[0102] Where p is the conditional probability distribution function, represents the spatial and temporal distribution of the k-1th time step of the ith event The spatiotemporal distribution at the kth time step and the coded information of the previous event h i-1 The probability distribution under the condition, θ and p θ are all parameters of the neural network, updated by the gradient descent method; They represent the time distribution and spatial distribution of the kth time step of the ith event respectively; the joint modeling process is obtained by sorting out:
[0103]
[0104] The specific implementation of the reverse denoising network structure is as follows: First, the same network structure is used in each denoising step, and the temporal and spatial attention outputs are obtained at the same time:
[0105] e k =SinusoidalPosEmb(k)
[0106] α=Softmax(W a Concat(h i-1 , e k)+b a )
[0107]
[0108] Among them, SinusoidalPosEmb is the sine-cosine position encoding function, and the Concat function adds the time feature to the event encoding. a 、b a 、b sh 、b th is a learnable parameter, α is a parameter that measures the spatiotemporal dependency of the model, and is used to indicate the influence of temporal and spatial features on the generation of spatiotemporal information in the sequence; after obtaining the attention weight output α, the model uses the forward feedback neural network to convert the spatiotemporal condition h i-1 Integrate into previous forecasts Finally, by integrating the results of each attention layer, the spatiotemporal weights and the weighted sum of the corresponding attention outputs are calculated, thus obtaining the spatiotemporal prediction noise added in each step. and The predicted denoising result of the current step can be further calculated based on the obtained spatiotemporal noise data and
[0109] x i =[x s,i , x t,i ]
[0110]
[0111] After obtaining the trained model and the hidden features h of the past i-1 events i-1 Afterwards, from the Gaussian noise At the beginning, the reverse denoising network iterates K times to predict the time information of the next event i and spatial information Predict data from the kth time step Generate prediction data for the k-1th time step The process is as follows:
[0112]
[0113] where β k is the Gaussian noise in the diffusion process, ∈ θ represents the trained reverse denoising network, z s 、z t is a random variable sampled from a standard Gaussian distribution; α k =1-β k is the scaling factor of the kth time step of the diffusion process, is the cumulative scaling factor for k time steps.
[0114] Although some embodiments of the present disclosure have been shown and described, it will be appreciated by those skilled in the art that modifications may be made to the embodiments without departing from the principles and spirit of the present disclosure, the scope of which is defined by the claims and their equivalents.
Claims
1. An event sequence prediction method based on a spatiotemporal diffusion generation network, characterized in that: It consists of two parts: spatiotemporal feature extraction of event sequences and denoising diffusion module; The spatiotemporal feature extraction of the event sequence includes three modules: event spatial association modeling module, event spatial association embedding module and event temporal association learning and embedding module; The event spatial association modeling receives the spatial geographic location information of each node in the event sequence data, and adaptively obtains the spatial adjacency matrix and node spatial feature matrix of the event sequence through the constructed adaptive graph learning module; the event spatial association embedding module uses the graph attention network to extract the spatial association information and spatial features of the event, receives the spatial adjacency matrix and node spatial feature matrix generated by the event spatial association modeling module, uses the graph attention network to perform attention encoding on each node, and generates the spatial encoding information of the sequence; The event time association learning and embedding module receives the event sequence, uses an encoder to extract the time features of the event sequence and forms time coding information; The denoising diffusion module receives the sequence time coding information and space coding information generated by the spatiotemporal feature extraction module, uses the denoising diffusion model to predict the time and space information of the event, and uses the denoising network to jointly learn the spatiotemporal coding features through the reverse denoising step to obtain the time and space attention outputs respectively, and obtains the denoising results multiple times through the iterative calculation method to finally generate the spatiotemporal prediction results.
2. The event sequence prediction method based on the spatiotemporal diffusion generation network according to claim 1, characterized in that: The event spatial association modeling module regards each event in the sequence as a node, and uses the spatial latitude and longitude information of the event as the initial structural feature of the event. First, the original structural feature matrix is converted into two node feature embeddings, which are used as the source node feature embedding and the target node feature embedding respectively. The unidirectional association relationship between the nodes is obtained by calculating the spatial dependency relationship between the source node and the target node.
3. The event sequence prediction method based on the spatiotemporal diffusion generation network as claimed in claim 2, characterized in that: The event space association embedding module uses a graph attention network to extract event space association information and spatial features. Specifically, 8 graph attention layers are set to obtain node feature outputs, and finally an output graph attention layer is set to integrate all attention outputs to obtain updated node spatial features. The input of each graph attention layer is the node feature matrix h and the node adjacency matrix adj. First, a weight matrix W of shape (F, F') is created and multiplied with the input feature matrix h to obtain the new node feature W h , and then find the attention coefficient e between nodes: Then the module uses a single-layer feedforward neural network mapping a with LeakyReLU as the activation function to obtain the normalized attention coefficient α of the node ij : To prevent the model from overfitting the data, the attention sampling loss rate of the aggregated node features is set to 0.1; the overall process of the model extracting node spatial features is: The output is the feature matrix h after attention encoding i '.
4. The event sequence prediction method based on the spatiotemporal diffusion generation network according to claim 3, characterized in that: The event time association learning and embedding module uses the encoder module to extract the time features of the event sequence. First, the sine and cosine functions are used. The position encoding method obtains the initial encoding time information, where e t is the time code corresponding to each event in the sequence, and M is the number of dimensions of the embedded code; Then the multi-head attention module is used to calculate the attention coefficient and further obtain the attention output; in each layer of the multi-head attention, the model first encodes the preliminary event information E t Linear projection is the three matrices Q required for attention calculation i , K i 、V i , and then use the dot product calculation method to get the attention coefficient, and use the Concat function to concatenate and calculate to get the attention output S: AND t ={and t,1 ,And t,2 ,...,And t,L } S i =Attention(Q i ,K i ,V i )V i S=Concat(S1,S2,...,S h )W o Finally, the position-forward feedback network is used to convert the attention output into the temporal feature encoding h of the event t ,Two normalization layers are embedded in the module to speed up the convergence of the model and ensure the stability of the network.
5. The event sequence prediction method based on the spatiotemporal diffusion generation network according to claim 4, characterized in that: The denoising diffusion module uses the denoising diffusion model to predict the time and space information of the event, and generates the time and space information x of the i-th event in the sequence i When the spatiotemporal coding information h of the i-1th event is i-1 As predictive regulatory information, it guides and optimizes the denoising process; For each event x in the sequence i =(t i ,s i ), the diffusion process is modeled as a Markov process in the space-time domain. The event state in the K-step diffusion process can be expressed as In the forward diffusion process: In the original space-time distribution of event i, Gradually add a proportion of β k Gaussian noise, which is added to The noise ratio is an increasing sequence {β1,…,β K }, and finally get an isotropic standard Gaussian noise The forward process is respectively; After the forward process is completed, reverse denoising is performed, that is, from Step-by-step reverse iteration generation The acquisition depends on the encoding feature h of the previous event i-1 And the spatiotemporal information obtained in the previous time step Each forecast step is modeled in an independent manner: Where p is the conditional probability distribution function, represents the spatial and temporal distribution of the k-1th time step of the ith event The spatiotemporal distribution at the kth time step and the coded information of the previous event h i-1 The probability distribution under the condition, θ and p θ are all parameters of the neural network, updated by the gradient descent method; They represent the time distribution and spatial distribution of the kth time step of the ith event respectively; the joint modeling process is obtained by sorting out: The reverse denoising network structure is implemented by using the same network in each denoising step. The network structure can simultaneously obtain temporal and spatial attention outputs: e k =SinusoidalPosEmb(k) α=Softmax(W a Concat(h i-1 ,And k )+b a ) Among them, SinusoidalPosEmb is the sine-cosine position encoding function, and the Concat function adds the time feature to the event encoding. a , b a , b sh , b th is a learnable parameter, and α is a parameter that measures the spatiotemporal dependency of the model, which is used to indicate the influence of temporal and spatial features on the generation of spatiotemporal information in the sequence; After obtaining the attention weight output α, the model uses the forward feedback neural network to transform the spatiotemporal condition h i-1 Integrate into previous forecasts In the process, we get the output of each attention layer; finally, by integrating the results of each attention layer, we calculate the weighted sum of the spatiotemporal weight and the corresponding attention output, thus obtaining the spatiotemporal prediction noise added in each step. and The predicted denoising result of the current step is further calculated based on the obtained spatiotemporal noise data and x i =[x s,i ,x t,i ] After obtaining the trained model and the hidden features h of the past i-1 events i-1 Afterwards, from the Gaussian noise At the beginning, the reverse denoising network iterates K times to predict the time information of the next event i and spatial information Specifically, we can get the following prediction data from the kth time step Generate prediction data for the k-1th time step The process: where β k is the Gaussian noise in the diffusion process, ∈ θ represents the trained reverse denoising network, z s 、z t is a random variable sampled from a standard Gaussian distribution; α k =1-β k is the scaling factor of the kth time step of the diffusion process, is the cumulative scaling factor for k time steps.
Citation Information
Cited By
Multi-source data fusion image sequence generation method and system based on space-time diffusion
CN120807279A
Power transmission and transformation project construction monitoring method and system
CN122066189A
Marine observation data prediction method based on DDPM and GAT
CN122262700A
Ocean observation data prediction method based on ddpm and gat
CN122262700B