Time series prediction method and system based on adaptive prior dynamic graph hybrid expert

CN123014191APending Publication Date: 2026-10-30ZHEJIANG SCI-TECH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611223776.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-13
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

[0059]第一,本发明利用周期对齐历史记忆构造多个候选先验,并由逐预测步先验路由器根据当前上下文动态分配权重,相比固定历史均值或完全直接预测,能够同时利用周期规律的稳定性和数据驱动模型的适应性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014191A_ABST
    Figure CN123014191A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of artificial intelligence and computer data processing, and particularly relates to a time series prediction method and system based on adaptive prior dynamic graph hybrid experts. The method is as follows: obtaining multivariate historical sequences, period-aligned historical segments and future covariates; extracting the node state of each variable through a variable node time series encoder, extracting the period global summary and the period feature of each prediction step through a period pattern encoder, and constructing a candidate period prior; extracting the future feature of each prediction step through a future covariate encoder; injecting the period summary and the future summary into the node state, and obtaining graph-enhanced node features through graph attention aggregation of a context dynamic graph module; concatenating the period feature, the future feature, the graph-enhanced node feature and the recent target summary to form a context of each prediction step; obtaining an adaptive benchmark through a prior router, and obtaining a limited residual through a hybrid expert residual module; and obtaining a final prediction result through fusion gating weighting of a direct prediction branch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the fields of artificial intelligence, computer data processing and entity system state prediction technology, specifically involving a time series prediction method and system based on adaptive prior dynamic graph hybrid experts. Background Technology

[0002] In the digital management of industrial equipment operation monitoring, production process control, environmental status analysis, and other physical systems, it is often necessary to predict future states based on continuously collected multivariate time series data. This type of data not only possesses complex time characteristics such as trends, periods, abrupt changes, and noise, but the strength of the correlation between different variables also varies with operating conditions, external conditions, and the prediction period. Therefore, accurately modeling time dependencies and variable correlations is crucial for improving the stability and generalization ability of multi-step predictions.

[0003] Existing time series forecasting methods typically employ recurrent neural networks, convolutional neural networks, attention networks, or combinations thereof to directly generate future results from historical sequences. While direct forecasting is structurally simple, it tends to overlook historical information when the forecast interval is long, the sample size is limited, or the system exhibits a clear periodic pattern. Furthermore, when recent states change rapidly, relying solely on a fixed-period baseline makes it difficult to correct biases in a timely manner. Existing methods generally fail to balance the stability of periodic priors with the flexibility of data-driven residual correction within the same forecasting framework.

[0004] On the other hand, the relationships between variables in multivariate sequences are usually represented by a fixed adjacency matrix or fully connected attention. Fixed topology is difficult to reflect the changes in relationships between different samples and under different operating conditions, while fully connected attention introduces a large number of weakly correlated edges and computational redundancy, making it easy for key variable relationships to be interfered with by noise. Although hybrid expert models can allocate computational paths for different data patterns, if multiple experts directly output complete prediction values, problems such as overlapping expert responsibilities, route degradation, or unstable output amplitudes can easily occur.

[0005] Furthermore, external covariates, periodically aligned historical segments, and recent target variables have different data organization methods and semantics. Simply concatenating them and processing them with a single encoder would weaken the structural differences between various types of information; while modeling them completely independently would make it difficult to form a unified prediction context. Therefore, a technical solution is needed that can encode multi-source time series information separately, dynamically construct graphs using context, adaptively select benchmarks from candidate periodic priors, and complete corrections through constrained hybrid experts. Summary of the Invention

[0006] To overcome the problems of insufficient utilization of periodic information, fixed variable relationships, difficulty in dividing tasks among different prediction modes, and large fluctuations in direct prediction results in existing technologies, this invention proposes a time series prediction method and system based on adaptive prior dynamic graph hybrid experts. This method treats each observed variable as a graph node, using causal dilated convolution and temporal attention to obtain node states; it extracts stepwise periodic features using periodic alignment historical memory and constructs multiple candidate priors; it extracts stepwise future conditions using a future external covariate encoder; and it modulates a multi-head dynamic graph using periodic summaries and future summaries to obtain variable relationships matching the current sample. Finally, an adaptive baseline is formed through a prior router, multiple residual experts are fused through an expert router, and gated fusion is performed with the direct prediction branch.

[0007] The technical solution adopted in this invention is as follows:

[0008] The time series prediction method based on adaptive prior dynamic graph hybrid expert includes the following steps:

[0009] 1) Obtain multivariate historical sequences from the entity system, periodically aligned historical segments corresponding to the interval to be predicted, future available external covariates, and temporal location features; standardize the numerical variables according to the training data statistics, and construct multi-step prediction samples based on the prediction starting point. The future available external covariates refer to external conditional variables that have been determined or can be obtained before the prediction starting point and correspond to each time position within the prediction interval, excluding future values ​​of the target variable to be predicted, and also excluding other non-target variables derived from future observation data from the target side.

[0010] 2) Extract the recent window from the multivariate historical sequence, treat each numerical variable as a node, concatenate the node's value at each time step with the shared temporal location features, and obtain the node state of each variable through shared linear projection, causal residual temporal convolution and temporal attention pooling.

