A multivariate time series prediction method and system based on spectrum consistency reliability guidance

By using a spectrum consistency reliability-guided approach, the problems of high-energy transient disturbances and unreliable decomposition characteristics in multivariate time series forecasting are solved. This approach achieves the encoding of stable information and reliability constraints between variables, ensuring the accuracy and integrity of the forecast.

CN123179299APending Publication Date: 2026-11-27GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611553347.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-09
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing multivariate time series forecasting, high-energy transient disturbances are easily mistaken for evidence of stable periods, which may lead to the accumulation and amplification of unreliable decomposition features during the encoding process. The interaction between variables lacks source evidence reliability constraints, and weak effective frequencies are easily lost due to screening.

Method used

By acquiring historical windows of multivariate time series, normalizing them, and then performing spectral decomposition, frequency-level spectral consistency is generated based on amplitude stability and phase increment consistency. Combined with time series statistics, variable-level reliability descriptions are generated, historical and local features are extracted, and feature injection intensity and injection stage are determined based on the reliability descriptions. Conditional attention between variables is encoded, and finally, prediction results are generated.

Benefits of technology

This reduces the probability of short-term high-energy disturbances being treated as continuous periodic structures, reduces the accumulation and amplification of unstable information in the prediction network and the propagation across variables, and ensures that low-energy but potentially predictive frequency information participates in the prediction, thus achieving a balance between noise suppression and information preservation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123179299A_ABST
    Figure CN123179299A_ABST
Patent Text Reader

Abstract

The present application relates to multivariate time series prediction technology, and discloses a prediction method and system based on spectral consistency reliability guidance. The method normalizes and performs spectral decomposition on the multivariate historical window, performs local frame spectral analysis on the remaining sequence, obtains the frequency level spectral consistency according to the amplitude stability and phase increment consistency, combines the time series statistics to generate the variable level reliability description, and determines the injection strength and injection stage of the historical characteristics and local characteristics, and conditionally encodes the attention between variables; the prediction value is generated according to the encoding result and the original dimension is restored. The scheme can reduce the influence of transient high-energy disturbance and unreliable source variables on the prediction result, while retaining weak and effective frequency information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of time series data processing and artificial intelligence prediction technology, and in particular to a multivariate time series prediction method, system, electronic device, and computer-readable storage medium based on spectral consistency reliability guidance. Background Technology

[0002] Multivariate time series forecasting is used to predict future conditions based on historical observations of multiple related physical variables. It can be applied to traffic condition forecasting, weather condition forecasting, energy system monitoring, and industrial sensor monitoring. Such tasks require both describing the local variations and long-term cycles of individual variables and learning the dependencies between different variables.

[0003] Existing frequency decomposition techniques separate trend and periodic components in the frequency domain through learnable frequency decoupling structures, and then use the decomposition results to construct predictive representations. These techniques can alleviate the problem of spectral component mixing in non-stationary time series to some extent.

[0004] The aforementioned scheme focuses on the separation of frequency components and the construction of predictive representations, but does not disclose how to determine whether evidence of a certain frequency within the current historical window is persistently stable across multiple local frames. When short-term disturbances have high energy, they may be transmitted to the prediction network as persistent periodic evidence based solely on spectral intensity or learnable decomposition results.

[0005] Attention among existing variables typically involves information exchange based on the similarity between variable representations, but it does not explicitly evaluate the reliability of the time-series evidence carried by the source variables. When a variable experiences a sudden change in state, short-term noise, or sensory anomalies, its instability evidence may propagate to other variables. Furthermore, retaining only high-energy or highly consistent frequencies may result in the loss of low-energy but still predictive long-term periodic information. Summary of the Invention

[0006] The technical problem to be solved by the present invention

[0007] This invention aims to address the problems in existing multivariate time series forecasting, such as high-energy transient disturbances being easily mistaken for stable periodic evidence, unreliable decomposition features potentially accumulating and amplifying during the encoding process, lack of source evidence reliability constraints on interactions between variables, and the easy loss of weak effective frequencies due to screening.

[0008] Technical solution

[0009] To address the aforementioned technical problems, this invention provides a multivariate time series prediction method guided by spectral consistency reliability, comprising the following steps:

[0010] Step 1: Obtain the historical window of the multivariate time series and normalize each variable separately;

[0011] Step 2: Perform spectral decomposition on the normalized sequence, perform local frame spectral analysis on the remaining sequence, and obtain frequency-level spectral consistency based on amplitude stability and phase increment consistency.

[0012] Step 3: Generate a variable-level reliability description based on frequency-level spectral consistency and time-series statistics;

[0013] Step four: Extract historical and local features, and determine the feature injection strength and injection stage based on variable-level reliability description;

[0014] Step 5: Conditionally encode the attention between variables based on the variable-level reliability description;

[0015] Step 6: Generate prediction results based on the conditional coding results and restore the original dimensions.

