A time series anomaly prediction method and system based on uncertainty perception

By employing differentiated normalization and multi-path prediction methods, the adaptive and uncertain problems of multivariate time series anomaly prediction in existing technologies are solved, enabling highly reliable anomaly early warning for complex systems and improving the accuracy and stability of prediction.

CN122388918APending Publication Date: 2026-07-14EAST CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
EAST CHINA NORMAL UNIV
Filing Date
2026-04-16
Publication Date
2026-07-14

AI Technical Summary

Technical Problem

Existing time series anomaly prediction methods lack adaptability, variable-level anomaly pattern modeling ability, and uncertainty representation ability in complex dynamic scenarios with multiple variables, resulting in insufficient prediction accuracy and stability, making it difficult to meet the high reliability anomaly early warning requirements of complex systems.

Method used

An uncertainty-aware time-series anomaly prediction method is adopted. Through differential normalization, multi-dimensional feature embedding and temporal relationship encoding, a multi-dimensional anomaly feature index library is constructed, multi-path future evolution hypotheses are generated, and adaptive perturbation injection and adversarial optimization are performed to achieve multi-path prediction and dynamic prototype update.

Benefits of technology

It improves the ability to model differential anomalies in multivariate time series, enhances the ability to characterize the process of local anomalies gradually evolving into overall anomalies, improves the stability and accuracy of predictions, and enhances the model's generalization ability in complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122388918A_ABST
    Figure CN122388918A_ABST
Patent Text Reader

Abstract

This invention discloses a time series anomaly prediction method and system based on uncertainty perception, comprising: inputting a multivariate time series and preprocessing it to obtain historical feature representations; constructing a multidimensional anomaly feature index library and maintaining anomaly prototype sequences of variable-level anomaly patterns; performing cross-modal feature retrieval and applying differentiated perturbations to different variables based on anomaly prototype sequence information to synthesize anomaly-perceived representations; generating multiple latent representations and calculating evolution weights by learning latent probability distributions and performing reparameterized multipath sampling; generating multiple future evolution hypotheses in parallel, predicting future time series paths by modeling the parallel evolution of different branches and combining evolution weights for weighted fusion and projection, and updating and optimizing anomaly prototypes; training and adversarial optimization of the prediction model, and performing inference and anomaly scoring; this invention can achieve stable and accurate early anomaly prediction in complex dynamic scenarios with multiple variables.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of time series anomaly analysis technology, and more specifically to a time series anomaly prediction method and system based on uncertainty perception. Background Technology

[0002] Currently, time series data is widely used in various fields such as industrial equipment monitoring, cloud computing system operation and maintenance, transportation management, energy dispatching, and intelligent manufacturing. With the rapid development of sensor technology and information acquisition systems, the scale of time series data generated by various complex systems continues to grow. How to predict potential anomalies in advance from historical observation data is of great significance for achieving risk warning, fault prevention, and stable system operation.

[0003] To achieve early warning, research in recent years has gradually shifted towards time series anomaly prediction tasks. By using historical observation data to predict the evolution trend of future sequences and judging potential abnormal states based on the prediction results, anomalies can be identified in advance. For the problem of unsupervised time series anomaly prediction, existing technologies have gradually formed a mainstream research paradigm with perturbation injection as the core. This can achieve anomaly prediction without the need for anomaly labels, and is therefore widely used in scenarios such as industrial monitoring, AIOps operations and maintenance, cloud computing systems, and transportation systems.

[0004] Although existing time series anomaly prediction methods can provide early warnings of anomalies to a certain extent, they still have significant shortcomings in complex, dynamic, multivariate scenarios. Specifically:

[0005] The modeling of anomalies lacks adaptability: Existing methods usually use a predefined library of anomaly patterns or random noise injection to generate anomaly samples. They apply a uniform or fixed perturbation strategy to all time series variables, failing to perform differentiated modeling based on the statistical characteristics and dynamic changes of different variables. This results in a large deviation between the generated anomaly patterns and the real anomaly structure, thus affecting the accuracy of anomaly prediction. Lack of fine-grained modeling capability for variable-level anomaly patterns: In multivariate time series, different variables have different scales of change and anomaly sensitivities. Some variables are more sensitive to small perturbations, while others are more robust. Existing methods usually perform uniform perturbations or uniform predictions at the overall sequence level, lacking the ability to finely model variable-level anomaly patterns and making it difficult to effectively characterize the dynamic process of local anomalies gradually evolving into overall anomalies. Ignoring the uncertainty of historical representation and future evolution: In the process of time series anomaly prediction, noisy historical observations may correspond to multiple potential semantic representations, and similar historical patterns may evolve into different trajectories in the future. Most existing methods adopt deterministic mapping methods and only output a single prediction result, which cannot describe multiple possible paths of future evolution. This leads to insufficient prediction stability of the model in complex dynamic systems and is prone to misjudgment or overfitting problems. Insufficient generalization ability for complex dynamic systems: In real-world scenarios such as industrial systems and cloud computing systems, time series typically have high dimensionality, strong coupling, and non-stationary characteristics. Existing anomaly prediction methods struggle to simultaneously consider both anomaly pattern modeling and future dynamic modeling capabilities during training, leading to a decline in prediction performance across scenarios or under high-noise conditions. This makes it difficult to meet the demand for highly reliable anomaly early warning in practical applications.