[0011] 3) Perform dual-path encoding on the periodic alignment history fragment: obtain a global periodic summary using bidirectional cyclic units along the periodic dimension; perform nonlinear mapping along the periodic dimension after rearranging according to the prediction step to obtain the periodic features corresponding to each prediction step; and simultaneously calculate multiple candidate periodic priors from the periodic alignment history fragment.

[0012] 4) Input the available external covariates and future time location features into the future external covariate encoder. After causal temporal convolution, recurrent units and layer normalization, the future features are obtained step by step prediction. The future global summary is obtained by time averaging.

[0013] 5) Project the periodic global summary and future global summary into context vectors and inject them into the node state. Calculate the node correlation through multi-head query and key-value mapping. Add the correlation to the learnable static bias and self-connection enhancement term. Perform Top-k sparsity and Softmax normalization on the candidate neighbors of each node to form the dynamic graph adjacency matrix corresponding to the current sample and complete graph attention aggregation.

[0014] 6) Set up an independent causal dilated convolutional encoder for the recent sequence of the target variable to obtain the recent target summary; concatenate the stepwise periodic features, stepwise future features, graph-enhanced target node features and the recent target summary according to the prediction step to form a stepwise prediction context.

[0015] 7) Input the prediction step context, candidate periodic priors and the most recent observation state into the prior router to obtain the stepwise weights of the candidate periodic priors and calculate the adaptive baseline; input the prediction step context into multiple expert heads to obtain candidate residuals, form weighted residuals through the expert router, and use a bounded activation function to limit the residual magnitude.

[0016] 8) The adaptive baseline and the constrained residuals are added to obtain the prior residual prediction; the direct prediction branch is used to generate the direct prediction from the context of each prediction step; the prior residual prediction and the direct prediction are weighted step by step by fusion gating, and the final multi-step prediction result is obtained after numerical range constraints.

[0017] 9) The joint objective function is constructed using weighted robust error, prior deviation regularization term and fusion gating regularization term. The model parameters are optimized based on the training samples to obtain the trained time series prediction model.

[0018] Preferably, the input sample is constructed in accordance with the periodic historical memory as follows:

[0019] Let the multivariate history series be... Where R represents the set of real numbers, T is the number of historical time steps, and N is the number of numerical variables; the time location feature is... The number of prediction steps is H; the future available external covariates and future time location features are combined as follows: X and E are concatenated along the feature dimension to form the historical input. For the target variable, segments of length H corresponding to the position of the interval to be predicted are extracted from D historical periods before the prediction starting point to form period-aligned historical memories. .

[0020] Constructing K candidate periodic priors from periodically aligned historical memories The candidate period prior includes at least the most recent period segment, the stepwise mean of the most recent several periods, the stepwise mean of a longer period window, and the stepwise median of all period segments. The candidate period priors share the same dimensions and prediction step index, enabling the router to independently select or merge them for each prediction step.

[0021] ;

[0022] Preferably, the variable node timing encoder is as follows:

[0023] Extract a recent window of length L from the historical input. For the nth variable, concatenate its numerical sequence with the shared temporal location features corresponding to each time step to obtain the node input. Using a shared linear layer The data is projected onto a C-dimensional latent space, and the batch dimension and node dimension are merged before being input into a causal residual temporal convolutional network. The causal residual temporal convolutional network consists of several residual convolutional blocks with increasing dilation rates. Each residual convolutional block sequentially performs one-dimensional convolution, causal pruning, nonlinear activation, and random deactivation, and maintains the consistency of the residual dimensions through identity mapping or one-dimensional projection.

[0024] ;

[0025] Calculate the attention score for the encoding results of node n at each time step, perform Softmax normalization along the time dimension, and then sum the results with weights to obtain the node state. All node states are combined as follows: The encoder shares timing parameters among all nodes, enabling different variables to be compared within a unified representation space, and the subsequent dynamic graph module learns the specific connection relationships between the variables.

[0026] ;

[0027] Preferably, the periodic mode encoder is as follows:

[0028] The periodically aligned historical memory M is input into the bidirectional gated recurrent unit in periodic order. The output sequence of the bidirectional gated recurrent unit is denoted as the periodic hidden sequence. The output representation of the last position is taken, and after linear mapping, nonlinear activation, random deactivation, and layer normalization, the periodic global summary is obtained. At the same time, transpose M to Each prediction step corresponds to a cross-period vector; the cross-period vector is then input into a shared linear mapping, nonlinear activation, random deactivation, and layer normalization to obtain the prediction step-by-step periodic features. The periodic global summary is used to modulate the dynamic graph, and the prediction-step periodic features are used to construct the final prediction context.

[0029] ;

[0030] Preferably, the future external covariate encoder is as follows:

[0031] The future input U first passes through a causal residual temporal convolutional network with different dilation rates to extract local evolution patterns. Then, it is input into a unidirectional gated recurrent unit to accumulate conditional information from front to back within the prediction interval. Finally, it is normalized by layers to obtain the future features for each prediction step. .right The future global summary is obtained by averaging along the prediction step dimension. Because of the use of causal convolution and a one-way loop structure, the encoding of the h-th prediction step does not depend on the positions of subsequent external covariates.