[0016] Furthermore, in step two, a Fourier transform is performed on the normalized sequence, and a trend soft mask is generated based on the roughness, curvature, first and last displacements, and horizontal offset of the normalized sequence. The trend spectrum is obtained using the trend soft mask, and the remaining spectrum is obtained using the complement of the trend soft mask.

[0017] Furthermore, amplitude stability is the ratio of the mean amplitude of the same variable and the same frequency across multiple local frames to the square root of the mean square amplitude of the multiple local frames plus a preset positive number to prevent the denominator from being zero; phase increment consistency is the magnitude of the average phase increment vector of adjacent local frames, obtained by multiplying the phase increment vector by its complex coefficients and dividing by the larger of its magnitude and the preset positive lower limit; frequency level spectrum consistency is obtained by combining amplitude stability and phase increment consistency.

[0018] Furthermore, the time series statistics include at least two of energy concentration, state stability, intervariate consistency, and smoothness, and the variable-level reliability description is obtained by mapping the energy-weighted frequency-level spectral consistency with the time series statistics.

[0019] Furthermore, historical features are obtained by trend components and periodic spectral coding based on frequency-level spectral consistency selection; local features are obtained by normalized sequences, local components, and first-order differential coding of normalized sequences.

[0020] Furthermore, variable embedding, historical features, local features, and variable-level reliability descriptions are combined into a routing state. Based on the routing state, injection strength gating and stage allocation weights are generated. The increment before encoding and the increment after encoding are calculated according to the stage allocation weights and their complements, respectively.

[0021] Furthermore, the trend component and the complete residual spectrum are input into the historical encoder to extract the complete residual features. A reliability factor with a preset lower limit is determined based on the adaptive spectrum mixing coefficient, energy weighted consistency and state stability. This factor is multiplied by a learnable bounded scale to form a reliability gating, and the adjusted complete residual features are fused into the pre-encoding representation.

[0022] Furthermore, a decomposition context is constructed based on historical features, local features, complete residual features, variable-level reliability description, injection strength, and stage-based weighting. Relationship bias based on the decomposition context, source variable reliability term, and target variable self-preservation term are added to the attention score between variables.

[0023] This invention also provides a multivariate time series prediction system based on spectral consistency and reliability guidance, including a historical window acquisition and normalization module, a consistency-guided spectral decomposition module, a reliability description extraction module, a historical and local dynamic coding module, a reliability-guided feature routing module, a reliability conditional variable coding module, and a prediction output module. These modules work together to execute the aforementioned methods.

[0024] The present invention also provides an electronic device, including a processor and a memory, wherein a computer program stored in the memory implements the above-described method when executed by the processor. The present invention also provides a computer-readable storage medium for storing the computer program.

[0025] Beneficial effects

[0026] This invention, by jointly evaluating amplitude repeatability and phase advance stability on local frames, makes the reliability of spectral evidence no longer determined solely by energy magnitude, which helps reduce the probability of short-term high-energy disturbances being mistaken for persistent periodic structures.

[0027] This invention summarizes frequency-level consistency and time-series statistics into a variable-level reliability description, and uses the same reliability description to jointly control feature injection intensity, injection stage, and inter-variable attention, so that decomposition, feature allocation, and variable interaction form consistent reliability constraints, which can reduce the accumulation and amplification of unstable information in the prediction network and the propagation across variables.

[0028] This invention provides an information transmission path beyond consistency screening through a direct fusion branch of complete residual features. The confidence lower bound of the reliability factor limits the minimum value of the factor, and the fusion direction and intensity can be adjusted by a learnable bounded scale, thereby enabling low-energy but potentially predictive frequency information to participate in prediction, and allowing the balance between noise suppression and information preservation to be adjusted by training. Attached Figure Description

[0029] Figure 1 This is a schematic diagram of the module relationships in the multivariate time series prediction system of the present invention.

[0030] Figure 2 This is a flowchart of the multivariate time series prediction method based on spectral consistency and reliability guided by the present invention. Figure 2 Also included as an illustration in the abstract. Detailed Implementation

[0031] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. These embodiments are used to illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.

[0032] First implementation method

[0033] like Figure 1 and Figure 2 As shown, this implementation method is executed in cooperation with a data acquisition device, a prediction server, and a monitoring terminal. The data acquisition device acquires multiple physical variables according to a sampling period, and the prediction server forms a length of... The history window is output with a length of The future prediction results are received by the monitoring terminal for monitoring, early warning or subsequent control.

[0034] Step 1: Obtain the historical window of the multivariate time series and normalize each variable separately.

[0035] Let the input history window be X, its batch size be B, its window length be T, and the number of variables be N. The prediction server calculates the window mean for each variable separately. and standard deviation This yields a normalized sequence. The mean and standard deviation of each variable are saved to the prediction output stage. The normalized history window of each variable is transformed into a basic variable embedding with the same dimension as the encoder input through an embedding map. This information is used for subsequent feature routing and pre-encoding fusion. Missing observations can be handled through forward padding, local interpolation, or mask encoding.