[0006] Therefore, how to overcome the shortcomings of existing time series anomaly prediction methods in terms of anomaly disturbance modeling, adaptive capability, uncertainty representation, and complex system modeling, so as to achieve stable and accurate anomaly prediction in multivariate complex dynamic scenarios, is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0007] In view of the above problems, the present invention aims to provide a time series anomaly prediction method and system based on uncertainty perception that overcomes or at least partially solves the above problems.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: A time series anomaly prediction method based on uncertainty perception includes: S1. Input multivariate time series data, perform differential normalization, multidimensional feature embedding and time series relation encoding to obtain historical feature representation; S2. Based on historical feature representation, construct a multi-dimensional anomaly feature index library, and maintain the anomaly prototype sequence of variable-level anomaly patterns through a hierarchical storage structure; S3. Perform cross-modal feature retrieval on historical feature representation and multidimensional anomaly feature index library, and apply differentiated perturbation to different variables based on anomaly prototype sequence information to synthesize anomaly perception representation containing potential anomaly information; S4. By learning the latent probability distribution and performing reparameterized multipath sampling, the historical feature representation is used to generate multiple latent representations. Based on the historical feature representation and the latent representation of each sampling point, the evolutionary tendency is estimated, and the corresponding evolutionary weight vector is calculated. S5. Based on multiple latent representations, multiple future evolution hypotheses are generated in parallel. By modeling the parallel evolution of different branches of smooth evolution and warning evolution and combining evolution weights for weighted fusion and projection, the future time series path is predicted. S6. By clustering and extracting the dominant patterns of potential future paths under the warning evolutionary branch, and calculating the evolutionary residuals and feature compression, the abnormal prototype is updated and optimized. S7. By applying multi-path prediction consistency constraints and adaptive boundary offset constraints to different evolutionary branches, and by using an adversarial optimization mechanism to train and optimize the prediction model; S8. Use the trained prediction model to perform inference and anomaly scoring, and output the final anomaly prediction results.

[0009] Preferably, the specific content of step S1 is as follows: Collect multidimensional monitoring signals from complex dynamic systems to obtain multivariable time series, and perform standardization processing to eliminate the influence of dimensions; The standardized multivariate time series is mapped to an initial latent space of uniform dimension to obtain the initial embedding representation; The initial embedding representation is input into a temporal coding network to extract deep temporal dependencies and coupling structures between variables. After encoding, a historical representation containing temporal dynamic information and multivariate correlation features is extracted.

[0010] Preferably, the multidimensional anomaly feature index library in step S2 includes a point-like anomaly sub-library, a fragment anomaly sub-library, and a dynamic evolution sub-library; The point anomaly sub-library stores latent space feature vectors mapped from predefined point anomaly priors, used to simulate transient sensor failures or sudden shocks in the production environment. The fragment anomaly sub-library stores prior features of fragment anomalies that reflect local periodic disruptions or trend shifts, which are used to model the complex process of gradual degradation of system performance or the breaking of periodic patterns. The dynamic evolution sub-library stores context-related anomaly features that evolve in real time with the current system operating environment, capturing time-varying and difficult-to-predefine heterogeneous anomaly patterns; Each sub-library maps the anomaly patterns in the original space to a latent space identical to the historical feature representation, maintaining N anomaly prototype sequences of dimension D:

[0011] in, These are punctate anomalies, fragment anomalies, and dynamic anomalies, respectively.

[0012] Preferably, the specific content of step S3 is as follows: Using historical conventional representations as query terms, the system retrieves data from a multidimensional anomaly feature index using a cross-attention mechanism. Attention weights are calculated using historical conventional representations, and feature terms reflecting potential failure risks in the current context are dynamically matched to retrieve anomaly patterns. A learnable scaling factor is introduced to adjust the impact intensity of anomalous information on the original normal state, and finally an anomalous perception representation containing potential anomalous information is synthesized.

[0013] Preferably, the specific content of step S4 is as follows: For historical feature representation and anomaly perception representation, a multilayer perceptron is used to calculate the statistical features in the latent space, including the mean and variance. Reparameterized sampling is used to extract from the learned distribution. One potential representation; Based on historical feature representation, anomaly perception representation, and the latent representation of each sampling point, the corresponding evolution weight vector is calculated to characterize the probability tendency of each path to evolve into a smooth or warning state.