[0032] ;

[0033] Preferably, the context dynamic graph module is as follows:

[0034] Global summary of the period Future Global Summary After concatenation, a context vector c is obtained through linear mapping. c is then broadcast to each node and added to the node state V. Multi-head queries and key-value mappings are performed on the context-enhanced node states, and scaled dot product relevance is calculated. The relevance matrix is ​​added to the static bias matrix B learned by node index and the identity matrix entries used to enhance the node's own information.

[0035] ; ;

[0036] For each node, only the k nodes with the highest relevance are retained, and the other positions are set to negative infinity. After Softmax normalization, the dynamic graph adjacency matrix of the r-th attention head is obtained. . use The value vectors are aggregated in the neighborhood, the attention heads are concatenated and mapped to the output, and then residuals are added to the original node states and layer normalization is performed. Finally, the graph-enhanced node states are obtained through a feedforward network, a second residual connection, and layer normalization. .

[0037] ; ;

[0038] The static bias matrix is ​​used to preserve stable variable relationships across samples, the periodic summary and future summary are used to make the query, key and value change with the current sample, the self-join enhancement term is used to increase the probability of preserving the node's own state, and Top-k sparsification is used to suppress weakly related edges and reduce graph aggregation noise.

[0039] Preferably, the recent target encoder and the step-by-step prediction context are as follows:

[0040] The target variable values ​​are extracted from recent historical windows and concatenated with the corresponding time-location features. The result is then fed into a causal residual temporal convolutional network with more expansion layers. The final encoded state is processed through linear mapping, non-linear activation, and layer normalization to obtain a recent target summary. Select the target variable node from the graph enhancement node states. and will and Reproduce H times respectively, and compare with the periodic features of each prediction step. And predicting future features step by step By concatenating the information, we obtain the prediction step-by-step context. .

[0041] ;

[0042] Preferably, the adaptive prior routing module is as follows:

[0043] The context of the h-th prediction step The K candidate prior values ​​corresponding to this prediction step, along with the most recently observed state, are concatenated and input into the prior router. The prior router consists of at least two linear layers, nonlinear activation, and random deactivation. Its output is normalized using Softmax to obtain the candidate prior weights. The candidate priors are progressively weighted and summed according to the aforementioned weights to obtain the adaptive benchmark. .

[0044] ; ;

[0045] because The calculation is performed separately for each sample and each prediction step. When the recent periodic segments are consistent with the current context, the weight of the recent prior can be increased. When the recent segments are abnormal or the long-term periodic patterns are more stable, the weight of the mean or median prior can be increased, thereby avoiding the use of a fixed historical baseline.

[0046] Preferably, the hybrid expert residual module is as follows:

[0047] Set up E expert heads with identical structures but independent parameters. Each expert head is defined by... As input, candidate residuals are output via a multilayer perceptron. The expert router takes the prediction step context, candidate prior values, and the most recent observed state as input, and the output is normalized by Softmax to obtain the expert weights. The candidate residuals are weighted, summed, and then input into the hyperbolic tangent function. This sum is then multiplied by a preset or trainable upper limit ρ for the residual magnitude to obtain the constrained residuals. .

[0048] ; ; ;

[0049] By having experts output residuals instead of complete predictions, each expert learns different correction modes around a stable adaptive benchmark; hyperbolic tangent amplitude constraints can limit overcorrection caused by outliers and improve the stability of multi-step prediction curves.

[0050] Preferably, the direct prediction branch and fusion gating are as follows:

[0051] Directly predicting branches As input, a direct prediction is obtained through a multilayer perceptron and a bounded activation function. The fusion gating takes the prediction step context, candidate prior values, and the most recent observation state as input, and obtains the gating coefficients through the Sigmoid function. The prior residual predictions and direct predictions are weighted by a gating coefficient, and the results are limited to a preset effective range. ; ;

[0052] Preferably, the initial bias of the fusion gated output layer is set to favor the prior residual branch, so that the model initially relies on the cyclic prior and restricted residual, and then learns from the data whether to increase the proportion of the direct prediction branch as training progresses.

[0053] Preferably, the joint training objective is as follows:

[0054] After restoring the normalized predictions and true results to their original dimensions, the scaled Huber loss, also known as the smoothed L1 loss, is calculated. Quadratic error is used for samples with absolute errors not exceeding a threshold δ, while linear error is used for samples exceeding δ, to reduce the impact of outliers on the training process. Sample weights are generated based on whether the true target is in a valid state and the degree of deviation of the true target from the reference baseline, making the model pay more attention to valid states and samples that are difficult to predict based on the baseline.

[0055] ; ;

[0056] Based on the weighted robust error, a regularization term is added to indicate that the prediction result deviates from the adaptive baseline, and a fusion gating regularization term is added to suppress the premature dominance of the direct prediction branch. The joint loss is: ;