[0036] In this implementation, the normalized standard deviation is the historical window variance plus 10⁻. 5 The square root is calculated, and the variance is calculated based on the number of samples within the window. The basic variable embedding is obtained by adding historical data embedding, learnable channel embedding, periodic phase embedding, and channel-phase joint embedding; the phase index is taken as the remainder of the input period index divided by the preset period length, and is zero when no period index is provided.

[0037] Step 2: Perform spectral decomposition on the normalized sequence, perform local frame spectral analysis on the remaining sequence, and obtain frequency-level spectral consistency based on amplitude stability and phase increment consistency.

[0038] For variables The normalized sequence is subjected to Fourier transform to obtain the spectrum. Statistical analysis based on the variation of normalized roughness, curvature, initial and final displacements, and horizontal offset. via trend selector Generate trend soft mask The trend spectrum and residual spectrum are obtained by the following formula:

[0039] Change statistics The calculation is as follows: First, the standard deviation of the sequence is limited to not less than 10⁻ 5 Roughness is the mean of the absolute values ​​of the first-order differences divided by the standard deviation; curvature is the mean of the absolute values ​​of the second-order differences divided by the standard deviation; head-tail displacement is the absolute value of the difference between the last and first values ​​divided by the standard deviation; and horizontal offset is the absolute value of the difference between the means of the second and first half windows divided by the standard deviation. The trend selector uses a linear layer, GELU activation, and another linear layer to map the above four statistics into a scalar. After limiting the amplitude with hyperbolic tangent, the learnable trend parameters at each frequency are adjusted, and then a sigmoid function is used to obtain the trend soft mask. The initial trend parameters decrease as the normalization frequency increases.

[0040]

[0041] Perform an inverse transform on the remaining spectrum to obtain the remaining sequence. Then, divide the remaining sequence into local frame lengths. and local frame step size The system is divided into frames, and a short-time Fourier transform is performed on each local frame. Let... For variables In frequency and local frames The amplitude stability of the complex spectral coefficients at that point is:

[0042]

[0043] in, To prevent positive numbers with a denominator of zero, the phase increment must have the same dimensions as the mean square of the amplitude. The phase increment consistency is as follows:

[0044] In this embodiment, ε within the square root of the amplitude stability denominator is taken as 10⁻. 6 When calculating the phase increment, the complex spectral coefficients of the adjacent local frame are multiplied by the conjugate of the coefficients of the previous frame, and then divided by the modulus of the product and 10⁻⁻⁶. 6 The larger of the two values; when the product is zero, the resulting phase increment vector is zero. When the number of local frames is greater than one, the average of these vectors is taken and the modulus is calculated; when the number of local frames is less than two, the phase increment consistency is set to zero.

[0045]

[0046] in, For variables The number of local frames, The average value of the phase increment vector. This indicates that the aforementioned phase increment normalization with a lower limit in the denominator is achieved by dividing the complex product by its modulus and 10⁻. 6 The larger of the two; when the product is zero, take zero; when the modulus is lower than the lower limit, the modulus of the vector can be less than one; formula (3) is applicable to the case where the number of local frames is greater than one; The modulus is equivalent to the average value. Frequency-level spectral consistency is:

[0047]

[0048] When the amplitudes of multiple local frames are close and the phase increment direction is stable, Approaching 1; when the amplitude increases abruptly only in a few frames or the phase advance direction is chaotic, This reduces reliability. Consequently, frequencies with higher amplitudes but formed only by short-term disturbances will not achieve high reliability simply because of their higher energy.

[0049] Local frame analysis uses the Hanning window, with both the number of points in the short-time Fourier transform and the window length being [missing information]. Step size is Center alignment and reflection-based edge patching are employed. For consistency, a preset threshold is subtracted, divided by a positive temperature parameter, and then a learnable frequency bias is added. This is then processed by a sigmoid function to obtain a local soft mask. To ensure the local result corresponds to the entire window spectrum, the local consistency and local soft mask are respectively subjected to one-dimensional linear interpolation along the frequency axis, adjusted to the number of frequency points of the entire real Fourier transform, i.e., the input length T divided by two, rounded down, and then incremented by one. All subsequent calculations use the aligned result.

[0050] Furthermore, energy concentration and state stability are first calculated statistically to form a mixed prior: the product of the two is multiplied by 0.90 and then added to by 0.05, with the result limited to between 0.05 and 0.95. Energy weighted consistency, energy concentration, state stability, and smoothness are then fed into a network consisting of linear layers, GELU, and another linear layer to obtain correction values. The prior is converted to log-probability, this correction value is added, and the result is processed by a Sigmoid algorithm to obtain the adaptive spectral mixing coefficients. Combine this with the aligned, consistent soft mask to form a periodic soft mask:

[0051]