[0014] Preferably, step S5 includes: Each latent representation is projected back into the model dimension space, and the underlying future hidden representation is extracted using a shared Transformer encoder; Based on the underlying future hidden representation, the smooth evolution branch uses the SmoothTransformer, which includes global dependency modeling and local smoothing mechanisms, to suppress high-frequency fluctuations and generate smooth feature representations; the alert evolution branch expands the temporal receptive field through dilated convolution to capture sparse anomalies and combines contrast enhancement mode to highlight irregular components and generate alert feature representations. By using the generated evolution weights, the outputs of the two branches are dynamically fused along the path to obtain the final hidden representation of the future. The fused features are mapped back to the original observation space using a lightweight prediction head, and the two branches output... A predicted future path.

[0015] Preferably, the specific content of step S6 is as follows: Receive the potential future path representations generated under the warning evolution branch, cluster them in the latent space, and select the cluster center with the largest number of members as the dominant anomalous mode in the evolution. The dominant anomaly pattern is projected back into the temporal space by the prediction head and the evolution residual with the real future observation window is calculated. The extracted evolutionary residuals are fed back into the shared encoder for feature compression, generating a dynamic prototype and updating it to the dynamic evolutionary sub-library.

[0016] Preferably, step S7, which involves training and adversarial optimization of the prediction model, includes the following: For the predicted path generated by the smooth evolution branch, variance constraints and reconstruction constraints are introduced to calculate the total loss of the regular branch; For the prediction path generated by the warning evolution branch, an adaptive boundary mechanism linked to the injection intensity is introduced to force the model to produce deviation features under strong perturbation and calculate the total loss of the warning evolution branch. Cross-entropy loss is used to align evolution weights with semantic context; Adversarial training is introduced, and KL divergence is used to construct adversarial loss. Model training and optimization are performed alternately between minimizing the primary objective loss and minimizing the adversarial loss.

[0017] Preferably, the specific content of step S8 is as follows: By calculating the consistency bias of multiple prediction paths, the propensity score in the evolution weights, or the offset between the predicted value and the threshold, an anomaly risk score within the future time window is obtained, and the final anomaly prediction result is output.

[0018] An uncertainty-aware time series anomaly prediction system, based on the aforementioned uncertainty-aware time series anomaly prediction method, includes: an embedding and encoding module, an anomaly prototype storage module, an adaptive anomaly injection module, a dynamic prototype update and pattern analysis module, an uncertainty-aware latent space modeling module, a dual-structure decoding module, a training and adversarial optimization module, and an inference and anomaly scoring module. The embedding and encoding module is configured to take multivariate time series data as input, perform differential normalization, multidimensional feature embedding and temporal relationship encoding to obtain historical feature representations; The exception prototype storage module is configured to build a multi-dimensional exception feature index library based on historical feature representation, and maintain the exception prototype sequence of variable-level exception patterns through a hierarchical storage structure. The adaptive anomaly injection module is configured to perform cross-modal feature retrieval from historical feature representations and a multi-dimensional anomaly feature index library, and apply differential perturbations to different variables based on anomaly prototype sequence information to synthesize an anomaly perception representation containing potential anomaly information. The uncertainty-aware latent space modeling module is configured to generate multiple latent representations by learning the latent probability distribution of historical feature representations and performing reparameterized multi-path sampling. Based on the historical feature representations and the latent representations of each sampling point, the module estimates the evolutionary tendency and calculates the corresponding evolutionary weight vector. The dual-structure decoding module is configured to generate multiple future evolution hypotheses in parallel based on multiple latent representations. It predicts future time series paths by modeling different branches of smooth evolution and warning evolution in parallel and combining them with evolution weights for weighted fusion and projection. The dynamic prototype update and pattern analysis module is configured to update and optimize the abnormal prototype by clustering and extracting the dominant patterns of the potential future paths under the warning evolution branch, and calculating the evolution residual and feature compression. The training and adversarial optimization module is configured to perform multi-path prediction consistency constraints and adaptive boundary offset constraints on different evolutionary branches, and to train and optimize the prediction model using an adversarial optimization mechanism. The reasoning and anomaly scoring module is configured to use the trained prediction model to perform reasoning and anomaly scoring, and output the final anomaly prediction results.