[0057] Among them, reference baseline An adaptive baseline is a baseline obtained in advance during the data construction phase and that does not participate in prior routing. Mean represents the weighted baseline generated by the prior router, which is the average over the batch and all prediction steps.

[0058] The present invention has the following beneficial effects.

[0059] First, this invention utilizes periodically aligned historical memory to construct multiple candidate priors, and the weights are dynamically allocated by a step-by-step prediction prior router based on the current context. Compared with fixed historical averages or direct prediction, this invention can simultaneously utilize the stability of periodic patterns and the adaptability of data-driven models.

[0060] Second, this invention treats each numerical variable as a graph node, modulates multi-head correlation with periodic summaries and future summaries, and integrates static node bias, self-connection enhancement and Top-k sparsity to form differentiated variable dependency graphs for different samples, while suppressing a large number of weakly correlated connections.

[0061] Third, this invention learns different residual correction modes around the adaptive benchmark through multiple independent experts, and selects experts step by step using an expert router. By limiting the residual amplitude through bounded activation, it reduces the impact of unstable expert outputs and extreme corrections on the prediction results.

[0062] Fourth, this invention simultaneously sets up a priori residual branch and a direct prediction branch, which are gradually switched by the fusion gating according to the context. When the periodic pattern is reliable, the priori residual branch is used first, and when the system state deviates from the historical periodic pattern, the proportion of the direct prediction branch is increased, thereby enhancing the adaptability to multiple operating modes.

[0063] Fifth, this invention encodes node history, periodic memory, future available external covariates, and recent target state separately, and then integrates them uniformly in the context of each prediction step, avoiding structural confusion caused by simply splicing time-series information from different sources. It is suitable for deployment in entity systems that require continuous multi-step prediction. Attached Figure Description

[0064] Figure 1 This is a schematic diagram of the overall network framework of the present invention; Figure 2 This is a schematic diagram of the variable node timing encoding and context dynamic graph module in this invention; Figure 3 This is a schematic diagram of the periodic pattern encoding and future external covariate encoding modules in this invention; Figure 4 This is a schematic diagram of the adaptive prior and hybrid expert residual module in this invention; Figure 5This is a schematic diagram of the gating fusion and joint training objectives in this invention. Detailed Implementation

[0065] The present invention will be further described below with reference to the accompanying drawings. It should be understood that the following embodiments are used to illustrate the technical principles of the present invention, and not to limit the scope of protection; equivalent adjustments to the number of coding layers, latent space dimension, expansion rate, number of attention heads, number of candidate priors, number of experts, and number of sparse neighbors can all be used to implement the present invention without departing from the core concept of the present invention.

[0066] like Figure 1 As shown, this embodiment establishes a multi-step temporal prediction model that includes a variable node temporal encoder, a periodic pattern encoder, a future external covariate encoder, a context dynamic graph module, a recent target encoder, an adaptive prior routing module, a hybrid expert residual module, a direct prediction branch, and fusion gating. The model receives four types of inputs corresponding to the same prediction starting point and outputs a prediction sequence of length H.

[0067] 1) Align multiple numerical variables of the entity system according to timestamps, preserving continuous historical windows. Calculate the mean and standard deviation for each numerical variable in the training data, and standardize the validation data and the data to be predicted using the same statistics. Construct sine and cosine features with periodic continuity based on time location, and may also incorporate work status, shift, or other known status identifiers.

[0068] 2): For each prediction starting point t, the interval [tT,t) is truncated to form a multivariate historical sequence; the future within the prediction interval [t,t+H) can be used as external covariates to form future inputs; according to the preset period length, D period segments of target variables aligned with the position [t,t+H) are selected before t to form period-aligned historical memory.

[0069] 3): Calculate K candidate periodic priors based on periodic alignment historical memory. To prevent the numerical range of different entity systems from affecting model training, the periodic memory, candidate priors, and target sequence are normalized using a uniform scaling factor and pruned within a reasonable range.

[0070] like Figure 3 As shown, the periodic pattern encoder treats D historical periodic segments as sequences of length D, each containing an H-dimensional prediction segment. The bidirectional cyclic unit outputs a periodic summary to reflect the overall changes in different historical periodic segments; the other path transposes the memory matrix and uses the value of each prediction step in the D periods as input to form a progressive periodic feature, enabling the model to retain the periodic differences at different positions within the prediction interval.

[0071] The future external covariate encoder first uses short-level causal dilated convolutions to extract local patterns between adjacent future positions, and then uses unidirectional recurrent units to accumulate conditional information along the prediction step. This encoder simultaneously outputs H stepwise features and a global summary; the former is used for stepwise prediction, and the latter for modulating variable relationships.

[0072] like Figure 2 As shown, in the variable-node temporal encoder, only the most recent L time steps are extracted from the long historical sequence for recent dynamic modeling. The value of the nth variable at the L time steps is concatenated with the features at the same time position, and the input projection layer and temporal convolutional network are shared across N nodes. Shared encoding controls both the parameter scale and ensures that the node states of different variables have a consistent dimension.