[0052] Trend spectrum and periodic spectrum Perform inverse Fourier transforms separately to obtain the trend component and the periodic component; then convert the remaining spectrum... Subtract the periodic spectrum Then, an inverse Fourier transform is performed to obtain the local components. The sum of the trend component, periodic component, and local components equals the normalized sequence. The local components are used by the local encoder in step four.

[0053] Step 3: Generate a variable-level reliability description based on frequency-level spectral consistency and time-series statistics.

[0054] The prediction server performs energy-weighted spectral consistency calculations at the frequency level to obtain energy-weighted consistency. This implementation calculates all four statistical parameters: energy concentration, state stability, intervariate consistency, and smoothness, and combines them with adaptive spectral mixing coefficients. A variable-level reliability description is generated through the reliability mapping R:

[0055]

[0056] in, Indicates energy-weighted consistency. Indicates energy concentration. Indicates state stability. Indicates cross-variable consistency. Indicates smoothness. This implementation will... , , , , and The above order directly combines to form a six-dimensional reliability description. In the formula, R represents the vector combination operation. The router then transforms this six-dimensional vector into reliability features for routing through a linear layer, GELU, and layer normalization. This implementation uses all four time-series statistics; other implementations may use at least two of them, adjusting the reliability description dimension and the input dimension of subsequent mappings accordingly.

[0057] The specific calculations for the above reliability statistics are as follows: Calculate the energy of the modulus squared at each frequency point of the complete remaining spectrum, divide the energy of each frequency point by the sum of the energies of all frequency points of that variable, and ensure the denominator is not less than 10⁻ 6 The energy weights are obtained. This is the summation of the product of energy weights and aligned frequency consistency. It is the sum of the weights of the three frequency points with the largest energy weights. If there are fewer than three frequency points, all frequency points are taken. The natural exponent is used to determine the negative value of the horizontal offset. The natural exponent is used to calculate the negative value of roughness, with both values ​​restricted to between zero and one. The cosine similarity is calculated by comparing the aligned frequency consistency vector of each variable with the mean of that vector across all variables, using a cosine similarity of 10⁻⁻⁶.6 The numerical stability constant is obtained by limiting the result to zero to one. .

[0058] Step four: Extract historical and local features, and determine the feature injection intensity and injection stage based on variable-level reliability description.

[0059] Historical encoders jointly encode trend components and periodic spectra The historical features are obtained by encoding the normalized sequence, local components, and the first-order difference of the normalized sequence. The local encoder can use frequency domain projection or a frequency-time joint network, while the local encoder can use dilated convolution, state-space network, or lightweight temporal convolutional network.

[0060] One specific implementation of historical encoding is as follows: the trend sequence is linearly projected onto the encoding dimension; the real and imaginary parts of the periodic spectrum are concatenated and linearly projected onto the same dimension; then the two projected features are concatenated, fused through a linear layer, GELU, random deactivation, and another linear layer, and finally added to the two projected features before layer normalization. The complete residual features use the same historical encoder, the only difference being the use of the complete residual spectrum.

[0061] A specific implementation of local encoding is as follows: The nearest local context is taken, and the normalized observation, local components, and first-order difference are used as three input channels; the first value of the first-order difference is zero. Causal encoding with left-side zero-padding is performed using one-dimensional convolutions with different dilation rates. The features at the last position of each convolutional branch and the time-mean features are concatenated and projected. Simultaneously, the three input channels are flattened and directly linearly projected. The results from both paths are added together and then normalized at the layer to obtain the local features.

[0062] Additionally, the trend component and the complete remaining spectrum Input the historical encoder to extract complete remaining features. This feature is used in step five to construct the decomposition context. The extraction of this feature is part of this implementation; whether to directly fuse it as an additional increment into the pre-encoding representation is determined by the optional fusion branch described in the second implementation.

[0063] The routing state is composed of variable embedding, historical features, local features, and variable-level reliability description. Generate injection strength gating and phase allocation weights:

[0064]

[0065] set up and Let the historical features and local features be the adapted features, respectively. Then the increment before encoding and the increment after encoding are:

[0066]

[0067] Phase allocation weight The feature and its complement form a complementary relationship, allowing the same feature to be continuously distributed between before and after encoding. When reliability is low, the router can reduce the corresponding injection strength or retain more features for post-encoding injection.

[0068] Injection strength gating is achieved by concatenating basic variable embeddings, historical features, local features, and projected reliability features. This concatenation is then processed through layer normalization, a linear layer, GELU, random deactivation, another linear layer, and a Sigmoid function to generate both historical and local strengths. The historical features are assigned a prior of 0.15 before encoding, plus 0.85 times the intervariate consistency and max( , The product of ) is used; the prior of local features is 0.10 plus 0.90 times the product of cross-variable consistency and state stability, and the prior is limited to 0.05 to 0.95. The stage routing network generates two correction quantities, which are added to the prior after being adjusted by hyperbolic tangent and preset residual scale, and then limited to zero to one, to obtain the weights assigned before encoding.