[0019] As can be seen from the above technical solution, compared with the prior art, the present invention discloses a time series anomaly prediction method and system based on uncertainty perception, which has the following beneficial effects: This invention addresses the shortcomings of existing time series anomaly prediction methods that employ fixed anomaly patterns or random perturbation injections, and solves the problem that they cannot generate adaptive anomaly perturbations based on different variable characteristics, thereby realizing differentiated anomaly modeling capabilities for multivariate heterogeneous time series. This invention solves the problem that existing anomaly prediction methods lack the ability to model variable-level anomaly structures, enabling the model to generate targeted anomaly patterns based on the sensitivity and dynamic characteristics of different variables, thereby improving the ability to characterize the process of local anomalies gradually evolving into overall anomalies in complex systems. This invention addresses the problem that existing time series anomaly prediction methods, which employ deterministic representation learning, neglect the uncertainties of historical observations and future evolution, by achieving joint modeling of historical potential states and multiple future evolutionary paths, thereby improving the stability and reliability of anomaly prediction. This invention addresses the problem that existing anomaly prediction models only generate a single future result and cannot describe multiple possible future states. By constructing a multi-path future evolution mechanism, it achieves consistent analysis of different future trends, thereby improving the accuracy of anomaly prediction in advance. This invention addresses the problem of insufficient generalization ability of existing anomaly prediction methods in complex industrial systems and high-noise data scenarios. By introducing adaptive anomaly memory and uncertainty modeling mechanisms, it improves the prediction performance of the model in multivariable, high-dimensional and non-stationary time series. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0021] Figure 1 This is a schematic diagram of a time series anomaly prediction method based on uncertainty perception provided in an embodiment of the present invention; Figure 2This is a schematic diagram of dataset statistics provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the SMD dataset anomaly score visualization results provided in this embodiment of the invention; Figure 4 This is a schematic diagram comparing the anomaly prediction performance of different models provided in this embodiment of the invention on different datasets. Detailed Implementation

[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0023] Example 1 This invention discloses a time series anomaly prediction method based on uncertainty perception, comprising: S1. Input multivariate time series data, perform differential normalization, multidimensional feature embedding and time series relation encoding to obtain historical feature representation; S2. Based on historical feature representation, construct a multi-dimensional anomaly feature index library, and maintain the anomaly prototype sequence of variable-level anomaly patterns through a hierarchical storage structure; S3. Perform cross-modal feature retrieval on historical feature representation and multidimensional anomaly feature index library, and apply differentiated perturbation to different variables based on anomaly prototype sequence information to synthesize anomaly perception representation containing potential anomaly information; S4. By learning the latent probability distribution and performing reparameterized multipath sampling, the historical feature representation is used to generate multiple latent representations. Based on the historical feature representation and the latent representation of each sampling point, the evolutionary tendency is estimated, and the corresponding evolutionary weight vector is calculated. S5. Based on multiple latent representations, multiple future evolution hypotheses are generated in parallel. By modeling the parallel evolution of different branches of smooth evolution and warning evolution and combining evolution weights for weighted fusion and projection, the future time series path is predicted. S6. By clustering and extracting the dominant patterns of potential future paths under the warning evolutionary branch, and calculating the evolutionary residuals and feature compression, the abnormal prototype is updated and optimized. S7. By applying multi-path prediction consistency constraints and adaptive boundary offset constraints to different evolutionary branches, and by using an adversarial optimization mechanism to train and optimize the prediction model; S8. Use the trained prediction model to perform inference and anomaly scoring, and output the final anomaly prediction results.

[0024] To further implement the above technical solution, the specific content of step S1 is as follows: Acquire multidimensional monitoring signals from complex dynamic systems to obtain multivariable time series data. ,in, Indicates the time step in history. The variable dimensions are represented and standardized to eliminate the influence of units. The standardized multivariate time series is mapped to an initial latent space of uniform dimension to obtain the initial embedding representation;

[0025] in, The dimension of the latent space feature vectors; The initial embedding representation is input into a temporal coding network to extract deep temporal dependencies and coupling structures between variables. After encoding, a historical representation containing temporal dynamics and multivariate correlation features is extracted. ;

[0026] The embedding and encoding in step S1 ensures that the model can capture the evolutionary patterns of complex time series within a unified latent space, thereby improving the accuracy of abnormal pattern recognition and future trajectory prediction.

[0027] To further implement the above technical solution, the multidimensional anomaly feature index library in step S2 includes a point-like anomaly sub-library, a fragment anomaly sub-library, and a dynamic evolution sub-library; The point anomaly sub-library stores latent space feature vectors mapped from predefined point anomaly priors, used to simulate transient sensor failures or sudden shocks in the production environment. The fragment anomaly sub-library stores prior features of fragment anomalies that reflect local periodic disruptions or trend shifts, which are used to model the complex process of gradual degradation of system performance or the breaking of periodic patterns. The dynamic evolution sub-library stores context-related anomaly features that evolve in real time with the current system operating environment, capturing time-varying and difficult-to-predefine heterogeneous anomaly patterns; Each sub-library maps the anomalous patterns of the original space to historical feature representations. Within the same latent space, maintain N sequences of anomalous prototypes with dimension D:

[0028] in, These are respectively punctate anomalies, fragment anomalies, and dynamic anomalies; Step S2 ensures that the model not only possesses general anomaly knowledge through point and fragment libraries, but also has adaptive learning capabilities for specific monitoring objects through dynamic libraries.