[0073] The causal residual temporal convolutional block uses the left effective receptive field and achieves the output length to match the input length by pruning the right padding after convolution, thus avoiding access to future locations. Multiple convolutional blocks employ an increasing dilation rate, allowing the receptive field to expand with each layer. Each convolutional block contains two convolutions, activations, and random deactivations, and performs group normalization after adding residuals to the output.

[0074] Temporal attention pooling independently calculates weights for L time steps for each node. If a local change is more relevant to the prediction, its attention weight is increased; the weight of stationary or noisy time steps is decreased. This yields N node states, which serve as the basic node representation of the dynamic graph.

[0075] The context dynamic graph module merges periodic and future summaries into a context vector. Within each attention head, the node state, after context enhancement, forms a query, key, and value. The scaled dot product of the query and key reveals the dynamic relevance of the current sample, a learnable static bias provides long-term variable relationships across samples, and self-connect enhancement terms improve the retention of node information. The three parts are summed, retaining only the k largest scores from each row, and then normalized to form a sparse adjacency matrix.

[0076] Graph attention aggregation is performed using a sparse adjacency matrix and value vectors, and the multi-head outputs are concatenated and mapped back to C-dimensionality. The graph aggregation output is added to the original node state residuals and then processed through layer normalization and a feedforward network. As a result, each variable node not only contains its own recent temporal pattern but also information about the other variables most relevant to the current context.

[0077] The target encoder and the variable node temporal encoder operate in parallel. This encoder processes only the target variable and temporal features, and uses deeper dilated convolutional layers to obtain a concentrated representation of recent trends using the terminal states. This preserves multivariate graphical information while providing the prediction head with a dedicated dynamic summary of the target variable itself.

[0078] The periodic stepwise features, future stepwise features, graph-enhanced target node states, and recent target summaries are concatenated to form H prediction-step contexts. Both the prior router and the expert router simultaneously receive these contexts, candidate prior values ​​for the corresponding prediction step, and the most recently observed state. This ensures that routing decisions not only rely on abstract latent features but also allow for direct comparison of the numerical relationships between candidate priors.

[0079] like Figure 4 As shown, the prior router outputs Softmax weights for K candidate priors. Each prediction step has independent weights, so different historical references can be used for different positions within the same prediction interval. Multiple expert heads only receive the prediction step-by-step context and output residual candidates respectively. The expert router outputs E expert weights; the weighted residuals are constrained within a preset range after passing through a hyperbolic tangent function and then added to the adaptive baseline.

[0080] like Figure 5 As shown, the direct prediction branch is used to handle unreliable prior states in historical cycles. The fusion gating outputs coefficients between 0 and 1 based on the complete route input. When the coefficients are close to 1, adaptive prior residual prediction is mainly used; when the coefficients are close to 0, direct prediction is mainly used. The model output is mapped to the effective normalized interval of the target variable through range pruning, and then restored to its original dimensions during deployment.

[0081] During the training phase, samples are divided chronologically, and all standardized statistics are calculated only from the training interval. Mini-batch gradient optimization is used to optimize model parameters, with an upper limit set on the gradient norm. Learning rate adjustments, optimal parameter saving, and early stopping are performed based on validation error. The joint loss calculates robust error on the original scale, while incorporating prior deviation regularization and fusion gating regularization to maintain a balance between prediction accuracy and output stability.

[0082] In the inference phase, a historical sequence, periodic memory, candidate priors, future available external covariates, and temporal location features consistent with those in the training phase are constructed from the starting point of the target prediction and input into the trained model. Each forward computation of the model simultaneously generates adaptive prior weights, expert weights, a dynamic graph adjacency matrix, fusion gating, and the final prediction result for H prediction steps. These intermediate results can also be used to explain the connections between different variables, the selection of periodic priors, and the division of expert roles.

[0083] In one alternative implementation, the composition of future inputs can be determined based on whether the entity system has available external covariates. When no external covariates exist, the channel corresponding to the external covariates is set to a zero vector, and future time position features are retained. The future external covariate encoder and subsequent modules remain unchanged. In another alternative implementation, the candidate periodic prior can be augmented with weighted mean, quantile, or exponential smoothing results based on the actual periodic structure, but it is still gradually fused by the same prior router.

[0084] In another alternative implementation, the causal residual temporal convolutional block can be replaced with a gated convolutional or state-space coding unit with the same causal constraints; Top-k sparsity can be replaced with threshold sparsity; and the number of expert heads and attention heads can be adjusted according to computational resources. As long as the combination of multi-source independent coding, context dynamic graph, adaptive prior, restricted hybrid expert residuals, and gated direct-access branches is still used, it is an equivalent implementation of the technical concept of this invention.

Claims