[0069] When this implementation does not enable the full-frequency residual direct fusion branch, the basic variables are embedded. Increment before encoding Add them together to get the original representation. Increment after encoding Reserved for use in step six. Complete remaining features. As input to the decomposition context, contextualization and direct fusion of full-frequency residuals are two different information usage paths.

[0070] Step 5: Conditionally encode the attention between variables based on the variable-level reliability description.

[0071] The decomposition context is constructed based on historical features, local features, complete residual features, variable-level reliability description, injection strength gating, and stage-based weighting. And calibrate the variable-level reliability description to variable reliability. In the first In each attention head, variables Receive variable The attention score for the information is:

[0072] The reliability of the variables in this implementation method is calibrated according to the following steps: max( , The state stability, intervariate consistency, and smoothness are multiplied by 0.45, 0.25, 0.20, and 0.10 respectively, summed, and then multiplied by "0.25 plus 0.75 times the intervariate consistency". The resulting value is then mapped to a value between a preset positive reliability lower limit and one. Before proceeding with the attention logarithmic operation, further... Limited to 10⁻ 4 Between one and one, avoid logarithmic zero values.

[0073] The relation bias is linearly projected from the decomposition context after layer normalization into the relation query and relation key of each attention head, and the inner product is calculated after normalization of the two. The coefficients of the relation bias, source variable reliability, and target variable self-preservation are all obtained from the learnable parameters by hyperbolic tangent, with values ​​between -1 and 1. Their signs and magnitudes are determined through joint training of the prediction loss. After normalizing the attention score according to the source variable and aggregating the value vector, the input representation of the target variable is concatenated with the decomposition context, and the correction amount of each head is generated through a gating network. The output of each head is adjusted by "one plus the hyperbolic tangent of the preset gating magnitude multiplied by the correction amount", and then output projection, residual connection, normalization, and feedforward operations are performed.

[0074]

[0075] The first term is the similarity between the query and the key representations, the second term is the relational bias based on the decomposition context, and the third term is based on the source variables. The reliability of the information output intensity is adjusted, and the fourth item is based on the target variable. The reliability of the source variable modulates its own attention score. When the coefficient of the source variable reliability term is positive, the source variable with lower reliability is subject to stronger score suppression; when the coefficient is negative, the moderating direction of the term is reversed. When the coefficient of the target variable self-maintenance term is positive, the lower the reliability of the target variable, the greater the increment of its own score; when the coefficient is negative, the term reduces its own score; when the corresponding coefficient is zero, the corresponding term does not produce any moderating effect. All terms participate in attention normalization, and the final attention weight is also determined by representation similarity and relation bias. For the attention head dimension, , and The learnable coefficient.

[0076] Step 6: Generate prediction results based on the conditional coding results and restore the original dimensions.

[0077] The conditional variable encoder encodes the unencoded representation and adds it to the unencoded representation and the post-encoded increment, then maps it to the prediction length via the prediction head. Then, the window mean and standard deviation saved in step one are used to restore the scale to the input data. If the input dataset has been standardized, the inverse transformation is further performed using the standardized parameters saved in the training segment to obtain the prediction results of the original physical dimensions. The inverse transformation of window normalization is as follows:

[0078]

[0079] The main symbols in this embodiment are shown in Table 1.

[0080] Table 1. Main Symbols and Their Meanings

[0081] symbol meaning Values ​​or dimensions Enter the history window length positive integer Predicted length positive integer Local frame length Not greater than positive integers Local frame step size Amplitude stability Phase increment consistency Frequency-level spectral consistency Variable-level reliability description Dimensionless vector Injection intensity gating vector Stage-based weight allocation vector Reliability of calibrated variables

[0082] Input window length Predicted length Local frame length and local frame step size It can be determined based on the sampling frequency, candidate period, and validation set. Increase It can improve frequency resolution and reduce It can improve sensitivity to changes in local state; reduce This can increase local frame overlap and improve the stability of consistency estimation, but it will increase the computational load. The above parameter relationships are only for implementation purposes and do not constitute a limitation on the scope of protection.

[0083] In an example of urban road traffic state prediction, roadside detectors collect flow, speed, and occupancy data for multiple road nodes at fixed intervals. The stable cycles formed during morning and evening rush hours exhibit relatively stable amplitude and phase progression within continuous local frames. Accidents, temporary road closures, or single sensor spikes typically only affect a few local frames. The prediction server executes steps one through six, adjusting feature injection and information exchange between variables based on the reliability description of the traffic pattern. Training determines the injection strength and attention coefficients; when the coefficient of the source variable reliability term is positive, this term applies score suppression to anomalous source variables with lower reliability, and its normalized information propagation weight is also influenced by other attention score terms. The output is the sum of the traffic flow data for each road variable within the prediction length. Numerical prediction within.

[0084] Model training and prediction implementation steps

[0085] Before performing predictions, the model is trained under supervision using historical observations and subsequent real observations. Taking a custom multivariate dataset as an example, the first 70% of observations are used for training, the last 20% for testing, and the remainder for validation. The validation and testing segments can retain historical observations of length T as input context, while the predicted labels remain within their respective segments. When dataset standardization is enabled, only the training segments are used to fit the mean and standard deviation of each variable, and then the same set of parameters is used to transform the training, validation, and testing data.

[0086] Sampling is performed with a step size of one sampling point. Each sample's input consists of multivariate observations from T consecutive historical time points, labeled with the actual observations from the following H time points. The period index uses the position of the prediction start time within a preset period. The data loader can simultaneously return a sequence consisting of the last historical period and the next H steps, but the loss only uses the next H steps. This model directly generates predictions from the historical window, without using future actual observations as model input. The multivariate joint prediction mode calculates the loss for all output variables, while the multivariate input single-objective mode calculates the loss only for the specified objective.

[0087] The samples are grouped into mini-batches, and the aforementioned normalization, spectral decomposition, reliability description, feature routing, conditional encoding, and prediction steps are performed. The default training objective is the mean absolute error, which is the average of the absolute differences between the predicted and true values ​​of all prediction times and supervised variables within the mini-batch. The predicted values ​​are first restored to the input data scale using the mean and standard deviation within the model's internal window, and then compared with the labels at the same scale. If the input dataset has been standardized, the comparison is still based on the standardized dataset scale, not the original physical dimensions. Other implementation methods can choose mean squared error or use Huber loss with a threshold of 1.0.

[0088] For each mini-batch, gradients are first cleared, and then backpropagation is performed based on the predicted loss. The Adam optimizer is used to jointly update the trend selector, history and local encoder, reliability mapping and routing network, conditional attention, prediction head, and learnable parameters in the embedding layer. Spectral consistency and its temporal statistics are calculated from the current input according to the aforementioned rules, without the need to provide additional reliability labels. Training can begin with model parameter initialization; alternatively, parameters with compatible names and dimensions from existing checkpoints can be loaded, and the initial values ​​of newly added parameters can be retained before continuing training.

[0089] After each training epoch, the system switches to evaluation mode. Predictions are made on the validation set without calculating gradients, and the model is evaluated using the average of the prediction losses from each mini-batch. If the validation loss is no higher than the recorded minimum, the candidate model is updated, and an independent snapshot of the parameters for that epoch is saved. If the validation loss increases, the number of epochs without improvement is accumulated, and training stops early when a preset number of patience epochs is reached. After training, the saved minimum validation loss parameters are loaded for independent testing and subsequent predictions; test data is not used for gradient updates or the aforementioned model selection.

[0090] One feasible configuration is as follows: historical window T = 96, prediction length H = 96, encoding dimension = 256, attention heads = 4, encoding layers = 2, feedforward dimension = 256, period length = 24; local frame length = 24, stride = 6, consistency threshold = 0.6, temperature = 0.1, local context length = 24, causal convolution kernel length = 3, dilation rate = 1, 2, 4. Training batch size = 32, initial learning rate = 10⁻ 4 The weight decay is zero, the maximum number of training rounds is 10, the early stopping patience rounds are 7, and the random inactivation rate is 0.1. When using the round-by-round adjustment strategy, after the e-th round, the learning rate for the next round is set to the initial learning rate multiplied by 0.5 raised to the power of e−1. The above is one implementation configuration; the parameters can be adjusted based on the sampling period, data size, and validation results.

[0091] During deployment, model parameters, input variable order, and preprocessing parameters are saved. Newly acquired historical windows are processed and computed in the same way as during training. If dataset standardization is used, after the model completes the inverse transformation of window normalization, the standardized parameters saved in the training segment are used for the inverse transformation to obtain the prediction results of the original physical dimensions for use by the monitoring terminal.

[0092] Second implementation method

[0093] This implementation adds a full-frequency residual reliability fusion branch to the first implementation, which directly fuses the extracted complete residual features into the pre-encoding representation after reliability gating adjustment, providing a learnable information transmission path for low-energy but potentially predictive frequencies in addition to consistency screening.

[0094] The complete residual feature obtained by jointly encoding the trend component and the complete residual spectrum in the first embodiment is adopted. A reliability factor with a confidence lower bound is determined based on adaptive spectral mixing coefficients, energy-weighted consistency, and state stability. This factor is multiplied by a learnable bounded scale to form a reliability gate. The pre-encoding representation of the first implementation is replaced with the pre-encoding representation containing this gated branch.

[0095]

[0096] in, For the range The lower confidence limit of the reliability factor within the range. As a learnable scale, Embedding of basic variables. Improvement It can increase or maintain the reliability factor, and decrease The reliability factor can be reduced or maintained, provided that other statistics remain unchanged. The quantity in square brackets of formula (11) is the reliability factor, whose value is not lower than the lower confidence limit and does not exceed one; the hyperbolic tangent is applied to the learnable scale to obtain a signed bounded scale, and the product of the two is the overall coefficient. The lower confidence limit constrains the reliability factor, and the sign and magnitude of the overall coefficient are jointly determined by the learnable bounded scale; when the scale is zero, the branch contribution is zero, and when the scale is negative, the branch provides an inverse feature increment. Therefore, this lower confidence limit does not indicate that the overall coefficient or the branch contribution has a positive minimum value.

[0097] In the photovoltaic energy power prediction example, the data acquisition equipment obtains historical power, irradiance, temperature, and related meteorological variables for multiple photovoltaic arrays. Stable diurnal cycles exhibit consistent phase progression across adjacent local frames, while short-term cloud cover may create frequency components with higher energy but shorter durations. Spectral consistency is used to reduce the reliability of this short-term disturbance, and the full-frequency residual reliability fusion branch provides an additional propagation path for weak frequency information that may predict rapid weather changes. Its final contribution is determined by the reliability factor and a learnable bounded scale, outputting array power predictions for multiple future time steps.

[0098] This implementation uses the aforementioned variance plus a positive number, the lower limit of the phase increment denominator, and the lower limit of attention reliability for numerical stabilization. When there are fewer than two local frames, the phase consistency and its product with amplitude stability are zero; subsequent soft masks and six-dimensional reliability descriptions are still generated according to the aforementioned threshold mapping, energy statistics, and intervariate statistics, and are not replaced by a preset neutral reliability.

[0099] System and equipment implementation

[0100] like Figure 1 As shown, the multivariate time series prediction system includes a historical window acquisition and normalization module, a consistency-guided spectral decomposition module, a reliability description extraction module, a historical and local dynamic coding module, a reliability-guided feature routing module, a reliability conditional variable coding module, and a prediction output module. The historical window acquisition and normalization module simultaneously forms the basic variable embeddings; the historical and local dynamic coding module simultaneously extracts the complete residual features used for decomposition context. In the second embodiment, the system also includes a full-frequency residual reliability fusion module, which is not included in the optional branch. Figure 1 It is drawn separately.

[0101] The historical window acquisition and normalization module connects to the data acquisition equipment or technical system database and provides a normalized sequence to the consistency-guided spectrum decomposition module, a normalized sequence and its first-order difference to the historical and local dynamic coding module, and basic variable embeddings to the reliability-guided feature routing module. The consistency-guided spectrum decomposition module provides consistency and statistical information to the reliability description extraction module, and trend components, periodic spectra, local components, and complete residual spectra to the historical and local dynamic coding module. The reliability description extraction module and the historical and local dynamic coding module jointly provide input to the reliability-guided feature routing module. The reliability conditional variable coding module receives the pre-coding representation and the decomposition context consisting of historical, local, and complete residual features, reliability description, and routing information. The prediction output module receives the coding result, the pre-coding representation, and the post-coding increment, and performs the fusion, prediction, and dimensional recovery described in step six. In the second implementation, the full-frequency residual reliability fusion module receives the complete residual features and the statistics required for gating, and adds the adjusted features to the pre-coding representation. Figure 1 The main module connections are shown, grouped by data and features, reliability and routing, and encoding and prediction. The input of the normalized sequence to local encoding, the embedding of basic variables, the detailed composition of the decomposition context, the post-encoding increment, the window mean and standard deviation, and the propagation paths of optional fusion branches are described above.

[0102] The system is implemented by one or more electronic devices, including a processor, memory, communication interface, and bus. The processor executes the program in memory to complete steps one through six; the program may also be stored on a non-transitory computer-readable storage medium.

Claims

1. A multivariate time series forecasting method guided by spectral consistency reliability, characterized in that, Includes the following steps: Step 1: Obtain the historical window of the multivariate time series and normalize each variable separately; Step 2: Perform spectral decomposition on the normalized sequence, perform local frame spectral analysis on the remaining sequence, and obtain frequency-level spectral consistency based on amplitude stability and phase increment consistency. Step 3: Generate a variable-level reliability description based on frequency-level spectral consistency and time-series statistics; Step four: Extract historical and local features, and determine the feature injection strength and injection stage based on variable-level reliability description; Step 5: Conditionally encode the attention between variables based on the variable-level reliability description; Step 6: Generate prediction results based on the conditional coding results and restore the original dimensions.

2. The multivariate time series forecasting method according to claim 1, characterized in that, Step two involves spectral decomposition of the normalized sequence, which includes: performing a Fourier transform on the normalized sequence; generating a trend soft mask based on the roughness, curvature, first and last displacements, and horizontal offset of the normalized sequence; obtaining the trend spectrum using the trend soft mask; and obtaining the residual spectrum corresponding to the residual sequence using the complement of the trend soft mask.

3. The multivariate time series forecasting method according to claim 1, characterized in that, The amplitude stability in step two is determined according to the following relationship: calculate the mean amplitude of the same variable and the same frequency in multiple local frames, add a preset positive number to the mean square of the amplitude in the multiple local frames to prevent the denominator from being zero, and take the square root. The ratio of the mean amplitude to the square root is taken as the amplitude stability.

4. The multivariate time series forecasting method according to claim 1, characterized in that, The phase increment consistency in step two is determined according to the following relationship: calculate the conjugate product of the complex spectral coefficients of the same variable and the same frequency in adjacent local frames and the complex spectral coefficients of the previous local frame, perform unit phase processing on the conjugate product, calculate the magnitude of the average value of the unit phase vectors corresponding to each adjacent local frame, and use the magnitude of the average value as the phase increment consistency; the product of the amplitude stability and the phase increment consistency is used as the frequency level spectral consistency.

5. The multivariate time series forecasting method according to claim 1, characterized in that, The time series statistics mentioned in step three include at least two of energy concentration, state stability, intervariate consistency, and smoothness; the energy-weighted frequency-level spectral consistency is mapped to the time series statistics to obtain the variable-level reliability description of each variable.

6. The multivariate time series forecasting method according to claim 1, characterized in that, Step four involves extracting historical and local features by: inputting the trend component and the periodic spectrum selected based on the frequency-level spectral consistency into the historical encoder to obtain the historical features; and inputting the normalized sequence, the local component, and the first-order difference of the normalized sequence into the local encoder to obtain the local features.

7. The multivariate time series forecasting method according to claim 1, characterized in that, Step four, determining the feature injection strength and injection stage, includes: combining variable embedding, the historical features, the local features, and the variable-level reliability description into a routing state; generating injection strength gating and stage allocation weights for the historical features and the local features based on the routing state; calculating the pre-encoding increment according to the stage allocation weights, and calculating the post-encoding increment according to the complement of the stage allocation weights.

8. The multivariate time series forecasting method according to claim 7, characterized in that, Also includes: The trend component and the complete residual spectrum are input into the history encoder to extract the complete residual features; A reliability factor not lower than a preset reliability lower limit is determined based on adaptive spectral mixing coefficients, energy weighted consistency, and state stability. The reliability factor is multiplied by a learnable bounded scale to obtain a reliability gating. The complete residual features adjusted by the reliability gating are then fused with the pre-encoding increment and the basic variable embedding.

9. The multivariate time series forecasting method according to claim 1, characterized in that, Step five involves conditional encoding of inter-variable attention, which includes: inputting the trend component and the complete residual spectrum into the historical encoder to extract the complete residual features; constructing a decomposition context based on the historical features, the local features, the complete residual features, the variable-level reliability description, the feature injection strength, and the injection stage; and adding a relational bias based on the decomposition context, a source variable reliability term based on the source variable reliability, and a target variable self-holding term based on the target variable reliability to the inter-variable attention score.

10. The multivariate time series forecasting method according to claim 1, characterized in that, During normalization, a preset positive number is added to the historical window variance of each variable and the square root is taken to obtain the stable standard deviation used for normalization. When calculating the unit phase increment vector, a preset positive lower limit is set for the modulus of the complex coefficient product; when the number of local frames is insufficient to calculate the phase increment consistency, the phase increment consistency is set to zero.

11. The multivariate time series forecasting method according to any one of claims 1 to 10, characterized in that, The multivariate time series can be a traffic state time series, a meteorological state time series, an energy system time series, or an industrial sensor time series, and the prediction results are used for monitoring, early warning, or control systems.

12. A multivariate time series forecasting system guided by spectral consistency reliability, characterized in that, It includes a historical window acquisition and normalization module, a consistency-guided spectral decomposition module, a reliability description extraction module, a historical and local dynamic coding module, a reliability-guided feature routing module, a reliability conditional variable coding module, and a prediction output module; The historical window acquisition and normalization module is used to acquire the historical window of a multivariate time series and normalize each variable separately. The consistency-guided spectral decomposition module is used to perform spectral decomposition on the normalized sequence, perform local frame spectral analysis on the remaining sequence, and obtain frequency-level spectral consistency based on amplitude stability and phase increment consistency. The reliability description extraction module is used to generate variable-level reliability descriptions based on frequency-level spectral consistency and time-series statistics. The historical and local dynamic coding module is used to extract historical features and local features; The reliability-guided feature routing module is used to determine the feature injection strength and injection stage based on variable-level reliability description; The reliability conditional variable encoding module is used to conditionally encode the attention between variables based on the variable-level reliability description; The prediction output module is used to generate prediction results and restore the original dimensions based on the conditional coding results.

13. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program, which, when executed by the processor, implements the multivariate time series forecasting method according to any one of claims 1 to 11.

14. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the multivariate time series forecasting method according to any one of claims 1 to 11.