[0029] To further implement the above technical solution, considering the characteristic that similar perturbations in multivariate time series may induce different consequences on different variables, an attention mechanism is used to achieve adaptive fusion; the specific content of step S3 is as follows: Representing historical norms As a query term, it is obtained from a multidimensional anomaly feature index through a cross-attention mechanism. Searching within the context of historical regular representations Calculate attention weights, dynamically match features from the database that reflect potential failure risks in the current context, and retrieve abnormal patterns. ;

[0030] This process ensures that the injected disturbances are not blind noise, but rather abnormal candidate patterns that are strongly correlated with the current system state (such as high load, stable operation, etc.). Introduce a learnable scaling factor By adjusting the impact intensity of anomalous information on the original normal state, an anomaly perception representation containing potential anomalous information is ultimately synthesized. ;

[0031] Through this step, the model can construct a starting point for the evolution of potential anomalies in the latent space, thereby guiding the subsequent decoder to generate anomaly warning paths.

[0032] To further implement the above technical solution, the specific content of step S4 is as follows: Representation of historical characteristics and anomaly perception representation The statistical features in the latent space, including the mean, are calculated using a multilayer perceptron. With variance ;

[0033] in, and ; This step expands a single feature point into a continuous probability space, thereby enabling it to cover a variety of potential historical semantic hypotheses. To achieve backpropagation of gradients and capture distribution features, reparameterized sampling is used to extract gradients from the learned distribution. A potential representation ; , ,

[0034] By generating a set of latent representations The model is capable of parallel exploration These possible historical semantic states provide a basis for subsequent multi-path evolution prediction; Based on historical feature representation and anomaly perception representation and the potential representation of each sampling point Calculate the corresponding evolution weight vector To characterize the probability tendency of each path to evolve into a smooth or warning state;

[0035] in, and These represent the relative weights of the smoothing branch and the warning branch, respectively, and are used to guide subsequent feature fusion.

[0036] To further implement the above technical solution, step S5 includes: Each potential representation Project back into the model-dimensional space and extract the underlying future hidden representation using the shared Transformer encoder. This serves as the common feature basis for subsequent smoothing branches and warning branches;

[0037] Based on the fundamental future hidden representation, the smooth evolution branch utilizes the SmoothTransformer, which incorporates global dependency modeling and local smoothing mechanisms, to suppress high-frequency fluctuations and generate smooth feature representations. The alert evolution branch expands the temporal receptive field through dilated convolution to capture sparse anomalies, and combines this with contrast enhancement models to highlight irregular components, generating alert feature representations. ;

[0038]

[0039] Using the generated evolution weights, the outputs of the two branches are dynamically fused along each path to obtain the final future hidden representation. ;

[0040] Lightweight prediction head Map the fused features back to the original observation space, and output... Predicted future paths This includes the outputs of the two branches respectively. The predicted future path, represented by historical norms The generated predicted paths Compared with the representation of anomaly perception Generated prediction path ;

[0041] Through the Analyzing the mean, variance, or variability of each path can explicitly assess the uncertainty of future evolution and provide a reliable early warning signal before anomalies occur.

[0042] To further implement the above technical solution, the specific content of step S6 is as follows: Receive generated under the warning evolution branch A potential future path represents Clustering is performed within the latent space, and the cluster center with the largest number of members is selected. As the dominant anomalous pattern in evolution; In order to eliminate The large amount of normal evolutionary background contained within it can be used to predict the head. Will dominate abnormal patterns Projecting back into the time domain and calculating the observation window relative to the actual future. The evolutionary residual;

[0043] This residual can accurately extract purely anomalous deviation features, thereby avoiding the contamination of the dynamic repository by normal background information; Extracted evolutionary residuals The feature is re-entered into the shared encoder for feature compression to generate a dynamic prototype. And updated to the dynamic evolution sub-library; When the sub-database reaches its storage capacity At the same time, a first-in-first-out (FIFO) strategy is used to remove old prototypes, ensuring that the model always retains the abnormal knowledge that best matches the current data distribution.

[0044] To further implement the above technical solution, step S7, which involves training and adversarial optimization of the prediction model, includes the following: Predicted paths generated for smooth evolution branches Introduce variance constraints and reconstruction constraints to calculate the total loss of the regular branch; Conventional variance loss is used to suppress excessive fluctuations among multiple prediction paths and encourage smoothness.

[0045] in, Calculate the path at a specific time step The sample variance at that location; This indicates the entire prediction window. Calculate the expected value for all time steps; Conventional reconstruction loss, ensuring The mean of the predicted paths and the actual future window Maintain consistency:

[0046] The total loss of a regular branch is defined as:

