A graph constraint-oriented spatio-temporal sequence data generation method and device
Patent Information
- Application Number
- CN202611436493.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-16
- Publication Date
- 2026-10-20
AI Technical Summary
上述方式容易存在以下问题:其一,原始节点域中的时空观测同时包含稳定时间背景和随机扰动,直接生成原始序列会使模型同时学习确定性周期规律和随机图结构变化,增加建模难度;其二,普通图像式卷积结构虽然具有局部平滑偏置,但其张量排列方式往往不具有明确的图谱语义,难以充分保持固定图上的频率结构;其三,普通Transformer或扩散Transformer通常将时空位置展平为一维Token序列处理,缺少对时间轴、图谱轴以及局部时间片段结构的区别建模,难以同时兼顾时间动态、空间相关和图谱能量结构
[0035](1)图谱化空间表示与保序时间表示;
Smart Images

Figure FT_1 
Figure FT_2
Abstract
Description
Technical Field
[0001] This invention belongs to the field of spatiotemporal sequence data processing technology, and particularly relates to a method and apparatus for generating graph-constrained spatiotemporal sequence data. Background Technology
[0002] Spatiotemporal series are an important data type in fields such as geographic information systems, environmental monitoring, urban computing, traffic sensing, air quality monitoring, meteorological observation, and energy system monitoring. This type of data is typically formed by continuous recordings from sensors, stations, road segments, grid centers, or sampling units at multiple spatial locations, thus exhibiting both temporal evolution and spatial dependence characteristics. Unlike ordinary time series, spatiotemporal series not only need to characterize the changes in observed values over time but also the spatial coupling relationships between different spatial units caused by physical topology, propagation relationships, adjacency structures, or functional associations. For example, in a traffic network, changes in traffic flow between different road sensors are influenced by road network connectivity and traffic propagation mechanisms; in an air quality monitoring network, changes in pollutant concentrations between different monitoring stations are affected by geographical distance, meteorological conditions, and diffusion propagation relationships.
[0003] In practical applications, due to limitations such as sensor deployment costs, missing observations, inconsistent sampling frequencies, privacy constraints, scarcity of extreme event samples, and regional distribution differences, real spatiotemporal sequences often suffer from insufficient samples, uneven distribution, inadequate coverage of anomalous scenarios, and difficulty in sharing data across regions. To alleviate these problems, researchers have begun to focus on spatiotemporal sequence generation technologies. These technologies learn the statistical regularities, spatiotemporal structure patterns, and joint distributions of real spatiotemporal sequences and generate new samples that are as consistent as possible with real samples in terms of statistical properties, temporal dynamics, and spatial dependencies. This serves tasks such as data augmentation, simulation, model training, robustness assessment, anomalous scenario supplementation, and data sharing.
[0004] Existing spatiotemporal sequence generation technologies can be broadly classified into the following categories.
[0005] The first category is mechanism-driven generation methods. These methods typically treat spatiotemporal sequences as external observations of a physical, social, or system dynamics process, generating sequence samples by establishing process mechanism equations, rule systems, or simulation mechanisms. For example, in meteorological, environmental, or traffic simulation scenarios, researchers often use partial differential equations, numerical simulation models, traffic flow models, or expert rule systems to evolve and solve spatiotemporal processes, thereby obtaining output results that satisfy specific physical laws or engineering rules. These methods have strong interpretability and perform well in scenarios with clear mechanisms and sufficient boundary conditions. However, they usually rely on strong prior knowledge and complex parameter settings, resulting in limited generalization ability across regions and tasks. When the process mechanism is complex, observational noise is strong, or system dynamics are not fully known, model construction becomes difficult, and it is hard to fully characterize the nonlinear random disturbances and complex joint distributions in real data.
[0006] The second category is statistical generation methods. These methods do not explicitly establish physical mechanisms. Instead, they assume that the observed data originates from a certain stochastic process or probability distribution, and learn spatiotemporal dependencies through covariance structures, Bayesian models, state-space models, posterior sampling mechanisms, or random field models, generating new samples that conform to statistical laws. Compared to mechanistic models, these methods offer greater flexibility and versatility, and can describe spatiotemporal correlations and uncertainties to a certain extent. However, when faced with complex spatiotemporal sequences that are high-dimensional, multivariate, strongly nonlinear, and multi-scale coupled, the modeling capabilities of these methods are often limited by pre-defined distribution assumptions, covariance forms, or parameterized structures, making it difficult to fully capture non-stationary changes, local spatial propagation, and higher-order joint dependencies in complex scenarios.
[0007] The third category is deep generation methods. With the development of deep learning, generative adversarial networks, variational autoencoders, normalized flow models, and diffusion models have begun to be used for time series and spatiotemporal sequence generation. These methods directly learn the data distribution through high-capacity neural networks, demonstrating strong capabilities in fitting complex patterns, multimodal samples, and nonlinear structures. Among them, diffusion models, due to their relatively stable training process, natural probabilistic modeling, and high generation quality, have gradually become an important direction for current sequence generation and spatiotemporal data generation. Diffusion models typically learn the data distribution through progressive noise addition and denoising, and gradually generate target samples from noise during the sampling phase.
[0008] However, existing deep generation methods still have shortcomings in generating spatiotemporal series constrained by graphs. On the one hand, many general time series generation methods simply treat spatiotemporal data as multivariate time series, treating different nodes, sensors, or spatial units as ordinary variable dimensions, mainly focusing on temporal dynamics and marginal distribution similarity, without explicitly utilizing the fixed spatial graph structure. Therefore, such methods struggle to ensure that the generated samples are consistent with the real data in terms of spatial correlation between nodes, graph smoothness, and graph structure consistency. On the other hand, although some spatiotemporal deep models introduce graph neural networks or spatial convolutional modules, their main goal is usually prediction, imputation, or conditional generation, i.e., recovering future values or missing values given historical observations, partial node observations, masking information, or external covariates, rather than directly addressing the task of generating complete graph spatiotemporal windows without historical observation input conditions.
[0009] Furthermore, existing graph spatiotemporal generation methods typically model spatiotemporal sequences directly in the original node domain, or rearrange the data into image-like tensors and then use convolutional networks or ordinary Transformers for generation. These approaches are prone to the following problems: First, spatiotemporal observations in the original node domain simultaneously contain both stable temporal backgrounds and random perturbations. Directly generating the original sequence forces the model to learn both deterministic periodic patterns and random graph structural changes, increasing modeling difficulty. Second, while ordinary image-like convolutional structures possess local smoothing biases, their tensor arrangements often lack clear graph semantics, making it difficult to fully preserve the frequency structure on a fixed graph. Third, ordinary Transformers or diffusion Transformers typically flatten spatiotemporal locations into one-dimensional token sequences, lacking differentiated modeling of the time axis, graph axis, and local time segment structures, making it difficult to simultaneously consider temporal dynamics, spatial correlation, and graph energy structure.
[0010] For spatiotemporal sequences on a fixed spatial graph, the graph structure is not only reflected in the adjacency relationships between nodes, but can also be represented by the frequency structure in the spectral domain through the graph Laplace eigenvectors or graph Fourier transforms. Real-world spatiotemporal signals typically exhibit specific energy distributions across low-, mid-, and high-frequency spectral components, with different frequency bands corresponding to spatial variation patterns at different scales. If the generation method cannot preserve the spectral energy structure, problems such as inter-node correlation distortion, abnormal graph smoothness, or unrealistic local spatial perturbations may occur. Therefore, spatiotemporal sequence generation methods oriented towards fixed graph constraints not only need to generate temporally reasonable sequences, but also need to maintain spatial correlation and spectral structure consistency under the fixed graph structure.
[0011] In summary, current technologies still lack a method to generate complete spatiotemporal sequence windows under fixed graph structure constraints. This method should be able to fully utilize the fixed graph structure and temporal context to generate synthetic spatiotemporal sequence data that simultaneously satisfies temporal dynamics, node spatial correlation, graph smoothness, and graph structure consistency, without relying on historical observations, node masks, partial measurements, or label conditions. This would improve the effectiveness of spatiotemporal data augmentation, simulation, and downstream model training. Summary of the Invention
[0012] To address the aforementioned technical problems, this invention proposes a method and apparatus for generating graph-constrained spatiotemporal sequence data. First, the node-level deterministic temporal background and random residuals are separated based on time coordinates. Then, the residuals are represented, trained, and sampled in a graph domain induced by a fixed graph. Finally, the generated residuals are inversely transformed back to the node domain and synthesized with the temporal background to form a complete spatiotemporal sequence. This invention is applicable to scenarios with fixed spatial relationships, such as traffic sensors, air quality monitoring, meteorological stations, energy networks, and environmental monitoring.
[0013] This invention generates a synthetic graph spatiotemporal sequence covering all nodes and a complete time window, given a fixed spatial graph structure and the time coordinates of the window to be generated. The generated sequence maintains comparable consistency with real samples in terms of temporal evolution, inter-node correlation, graph smoothness, and graph energy distribution, and can be used as a data source for data augmentation, simulation inference, supplementation of abnormal scenarios, and training of downstream models.
[0014] Unlike multivariate time series generation methods that treat spatial nodes as unstructured variables, this invention models spatiotemporal observations as time-varying graph signals on a fixed graph. The fixed graph not only determines node adjacency relationships but also defines spectral coordinates through graph Laplacian eigenvectors and eigenvalues; the time dimension maintains its original order to accommodate periodic background and local dynamics. Based on this representation, this invention performs diffusion modeling in the spectral residual domain and characterizes spectral-time dependencies at different scales using spectral-aware token encoding, temporal patching, and axial-global attention.
[0015] The specific technical solution is as follows:
[0016] A method for generating graph-constrained spatiotemporal sequence data includes the following steps:
[0017] Obtain a fixed spatial graph and the time coordinates corresponding to the window to be generated; the fixed spatial graph represents the spatial relationship between nodes, and the time coordinates represent the periodic position of each time step within the window to be generated;
[0018] The graph Laplace matrix and graph Fourier basis are constructed from the fixed spatial graph, and the spectral group configuration, normalization parameters and effective coefficient mask are determined, thereby forming a fixed graph spectral transformation and spectral group configuration;
[0019] The node-level deterministic temporal background is estimated or obtained based on the time coordinates; the temporal background is retained as an independent branch and is used to assume stable periodic patterns during the generation process;
[0020] The shape of the packed spectrum residual tensor is determined according to the spectrum group configuration, initial noise is sampled from a preset random noise distribution, and the initial noisy spectrum residual tensor is obtained according to the initial noise scale.
[0021] According to the preset diffusion noise scale sequence, the current noisy map residual tensor and the corresponding noise scale are input into the trained diffusion denoising network to iterate and obtain the target map residual tensor.
[0022] The target graph residual tensor is subjected to inverse spectral unpacking, removal of invalid padding coefficients, inverse normalization, and inverse graph Fourier transform to obtain the node domain residual.
[0023] The node domain residuals are added to the temporal background to obtain the spatiotemporal sequence of the composite graph.
[0024] An apparatus for generating graph-constrained spatiotemporal sequence data includes the following modules:
[0025] A fixed spatial map and time coordinate acquisition module acquires a fixed spatial map and the time coordinates corresponding to the window to be generated; the fixed spatial map represents the spatial relationship between nodes, and the time coordinates represent the periodic position of each time step within the window to be generated;
[0026] The graph transformation and spectral group configuration determination module constructs the graph Laplace matrix and graph Fourier basis from the fixed spatial graph, and determines the spectral group configuration, normalization parameters and effective coefficient mask, thereby forming a fixed graph transformation and spectral group configuration.
[0027] The time background acquisition module estimates or acquires the node-level deterministic time background based on the time coordinates; the time background is retained as an independent branch and is used to assume stable periodic patterns during the generation process;
[0028] The initial noisy spectrum residual tensor acquisition module determines the shape of the packaged spectrum residual tensor according to the spectrum group configuration, samples initial noise from a preset random noise distribution, and obtains the initial noisy spectrum residual tensor according to the initial noise scale.
[0029] The target map residual tensor acquisition module inputs the current noisy map residual tensor and the corresponding noise scale into the trained diffusion denoising network according to the preset diffusion noise scale sequence, and iteratively obtains the target map residual tensor.
[0030] The node domain residual acquisition module performs inverse spectral unpacking, removal of invalid padding coefficients, inverse normalization, and inverse graph Fourier transform on the target graph residual tensor to obtain the node domain residual.
[0031] The result generation module adds the node domain residual to the temporal background to obtain the spatiotemporal sequence of the composite graph.
[0032] An electronic device includes: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method.
[0033] A computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, cause the processor to implement the method described thereon.
[0034] The present invention has the following beneficial effects:
[0035] (1) Graphical spatial representation and order-preserving temporal representation;
[0036] Mechanism: This invention addresses the different structural properties of the spatial and temporal dimensions in fixed graph spatiotemporal sequences by proposing an asymmetric residual representation method of "graph-based spatial representation and order-preserving temporal representation." Specifically, this invention first decomposes the original spatiotemporal sequence into a deterministic temporal background and random residuals. Then, it performs a graph Fourier transform on the residuals along the fixed graph node dimensions and divides them into spectral groups according to the graph frequency, forming a spectral group-time-coefficient tensor.
[0037] Technical benefits: Compared to generating directly in the original node index domain, this invention can explicitly write the spatial structure induced by the fixed graph topology into the representation coordinate system, enabling the model to directly perceive low-frequency, mid-frequency and high-frequency graph patterns; at the same time, the time dimension still maintains the original order and local continuity, thus making it more suitable for learning the overall structural distribution of real graph spatiotemporal samples.
[0038] (2) Separation modeling of deterministic background and stochastic residuals;
[0039] Mechanism: This invention does not directly generate the original spatiotemporal sequence. Instead, it first estimates the node-level deterministic temporal background, decomposes the original sequence into the temporal background and random residuals, and performs diffusion generation in the residual domain. After sampling, the generated residuals are added to the temporal background to recover the complete spatiotemporal sequence.
[0040] Technical benefits: Compared with directly generating the original sequence, this invention reduces the difficulty for the model to learn stable periodic patterns and random perturbations at the same time, allowing the diffusion model to focus on learning graph structure changes, local perturbations and spatiotemporal correlations in random residuals, thereby improving the consistency of generated samples between periodic background and random changes.
[0041] (3) Spectrum-aware Token encoding mechanism;
[0042] Mechanism: Existing ordinary Transformers or diffusion Transformers typically directly and linearly map a set of features to tokens, making it difficult to utilize the frequency structure within the spectral coefficients. This invention proposes a spectrum-aware token encoding mechanism that constructs coefficient amplitude features and spectral structure features for multiple spectral coefficients within each spectral group-time location, and combines local spectral mixing, intra-group spectral attention, and band pooling to encode multiple spectral coefficients into spectral group-time tokens.
[0043] Technical benefits: Compared with simple linear token encoding, this invention can explicitly utilize information such as graph Laplacian eigenvalues, frequency band information, relative positions within the spectrum group, and global frequency numbers during the token formation stage, avoiding the treatment of graph coefficients as unordered channels, thus making it more conducive to maintaining node spatial correlation, graph smoothness, and graph energy structure.
[0044] (4) Local time segment modeling mechanism;
[0045] Mechanism: Existing spatiotemporal generation models typically treat each time point as an independent token or directly rely on global attention to model temporal relationships, easily overlooking short-term change patterns in local time segments. This invention introduces a time patching mixing mechanism after spectrum-aware token encoding, performing local window mixing of spectrum group-time tokens along the time dimension, enabling tokens at each time position to fuse information from adjacent time steps.
[0046] Technical benefits: Compared with methods that use only a single time point as the basic modeling unit, this invention can enhance the semantics of local time segments without reducing temporal resolution, enabling generated samples to better maintain local temporal continuity and residual dynamic change patterns, and improving the usability of synthetic data for downstream graph spatiotemporal prediction or data augmentation.
[0047] (5) Axial-global spectrum-time interactive modeling;
[0048] Mechanism: Existing conventional Transformers or diffusion Transformers typically flatten spatial and temporal locations into a one-dimensional token sequence and perform global attention at each layer, lacking a distinction between the different physical meanings of the time axis and the spectral axis. This invention proposes an axial-global diffusion denoising network that decomposes token interactions into time axis attention, spectral group axis attention, and periodic global attention. Specifically, time axis attention is used to model the dynamic dependencies of the same spectral band over time; spectral group axis attention is used to model the cooperative relationships between different spectral bands at the same time cross-section; and periodic global attention is used to supplement long-range spectral-temporal dependencies.
[0049] Technical benefits: Compared with ordinary global attention structures, this invention can model temporal evolution, spectral band coordination and global spatiotemporal consistency respectively. It retains structural priors and avoids the lack of long-range dependencies caused by complete localization, thereby improving the overall consistency of generated samples in terms of temporal dynamics, spatial correlation and spectral structure.
[0050] (6) Complete graph spatiotemporal window generation task;
[0051] Mechanism: Existing graph spatiotemporal models mostly aim at prediction, interpolation, or conditional recovery, typically relying on historical observations, partial node measurements, mask information, or label conditions. This invention focuses on generating complete graph spatiotemporal sequence windows. In the main embodiment, it does not rely on historical observations, node masks, partial measurements, or label conditions, but instead generates complete spatiotemporal sequences based on a fixed graph structure and temporal background decomposition.
[0052] Technical application: This invention is more suitable for tasks such as data augmentation, simulation, abnormal scenario supplementation, and complete sample synthesis. It can generate synthetic samples that cover all nodes and complete time windows, rather than just predicting and restoring future values, missing values, or local observations.
[0053] (7) Structural consistency and data availability;
[0054] Mechanism: The generation process of this invention simultaneously considers temporal dynamics, spatial correlation, spectral structure, and data availability. By combining spectral residual representation, spectral-aware token encoding, temporal patching, and an axial-global diffusion denoising network, the generated samples can better preserve the structural features on a fixed graph.
[0055] Technical implications: Compared to generation methods that only focus on marginal distribution or single-point time series similarity, this invention helps improve the consistency of generated samples in terms of node correlation structure, graph energy distribution, temporal autocorrelation, and downstream graph spatiotemporal prediction availability, making the synthetic data more suitable as a data source for graph spatiotemporal model training, data augmentation, and robustness evaluation. Attached Figure Description
[0056] Figure 1 This is a flowchart of a graph-constrained spatiotemporal sequence data generation method according to an embodiment of the present invention;
[0057] Figure 2 This is a flowchart of a diffusion denoising network training method according to an embodiment of the present invention. Detailed Implementation
[0058] The embodiments of the present invention will be described below with reference to the accompanying drawings. To ensure consistency in terminology and data flow, the basic objects and their relationships are given first, followed by detailed descriptions. Figure 1 The online generation process Figure 2The offline training process. Except for the explicitly marked steps, the subsequent module descriptions are used to explain parameter construction, representation transformations, or optional implementations, and do not add method steps to the flowchart.
[0059] This invention provides a method for generating graph-constrained spatiotemporal sequence data. Figure 1 The online generation process is illustrated under conditions of fixed graph structure and time coordinates. Its core lies in the separate modeling of the graph residual branches and the temporal background branches, which are then synthesized only in the final output stage.
[0060] Let the fixed spatial diagram be The real node domain spatiotemporal sequence is The time coordinate is The node-level deterministic time context is The random residual is Let the graph Fourier basis and eigenvalue diagonal matrix of the graph Laplace matrix be respectively... and After spectral transformation, normalization, and spectral group packaging, the spectral residual tensor is obtained. . Figure 1 It includes the following seven steps, S101 to S107:
[0061] Figure 1 The following implementation only lists S101 to S107 as seven main process steps. Figure 2 The training process shown is used to obtain the denoising network called by S105. .
[0062] S101: Obtain a fixed space map Time coordinates corresponding to the window to be generated A fixed spatial graph represents the spatial relationships between nodes, while time coordinates represent the periodic positions of each time step within the window to be generated.
[0063] S102: Construct the graph Laplace matrix and graph Fourier basis from the fixed spatial graph, and determine the spectral group configuration, normalization parameters and effective coefficient mask, thereby forming a fixed graph spectral transformation and spectral group configuration.
[0064] S103: Based on time coordinates Estimate or obtain node-level deterministic temporal context The background follows a stable periodic pattern and is retained as an independent branch during the generation process.
[0065] S104: Determine the shape of the packed spectrum residual tensor according to the spectrum group configuration, sample the initial noise from the preset random noise distribution, and obtain the initial noisy spectrum residual tensor according to the initial noise scale.
[0066] S105: According to the preset diffusion noise scale sequence, the current noisy spectrum residual tensor and the corresponding noise scale are... Input the trained diffusion denoising network The residual tensor of the target map is obtained through iteration.
[0067] S106: Perform inverse spectral unpacking, removal of invalid padding coefficients, inverse normalization, and inverse graph Fourier transform on the target graph residual tensor to obtain the nodal domain residual.
[0068] S107: Integrating nodal domain residuals with temporal context Adding them together yields the spatiotemporal sequence of the composite graph.
[0069] Figure 1 The dependencies are as follows: After S101, S102 establishes the spectrum transformation and spectrum group configuration required for the spectrum residual branch; S103 establishes the time background branch; S104 to S106 sequentially complete noise initialization, diffusion denoising, and node domain recovery on the spectrum residual branch; S107 converts the output of S103... Merge with the node domain residuals output by S106. (Through...) Figure 2 The training process shown yields the following results. Used to execute S105, the diffused noise scheduling is used to determine the noise scale and sampling update process corresponding to each iteration of S105.
[0070] S101. Obtain the fixed spatial map and the time coordinates corresponding to the window to be generated; including:
[0071] Assume the fixed spatial diagram is as follows:
[0072] ,
[0073] Where V represents the set of graph nodes and E represents the set of edges. Represents the adjacency matrix or spatial incidence matrix. This indicates the number of nodes. Nodes can correspond to traffic sensors, air quality monitoring stations, weather stations, power load nodes, road segments, or other spatial sampling units.
[0074] The time coordinate sequence corresponding to the window to be generated is represented as follows:
[0075] ,
[0076] in, Indicates the time length during which the window is to be generated. It can represent the first Time information for each time step, such as intraday time, weekday information, periodic index, or other intrinsic time coordinates.
[0077] In this embodiment, during the generation phase, a fixed spatial map is used. Used to provide spatial structure constraints, time coordinates Used to obtain node-level deterministic temporal context The generative model of this invention does not rely on historical observation sequences, node masks, partial node measurements, category labels, or additional semantic covariates during sampling; instead, it generates a window of the complete graph spatiotemporal sequence.
[0078] S102, Constructing spectral transformation, spectral group division, and effective coefficient configuration;
[0079] To explicitly utilize the fixed graph structure, based on a fixed spatial graph Establish the graph Fourier transform and its inverse transform between the node domain and the graph domain, and determine the spectral group configuration used for subsequent graph residual representation.
[0080] First, based on the fixed graph adjacency matrix Constructing the graph Laplacian matrix In one embodiment, the graph Laplace matrix can be represented as:
[0081] ,
[0082] in, This is the degree matrix. In another embodiment, a normalized graph Laplacian matrix can also be used. :
[0083] ,
[0084] Eigenvalue decomposition of the graph Laplacian matrix yields the graph Fourier basis and the corresponding graph frequencies:
[0085] ,
[0086] in, This indicates the graphical Laplacian matrix used. To plot Fourier's diagram, This is a diagonal matrix of eigenvalues. The eigenvalues correspond to different spectral frequencies in order of frequency. Lower spectral frequencies usually represent smooth spatial patterns on the graph, while higher spectral frequencies usually represent local differences or fine-grained spatial variations between nodes.
[0087] Subsequently, based on the number of nodes, the length of the time window, and the preset spectral group configuration, the graph frequencies were divided into frequency sequences. Each spectral group contains no more than [number] spectral sets. Each spectral coefficient is used to determine the layout of the spectral group-time-coefficient tensor. For insufficient... The positions of the spectral coefficients are filled in, and an effective coefficient mask is generated. This is used to identify the positions of valid spectral coefficients.
[0088] Simultaneously, the normalized parameters determined based on the graph residual statistics during the training phase are obtained, and the normalized parameters, graph Fourier basis, spectral group division, and effective coefficient mask are saved as a fixed graph configuration for use in the graph residual representation during the training phase and the graph residual recovery during the generation phase.
[0089] The output of this step is a fixed graph transformation and spectral group configuration, rather than the true residuals of the window to be generated. During the training phase, this configuration is used to convert the node domain residuals into a graph residual tensor; during the generation phase, the configuration is used to perform an inverse transformation on the denoised graph residual tensor.
[0090] The purpose of this step is to convert the node domain residuals into tensors with explicit fixed graph semantics, so that subsequent models can directly learn the graph frequency structure, rather than implicitly inferring spatial dependencies only in the node domain.
[0091] S103. Obtain the node-level deterministic temporal background based on the time coordinates;
[0092] Real spatiotemporal sequences typically contain two types of components: one is the stable background pattern determined by the time coordinates, such as intraday cycles, weekly cycles, or long-term average patterns of nodes themselves; the other is the random residuals that change around the stable background, such as traffic disturbances, local propagation, anomalous fluctuations, and random noise.
[0093] If the original sequence is generated directly The model needs to learn both the stable temporal context and the random graph structure changes simultaneously, which can easily lead to coupling between periodic patterns, spatial correlations, and local perturbations, increasing the modeling difficulty. Therefore, this invention first estimates the node-level deterministic temporal context:
[0094] ,
[0095] In the time background construction stage, the spatiotemporal sequence of the training graph and its time coordinates are used to statistically analyze or fit the stable change patterns of each node under different time coordinates, and establish a time background mapping relationship.
[0096] During the generation phase, based on the time coordinate sequence corresponding to the window to be generated:
[0097] ,
[0098] Query or calculate the node-level background value corresponding to each time step. :
[0099] ,
[0100] The background encoding function is used to obtain the deterministic temporal background of the window to be generated:
[0101] ,
[0102] The time background mapping relationship can be established based on intraday time, weekday information, periodic index, or a combination thereof. For example, intraday periodic background and intraday time and weekday combination background can be established separately, and the node mean can be used as the backtracking background when the corresponding time coordinate lacks statistical samples.
[0103] In this embodiment, the time background Retained as an independent branch, not directly input to the diffusion denoiser. Instead, after generating the node domain residual, it is synthesized with the node domain residual in the output stage.
[0104] S104, Sampling initial spectrum residual noise tensor, including:
[0105] After obtaining the fixed spectrum transformation and spectrum group configuration, the shape of the spectrum residual tensor is determined according to the spectrum group configuration. For a single window to be generated, the shape of the spectrum residual tensor is:
[0106] ,
[0107] For batch generation, the shape of the map residual tensor is:
[0108] ,
[0109] To determine the batch size, initial noise is sampled from a preset random noise distribution.
[0110] ,
[0111] And based on the initial noise scale of the diffusion sampling process The initial noisy map residual state is obtained:
[0112] ,
[0113] in, This represents the initial noise state in the residual space of the packed map. This is the initial noise scale in the preset noise scale sequence. For spectral group filling positions, it is determined based on the effective coefficient mask. The filling positions are marked so that they are not involved in the subsequent feature processing of effective coefficients, loss calculation, and node domain recovery.
[0114] This step directly samples the initial noise in the defined residual space of the packed map, without using historical observations, partial node observations, or temporal background for the window to be generated. Step S104 outputs the initial noise state. The initial noise scale and its corresponding noise scale are input into step S105 for iterative denoising.
[0115] S105. Call the diffusion denoising network to iteratively generate the target map residual tensor;
[0116] The initial spectrum residual noise state is obtained in step S104. Then, iterative denoising is performed according to a preset diffusion noise scale sequence. The noise scale sequence is expressed as:
[0117] ,
[0118] in, Indicates the initial noise scale. Indicates the end-point noise scale. This indicates the number of iterations in the diffusion sampling.
[0119] In the In the next iteration, the current noisy map residual state will be... and its corresponding noise scale Input the trained diffusion denoising network This yields the denoising estimate at the current noise scale:
[0120] ,
[0121] in, Both the input and output reside in the spectral group-time-coefficient tensor space, and the denoising estimation Residual status of the current map They have the same spectral group, time, and coefficient dimension. Effective coefficient mask. Used to identify the positions of effective spectral coefficients, so that the filled positions are not involved in the effective feature processing of the denoising network.
[0122] Based on current noise levels Next noise scale and denoising estimation The residual state of the map for the next iteration is obtained according to the preset diffusion sampling update rule:
[0123] ,
[0124] in, This represents the diffusion sampling update operator. In one embodiment, the diffusion sampling update operator employs a noise-scale-based Euler update rule and uses a second-order correction between adjacent sampling steps to progressively reduce the noise component in the spectral residual state according to the current noise scale and the next noise scale.
[0125] Repeat the above process of "inputting the current noisy state - performing denoising - updating the map residual state" until the final noise scale is reached to obtain the target map residual tensor:
[0126] ,
[0127] The target graph residual tensor remains the normalized spectral group-time-coefficient tensor, which is then input into step S106 to perform inverse spectral group unpacking, inverse normalization, and inverse graph Fourier transform. Diffusion denoising network The internal spectral-aware token encoding, local temporal mixing, noise conditional modulation, and axial-global attention are all internal network processing steps in this step and are not constructed separately. Figure 1 The new main process steps.
[0128] S106. Perform an inverse transformation on the target map residual tensor to recover the nodal domain residuals, including:
[0129] The residual tensor of the target map obtained in step S105 is denoted as:
[0130] ,
[0131] in, Indicates the number of spectral groups. Indicates the length of the time window. This represents the coefficient width for each spectral group. This is the residual tensor of the spectrum after normalization and spectral group packaging.
[0132] First, based on the spectral group configuration and effective coefficient mask determined in step S102. ,right Perform inverse spectral unpacking, remove padding positions, and restore the original order of spectral coefficients according to the graph frequency index to obtain the normalized spectral residual coefficients:
[0133] ,
[0134] in,
[0135] ,
[0136] Let the number obtained during the training phase be... The mean and standard deviation of the frequency of each graph are respectively and The normalized scaling factor is Then the first The positive normalization of the residuals of the time-step graph can be expressed as:
[0137] ,
[0138] For the first The spectral residuals at each time step are used to perform inverse normalization on the normalized spectral residual coefficients obtained by unpacking the inverse spectral set, resulting in unnormalized spectral residual coefficients:
[0139] ,
[0140] in, It is a preset positive number used to avoid numerical instability caused by excessively small standard deviation.
[0141] Subsequently, the graphical Fourier basis obtained in step S102 is used. Perform the inverse graphical Fourier transform. For the ... If we represent each time step using a column vector, then we have:
[0142] ,
[0143] in, Indicates the first The residual coefficients of the spectrum at each time step. This represents the corresponding node domain residual. Performing an inverse transform over all time steps yields the node domain residual sequence:
[0144] ,
[0145] When generating using batch samples, the shape of the node domain residual is as follows:
[0146] ,
[0147] The output of this step is the nodal domain residual generated by the diffusion model. It has not yet been associated with a definitive time context. Synthesis; Step S107 further adds the two together to obtain a complete composite spatiotemporal sequence.
[0148] S107. Fuse the node domain residuals with the temporal context to output the spatiotemporal sequence of the composite graph;
[0149] The node-level deterministic temporal background obtained in step S103 is denoted as:
[0150] ,
[0151] The node domain generation residual obtained in step S106 is denoted as:
[0152] ,
[0153] The deterministic temporal background and the residual generated from the node domain are added element-wise at the same time and node positions to obtain the spatiotemporal sequence of the composite graph:
[0154] ,
[0155] Through the above steps, firstly, a graph transformation and spectral group configuration are established based on a fixed spatial graph, and a deterministic temporal background is obtained according to the time coordinates of the window to be generated; then, starting from the random noise state, a diffusion denoiser is called to perform iterative sampling in the packed graph residual space; finally, the denoised graph residual is restored to the node domain residual by inverse spectral group unpacking, inverse normalization and inverse graph Fourier transform, and added to the deterministic temporal background to obtain a synthetic graph spatiotemporal sequence covering all nodes and the complete time window.
[0156] Specifically, step S102 establishes a map transformation and fixed configuration based on a fixed spatial map; step S103 obtains a node-level deterministic temporal background based on the time coordinates to be generated; steps S104 to S106 generate and recover node domain residuals; and step S107 superimposes the node domain residuals with the deterministic temporal background to obtain a synthesized spatiotemporal sequence. The diffusion denoising mechanism invoked in step S105... Acquired through the training phase, the specific training process and internal structure are as follows: Figure 2 As shown, the input-output relationship, network structure, and training optimization mechanism of the diffusion denoiser are explained.
[0157] First, let's explain the input-output relationship of the denoising network:
[0158] Diffusion denoising network It is used in both the training and generation phases. For the input noisy graph residual tensor... and the corresponding noise scale The denoiser outputs the denoised spectral residual estimate:
[0159] ,
[0160] in, and All reside in the spectral-time-coefficient tensor space and have the same spectral dimension, time dimension, and coefficient dimension. (Time background) inaction The input time background is synthesized only with the node domain residual in step S107.
[0161] In one embodiment, Includes diffusion preconditioning module and spectral-time diffusion network The diffusion preconditioning module is based on the noise scale. Scale the input and network output:
[0162] ,
[0163] in, For effective coefficient mask, This represents element-wise multiplication. , and These are the preconditioning coefficients related to the noise scale. As a preset data scale parameter, the coefficient can be expressed as:
[0164] ,
[0165] ,
[0166] ,
[0167] Through the above preconditioning process, the network receives relatively stable inputs at different noise scales, and the network output is combined with the current noisy state to obtain the final denoising estimate.
[0168] The specific structure of the spectral-time diffusion network is as follows:
[0169] Spectral-Time Diffusion Network Packed spectrum residual tensor The network takes spectral data as input and performs structured modeling of the spectral residuals according to the spectral group dimension and the temporal dimension. The network includes a spectral-aware token encoding module, a spectral-temporal structure encoding module, a local-temporal mixing module, a noise conditional modulation module, an axial-global attention module, and an output mapping module.
[0170] Introduction to the Spectrum-Aware Token Encoding Module:
[0171] For the k-th spectral group, the t-th time step, and the f-th spectral coefficient within that spectral group, let its input value be... Numerical features and spectral structure features are constructed for the spectral coefficients.
[0172] The numerical features may include spectral coefficient values, scale-normalized coefficient values, signed logarithmic features, and absolute value features, for example:
[0173] ,
[0174] in, This represents the spectral coefficients after adjustment for intragroup or frequency band scales.
[0175] The spectral structural features may include the graph Laplacian eigenvalues, relative positions within the spectral group, global graph frequency numbers, and offsets relative to the center frequency of the spectral group.
[0176] ,
[0177] in, Indicates spectral frequency. Indicates the relative position within the spectral group. Indicates the global graph frequency number. This represents the difference between the frequency of the spectrum and the center frequency of the spectrum group to which it belongs.
[0178] The numerical features and spectral structural features are embedded separately, and frequency band identifiers are added to obtain coefficient-level features. Subsequently, within the same spectral group and the same time step, local spectral mixing and intra-spectral attention are performed along the coefficient dimension within the spectral group to capture the local relationships between adjacent spectral coefficients and the structural relationships between different frequencies.
[0179] Multiple aggregations are performed on the processed coefficient-level features, including mean aggregation, attention aggregation, and low-frequency, mid-frequency, and high-frequency grouping aggregation, to obtain spectral-aware features. Simultaneously set up a normal linear mapping branch:
[0180] ,
[0181] The two branches are fused using a gated residual approach to obtain the learnable linear transformation matrix weights.
[0182] ,
[0183] in, These are learnable gating parameters. They are derived from each spectral group and the parameters corresponding to each time step. Composition of the spectrum group—time token tensor.
[0184] The specifics of spectral-temporal structure encoding and local temporal mixing are as follows.
[0185] Add the spectrum group position, time position, spectral frequency, and frequency band structure encoding to the spectrum group-time token:
[0186] , For spectral groups—time tokens, Encoding the position of the spectral group. Encoding for time location, For spectral frequency encoding, This is for frequency band structure coding.
[0187] During the training phase, a small number of spectral groups—time tokens—can be randomly masked before structural encoding is added, to enhance the network's ability to recover effective coefficients using adjacent time and spectral context. This token masking is only used as a training optimization mechanism; the masking operation is not performed during the sampling phase.
[0188] Subsequently, local temporal mixing is performed on the token sequence of each spectral group along the time dimension:
[0189] ,
[0190] in, This represents a local temporal segment blending operation, which can be performed using a depthwise separable convolution in the temporal dimension. These are learnable gating parameters. Local temporal mixing does not change the number of spectral groups, the number of time steps, or the number of tokens.
[0191] Noise conditional modulation and axial-global attention are specifically as follows:
[0192] Based on current noise levels Constructing noise conditional embedding:
[0193] ,
[0194] The noise condition embedding is used in the normalization layer, attention layer and feedforward network in the modulation diffusion network module, so that the network can adopt the corresponding denoising method according to different noise scales.
[0195] Each spectral-time diffusion module is executed sequentially:
[0196] 1. Fix the spectral group and perform time-axis attention in the time dimension;
[0197] 2. At a fixed time position, perform spectral group axis attention within the spectral group dimension;
[0198] 3. Perform global attention on all spectral groups—time tokens—at preset layer intervals;
[0199] 4. Update the token's hidden features via a feedforward network.
[0200] During the attention calculation process, time relative position bias, spectral group relative position bias, and spectral frequency distance bias can also be added to enable the attention calculation to simultaneously perceive time distance, spectral group distance, and spectral frequency distance.
[0201] After processing by multiple spectral-temporal diffusion modules, the denoised hidden features are obtained. .
[0202] The output mapping will then be introduced;
[0203] Normalization is performed on the final hidden features, and the graph residual coefficients within the corresponding spectral group are restored to each spectral group-time token through the output mapping header:
[0204] ,
[0205] The output is the linear layer weight; after processing by the diffusion preconditioning module, the output yields a denoised spectral residual estimate with the same spectral group, time, and coefficient dimensions as the input. .
[0206] In summary, the above are merely preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for generating graph-constrained spatiotemporal sequence data, characterized in that, Includes the following steps: Obtain a fixed spatial graph and the time coordinates corresponding to the window to be generated; the fixed spatial graph represents the spatial relationship between nodes, and the time coordinates represent the periodic position of each time step within the window to be generated; The graph Laplace matrix and graph Fourier basis are constructed from the fixed spatial graph, and the spectral group configuration, normalization parameters and effective coefficient mask are determined, thereby forming a fixed graph spectral transformation and spectral group configuration; The node-level deterministic temporal background is estimated or obtained based on the time coordinates; the temporal background is retained as an independent branch and is used to assume stable periodic patterns during the generation process; The shape of the packed spectrum residual tensor is determined according to the spectrum group configuration, initial noise is sampled from a preset random noise distribution, and the initial noisy spectrum residual tensor is obtained according to the initial noise scale. According to the preset diffusion noise scale sequence, the current noisy map residual tensor and the corresponding noise scale are input into the trained diffusion denoising network to iterate and obtain the target map residual tensor. The target graph residual tensor is subjected to inverse spectral unpacking, removal of invalid padding coefficients, inverse normalization, and inverse graph Fourier transform to obtain the node domain residual. The node domain residual is added to the temporal background to obtain the spatiotemporal sequence of the composite graph.
2. The method according to claim 1, characterized in that, The spectral group configuration includes: dividing the graph frequencies into multiple spectral groups according to frequency order, each spectral group containing no more than a preset number of spectral coefficients, and determining the layout of the spectral group-time-coefficient tensor; filling in positions where the number of spectral coefficients is less than the preset number, and generating the effective coefficient mask to identify the positions of the effective spectral coefficients; simultaneously acquiring the normalized parameters determined based on the spectral residual statistics during the training phase, and saving the normalized parameters, the graph Fourier basis, the spectral group division, and the effective coefficient mask as a fixed spectral configuration for use in spectral residual representation during the training phase and spectral residual recovery during the generation phase.
3. The method according to claim 1, characterized in that, The method for obtaining the node-level deterministic temporal background is as follows: using the spatiotemporal sequence of the training graph and its time coordinates, the stable change pattern of each node under different time coordinates is statistically analyzed or fitted to establish a temporal background mapping relationship. During the generation phase, based on the time coordinate sequence corresponding to the window to be generated, the node-level background value corresponding to each time step is queried or calculated to obtain the time background of the window to be generated; the time background mapping relationship is established based on intraday time, weekday information, periodic index or a combination thereof, and the node mean is used as the backtracking background when the corresponding time coordinate lacks statistical samples.
4. The method according to claim 1, characterized in that, The packed spectrum residual tensor has three dimensions: the number of spectrum groups, the length of the time window, and the width of the coefficients of each spectrum group. The initial noisy spectrum residual tensor is obtained by multiplying the initial noise scale by random noise that follows a standard normal distribution. For the spectrum group filling position, it is identified according to the effective coefficient mask so that the filling position does not participate in the subsequent feature processing, loss calculation, and node domain recovery of the effective coefficients.
5. The method according to claim 1, characterized in that, The input and output of the diffusion denoising network are both located in the spectrum group-time-coefficient tensor space. In the i-th iteration, the current noisy spectrum residual state and its corresponding noise scale are input into the diffusion denoising network to obtain the denoising estimate. Then, according to the preset diffusion sampling update rule, the spectrum residual state for the next iteration is obtained based on the current noise scale, the next noise scale, and the denoising estimate. Repeat the above process until the end noise scale is reached to obtain the target map residual tensor; The diffusion sampling update rule adopts a noise-scale-based update method and performs correction processing between adjacent sampling steps.
6. The method according to claim 1, characterized in that, The inverse spectral unpacking is performed as follows: based on the spectral configuration and the effective coefficient mask, the inverse spectral unpacking is performed on the target spectral residual tensor, the padding positions are removed, and the original order of each spectral coefficient is restored according to the spectral frequency index to obtain the normalized spectral residual coefficients; The inverse normalization is performed by using the mean and standard deviation of each graph frequency obtained during the training phase, as well as the normalization scaling factor, to perform inverse normalization on the normalized graph residual coefficients, resulting in unnormalized graph residual coefficients. The inverse graph Fourier transform is performed by using the graph Fourier basis to perform inverse graph Fourier transform on the unnormalized graph residual coefficients at each time step, resulting in the node domain residuals.
7. The method according to claim 1, characterized in that, The diffusion denoising network includes a diffusion preconditioning module and a spectral-temporal diffusion network. The diffusion preconditioning module scales the input and network output according to the noise scale, enabling the network to receive relatively stable inputs at different noise scales, and combines the network output with the current noisy state to obtain the final denoising estimate. The spectral-temporal diffusion network takes the packed spectral residual tensor as input and includes, in sequence: a spectral-aware token encoding module, used to construct numerical features and spectral structural features and fuse them into a spectral group-temporal token; a local temporal mixing module, used to perform local window mixing on the token sequence of each spectral group along the time dimension; a noise conditional modulation module, used to construct noise conditional embeddings according to the current noise scale to modulate each module of the network; an axial-global attention module, used to sequentially perform time axis attention, spectral group axis attention, and periodic global attention to model temporal dynamics, inter-spectral group collaboration, and global spectral-temporal dependence, respectively; and an output mapping module, used to restore the final hidden features to spectral residual coefficients.
8. A device for generating graph-constrained spatiotemporal sequence data, characterized in that, Includes the following modules: A fixed spatial map and time coordinate acquisition module acquires a fixed spatial map and the time coordinates corresponding to the window to be generated; the fixed spatial map represents the spatial relationship between nodes, and the time coordinates represent the periodic position of each time step within the window to be generated; The graph transformation and spectral group configuration determination module constructs the graph Laplace matrix and graph Fourier basis from the fixed spatial graph, and determines the spectral group configuration, normalization parameters and effective coefficient mask, thereby forming a fixed graph transformation and spectral group configuration. The time background acquisition module estimates or acquires the node-level deterministic time background based on the time coordinates; the time background is retained as an independent branch and is used to assume stable periodic patterns during the generation process; The initial noisy spectrum residual tensor acquisition module determines the shape of the packaged spectrum residual tensor according to the spectrum group configuration, samples initial noise from a preset random noise distribution, and obtains the initial noisy spectrum residual tensor according to the initial noise scale. The target map residual tensor acquisition module inputs the current noisy map residual tensor and the corresponding noise scale into the trained diffusion denoising network according to the preset diffusion noise scale sequence, and iteratively obtains the target map residual tensor. The node domain residual acquisition module performs inverse spectral unpacking, removal of invalid padding coefficients, inverse normalization, and inverse graph Fourier transform on the target graph residual tensor to obtain the node domain residual. The result generation module adds the node domain residual to the temporal background to obtain the spatiotemporal sequence of the composite graph.
9. An electronic device, characterized in that, include: One or more processors; A memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores executable instructions that, when executed by a processor, cause the processor to perform the method described in any one of claims 1 to 7.