1. A time series prediction method based on adaptive prior dynamic graph hybrid expert, characterized in that, Includes the following steps: S1, obtain the multivariate historical sequence from the entity system, the period-aligned historical segments corresponding to the interval to be predicted, the future covariates available at the prediction time, and the future time location features; The continuous numerical features in multivariate historical sequences, periodically aligned historical segments, and future covariates available at the prediction time are standardized according to the training data statistics, and multi-step prediction samples are constructed according to the prediction starting point. S2 extracts the recent window from the multivariate historical sequence, treats each numerical variable as a node, concatenates the node's value at each time step with the shared temporal location feature, inputs it into the variable node temporal encoder, and obtains the node state corresponding to each numerical variable in the multivariate historical sequence through shared linear projection, causal residual temporal convolution and temporal attention pooling. S3, input the period-aligned historical fragments into the periodic pattern encoder for dual-path encoding to obtain the periodic global summary and the periodic features corresponding to each prediction step; And calculate multiple candidate periodic priors from the periodic alignment historical segments; S4 inputs the future covariates and future time location features available at the prediction time into the future covariate encoder. After causal temporal convolution, recurrent units and layer normalization, the step-by-step future features are obtained, and the future global summary is obtained by time averaging. S5 projects the periodic global summary and future global summary into context vectors and injects them into the node state. It then performs multi-head queries and key-value mapping to calculate node correlations through the context dynamic graph module. The correlations are added to the learnable static bias and self-connection enhancement terms. Top-k sparsification and Softmax normalization are performed on the candidate neighbors of each node to form the dynamic graph adjacency matrix corresponding to the current sample. Finally, graph attention aggregation is completed to obtain the graph enhancement target node features. S6, set up an independent recent target encoder for the recent sequence of the target variable. The recent target encoder includes a causal dilated convolutional encoder to obtain a recent target summary. Then, concatenate the periodic features corresponding to each prediction step obtained in step S3, the future features obtained step by prediction step obtained in step S4, the graph-enhanced target node features obtained in step S5, and the recent target summary according to the prediction step to form a step by prediction step context. S7: Input the prediction step context, candidate periodic priors and the most recent observation state into the prior router to obtain the stepwise weights of the candidate periodic priors and calculate the adaptive baseline; input the prediction step context into multiple expert heads to obtain candidate residuals, and form weighted residuals through the expert router; The weighted residual is input into the hyperbolic tangent function and multiplied by the upper limit of the residual amplitude to obtain the restricted residual; S8, add the adaptive baseline and the constrained residual to obtain the prior residual prediction; use the direct prediction branch to generate the direct prediction from the prediction step context; By fusion gating, progressive weighting is applied between prior residual prediction and direct prediction, and the final multi-step prediction result is obtained after numerical range constraints. S9 uses a joint objective function consisting of weighted robust error, prior deviation regularization term, and fusion gating regularization term to optimize model parameters based on training samples, thereby obtaining a trained time series prediction model; inputs the samples to be predicted into the trained time series prediction model, and outputs the final multi-step prediction results corresponding to each prediction step within the prediction interval.

2. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S1, the acquisition of the multivariate historical sequence, periodically aligned historical segments, future covariates available at the prediction time, and future time location features, the standardization of continuous numerical features, and the construction of candidate periodic priors are as follows: Let the multivariate history series be... Where R represents the set of real numbers, T is the number of historical time steps, and N is the number of numerical variables; the historical time location feature is... F t The dimension of the time-location features is H; the number of prediction steps is H; the future input is the combination of the future covariates available at the prediction time and the future time-location features. F u The feature dimension for future input is defined; X and E are concatenated along the feature dimension to form historical input; for the target variable, i.e., the numerical variable to be predicted, segments of length H corresponding to the position of the interval to be predicted are extracted from D historical periods before the prediction start point to form period-aligned historical segments. ; Constructing K candidate periodic priors from periodically aligned historical fragments The candidate period prior includes at least the most recent period segment, the stepwise mean of the most recent several periods, the stepwise mean of a period window of a set length, and the stepwise median of all period segments; the candidate period priors share the same dimension and prediction step index, enabling the router to select or merge independently for each prediction step. ; Where X is the multivariate historical sequence, T is the number of historical time steps, N is the number of numerical variables; E is the historical time position feature; H is the number of prediction steps; the future covariates available at the prediction time and the future time position features are concatenated in the feature dimension to form the future input U; M is a matrix composed of periodically aligned historical segments; D is the number of historical periods; P is the candidate period prior matrix; K is the number of candidate period priors, and the candidate period priors include the most recent period segment, short-term mean, long-term mean, and median priors; P recent Align historical segments for the most recent cycle; P short P is the step-by-step prediction mean of the most recent period segments; long To set the step-by-step prediction mean of segments within a specified periodic window; P median The median of each prediction step is aligned with the historical segments of all periods; the four types of candidate period priors are stacked along the candidate prior dimension to form the candidate period prior matrix P; For continuous numerical features in multivariate historical sequences and future inputs U, standardization is performed based on the mean and standard deviation obtained only from training data. Construct multi-step prediction samples from the prediction starting point; the true values ​​of the target variable for the H consecutive prediction steps after the prediction starting point are used as labels only during the training, validation, or testing phases.

3. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S2, the variable node timing encoder is as follows: A recent window of length L is extracted from the historical input, which is formed by concatenating multivariate historical sequences and historical time location features along the feature dimension. For the nth variable, its numerical sequence is concatenated with the shared time location features corresponding to each time step to obtain the node input. ; Using shared linear layers Projected onto the C-dimensional latent space, and the batch dimension and node dimension are merged and input into the causal residual temporal convolutional network; the causal residual temporal convolutional network includes several residual convolutional blocks with increasing dilation rate. Each residual convolutional block performs one-dimensional convolution, causal pruning, nonlinear activation and random deactivation in sequence, and maintains the consistency of residual dimension through identity mapping or one-dimensional projection. ; Where L is the recent window length, n is the variable node index, and Z is the variable node index. n Let H be the input of the nth variable node, C be the dimension of the latent space, and H be the input of the nth variable node. n For node temporal encoding, Linear represents shared linear projection, and TCN represents causal residual temporal convolutional network; Calculate the attention score for the encoding results of node n at each time step, perform Softmax normalization along the time dimension, and then sum the results with weights to obtain the node state. All node states are combined as follows The encoder shares timing parameters among all nodes, enabling different variables to be compared within a unified representation space, and the subsequent dynamic graph module learns the specific connection relationships of the variables. ; Where t is the index of the historical time step within the recent window, and H n,t w is the encoding vector of node n at time step t. a For a trainable attention vector, a n,t For attention weights normalized along the time dimension, v n Let V be the node state of node n, and let V be the matrix of all node states.

4. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S3, the periodic mode encoder is as follows: A matrix M, consisting of D periodically aligned historical segments, is input into a bidirectional gated recurrent unit (BRU) in periodic order. The output sequence of the BRU is denoted as the periodic hidden sequence. The output representation of the last position is taken, and after linear mapping, nonlinear activation, random deactivation, and layer normalization, the periodic global summary is obtained. ; At the same time, transpose M to Each prediction step corresponds to a cross-period vector; the cross-period vector is then input into a shared linear mapping, nonlinear activation, random deactivation, and layer normalization to obtain the prediction step-by-step periodic features. ; Periodic global summaries are used to modulate dynamic graphs, and prediction-step periodic features are used to construct the final prediction context. ; Where M is a matrix composed of periodically aligned history segments; BiGRU represents a bidirectional gated cyclic unit; H p The periodic hidden sequence output by the bidirectional gated loop unit; M is the output vector of the last position of the periodic hidden sequence; T Q is the transpose of matrix M; p For each prediction step, a periodic characteristic is presented. s p For periodic global summaries; W p and b p All are trainable linear mapping parameters used to generate predictive step-by-prediction periodic features; W s and b s All are trainable linear mapping parameters used to generate a global summary of the periodicity; φ is a nonlinear activation function, Dropout is a random deactivation operation, LN is a layer normalization operation; D is the number of historical periods, and C is the dimension of the latent space.

5. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S4, the future covariate encoder is specifically as follows: The future input U, formed by concatenating the future covariates and future time location features obtained from the prediction times of H prediction steps in the feature dimension, first passes through a causal residual temporal convolutional network with different dilation rates to extract local evolution patterns. Then, it is input into a unidirectional gated recurrent unit to accumulate conditional information from front to back within the prediction interval, and finally, through layer normalization, the future features for each prediction step are obtained. ;right The future global summary is obtained by averaging along the prediction step dimension. Because of the use of causal convolution and unidirectional loop structure, the encoding of the h-th prediction step does not depend on the position of subsequent external covariates. ; Where U represents the future input, GRU represents a one-way gated recurrent unit, and Q... f To predict future features step by step, Q f,h For the future features of the h-th prediction step, s f For the future global summary, h is the prediction step index, H is the number of prediction steps, and C is the dimension of the latent space.

6. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S5, the context dynamic graph module is as follows: Global summary of the period Future Global Summary After concatenation, a context vector c is obtained through linear mapping. c is then broadcast to each node and added to the node state V. Perform multi-head queries and key-value mappings on the context-enhanced node states respectively, and calculate scaled dot product correlations; add the correlation matrix to the static bias matrix B learned by node index and the identity matrix items used to enhance the node's own information; ; ; Where c is the context vector, W c and b c For context projection parameters, 1 N V is an N-dimensional column vector of all 1s. c Enhance node state for context; r is the attention head index, R is the number of attention heads, and Q is the number of attention heads. (r) K (r) Sum projection V (r) Let d be the query, key, and value projection results for the r-th attention head. head Let C be the dimension of the single-headed space, and B be the dimension of the latent space. (r) For a learnable static bias matrix, I N S is an N-order identity matrix. (r) This is a correlation matrix; For each node, only the k nodes with the highest relevance are retained, and the other positions are set to negative infinity. After Softmax normalization, the dynamic graph adjacency matrix of the r-th attention head is obtained. ;use The value vectors are aggregated in the neighborhood, concatenated with each attention head, and after output mapping, residuals are added to the original node states and layer normalization is performed. Then, the graph-enhanced node states are obtained through a feedforward network, a second residual connection, and layer normalization. ; ; ; Where k is the number of candidate neighbors retained for each node, and A (r) Let O be the adjacency matrix of the dynamic graph for the r-th attention head. (r) For the neighborhood aggregation result, W o For multi-head output projection matrix, Norm denotes layer normalization operation, FFN denotes feedforward network, and V g To enhance the node state of the graph; The static bias matrix is ​​used to preserve stable variable relationships across samples, the periodic summary and future summary are used to make the query, key and value change with the current sample, the self-join enhancement term is used to increase the probability of preserving the node's own state, and Top-k sparsification is used to suppress weakly related edges and reduce graph aggregation noise.

7. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S6, the recent target encoder and the prediction step context are as follows: The target variable values ​​are extracted from recent historical windows and concatenated with the corresponding time-location features. The result is then fed into a causal residual temporal convolutional network with more expansion layers. The final encoded state is processed through linear mapping, non-linear activation, and layer normalization to obtain a recent target summary. ; Selecting the target variable node from the graph augmentation node states and will and Reproduce H times respectively, and compare with the periodic features of each prediction step. And predicting future features step by step By concatenating the components, we obtain the prediction step-by-step context. ; ; Among them, s r For a summary of near-term goals, v g To enhance the node state V of the graph g The target variable node features selected in Q p,h and Q f,h C represents the periodic feature and future feature of the h-th prediction step, respectively. h Here is the context for the h-th prediction step, where H is the number of prediction steps.

8. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S7, the adaptive prior routing module is as follows: The context of the h-th prediction step The K candidate prior values ​​corresponding to this prediction step, along with the most recent observed state, are concatenated and input into the prior router. The prior router consists of at least two linear layers, nonlinear activation, and random deactivation. Its output is normalized using Softmax to obtain the candidate prior weights. The candidate priors are progressively weighted and summed according to the aforementioned weights to obtain the adaptive benchmark. ; ; ; in, Let be the value vector of K candidate periodic priors at the h-th prediction step. Let x be the k-th element in the value vector. last R represents the most recent observations of the target variable, standardized in a manner consistent with the training phase. p For the prior router, For candidate prior weight vectors, Let b be the weight of the k-th candidate prior. h This serves as the adaptive baseline for the h-th prediction step; In step S7, the hybrid expert residual module is as follows: Set up E expert heads with identical structures but independent parameters; each expert head is configured with... As input, candidate residuals are output via a multilayer perceptron. The expert router takes the prediction step context, candidate prior values, and the most recent observation state as input, and the output is normalized by Softmax to obtain the expert weights. The candidate residuals are weighted and summed, then input into the hyperbolic tangent function and multiplied by a preset or trainable upper limit of residual magnitude. To obtain the constrained residual ; ; ; ; Where E is the number of expert heads, e is the expert head index, and R... e For expert routers, Let the weight of the e-th expert head be the weight of the h-th prediction step. For the corresponding candidate residuals, r is the upper limit of the residual amplitude. h For constrained residuals, This is for predicting prior residuals.

9. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S8, the direct prediction branch and fusion gating are as follows: Directly predicting branches As input, a direct prediction is obtained through a multilayer perceptron and a bounded activation function. The fusion gating takes the prediction step context, candidate prior values, and the most recent observed state as input, and obtains the gating coefficients through the Sigmoid function. The prior residual prediction and direct prediction are weighted by a gating coefficient, and the results are restricted to a preset effective range. ; ; in, For direct prediction branches, G is the fusion gating, σ is the Sigmoid function, and d h For direct prediction, g h The fusion weights for the prior residual prediction at the h-th prediction step are... The final predicted value is y, where Clip is the numerical truncation function. min and y max These are the lower and upper limits of the preset valid range, respectively; The output layer of the fusion gate is configured with an initial bias biased prior residual branch.

10. The time series prediction method based on adaptive prior dynamic graph hybrid expert as described in claim 1, characterized in that, In step S9, the joint training objective is as follows: After restoring the normalized prediction results and the true results to their original dimensions, the scaled Huber loss, i.e. the smoothed L1 loss, is calculated. For samples whose absolute error does not exceed the threshold δ, quadratic error is used, and for samples that exceed δ, linear error is used to reduce the impact of outliers on the training process. Sample weights are generated based on whether the true target is in an effective state and the degree of deviation of the true target from the reference baseline, so that the model pays more attention to effective states and samples that are difficult to predict by the baseline. ; ; Where e is the prediction error, δ is the Huber loss threshold, and w h Let y be the sample weight for the h-th prediction step, I be the indicator function, and y be the weight of the sample for the h-th prediction step. h Let τ be the true target value, τ be the effective state threshold, and b be the value of the target value. h ref λ is a reference baseline obtained in advance during the data construction phase and not involved in prior routing; s is a scaling parameter to prevent the denominator from being too small; λ is a reference baseline. a and λ d All are sample weight coefficients; Based on the weighted robust error, a regularization term is added to indicate that the prediction result deviates from the adaptive baseline, and a fusion gating regularization term is added to suppress the premature dominance of the direct prediction branch. The joint loss is: ; in, b is the joint objective function; h The adaptive benchmark is a weighted benchmark generated by the prior router; λ r λ is the coefficient of the prior deviation regularization term. g To integrate the gating regularization coefficients, Mean represents the average over the training batch and all prediction steps.