[0047] For the prediction path generated by the warning evolution branch, an adaptive boundary mechanism linked to the injection intensity is introduced to force the model to produce deviation features under strong perturbation and calculate the total loss of the warning evolution branch.

[0048]

[0049] The ReLU function is used to ensure that a penalty is triggered when the prediction deviation is below a preset boundary, thereby enhancing the model's ability to extract abnormal evolution patterns. Evolution weights are derived using cross-entropy loss. Align with semantic context to ensure that regular inputs tend to evolve smoothly, while abnormal injection inputs tend to evolve with warnings;

[0050] CE cross-entropy is used to measure the difference between two probability distributions, serving as a supervisory alignment signal; The anomaly injection module is treated as a generator, aiming to generate perturbations that are highly similar to real evolution but challenging; the prediction model is treated as a discriminator; adversarial loss is constructed using KL divergence to make the anomalous evolution distribution approximate the normal evolution distribution, thereby improving the model's accuracy in capturing subtle anomalies at the decision boundary in adversarial games.

[0051] Minimize the loss of the main objective Minimize the adversarial loss Model training and optimization are performed alternately.

[0052] To further implement the above technical solution, the specific content of step S8 is as follows: In this implementation, the adaptive anomaly injection branch is disabled, and only the regular evolution branch is enabled; a historical window for real-time input is used. Encode the data and perform secondary parameterized sampling to obtain a set of latent representations representing different historical semantic hypotheses. The system outputs multiple future evolution paths in parallel. By calculating the consistency deviation of multiple prediction paths, the tendency score in the evolution weights, or the offset between the predicted value and the threshold, it obtains the anomaly risk score within the future time window and outputs the final anomaly prediction result.

[0053] Example 2 An uncertainty-aware time series anomaly prediction system, based on an uncertainty-aware time series anomaly prediction method, includes: an embedding and encoding module, an anomaly prototype storage module, an adaptive anomaly injection module, a dynamic prototype update and pattern analysis module, an uncertainty-aware latent space modeling module, a dual-structure decoding module, a training and adversarial optimization module, and an inference and anomaly scoring module. The embedding and encoding module is configured to take multivariate time series data as input, perform differential normalization, multidimensional feature embedding and temporal relationship encoding to obtain historical feature representations; The exception prototype storage module is configured to build a multi-dimensional exception feature index library based on historical feature representation, and maintain the exception prototype sequence of variable-level exception patterns through a hierarchical storage structure. The adaptive anomaly injection module is configured to perform cross-modal feature retrieval from historical feature representations and a multi-dimensional anomaly feature index library, and apply differential perturbations to different variables based on anomaly prototype sequence information to synthesize an anomaly perception representation containing potential anomaly information. The uncertainty-aware latent space modeling module is configured to generate multiple latent representations by learning the latent probability distribution of historical feature representations and performing reparameterized multi-path sampling. Based on the historical feature representations and the latent representations of each sampling point, the module estimates the evolutionary tendency and calculates the corresponding evolutionary weight vector. The dual-structure decoding module is configured to generate multiple future evolution hypotheses in parallel based on multiple latent representations. It predicts future time series paths by modeling different branches of smooth evolution and warning evolution in parallel and combining them with evolution weights for weighted fusion and projection. The dynamic prototype update and pattern analysis module is configured to update and optimize the abnormal prototype by clustering and extracting the dominant patterns of the potential future paths under the warning evolution branch, and calculating the evolution residual and feature compression. The training and adversarial optimization module is configured to perform multi-path prediction consistency constraints and adaptive boundary offset constraints on different evolutionary branches, and to train and optimize the prediction model using an adversarial optimization mechanism. The reasoning and anomaly scoring module is configured to use the trained prediction model to perform reasoning and anomaly scoring, and output the final anomaly prediction results.

[0054] Example 3 This embodiment evaluates the method of Embodiment 1 on multiple real-world time series datasets, including MSL (Mars Science Lab), PSM (Server Metrics Pool), SMD (Server Machine Dataset), SWAN and GECCO from NeurIPS-TS (NeurIPS 2021 Time Series Benchmark), and Genesis, etc. Figure 2 These datasets are diverse in application areas, data characteristics, and anomaly types, providing a comprehensive evaluation benchmark for anomaly prediction.

[0055] Figure 3 To visualize a segment of the original time series from the SMD dataset and the corresponding anomaly score generated by the method of this invention, a slight perturbation occurred around t≈10, but the anomaly score remained stable, indicating that the model does not respond to instantaneous fluctuations. More importantly, before the true anomaly interval begins at t≈45, the anomaly score has already risen sharply around t≈40, demonstrating the model's ability to predict anomaly evolution trends in advance. This early rise indicates that the model can capture potential risk signals implied in future dynamics, rather than relying solely on observed anomaly segments. After the anomaly fully occurs (t≥45), the anomaly score remains high, reflecting a persistent anomaly risk. Overall, this visualization highlights the predictive nature of the proposed criterion, enabling early warning of anomalies rather than post-event detection.

[0056] To evaluate the effectiveness of the method in Example 1 for predicting time series anomalies, it was compared with representative methods from different categories.

[0057] This embodiment employs classic anomaly detection methods, including: statistical and density-based methods (LODA, IFOrest), deep reconstruction-based methods (TranAD, Anomaly Transformer, CATCH, Cross-AD), and contrastive learning-based models (DCdetector). Furthermore, this method is compared with methods specifically designed for anomaly prediction, including PAD, IGCL, and A2P. All anomaly detection methods are adapted according to the protocol proposed by PAD to suit anomaly prediction tasks.

[0058] This embodiment systematically evaluates the proposed method on six publicly available multivariate time series datasets: the historical backtracking window is fixed at 96, and four prediction step sizes (32, 64, 128, and 192) are initially evaluated; for simplicity and clarity, the results reported in the main table are the average values ​​over these prediction step sizes, such as... Figure 4As shown, the method of the present invention achieves optimal performance in all major indicators, outperforming all baseline methods. This indicates that the method of the present invention can more accurately locate future anomalies and stably rank the anomaly risks in future time windows, which is crucial for early warning systems in practical applications.

[0059] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to the method section.

[0060] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A time series anomaly prediction method based on uncertainty perception, characterized in that, include: S1. Input multivariate time series data, perform differential normalization, multidimensional feature embedding and time series relation encoding to obtain historical feature representation; S2. Based on historical feature representation, construct a multi-dimensional anomaly feature index library, and maintain the anomaly prototype sequence of variable-level anomaly patterns through a hierarchical storage structure; S3. Perform cross-modal feature retrieval on historical feature representation and multidimensional anomaly feature index library, and apply differentiated perturbation to different variables based on anomaly prototype sequence information to synthesize anomaly perception representation containing potential anomaly information; S4. By learning the latent probability distribution and performing reparameterized multipath sampling, the historical feature representation is used to generate multiple latent representations. Based on the historical feature representation and the latent representation of each sampling point, the evolutionary tendency is estimated, and the corresponding evolutionary weight vector is calculated. S5. Based on multiple latent representations, multiple future evolution hypotheses are generated in parallel. By modeling the parallel evolution of different branches of smooth evolution and warning evolution and combining evolution weights for weighted fusion and projection, the future time series path is predicted. S6. By clustering and extracting the dominant patterns of potential future paths under the warning evolutionary branch, and calculating the evolutionary residuals and feature compression, the abnormal prototype is updated and optimized. S7. By applying multi-path prediction consistency constraints and adaptive boundary offset constraints to different evolutionary branches, and by using an adversarial optimization mechanism to train and optimize the prediction model; S8. Use the trained prediction model to perform inference and anomaly scoring, and output the final anomaly prediction results.

2. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, The specific content of step S1 is as follows: Collect multidimensional monitoring signals from complex dynamic systems to obtain multivariable time series, and perform standardization processing to eliminate the influence of dimensions; The standardized multivariate time series is mapped to an initial latent space of uniform dimension to obtain the initial embedding representation; The initial embedding representation is input into a temporal coding network to extract deep temporal dependencies and coupling structures between variables. After encoding, a historical representation containing temporal dynamic information and multivariate correlation features is extracted.

3. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, The multidimensional anomaly feature index library in step S2 includes a point-like anomaly sub-library, a fragment anomaly sub-library, and a dynamic evolution sub-library; The point anomaly sub-library stores latent space feature vectors mapped from predefined point anomaly priors, used to simulate transient sensor failures or sudden shocks in the production environment. The fragment anomaly sub-library stores prior features of fragment anomalies that reflect local periodic disruptions or trend shifts, which are used to model the complex process of gradual degradation of system performance or the breaking of periodic patterns. The dynamic evolution sub-library stores context-related anomaly features that evolve in real time with the current system operating environment, capturing time-varying and difficult-to-predefine heterogeneous anomaly patterns; Each sub-library maps the anomaly patterns in the original space to a latent space identical to the historical feature representation, maintaining N anomaly prototype sequences of dimension D: in, These are punctate anomalies, fragment anomalies, and dynamic anomalies, respectively.

4. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, The specific content of step S3 is as follows: Using historical conventional representations as query terms, the system retrieves data from a multidimensional anomaly feature index using a cross-attention mechanism. Attention weights are calculated using historical conventional representations, and feature terms reflecting potential failure risks in the current context are dynamically matched to retrieve anomaly patterns. A learnable scaling factor is introduced to adjust the impact intensity of anomalous information on the original normal state, and finally an anomalous perception representation containing potential anomalous information is synthesized.

5. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, The specific content of step S4 is as follows: For historical feature representation and anomaly perception representation, a multilayer perceptron is used to calculate the statistical features in the latent space, including the mean and variance. Reparameterized sampling is used to extract from the learned distribution. One potential representation; Based on historical feature representation, anomaly perception representation, and the latent representation of each sampling point, the corresponding evolution weight vector is calculated to characterize the probability tendency of each path to evolve into a smooth or warning state.

6. The time series anomaly prediction method based on uncertainty perception as described in claim 5, characterized in that, Step S5 includes: Each latent representation is projected back into the model dimension space, and the underlying future hidden representation is extracted using a shared Transformer encoder; Based on the underlying future hidden representation, the smooth evolution branch uses the SmoothTransformer, which includes global dependency modeling and local smoothing mechanisms, to suppress high-frequency fluctuations and generate smooth feature representations; the alert evolution branch expands the temporal receptive field through dilated convolution to capture sparse anomalies and combines contrast enhancement mode to highlight irregular components and generate alert feature representations. By using the generated evolution weights, the outputs of the two branches are dynamically fused along the path to obtain the final hidden representation of the future. The fused features are mapped back to the original observation space using a lightweight prediction head, and the two branches output... A predicted future path.

7. The time series anomaly prediction method based on uncertainty perception as described in claim 6, characterized in that, The specific content of step S6 is as follows: Receive the potential future path representations generated under the warning evolution branch, cluster them in the latent space, and select the cluster center with the largest number of members as the dominant anomalous mode in the evolution. The dominant anomaly pattern is projected back into the temporal space by the prediction head and the evolution residual with the real future observation window is calculated. The extracted evolutionary residuals are fed back into the shared encoder for feature compression, generating a dynamic prototype and updating it to the dynamic evolutionary sub-library.

8. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, Step S7, the specific content of training and adversarial optimization of the prediction model, is as follows: For the predicted path generated by the smooth evolution branch, variance constraints and reconstruction constraints are introduced to calculate the total loss of the regular branch; For the prediction path generated by the warning evolution branch, an adaptive boundary mechanism linked to the injection intensity is introduced to force the model to produce deviation features under strong perturbation and calculate the total loss of the warning evolution branch. Cross-entropy loss is used to align evolution weights with semantic context; Adversarial training is introduced, and KL divergence is used to construct adversarial loss. Model training and optimization are performed alternately between minimizing the primary objective loss and minimizing the adversarial loss.

9. The time series anomaly prediction method based on uncertainty perception as described in claim 1, characterized in that, The specific content of step S8 is as follows: By calculating the consistency bias of multiple prediction paths, the propensity score in the evolution weights, or the offset between the predicted value and the threshold, an anomaly risk score within the future time window is obtained, and the final anomaly prediction result is output.

10. A time series anomaly prediction system based on uncertainty perception, characterized in that, A time series anomaly prediction method based on uncertainty perception according to any one of claims 1-9 includes: an embedding and encoding module, an anomaly prototype storage module, an adaptive anomaly injection module, a dynamic prototype update and pattern analysis module, an uncertainty perception latent space modeling module, a dual-structure decoding module, a training and adversarial optimization module, and an inference and anomaly scoring module. The embedding and encoding module is configured to take multivariate time series data as input, perform differential normalization, multidimensional feature embedding and temporal relationship encoding to obtain historical feature representations; The exception prototype storage module is configured to build a multi-dimensional exception feature index library based on historical feature representation, and maintain the exception prototype sequence of variable-level exception patterns through a hierarchical storage structure. The adaptive anomaly injection module is configured to perform cross-modal feature retrieval from historical feature representations and a multi-dimensional anomaly feature index library, and apply differential perturbations to different variables based on anomaly prototype sequence information to synthesize an anomaly perception representation containing potential anomaly information. The uncertainty-aware latent space modeling module is configured to generate multiple latent representations by learning the latent probability distribution of historical feature representations and performing reparameterized multi-path sampling. Based on the historical feature representations and the latent representations of each sampling point, the module estimates the evolutionary tendency and calculates the corresponding evolutionary weight vector. The dual-structure decoding module is configured to generate multiple future evolution hypotheses in parallel based on multiple latent representations. It predicts future time series paths by modeling different branches of smooth evolution and warning evolution in parallel and combining them with evolution weights for weighted fusion and projection. The dynamic prototype update and pattern analysis module is configured to update and optimize the abnormal prototype by clustering and extracting the dominant patterns of the potential future paths under the warning evolution branch, and calculating the evolution residual and feature compression. The training and adversarial optimization module is configured to perform multi-path prediction consistency constraints and adaptive boundary offset constraints on different evolutionary branches, and to train and optimize the prediction model using an adversarial optimization mechanism. The reasoning and anomaly scoring module is configured to use the trained prediction model to perform reasoning and anomaly scoring, and output the final anomaly prediction results.