An unsupervised system sequence anomaly detection method, system, device and medium based on time-frequency domain fusion

By proposing an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, and utilizing standardized parameters and a one-dimensional convolutional residual model, this method addresses the overfitting problem of existing models for isolated spikes and high-frequency noise, improves the accuracy and stability of anomaly detection, and reduces the false alarm rate.

CN123138588APending Publication Date: 2026-11-20HAINAN POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611189241.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-06
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing system operation index sequence anomaly detection models are prone to overfitting to isolated spikes and local disturbances formed by high-frequency noise, which leads to a deviation in the representation of normal variation patterns and reduces the accuracy of online anomaly judgment.

Method used

An unsupervised system sequence anomaly detection method based on time-frequency domain fusion is adopted. By calculating standardized parameters, training window difference, time domain mapping, time index truncated Fourier mapping and phase index mapping based on window position, fusion features are generated. A one-dimensional convolutional residual model is used for reconstruction and prediction, forming reconstruction loss, prediction loss and second-order smoothing loss. The model is trained with three loss terms, and finally the detection residual is determined by dynamic two-sided threshold.

Benefits of technology

It reduces the interference of isolated spikes and high-frequency noise on normal operation patterns, improves the stability of characterization of the main periodic and continuous change states of system operation indicators, reduces false alarms caused by normal fluctuations, and enhances the ability to identify continuous anomalies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123138588A_ABST
    Figure CN123138588A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on time-frequency domain fusion's unsupervised system sequence anomaly detection method, system, equipment and medium, belong to system running state monitoring technical field, comprising: according to the training section of system running index sequence Calculation standardization parameter and form training difference window;Training difference window is respectively carried out time domain mapping, time index truncation fourier mapping and phase index mapping based on window position, mapping output is spliced into fusion feature;Reconstruction difference sequence and difference prediction value are generated using one-dimensional convolution residual model and model training is completed;Online residual error is formed, according to normal residual sequence Determine double-sided threshold and output abnormal identification.The application reduces the interference of isolated peak and high-frequency noise on normal law learning by fusing the time domain, period and window position characteristics of difference value, and improves the stability of system running index anomaly detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of system operation status monitoring technology, specifically to an unsupervised system sequence anomaly detection method, system, device, and medium based on time-frequency domain fusion. Background Technology

[0002] Servers, applications, network devices, and industrial equipment continuously generate indicator data reflecting their operational status during operation. This indicator data is arranged according to sampling time to form a system operation indicator sequence. Existing anomaly detection methods typically learn normal variation patterns from historical system operation indicator sequences and determine whether the operational status is abnormal based on the deviation between actual observed values ​​and predicted values.

[0003] The system's operational index sequences are often accompanied by isolated spikes and high-frequency noise. Existing models are prone to following local disturbances, weakening their representation of major periodic and continuous variation patterns, leading to false alarms or missed alarms. Furthermore, some models have complex structures and high computational costs, which are not conducive to continuous online detection. Summary of the Invention

[0004] In view of the above-mentioned problems, the present invention provides a method, system, device and medium for unsupervised system sequence anomaly detection based on time-frequency domain fusion.

[0005] Therefore, the technical problem solved by this invention is that existing system operation index sequence anomaly detection models are prone to overfitting to isolated spikes and local disturbances formed by high-frequency noise, which leads to a deviation in the representation of normal change patterns and reduces the accuracy of online anomaly judgment.

[0006] To address the aforementioned technical problems, this invention provides the following technical solution: a method for detecting sequence anomalies in an unsupervised system based on time-frequency domain fusion, comprising, Based on the training segment of the system operation index sequence, standardized parameters are calculated. A training window is extracted from the training segment, and the training window is standardized with the standardized parameters. Then, a first-order difference is made to form a training difference window. The training difference window is processed by time-domain mapping, time-index truncated Fourier mapping, and phase-index mapping based on window position, and the output is concatenated along the feature channel dimension to form a fused feature. The one-dimensional convolutional residual model generates reconstructed difference sequences and difference predictions based on fusion features, forming reconstruction loss, prediction loss and second-order smoothing loss. The three losses are used to train the temporal mapping and the one-dimensional convolutional residual model. The detection window is extracted from the sequence of online system operation indicators, and after standardizing the detection window with standardized parameters, a first-order difference is performed; after the aforementioned mapping and splicing, the difference prediction value is generated by a one-dimensional convolutional residual model. The differential predicted value is added to the standardized value at the end of the detection window and then inversely standardized to obtain the predicted value. The actual value minus the predicted value at the next moment of the detection window forms the detection residual. The detection residual is judged by the two-sided threshold formed by the normal residual sequence, and an anomaly label is output. The detection residual within the threshold is written into the normal residual sequence.

[0007] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, wherein: the time-indexed truncated Fourier mapping includes: Normalize the index of each time position in the training difference window, or the index of each time position in the first-order difference result of the detection window, to generate sine basis functions and cosine basis functions from the first order to the highest retained order; According to the values ​​of each order of sine basis function and cosine basis function at each time position, the difference values ​​at the same time position are weighted, and the sine weighted results and cosine weighted results of all time positions are summarized respectively. The summaries are normalized according to the number of time positions to form the sine Fourier coefficients and cosine Fourier coefficients of each window level. The time-indexed truncated Fourier map output is formed by weighting the values ​​of the same-order sine basis functions at each time position using the coefficients of the sine Fourier coefficients at each window level, and by weighting the values ​​of the same-order cosine basis functions at each time position using the coefficients of the cosine Fourier coefficients at each window level.

[0008] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, wherein: the phase index mapping based on window position includes: The index of each time position in the training difference window, or the index of each time position in the first-order difference result of the window to be detected, is normalized to form a normalized position index. Based on the normalized position index, generate sine position codes and cosine position codes of the first order to the preset phase order; The difference value at each time position is used to perform amplitude weighting on each order of sine and cosine position codes at the same time position, forming a phase index mapping output based on the window position.

[0009] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, wherein: the one-dimensional convolutional residual model generates reconstructed difference sequences and difference prediction values ​​based on fusion features, including: The one-dimensional convolutional residual network in the one-dimensional convolutional residual model uses one-dimensional convolutional projection to fuse features and form hidden features, which are then sequentially input into the concatenated residual blocks. Each residual block's main branch undergoes two one-dimensional convolutions, followed by batch normalization. Activation occurs between the two convolutions, and equal-length padding is used in both one-dimensional convolutions. When the number of channels in the residual block input is the same as the number of channels in the main branch output, the residual branch performs an identity mapping on the residual block input. When the number of channels in the residual block input is different from the number of channels in the main branch output, the residual branch uses one-dimensional convolution to project the channels onto the residual block input. The main branch output and the residual branch output are added sequentially at each time position and then activated to form the residual block output. The one-dimensional convolutional residual network uses the output of the last residual block to form a reconstructed difference sequence; the prediction head in the one-dimensional convolutional residual model reads the hidden features at the last time position in the output of the last residual block to form the difference prediction value.

[0010] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, the step of forming reconstruction loss, prediction loss, and second-order smoothing loss, and training the time-domain mapping and one-dimensional convolutional residual model with the three losses, includes: The reconstruction objective is to train the difference window, and the prediction objective is the first-order difference between the standardized value at the next moment after the training window and the standardized value at the end of the training window. The reconstruction loss is formed based on the difference between the reconstructed difference sequence and the reconstruction target; the prediction loss is formed based on the difference between the predicted difference value and the prediction target; and the second-order smoothing loss is formed based on the second-order difference of the reconstructed difference sequence. The learnable parameters of the temporal mapping, the learnable parameters of the one-dimensional convolutional residual network, and the learnable parameters of the prediction head are updated using reconstruction loss, prediction loss, and second-order smoothing loss.

[0011] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, wherein: the determination of the detection residual using a two-sided threshold formed by the normal residual sequence includes: A normal residual sequence is formed based on the normal residuals of the training segment or independent validation segment; Select a preset number of recent normal residuals from the normal residual sequence, determine the residual center based on the median of the recent normal residuals, and determine the residual discrete scale based on the median absolute deviation of the recent normal residuals relative to the residual center. The threshold offset is formed by multiplying the preset scaling coefficient by the residual discrete scale. The upper threshold is formed by adding the threshold offset to the residual center, and the lower threshold is formed by subtracting the threshold offset from the residual center. When the detection residual is greater than the upper threshold or less than the lower threshold, it is judged as abnormal; when the detection residual is greater than or equal to the lower threshold and less than or equal to the upper threshold, it is judged as normal, the detection residual is written into the normal residual sequence, and the bilateral thresholds at the next time step are determined based on the updated normal residual sequence.

[0012] As a preferred embodiment of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion described in this invention, wherein: when the number of continuously identified anomalies reaches a preset freeze count, a continuous anomaly state is entered, and the updating of normal residual sequences and bilateral thresholds is paused. During the continuous abnormal state, the detection residual is clipped to between the lower threshold and the upper threshold to form a shadow residual, which is written into the shadow window in chronological order. Based on the shadow residual in the shadow window, candidate two-sided thresholds are formed according to the determination method of the two-sided thresholds. During the continuous abnormal state, when the detection residual is judged to be normal, the number of consecutive normal times is accumulated; when the number of consecutive normal times reaches the preset recovery count, the bilateral thresholds are updated according to the candidate bilateral thresholds, the continuous abnormal state is exited, and the subsequent detection residuals judged to be normal are written into the normal residual sequence. The bilateral thresholds are determined according to the updated normal residual sequence.

[0013] This invention provides an unsupervised sequence anomaly detection system based on time-frequency domain fusion.

[0014] To solve the above technical problems, the present invention provides the following technical solution: an unsupervised system sequence anomaly detection system based on time-frequency domain fusion, comprising: a window processing module, used to calculate standardized parameters based on the training segment of the system operation index sequence, extract a training window from the training segment, standardize the training window with the standardized parameters, and then perform first-order difference to form a training difference window; The feature processing module is used to train the difference window through time-domain mapping, time-index truncated Fourier mapping and window position-based phase index mapping, and the output is spliced ​​along the feature channel dimension to form fused features; The model training module is used to generate reconstructed difference sequences and difference prediction values ​​based on the fusion features of the one-dimensional convolutional residual model, forming reconstruction loss, prediction loss and second-order smoothing loss. The three losses are used to train the temporal mapping and one-dimensional convolutional residual model. The online processing module is used to extract the window to be detected from the sequence of online system operation indicators, standardize the window to be detected with standardized parameters, and then perform first-order difference; after the aforementioned mapping and splicing, the difference prediction value is generated by a one-dimensional convolutional residual model. The anomaly detection module is used to add the differential predicted value to the standardized value at the end of the detection window and then inversely standardize it to obtain the predicted value. The actual value minus the predicted value at the next moment of the detection window forms the detection residual. The detection residual is judged by the two-sided threshold formed by the normal residual sequence, and an anomaly label is output. The detection residual within the threshold is written into the normal residual sequence.

[0015] The present invention provides a computer device, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion.

[0016] The present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion.

[0017] The beneficial effects of this invention are as follows: This application can reduce the interference of isolated spikes and high-frequency noise on the learning of normal operation patterns. While retaining true mutation information, it improves the stability of the representation of the main periodic and continuous change states of system operation indicators, thereby reducing false alarms caused by normal fluctuations and enhancing the ability to identify persistent anomalies. Simultaneously, the model computational cost of this application increases linearly with the window length, and the anomaly judgment benchmark is updated only by normal residuals, which helps reduce the online detection burden, avoids threshold contamination by abnormal residuals, and improves detection stability during long-term operation. Attached Figure Description

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

[0019] Figure 1 The above is a flowchart of an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, which is provided as an embodiment of the present invention.

[0020] Figure 2 This is a schematic diagram illustrating the formation of fusion features in an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, provided as an embodiment of the present invention.

[0021] Figure 3 This is a schematic diagram of a one-dimensional convolutional residual model structure for an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, provided as an embodiment of the present invention.

[0022] Figure 4 This is a schematic diagram of the system deployment architecture of an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, provided as an embodiment of the present invention.

[0023] Figure 5 The flowchart below illustrates a dynamic two-sided threshold determination process for an unsupervised system sequence anomaly detection method based on time-frequency domain fusion, as provided in one embodiment of the present invention.

[0024] Figure 6 This is a schematic diagram illustrating the truncated Fourier mapping processing effect of an unsupervised system sequence anomaly detection method based on time-frequency domain fusion provided in an embodiment of the present invention.

[0025] Figure 7 This is a schematic diagram of the Fourier highest-order-retention sensitivity test results of an unsupervised system sequence anomaly detection method based on time-frequency domain fusion provided in an embodiment of the present invention. Detailed Implementation

[0026] To make the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.

[0027] Example 1, referring to Figures 1-7 This is one embodiment of the present invention, which provides a method for detecting sequence anomalies in an unsupervised system based on time-frequency domain fusion, comprising: The system operation indicator sequence processed in this embodiment is a continuous sequence of observations collected in chronological order to reflect the operating status of servers, applications, network devices, or industrial equipment. In some embodiments, the system operation indicators are key performance indicators (KPIs), such as CPU utilization, response time, and throughput. The processing procedure is illustrated below using a single system operation indicator channel as an example. When the input contains D system operation indicator channels, each channel adopts the same standardization and first-order difference processing method, and performs time-domain mapping, time-index truncated Fourier mapping, and window-position-based phase index mapping respectively. Then, the mapping outputs formed by each channel are concatenated along the feature channel dimension. The original observation value of the d-th system operation indicator channel at sampling time t is represented as... t represents the sampling time, d represents the system operation index channel number, and D represents the total number of system operation index channels.

[0028] This application employs an unsupervised training method. During model training, no manual anomaly category labels are used. Instead, self-supervised training samples are constructed using historical training windows and the real observations at the next moment after the training window. The difference values ​​within the training window are used to form the reconstructed target, and the real observations at the next moment after the training window are used to form the difference prediction target for the next moment.

[0029] like Figure 1As shown, this embodiment sequentially performs differential preprocessing, temporal mapping, time-index truncated Fourier mapping, window-position-based phase index mapping, fusion feature formation, one-dimensional convolutional residual model training, online differential prediction, inverse differential, inverse standardization, and dynamic two-sided threshold determination. Figure 1 The time-frequency domain feature extraction and feature fusion process in this embodiment corresponds to the three-item mapping and feature splicing process in this embodiment; Figure 1 The system-level reduction and reconstruction process in the model corresponds to the process by which a one-dimensional convolutional residual model forms a reconstructed difference sequence and difference prediction value based on the fusion features.

[0030] Furthermore, such as Figure 4 As shown, this embodiment can be deployed in an operational architecture that includes a data acquisition layer, a data processing and computation layer, and an application and presentation layer. The data acquisition layer's acquisition agent reads system operation indicator sequences from servers, terminals, devices, or applications. The data processing and computation layer allocates data processing tasks to computation nodes through task scheduling and management nodes. The computation nodes perform time-domain mapping, time-index truncated Fourier mapping, window-position-based phase index mapping, fusion feature formation, one-dimensional convolution reconstruction, difference prediction, and dynamic two-sided threshold determination. Model parameters and operational configurations are saved through model storage and configuration management. The application and presentation layer receives anomaly determination results and outputs the processing results through dynamic threshold configuration, anomaly alarm console, visualization dashboard, report and log management, or external system interfaces. Therefore, the model input directly originates from the continuous operational indicators of the monitored object, and the predicted values, detection residuals, and anomaly identifiers generated by the model can be used for system operation status monitoring and fault early warning.

[0031] like Figure 1 As shown, this embodiment includes steps S1 to S5, wherein: S1, calculate standardized parameters based on the training segment of the system operation index sequence, extract the training window from the training segment, standardize the training window with the standardized parameters, and then perform first-order difference to form the training difference window; It is understandable that a training segment is a data segment pre-divided according to time sequence within the system's operational indicator sequence, used to calculate standardized parameters and train the model. Standardized parameters are used to unify the dimensions and numerical scales of different system operational indicator channels. A training window is a fixed-length data segment continuously extracted from the training segment according to time sequence. A training difference window is a data window formed by performing a first-order difference on the standardized training window.

[0032] In the embodiments of this application, the data acquisition agent reads the system operation index sequence from the server, terminal, device, or application according to a preset sampling period, and aligns the timestamps in the system operation index sequence to a uniform sampling grid. The uniform sampling grid is a continuous sampling time position formed according to a preset sampling period, used to ensure that adjacent observations entering the same training window have a defined sampling time interval.

[0033] Furthermore, when a time position in the uniform sampling raster lacks a true observation, forward imputation or linear interpolation is used for short-term missing values. Forward imputation uses the nearest valid observation before the missing time position to fill the corresponding missing position; linear interpolation uses valid observations before and after the missing time position to form an interpolation result according to the time distance between the corresponding valid observation and the missing time position.

[0034] Furthermore, candidate training windows are extracted from the training segment according to the window length and sliding step size, and the missing percentage of each candidate training window is calculated. The missing percentage is the proportion of the number of sampling points formed by forward padding or linear interpolation in the candidate training window to the total number of time positions contained in the candidate training window. When the missing percentage of a candidate training window is greater than 20%, the corresponding candidate training window is discarded and will not be used as a training window for subsequent model training.

[0035] It should be noted that 20% is the window quality control threshold used in this implementation, meaning that at least 80% of the sampling points in a training window of length L are derived from real observations. Forward padding or linear interpolation reduces local variance and alters the autocorrelation function and spectral energy of the system's performance index sequence. When the number of sampling points formed by forward padding or linear interpolation in a candidate training window exceeds 1 / 5 of the total number of time positions in the window, the subsequently formed Fourier coefficients, convolutional features, and prediction targets may reflect the missing value handling rules more accurately than the actual operating state of the monitored object, leading to biases such as underestimated variance, smoothed periodic components, and compressed abnormal residuals.

[0036] In other implementations, the window quality control threshold is a configurable data quality parameter that can be determined within the range of 10% to 30% based on sampling stability through missing data injection verification. Missing data injection verification is used to compare the impact of different missing percentages on subsequent feature formation and model detection results.

[0037] Furthermore, when the number of consecutive missing time positions within a candidate training window is greater than... Even if the total missing percentage of candidate training windows is less than or equal to 20%, it is preferable to discard the corresponding candidate training windows to avoid interpolation across consecutive missing intervals. Here, L represents the total number of time positions contained in a candidate training window. This represents 10% of the total number of candidate training window time locations, and is not a fixed number of sampling points set independently of the window length.

[0038] After completing the sampling alignment and missing value handling of the system operation index sequence, the mean and standard deviation of the training segment are calculated for each system operation index channel based on the training segment. The mean of the training segment for the d-th system operation index channel is expressed as: The standard deviation of the training segment is expressed as Together, these two constitute the standardized parameters of the d-th system operation indicator channel.

[0039] Furthermore, a sliding window of length L and sliding step size s is used to extract the i-th training window from the training segment, and each observation in the i-th training window is standardized according to the standardization parameters. The original observations of the d-th system performance index channel at sampling time t are then presented. The corresponding standardized value is: in, This represents the standardized value of the d-th system performance indicator channel at sampling time t. This represents a stability constant used to prevent the denominator from being zero. In this embodiment, Pick .

[0040] It should be noted that the standardized parameters are calculated only based on the training segments. The detection windows formed during the validation, testing, and online detection periods all use the same set of training segment mean and standard deviation calculated from the training segments. The standardized parameters are not recalculated based on the validation, testing, or online observations to avoid incorporating future observation information into the model training process.

[0041] After standardization, the i-th training window is represented as: Where i represents the starting time position of the training window, L represents the number of time positions contained in each training window, s represents the interval between the starting time positions of two adjacent training windows, and D represents the number of system operation indicator channels.

[0042] For example, in this embodiment, the sliding window length L is 128, the training step size s is 1, and the prediction step size is 1. The sliding window length L is used to limit the range of continuous historical observations received by the model at one time; the training step size s is used to limit the time position interval between the starting points of adjacent training windows; the prediction step size of 1 indicates that the model predicts the next moment immediately following the current training window based on the current training window. For system operating indicators with different sampling periods, the sliding window length can cover at least one major period of the corresponding system operating indicator.

[0043] Furthermore, the i-th training window covers to The standardized value at the time following the training window is Perform first-order differencing on the standardized values ​​at adjacent time points within the training window. The difference value of the d-th system performance indicator channel in the i-th training window at the t-th time position is: in, This represents the difference value of the d-th system performance indicator channel in the i-th training window at the t-th time position.

[0044] Substituting the standardization relation into the first-order difference relation, the difference value can also be expressed as: Therefore, the mean of the training segment The standard deviation of the training segment is canceled out in the first difference between adjacent standardized values. It will continue to be used to standardize the scale of changes in different system operation indicator channels.

[0045] For continuous streaming data, the difference value of the i-th training window at the first time position is calculated using the nearest true standardized observation before the start of the training window: in, It is the sampling point immediately preceding the starting point of the current training window, not the sampling point at the end of any overlapping window.

[0046] Optionally, when processing the first training window of the entire dataset, or when processing independent data slices without preceding observations, let Furthermore, when calculating the reconstruction loss of the current training window, the reconstruction error corresponding to the first time position is masked, so that the boundary zero padding does not participate in the model parameter update.

[0047] Depend on to A training difference window of length L is formed. It should be noted that the training difference window has the same number of time positions as the training window, and does not form a data tensor of length L-1 due to the first-order difference.

[0048] Furthermore, the differential prediction target at the next time step after the training window is: in, This represents the standardized value at the next moment after the training window. This represents the standardized value at the end of the training window. During the training phase, the standardized value at the end of the training window, together with the standardized value at the next time step after the training window, are used to form the differential prediction target. During the online detection phase, the window cache stores the standardized value at the end of the current window to be detected, and adds the standardized value at the end of the window to be detected to the differential prediction value generated by the one-dimensional convolutional residual model to form the standardized prediction value at the next time step after the detection window.

[0049] It should be noted that standardization and first-order differencing are used to address different problems. Standardization is used to eliminate the differences in dimensions and numerical scales between different system performance indicators such as CPU utilization, response time, and throughput, so that each indicator has comparable gradient and residual scales after entering the shared model. First-order differencing is used to weaken the horizontal terms and slow trends of individual system performance indicators over time, while preserving abrupt changes and periodic fluctuations between adjacent time points.

[0050] Furthermore, first-order differencing does not remove abrupt changes but instead converts the horizontal changes in the original observations into magnitudes of change. Isolated spikes retained after differencing are suppressed in subsequent time-indexed truncated Fourier maps because harmonics with orders greater than the highest retained order are not generated. This suppression is further mitigated by finite kernel sharing aggregation in the one-dimensional convolutional residual model and second-order smoothing loss, reducing the tracking of single-point oscillations. Simultaneously, the time-domain mapping continues to preserve the sign and amplitude of abrupt changes, preventing the true fault origin from being directly deleted during feature processing. Isolated noise forms local high-frequency energy, while persistent faults generate continuous detection residuals, horizontal shifts, or mid-to-low-frequency structural changes. These are ultimately distinguished by the differencing prediction results and dynamic two-sided thresholds.

[0051] In step S1, the numerical scale of different system operation index channels is uniformly determined according to the training segment, and the number of time positions of the training window, training difference window and subsequent reconstructed difference sequence are kept the same, so as to provide input with a defined data range and index relationship for the subsequent three mappings and loss calculations.

[0052] S2, the training difference window is processed by time-domain mapping, time-index truncated Fourier mapping and phase-index mapping based on window position, and the output is spliced ​​along the feature channel dimension to form fused features; It is understandable that the three mappings in step S2 all use the same training difference window as the processing object. The time-domain mapping directly retains the amplitude, positive and negative directions, and local change information of each difference value; the time-indexed truncated Fourier mapping forms window-level sine Fourier coefficients and window-level cosine Fourier coefficients based on the difference values ​​of all time positions within the window, and uses the corresponding Fourier coefficients to form the mapping output of each time position; the phase-indexed mapping based on the window position combines each difference value with the sine and cosine position codes of the same time position. The outputs of the three mappings have the same number of time positions and can be concatenated along the feature channel dimension to form a fused feature.

[0053] In the embodiments of this application, such as Figure 2 As shown, the training difference window undergoes temporal mapping, time-index truncated Fourier mapping, and phase-index mapping based on window position to form three mapping outputs. These three outputs are aligned according to the same time position and concatenated along the feature channel dimension to form the fused feature. During online detection, the first-order difference results of the window to be detected use the same mapping parameters, mapping order, and channel concatenation order to form the fused feature to be detected.

[0054] For the difference value of the d-th system performance indicator channel in the i-th training difference window at the t-th time position. Set up a learnable time-domain affine mapping: in, Represents time-domain mapping, For inclusion A learnable weight vector for each weight component. For inclusion The learnable bias vectors for each bias component are mapped in the time domain for each difference value. Each time-domain mapping feature. In this embodiment, We set the value to 4. The learnable weight vector and learnable bias vector are updated together with the learnable parameters of the one-dimensional convolutional residual model through backpropagation.

[0055] It's important to note that time-domain mapping doesn't involve periodic basis function expansion; instead, it provides a direct information path for the difference values, preserving their amplitude and direction. Time-indexed truncated Fourier mapping emphasizes the global periodicity and smoothness of the training window, while phase-indexed mapping based on window position emphasizes the coupling between the difference amplitude and the window position. Relying solely on the latter two might weaken sudden but persistent step initiation points. Therefore, time-domain mapping serves as a complementary information source between suppressing local high-frequency disturbances and preserving true variations.

[0056] In some embodiments, the time-index truncated Fourier mapping in steps S2 and S4 includes steps S21 to S23, wherein: S21, normalize the index of each time position in the training difference window, or the index of each time position in the first-order difference result of the detection window, to generate sine basis functions and cosine basis functions from the first order to the highest retained order; In the embodiments of this application, the training difference window is first described as the processing object. The first-order difference result of the window to be detected adopts the same time position index normalization method and basis function generation method. For the t-th time position within the training difference window, the time position index is normalized according to the window length L. ,in, .

[0057] Furthermore, based on the normalized time position index, cosine and sine basis functions from the first to the highest retained order K are generated. The values ​​of the k-th order cosine and sine basis functions at time position t are as follows: as well as: Where k represents the order of the basis functions, K represents the highest retained order. The time-indexed truncated Fourier map does not generate sine and cosine basis function channels with orders greater than K, thus limiting the highest time frequency represented by the time-indexed truncated Fourier map by the number of basis function channels. The highest retained order K does not restrict the information formed by the time-domain mapping and the window-position-based phase-index mapping, nor does it imply that the one-dimensional convolutional residual model can only receive all input features no greater than the corresponding frequency.

[0058] For example, in this embodiment, the highest retention order K is 8. In other embodiments, the highest retention order K can be selected from candidate values ​​such as 4, 8, and 16 based on the sampling frequency, the lowest period to be retained, the power spectral energy of the normal training segment, and the false alarm rate of the validation set.

[0059] Specifically, let the sampling frequency of the system operation index sequence be... The sampling interval is Then the frequency corresponding to the kth harmonic is The period corresponding to the kth harmonic is The highest retention order K corresponds to the highest retention frequency. The corresponding minimum retention period is .

[0060] Furthermore, when the desired retention period is not shorter than When considering components, the highest retention order K can be set to no greater than [value missing]. At the same time, not greater than .in, represents the lower limit of the period to be retained, and represents rounding down. When the highest retention order K decreases, the highest frequency that the time-indexed truncated Fourier map can represent decreases, and the reconstruction result tends to be smoother, but normal fast periods in the system operation indicators may be lost; when the highest retention order K increases, the time-indexed truncated Fourier map can retain shorter periods and finer local variations, but the degree of freedom in representing high-frequency noise increases accordingly.

[0061] S22, according to the values ​​of each order of sine basis function and cosine basis function at each time position, the difference values ​​at the same time position are weighted, and the sine weighted results and cosine weighted results of all time positions are summarized respectively. The summaries are normalized according to the number of time positions to form the sine Fourier coefficients and cosine Fourier coefficients of each window level. In the embodiments of this application, for the i-th training difference window and the d-th system operation index channel, the difference values ​​of all L time positions are weighted and summarized according to the k-th order cosine basis function to form the k-th order window-level cosine Fourier coefficients: Furthermore, the differences at all L time positions are weighted and summed according to the k-th order sine basis function to form the k-th order window-level sine Fourier coefficients: in, The coefficients of the k-th window-level cosine Fourier transforms of the d-th system performance index channel within the i-th training difference window are: This represents the corresponding k-th window-level sine Fourier coefficients. This is used to normalize the summary results according to the number of time positions of the training difference window.

[0062] It should be noted that the Fourier coefficients at each window level are determined collectively by all time positions within the training difference window, and not independently by any single time position. The time-indexed sine and cosine basis functions provide global support across the entire training window. Basis functions of different orders represent different time frequencies, allowing the main periodic components within the window to be represented according to their order.

[0063] S23 uses the weighted values ​​of the same-order sine basis function at each time position by the sine Fourier coefficients of each window level, and the weighted values ​​of the same-order cosine basis function at each time position by the cosine Fourier coefficients of each window level, to form a time-indexed truncated Fourier map output.

[0064] In the embodiments of this application, for the i-th training difference window, the d-th system operation index channel, and the t-th time position, the k-th window-level sine Fourier coefficients and the k-th window-level cosine Fourier coefficients are used respectively to weight the values ​​of the corresponding sine basis functions and cosine basis functions at the t-th time position, forming a time-indexed truncated Fourier mapping output: in, Let represent the time-index truncated Fourier map output of the d-th system performance indicator channel in the i-th training difference window at time t. Each order forms a cosine channel and a sine channel, thus the time-index truncated Fourier map generates 2K output channels for each system performance indicator channel.

[0065] It should be noted that the time-indexed sine and cosine basis functions provide global support across the entire training window. Isolated spikes within the window require simultaneous changes to multiple window-level Fourier coefficients to influence the mapping output at different time points. Furthermore, for an isolated spike with a single amplitude of A within the training difference window, the window-level Fourier coefficients are summed from L time points, and the contribution of the isolated spike to any normalized Fourier coefficient is approximately [missing information]. This contribution magnitude is used to illustrate the relative impact of a single time point on the window-level global coefficients, and does not imply that the Fourier coefficients in different training difference windows are all fixed values.

[0066] Furthermore, the sine and cosine basis functions from the first to the highest retained order K correspond to different time frequencies, and the orthogonality between the basis functions reduces the coupling between coefficients at different frequencies. The finite highest retained order K excludes higher harmonics with orders greater than K, limiting the high-frequency degrees of freedom required for reconstructing narrow pulses using the time-indexed truncated Fourier map. This processing reduces the degree to which the time-indexed truncated Fourier map follows isolated spikes, rather than directly removing isolated spikes or true abrupt changes from the training difference window. True abrupt changes are still identified by the time-domain mapping, difference prediction results, and subsequent dynamic two-sided thresholding.

[0067] Alternatively, in other implementations, the amplitude domain sine and cosine expansions can be used as a univariate nonlinear mapping. Specifically, the difference values ​​are clipped to an interval. This forms the amplitude normalization quantity. Then, the amplitude domain sine and cosine mappings are generated and output according to the following formula: Where B represents the differential amplitude clipping boundary, and u represents the normalized result of the clipped differential value relative to the differential amplitude clipping boundary. In this embodiment, B can be 3. It should be noted that the amplitude domain sine and cosine mappings are different from the time-indexed truncated Fourier mappings in steps S21 to S23, and are not used in combination with the time-indexed truncated Fourier mapping process used in this embodiment.

[0068] In some embodiments, the phase index mapping based on window position in steps S2 and S4 includes steps S24 to S26, wherein: S24, normalize the index of each time position in the training difference window, or the index of each time position in the first-order difference result of the window to be detected, to form a normalized position index. In the embodiments of this application, taking the training difference window as an example, the index of the t-th time position in the training difference window is normalized as follows: in, This represents the normalized position index of the t-th time position. .

[0069] It should be noted that when t is 0, the normalized position index is 0; when t is L-1, the normalized position index is 1, thus making the start and end positions of the training window correspond to the two endpoints of the normalized position interval, respectively. The first-order difference result of the window to be detected uses the same normalized position index calculation method.

[0070] S25, Generate sine and cosine position codes of the first to preset phase orders based on the normalized position index; In embodiments of this application, based on normalized position index Generate phase orders from the first to the preset number. The cosine and sine position codes are given. The k-th order cosine and sine position codes are respectively: as well as: Where k represents the positional coding order, , Indicates the preset phase order.

[0071] For example, in this embodiment, a preset phase order is used. Choose 4. The preset phase order is used to determine the positional coding scale included in the phase index mapping based on the window position, and is selected through the validation set along with the window length L, the highest retained order K, the number of hidden channels C, and the number of residual blocks M.

[0072] S26, the difference value of each time position is used to perform amplitude weighting on each order of sine position code and cosine position code at the same time position to form a phase index mapping output based on window position.

[0073] In the embodiments of this application, for the i-th training difference window, the d-th system performance indicator channel, and the t-th time position, the difference value at the same time position is used. The cosine and sine position codes of each order are weighted by amplitude to form a phase index mapping output based on the window position: in, This represents the window-position-based phase index mapping output for the d-th system performance index channel within the i-th training difference window at time t. Each order forms a cosine position channel and a sine position channel, thus the window-position-based phase index mapping forms for each system performance index channel. One output channel.

[0074] It's important to note that the window-position-based phase index mapping does not calculate window-level Fourier coefficients. Instead, it multiplies the current difference value at each time position with the sine and cosine position codes for the same time position. This multiplication represents the difference in the same amplitude difference value occurring at different positions within the training window. The time-indexed truncated Fourier mapping first summarizes the entire training difference window, forming window-level sine and cosine Fourier coefficients to represent the global energy and smoothing components of the main period. The window-position-based phase index mapping then supplements this with the positional relationships of each difference value within the window. Using only the time-indexed truncated Fourier mapping may preserve the main period but introduce time alignment bias; using only the window-position-based phase index mapping lacks a stable summary of the overall spectral energy of the training window.

[0075] Furthermore, the time-domain mapping features Time-indexed truncated Fourier map output and window position-based phase index mapping output By splicing along the feature channel dimension, a fused feature is formed: Fusion features The shape of the tensor is ,in, L represents the training batch size, and L represents the number of time positions in the training difference window. This represents the number of fused feature channels, and satisfies: Where D represents the number of system operation indicator channels, This represents the number of time-domain mapping features for each system performance indicator channel, and 2K represents the number of time-index truncated Fourier map output channels for each system performance indicator channel. This represents the number of phase index mapping output channels based on window position for each system operation indicator channel.

[0076] In step S2, the direct amplitude information, global periodic information, and window position phase information of the same training difference window are converted into feature tensors of the same time length. The three mapping outputs remain aligned in time position and enter the subsequent one-dimensional convolutional residual model along the feature channel dimension, enabling the model to simultaneously utilize the amplitude of the difference values, the window-level periodic structure, and the positional relationship within the window.

[0077] S3, the one-dimensional convolutional residual model generates reconstructed difference sequences and difference prediction values ​​based on the fusion features, forming reconstruction loss, prediction loss and second-order smoothing loss, and trains the temporal mapping and one-dimensional convolutional residual model with the three losses; Understandably, a one-dimensional convolutional residual model consists of a one-dimensional convolutional residual network and a prediction head. The one-dimensional convolutional residual network performs shared convolution operations along the time axis of the fused features, forming hidden features and a reconstructed difference sequence that correspond to the input time position; the prediction head reads the hidden features at the last time position of the one-dimensional convolutional residual network to form the difference prediction value at the next time step after the training window.

[0078] The reconstructed difference sequence represents the model's reconstruction result of the difference values ​​at each time point within the training difference window, while the predicted difference value represents the model's prediction result of the difference value at the next time point after the training window. The reconstruction loss constrains the difference between the reconstructed difference sequence and the training difference window, the prediction loss constrains the difference between the predicted difference value and the predicted difference value at the next time point after the training window, and the second-order smoothing loss limits the rapid oscillations in the reconstructed difference sequence between adjacent time points due to a lack of data support.

[0079] In the embodiments of this application, such as Figure 3 As shown, the one-dimensional convolutional residual model first projects the fused features into hidden features, and then sequentially inputs the hidden features into concatenated residual blocks. Each residual block includes a main branch and a residual branch. The main branch performs two one-dimensional convolutions and batch normalization processes sequentially, while the residual branch performs identity mapping or channel projection based on the number of input channels. The outputs of the two branches are added together at each time position to form the residual block output. Figure 3 The coefficient reduction structure in the model corresponds to the structure of a one-dimensional convolutional residual network that performs channel projection, shared convolution aggregation, and residual propagation on the fused features.

[0080] In some embodiments, step S3, the one-dimensional convolutional residual model generates a reconstructed difference sequence and a difference prediction value based on the fusion features, including steps S31 to S33, wherein: S31, the one-dimensional convolutional residual network in the one-dimensional convolutional residual model uses one-dimensional convolutional projection to fuse features and form hidden features, and then inputs the hidden features into the concatenated residual blocks in sequence. In the embodiments of this application, a one-dimensional convolution with a kernel width of 1 is used to fuse features. from The feature channels are projected onto C hidden channels. A one-dimensional convolution with a kernel width of 1 linearly combines the feature channels at each time point without changing the number of time points of the fused features.

[0081] Furthermore, the projected hidden features are sequentially input into M concatenated residual blocks. In this embodiment, the number of hidden channels C is 32, and the number of residual blocks M is 2. The one-dimensional convolutional residual network does not have pooling layers, so that the input fused features, the output of each residual block, and the reconstructed difference sequence all maintain L time positions, avoiding time position misalignment between the training difference window and the reconstructed difference sequence due to time dimension downsampling.

[0082] S32, the main branch of each residual block undergoes two one-dimensional convolutions, followed by batch normalization after each convolution, and activation between the two convolutions. Both one-dimensional convolutions use equal-length padding. When the number of channels in the residual block input is the same as the number of channels in the main branch output, the residual branch performs an identity mapping on the residual block input. When the number of channels in the residual block input is different from the number of channels in the main branch output, the residual branch uses one-dimensional convolution to project the channels into the residual block input. The main branch output and the residual branch output are added sequentially at each time position and then activated to form the residual block output. In the embodiments of this application, let the input of the m-th residual block be... ,in, The first one-dimensional convolution output of the m-th residual block is formed after batch normalization as follows: Here, Conv1D represents one-dimensional convolution. This represents the first one-dimensional convolution in the m-th residual block. This represents the batch normalization (BN) processing corresponding to the first one-dimensional convolution.

[0083] Furthermore, regarding The Rectified Linear Unit (ReLU) activation function is applied, the activation result is input into the second one-dimensional convolution, and batch normalization is performed on the output of the second one-dimensional convolution to form: in, This represents the second one-dimensional convolution in the m-th residual block. This represents the batch normalization process corresponding to the second one-dimensional convolution.

[0084] Furthermore, both main branch convolutions have a kernel width of 3 and a stride of 1, and employ equal-length padding. Equal-length padding involves adding data positions at both ends of the convolution input sequence that match the kernel width, ensuring that the number of time positions in the one-dimensional convolution output is the same as the number of time positions in the one-dimensional convolution input.

[0085] When the m-th residual block is input Number of channels and main branch output When the number of channels is the same, the residual branch The residual block input is subjected to identity mapping; when the number of channels in the residual block input is different from the number of channels in the main branch output, the residual branch uses a one-dimensional convolution with a kernel width of 1 to project the channels of the residual block input, so that the number of channels in the residual branch output is the same as the number of channels in the main branch output.

[0086] Furthermore, the main branch output and the residual branch output are added item by item at the same batch position, the same feature channel, and the same time position, and ReLU activation is performed to form the m-th residual block output: It's important to note that during the training phase, the batch normalization layer calculates the mean and variance of intermediate features for each training batch and accumulates the running mean and variance using an exponentially moving average. The running mean, running variance, and learnable scaling and translation parameters generated by the batch normalization layer are saved along with the model parameters. During online detection, the one-dimensional convolutional residual model switches to inference mode, and the batch normalization layer only uses the running mean and running variance saved during training. It does not re-estimate the batch mean or batch variance based on the current detection window, nor does it update the batch normalization parameters. Therefore, even if only one detection window is input each time during online detection, the batch normalization output remains a fixed value.

[0087] S33, the one-dimensional convolutional residual network uses the output of the last residual block to form a reconstructed difference sequence; the prediction head in the one-dimensional convolutional residual model reads the hidden features of the last time position in the output of the last residual block to form the difference prediction value.

[0088] In the embodiments of this application, the last residual block output The data is projected through a one-dimensional convolution with a kernel width of 1 to form D output channels, resulting in a reconstructed difference sequence consisting of time positions from 0 to L-1. The number of output channels D of the reconstructed difference sequence is the same as the number of channels of the system performance index, and the number of time positions L is the same as the number of time positions of the training difference window.

[0089] Furthermore, the prediction head reads the hidden features at the last time position in the output of the last residual block. And the differential prediction value at the next time step after the training window is formed through a linear layer. When the input contains D system operation index channels, the hidden features at the last time position contain C hidden channels. The linear layer in the prediction head projects the C-dimensional hidden features into a D-dimensional difference prediction result. The D output components correspond to the difference prediction values ​​of the D system operation index channels at the time after the training window. When the input contains only one system operation index channel, the linear layer forms a difference prediction value.

[0090] It should be noted that L-1 is the last valid time position in the output of the last residual block. The difference prediction target corresponding to the next time step after the training window There is no mistaking the end time position of the training window as the prediction target or reading a position that exceeds the time range of the hidden features.

[0091] In some embodiments, step S3 forms a reconstruction loss, a prediction loss, and a second-order smoothing loss, and trains the temporal mapping and one-dimensional convolutional residual model with these three losses, including steps S34 to S36, wherein: S34, the reconstruction target is the training difference window, and the prediction target is the first-order difference between the standardized value at the next moment after the training window and the standardized value at the end of the training window; In the embodiments of this application, the reconstruction target includes the training difference window. to This is used to constrain the reconstruction results of the one-dimensional convolutional residual network for the difference values ​​at each time point within the training window. When there are no true standardized observations immediately preceding the starting point in the training window, and the difference value at the first time point is set to 0, the reconstruction error corresponding to the first time point of the current training window is masked in the reconstruction loss.

[0092] Furthermore, the prediction target is the standardized value one time after the training window. Standardized value at the end of the training window The first difference is: The predicted target and the standardized value at the next time step after the training window correspond to the same sampling time. The differential predicted value output by the prediction head is used to approximate the predicted target.

[0093] S35, Reconstruction loss is formed based on the difference between the reconstructed difference sequence and the reconstruction target, prediction loss is formed based on the difference between the difference prediction value and the prediction target, and second-order smoothing loss is formed based on the second difference of the reconstructed difference sequence. For ease of explanation, the following loss relationship is represented using a training window and a system performance indicator channel as an example. When the input contains multiple system performance indicator channels, or a training batch contains multiple training windows, the prediction loss, reconstruction loss, and second-order smoothing loss are calculated for each system performance indicator channel and each training window, and the average of the calculation results for the channel dimension and the batch dimension is taken.

[0094] The reconstruction loss is calculated based on the absolute difference between the reconstructed difference sequence and the training difference window: When the first difference value of the training difference window is set to 0 because there are no preceding observations, the reconstruction loss does not include the absolute difference corresponding to the first time position, and is averaged according to the number of time positions actually involved in the calculation.

[0095] Furthermore, based on the difference between the predicted value and the target value, Huber Loss is used to form the prediction loss: Furthermore, a second-order smoothing loss is formed based on the second-order differences between adjacent time positions in the reconstructed difference sequence: It should be noted that the second-order smoothing loss applies to the reconstructed difference sequence generated by the model, but not to the original training difference window. The first-order difference in step S1 is used to weaken the level term and slow trend of the original system performance index and to explicitly represent the change in adjacent observations; the second-order smoothing loss is used to limit the rapid oscillation of the model reconstruction results at adjacent time positions. The two have different processing objects and application positions.

[0096] S36 updates the learnable parameters of the temporal mapping, the learnable parameters of the one-dimensional convolutional residual network, and the learnable parameters of the prediction head using reconstruction loss, prediction loss, and second-order smoothing loss.

[0097] In the embodiments of this application, a L2 constraint term for the network weights is added to the weighted sum of the prediction loss, reconstruction loss, and second-order smoothing loss to form the overall training objective for parameter updates: in, This represents the temporal mapping, the one-dimensional convolutional residual network, and the learnable weights in the prediction head. Indicates the weight of the predicted loss. Indicates the reconstruction loss weights. Indicates the weights of the second-order smoothing loss. This represents the L2 norm constraint coefficient of the network weights.

[0098] It should be noted that the network weight L2 constraint term is a parameter constraint term added to the reconstruction loss, prediction loss, and second-order smoothing loss, and does not change the correspondence between the three losses during model training.

[0099] Exemplary, in this embodiment, , , , The prediction loss weights are used to determine the next time step difference prediction as the primary training objective; the reconstruction loss weights are used to preserve the difference change information within the training window; the second-order smoothing loss weights are used to apply a weak smoothing constraint to the reconstructed difference sequence; and the network weight L2 constraint coefficients are used to limit the learnable weights from becoming too large. The prediction loss and reconstruction loss further constrain the model output to follow the true difference changes; therefore, the small-weighted second-order smoothing loss will not cause the reconstructed difference sequence to deviate from the training difference window.

[0100] In other implementations, each loss can be divided by the moving mean of the corresponding loss in the early stage of training, and then the weights of each loss can be adjusted on the validation set so that the auxiliary gradients corresponding to the reconstruction loss and the second-order smoothing loss are not greater than the principal gradients corresponding to the prediction loss.

[0101] Furthermore, backpropagation is performed using the overall training objective to update the learnable weights and learnable biases of the temporal mapping, the convolutional weights and batch-normalized learnable parameters in the one-dimensional convolutional residual network, and the learnable parameters of the prediction head. This implementation employs an Adaptive Moment Estimation (Adam) optimizer, with an initial learning rate of [value missing]. The training batch size is set to 64, and the maximum training time is 100 rounds. Training is stopped early when the validation loss does not decrease for 10 consecutive rounds, and the model parameters at the lowest validation loss are saved.

[0102] Furthermore, the training, validation, and testing data are divided into 70%, 15%, and 15% chronologically. The first 70% of the data in the system performance indicator sequence is used for training, the next 15% for validation, and the last 15% for testing. Standardized parameters are calculated only based on the training segment to prevent future information from entering the training process. For system performance indicators with different sampling periods, the window length L, the maximum retention order K, and the preset phase order can be selected through the validation set. The number of hidden channels, C, and the number of residual blocks, M.

[0103] It should be noted that the one-dimensional convolutional residual network shares convolutional weights along the time axis. The kernel width is q, and the number of input channels is... The number of output channels is The one-dimensional convolution has the following main weight parameter number: The main weight parameter is independent of the window length L.

[0104] Furthermore, assuming that the number of input and output channels in each residual block is C, the kernel width of the two main branch convolutions is q, and neglecting the bias term, batch normalization parameter, and residual branch projection parameter, the number of main convolution parameters for M double convolution residual blocks is: Under the same conditions, when only the multiply-accumulate operation of the convolution of the two main branches is counted, the amount of multiply-accumulate required to perform one forward computation on an input of length L is: It increases linearly with the window length L.

[0105] The one-dimensional convolutional residual network in this application does not have pooling layers, nor does it generate data containing... A pairwise relation matrix of the temporal positions of each element is required for a time series model employing global self-attention. The computational cost and runtime intermediate storage of the attention score matrix increase quadratically with the window length L; when dense fully connected mapping is used directly in the time dimension, the time dimension weight parameters may also increase quadratically with the window length L. In contrast, this application avoids including time dimension weight terms that increase quadratically with the window length by sharing convolution weights along the time axis.

[0106] Through step S3, the one-dimensional convolutional residual model maintains the correspondence between the time positions of the training difference window while performing channel reduction and shared convolution aggregation on the fused features to form the reconstructed difference sequence within the window and the difference prediction value at the next time step after the window. The prediction loss, reconstruction loss and second-order smoothing loss are used to train the temporal mapping and the one-dimensional convolutional residual model.

[0107] S4. Extract the window to be detected from the online system operation index sequence, standardize the window to be detected with standardized parameters, and then perform first-order difference; after the aforementioned mapping and splicing, generate the difference prediction value by a one-dimensional convolutional residual model; Understandably, the online system performance index sequence is a sequence of observed system performance indicators received continuously according to the sampling time after the model has completed training. The detection window is a continuous historical data segment extracted from the online system performance index sequence to predict the actual value at the next time step. The detection window uses the same window length, time position definition, standardization parameters, and first-order difference rule as the training window.

[0108] The aforementioned mapping and splicing in the numbered sentence refers to performing time-domain mapping, time-index truncated Fourier mapping, and window position-based phase index mapping on the first-order difference results of the window to be detected, and then splicing the outputs of the three mappings along the feature channel dimension to form the fused feature to be detected.

[0109] In the embodiments of this application, after the model training is completed, the training segment mean, training segment standard deviation, highest retention order, preset phase order, temporal mapping parameters, convolution parameters of the one-dimensional convolutional residual network, prediction head parameters, and dynamic two-sided threshold parameters are saved as the same model version; the running mean, running variance, and learnable scaling and translation parameters formed by the batch normalization layer during the training phase are saved together with the network parameters.

[0110] Furthermore, during online detection, for each new system operation indicator sampling point received, the window cache of the corresponding system operation indicator channel is updated, and a detection window containing the most recent L time positions is extracted from the online system operation indicator sequence. The detection window is standardized using the mean and standard deviation of the training segment calculated in step S1, without recalculating the mean or standard deviation based on the current detection window.

[0111] Furthermore, the standardized window to be detected is processed according to the first-order difference rule in step S1 to form a first-order difference result. For continuous online data, the difference value at the first time position of the window to be detected is determined using the true standardized observation value immediately preceding the start of the window to be detected; the window cache also retains the standardized value at the end of the current window to be detected, which is used to restore the difference prediction value to the standardized prediction value at the next time point of the window to be detected.

[0112] Furthermore, the first-order difference result of the window to be detected is processed in the same way as in step S2 to form a temporal mapping feature, a time-indexed truncated Fourier mapping output, and a phase index mapping output based on the window position, and then concatenated along the feature channel dimension to form the fused feature to be detected. During online detection, the highest retention order K and the preset phase order determined in the training phase are used. The time-domain mapping parameters and the same feature channel concatenation order are used.

[0113] The fused features to be detected are input into the trained one-dimensional convolutional residual model. During online detection, the temporal mapping parameters, one-dimensional convolutional residual network parameters, prediction head parameters, or batch normalized runtime statistics are not updated. The prediction head reads the hidden features from the last time position in the output of the last residual block and generates the differential prediction value for the next time step after the detection window. .

[0114] In step S4, the online detection stage uses the same standardized parameters, difference definition, maximum retention order, preset phase order, feature channel splicing order, and model parameters as the training stage. This ensures that the fused features to be detected and the fused features to be trained are in the same data processing domain, and that the online input of the one-dimensional convolutional residual model maintains the same data meaning and tensor structure as the training input.

[0115] S5, the differential predicted value is added to the standardized value at the end of the detection window and then inversely standardized to obtain the predicted value; the actual value minus the predicted value at the next moment of the detection window forms the detection residual, the detection residual is judged by the two-sided threshold formed by the normal residual sequence, the abnormality label is output, and the detection residual within the threshold is written into the normal residual sequence.

[0116] Understandably, the standardized value at the end of the detection window is the standardized observation at the last time position of the detection window. The differential prediction value represents the change in the standardized value predicted by the model at a later time relative to the standardized value at the end of the detection window. The normal residual sequence is formed from the normal residuals of the training segment or independent validation segment, and during online detection, only the detection residuals judged to be normal are written into the time-ordered sequence. The two-sided thresholds include an upper threshold and a lower threshold, used to identify positive detection residual out-of-bounds and negative detection residual out-of-bounds, respectively.

[0117] In the embodiments of this application, the differential prediction value is added to the standardized value at the end of the window to be detected to form the standardized prediction value at the next moment of the window to be detected: in, This represents the standardized value at the end of the current detection window. This represents the difference prediction value generated by the one-dimensional convolutional residual model. This represents the standardized predicted value one moment after the detection window.

[0118] Furthermore, the standardized parameters calculated from the training segment are used to perform inverse standardization on the standardized predicted values ​​to form predicted values ​​in their original dimensions: Furthermore, the actual value at the next moment after the detection window is obtained from the sequence of online system operation indicators. The difference between the actual value and the predicted value at the next moment after the detection window is calculated to form the detection residual: in, This represents the detection residual of the d-th system operation index channel at sampling time t. A positive detection residual indicates that the actual value at the next moment after the detection window is greater than the predicted value; a negative detection residual indicates that the actual value at the next moment after the detection window is less than the predicted value. Therefore, the deviation of the actual value in both directions is determined using upper and lower thresholds respectively.

[0119] like Figure 5 As shown, the difference between the actual value and the predicted value at the next time step after the detection window forms the detection residual. This detection residual then enters the dynamic two-sided threshold determination process. The dynamic two-sided threshold determination process forms the residual center, residual discrete scale, upper threshold, and lower threshold based on the normal residual sequence, and outputs an anomaly flag based on whether the detection residual is greater than the upper threshold or less than the lower threshold. When the detection residual is determined to be normal, it is written into the normal residual sequence to determine the two-sided threshold at the next time step; when the detection residual is determined to be abnormal, it is not written into the normal residual sequence.

[0120] In some embodiments, step S5, which uses a two-sided threshold formed by the normal residual sequence to determine the detection residual, includes steps S51 to S54, wherein: S51, form a normal residual sequence based on the normal residuals of the training segment or independent validation segment; In the embodiments of this application, the training segment or independent validation segment used to initialize the normal residual sequence is a data segment formed during the period when the monitored object is in normal operation. The training segment or independent validation segment is used to characterize the normal operation benchmark of the monitored object, and it is not necessary to set artificial anomaly category labels for each time position within the data segment, thus not changing the unsupervised training method of the one-dimensional convolutional residual model.

[0121] After training the one-dimensional convolutional residual model, offline windows are sequentially extracted from the training or independent validation segments according to the same window length and stride as the training window. The offline windows are standardized using the standardized parameters calculated in the training segments, and first-order differencing is performed. Further, temporal mapping, time-indexed truncated Fourier mapping, and window-position-based phase index mapping are performed on the first-order differencing results of the offline windows. The outputs of these three mappings are concatenated along the feature channel dimension to form offline fusion features. The trained one-dimensional convolutional residual model then generates offline differencing predictions based on these offline fusion features.

[0122] Furthermore, the offline differential prediction value is added to the standardized value at the end of the corresponding offline window, and inverse standardization is performed using the standardization parameters calculated in the training segment to form the offline prediction value. The difference between the actual value and the offline prediction value at the next moment after the offline window is calculated to form the offline detection residual. Since the training segment or independent validation segment corresponds to the normal operating state of the monitored object, the offline detection residual is written into the normal residual sequence as normal residual according to the sampling time order.

[0123] Furthermore, based on the normal residuals formed offline, the initial residual center, initial median absolute deviation, initial upper threshold, and initial lower threshold of each system operation index channel are pre-calculated, and the corresponding threshold parameters are associated with and saved with the model parameters. After online detection begins, when the number of accumulated normal residuals online is less than a preset number R, the initial upper threshold and initial lower threshold are used to determine the detection residuals; when the number of accumulated normal residuals online reaches R, the two-sided thresholds are dynamically determined based on the most recent R normal residuals. In this embodiment, the preset number R is 256, where R represents the number of most recent normal residuals selected each time the two-sided thresholds are dynamically determined, used to limit the historical residual range corresponding to the two-sided thresholds.

[0124] S52, Select a preset number of recent normal residuals from the normal residual sequence, determine the residual center based on the median of the recent normal residuals, and determine the residual discrete scale based on the median absolute deviation of the recent normal residuals relative to the residual center. In the embodiments of this application, the R most recent normal residuals are selected from the normal residual sequence in ascending order of time. For the d-th system operation index channel, the residual center at sampling time t is determined based on the median of the R most recent normal residuals: in, This indicates that the residual center of the d-th system operation index channel at sampling time t is used to determine the two-sided threshold. Let J represent the j-th residual among the most recent R normal residuals.

[0125] Furthermore, the median absolute deviation (MAD) is calculated based on the absolute deviation of the most recent normal residuals relative to the residual center: in, It is used to represent the degree of dispersion of the most recent R normal residuals around the residual center.

[0126] Furthermore, the residual discrete scale is determined based on the median absolute deviation: Where 1.4826 represents the scaling factor for the median absolute deviation. This is used to prevent the residual discrete scale from being completely zero when the median absolute deviation is zero.

[0127] S53, multiply the preset scaling coefficient by the residual discrete scale to form the threshold offset, add the threshold offset to the residual center to form the upper threshold, and subtract the threshold offset from the residual center to form the lower threshold. In the embodiments of this application, the preset scaling factor is expressed as: The threshold offset is the product of the preset scaling factor and the residual discrete scale. The upper and lower thresholds are as follows: in, This represents the upper threshold of the d-th system operation index channel at sampling time t. This indicates the corresponding lower threshold. It should be noted that... The letter L in the text represents the lower threshold and does not represent the window length L used in step S1 to limit the number of training window time positions.

[0128] For example, in this embodiment, a preset scaling factor is used. The value is set to 3.5. The preset scaling factor is used to control the distance between the two-sided thresholds and the residual center. When the preset scaling factor increases, the range between the upper and lower thresholds expands; when the preset scaling factor decreases, the range between the upper and lower thresholds shrinks.

[0129] S54. When the detection residual is greater than the upper threshold or less than the lower threshold, it is judged as abnormal; when the detection residual is greater than or equal to the lower threshold and less than or equal to the upper threshold, it is judged as normal, the detection residual is written into the normal residual sequence, and the bilateral thresholds at the next time step are determined according to the updated normal residual sequence.

[0130] In the embodiments of this application, when or When, output exception flag 1; when When the error occurs, output an anomaly flag of 0. An anomaly flag of 1 indicates that the detection residual at the corresponding sampling time exceeds both thresholds, while an anomaly flag of 0 indicates that the corresponding detection residual is within the range of both thresholds.

[0131] Furthermore, detection residuals deemed abnormal are not written into the normal residual sequence to prevent persistent fault residuals from altering the residual center of normal residuals, increasing the residual dispersion scale, and causing the upper threshold to rise or the lower threshold to fall. Detection residuals deemed normal are written into the normal residual sequence in chronological order. When the number of residuals in the normal residual sequence exceeds a preset number R, the most recent R normal residuals are retained, and the residual center, residual dispersion scale, upper threshold, and lower threshold are redefined for the next time step based on the updated most recent normal residuals.

[0132] In some embodiments, for scenarios containing D system operation indicator channels, a critical channel out-of-bounds triggering method is adopted. The configuration file pre-lists critical system operation indicator channels directly related to system security, system availability, or service level. If the detection residual of any critical system operation indicator channel is greater than an upper threshold or less than a lower threshold, a system anomaly is output. The critical system operation indicator channels are configured by operations and maintenance personnel according to equipment specifications, service level agreements, and the scope of fault impact, and are saved along with the model version; they are not automatically learned during the unlabeled training phase.

[0133] In some embodiments, step S5 further includes steps S55 to S57, wherein: S55, when the number of continuously abnormal detection residuals reaches the preset freeze count, enter the continuous abnormal state and pause the update of the normal residual sequence and the two-sided threshold. In the embodiments of this application, a preset freeze count is used to determine the conditions for a continuous anomaly to change from a point-by-point out-of-bounds state to a persistent anomaly state. The number of detection residuals that are continuously judged as an anomaly is the number of detection residuals that are consecutively greater than an upper threshold or less than a lower threshold in chronological order.

[0134] For example, in this embodiment, the preset freeze count is preferably: in, R represents the preset freeze count, and R represents the number of most recent normal residuals used when determining the two-sided threshold.

[0135] When the number of continuously detected residuals deemed abnormal reaches a preset freeze count, the anomaly detection process enters a continuous anomaly state and maintains anomaly alarms. Writing detection residuals to the normal residual sequence is suspended, while the official upper and lower thresholds used when entering the continuous anomaly state remain unchanged. Updating the normal residual sequence and the official two-sided thresholds is paused to prevent faulty residuals formed during the continuous anomaly period from entering the normal residual statistical range, thereby avoiding the shift of the official two-sided thresholds towards the faulty residual distribution.

[0136] S56, During the continuous abnormal state, the detection residual is clipped to between the lower threshold and the upper threshold to form a shadow residual, which is written into the shadow window in chronological order. Based on the shadow residual in the shadow window, candidate two-sided thresholds are formed according to the determination method of the two-sided thresholds. In the embodiments of this application, during the continuous abnormal state, the official upper threshold and official lower threshold frozen when entering the continuous abnormal state are still used to determine the current detection residual. For the current detection residual, the detection residuals greater than the official upper threshold are clipped to the official upper threshold, the detection residuals less than the official lower threshold are clipped to the official lower threshold, and the detection residuals between the official lower threshold and the official upper threshold remain unchanged, thereby forming a shadow residual.

[0137] Furthermore, the shadow residuals are written into the shadow window in chronological order. The shadow window is independent of the normal residual sequence and is used to maintain the time progression of residual statistics while the formal two-sided thresholds are frozen. The shadow window retains the most recent R shadow residuals in chronological order.

[0138] Furthermore, when the number of shadow residuals in the shadow window reaches R, according to the median-median absolute deviation method in steps S52 and S53, candidate residual centers, candidate residual discrete scales, candidate upper thresholds and candidate lower thresholds are formed based on the most recent R shadow residuals, and the candidate upper thresholds and candidate lower thresholds are used as candidate two-sided thresholds.

[0139] It should be noted that candidate two-sided thresholds do not directly replace formal two-sided thresholds during periods of sustained anomalous conditions. When the number of shadow residuals in the shadow window has not yet reached R, and therefore candidate two-sided thresholds have not yet been formed, the formal two-sided thresholds remain unchanged. By pruning the detection residuals through the shadow window and continuously forming candidate statistics, the original amplitude of the fault residuals is prevented from directly entering the candidate two-sided threshold calculation, and the threshold statistics process is prevented from completely halting during periods of sustained anomalous conditions.

[0140] S57, During the continuous abnormal state, when the detection residual is judged to be normal, the number of consecutive normal times is accumulated; when the number of consecutive normal times reaches the preset recovery count, the bilateral threshold is updated according to the candidate bilateral threshold, the continuous abnormal state is exited, the subsequent detection residuals judged to be normal are written into the normal residual sequence, and the bilateral threshold is determined according to the updated normal residual sequence.

[0141] In the embodiments of this application, the preset recovery count is the number of consecutive normal detection residuals configured before the online detection begins, used to determine the conditions for exiting the continuous abnormal state. This embodiment does not limit the specific value of the preset recovery count.

[0142] Once in a persistent abnormal state, if the current detection residual is greater than or equal to the formal lower threshold and less than or equal to the formal upper threshold, the current detection residual is judged as normal, and the number of consecutive normal values ​​is accumulated. Furthermore, during the period of accumulating consecutive normal values, if any subsequent detection residual is judged as abnormal again, the number of consecutive normal values ​​is reset to zero, and the persistent abnormal state continues.

[0143] Furthermore, the formal two-sided threshold is updated only after the candidate two-sided threshold has been formed and the current consecutive normal count has reached the preset recovery count, and the continuous abnormal state is exited. After exiting the continuous abnormal state, the subsequent detection residuals that are judged to be normal are written into the normal residual sequence, and the subsequent two-sided thresholds are determined according to the R most recent normal residuals in the normal residual sequence, following the methods in steps S52 and S53.

[0144] It should be noted that if the number of consecutive normal occurrences reaches the preset recovery count before a candidate two-sided threshold is formed in the shadow window, the formal two-sided threshold and the persistent abnormal state will continue to be maintained. After the candidate two-sided threshold is formed, the formal two-sided threshold will be updated based on the candidate two-sided threshold and the persistent abnormal state will be exited when the current number of consecutive normal occurrences reaches the preset recovery count. If a detection residual that is judged to be abnormal reappears before or after the formation of the candidate two-sided threshold, the number of consecutive normal occurrences will be reset to zero, and the persistent abnormal state cannot be exited based on the previous achievement of the preset recovery count.

[0145] Furthermore, for each completed online anomaly detection, the output should include at least the system operation indicator channel identifier, timestamp, predicted value, actual value at the next moment after the detection window, detection residual, upper threshold, lower threshold, anomaly identifier, and model version number, to support anomaly alarm tracking and detection result verification.

[0146] In step S5, the differential prediction values ​​generated by the one-dimensional convolutional residual model are restored to the prediction values ​​under the original system operating index dimensions, and online anomaly detection is performed using the median-median absolute deviation two-sided threshold updated only by normal residuals. During periods of continuous anomalies, a formal two-sided threshold freezing and shadow window candidate two-sided threshold mechanism are adopted to avoid the continuous anomaly detection residuals from changing the statistical range of normal residuals. After the candidate two-sided thresholds have been formed and the current consecutive normal counts have reached the preset recovery count, the online update of the normal residual sequence and the two-sided thresholds is restarted.

[0147] For example, to illustrate the effect of time-indexed truncated Fourier mapping on isolated high-frequency perturbations, and the impact of the highest retention order K on the reconstruction and anomaly detection results, the following method is used: Figure 6 and Figure 7 The experiment in the experiment will be explained.

[0148] Generate a clean reference sequence of length N = 5760: in, This represents the clean reference value at sampling time t.

[0149] Furthermore, Gaussian background noise with a mean of 0 and a standard deviation of 0.08 is superimposed on a clean reference sequence. Approximately 1% of the time positions in both the training and testing segments are randomly selected to superimpose non-fault transient perturbations with amplitudes ranging from 0.3 to 0.5 and lasting for one sampling point. In the testing segment, 30 fault intervals with amplitudes ranging from 0.8 to 1.2 and lasting for 3 to 8 sampling points are injected separately. Following chronological order, the first 70% of the data is used as the training segment, the middle 15% as the validation segment, and the last 15% as the testing segment. During training, no labels for non-fault transient perturbations or fault labels are provided to the model.

[0150] The experimental group used the methods in steps S1 to S5, setting the sliding window length L to 128, the highest retention order K to 8, and the preset phase order. The experimental group had 4 hidden channels (C) and 32 residual blocks (M). The control group replaced the temporal index truncated Fourier mapping with a cubic B-spline basis function mapping. The structure, prediction head, preprocessing method, loss term, optimizer, number of training epochs, and dynamic two-sided threshold parameters of the one-dimensional convolutional residual network remained consistent. To ensure that the number of trainable parameters was on the same order of magnitude in both groups, the number of hidden channels was adjusted in the control group. Both the experimental and control groups used five different random seeds for repeated training and testing.

[0151] Furthermore, both the experimental and control groups used normalized time indices as the independent variables for the basis functions. The experimental group employed sine and cosine basis functions with a highest order of K. The control group used uniform nodes on the same normalized time index and generated cubic B-spline basis functions, with the number of B-spline basis functions adjusted to have the same or closest degrees of freedom as the 2K sine and cosine output channels of the experimental group. Both groups used the same input window, the same standardization and first-order differencing methods, the same one-dimensional convolutional residual network structure, and the same training objective. Except for adjusting the number of hidden channels in the control group to control the number of trainable parameters, the other network configurations remained consistent, only the types of basis functions were changed, so that the differences in fitting results corresponded to the structural differences between the global finite-order Fourier basis functions and the local B-spline basis functions.

[0152] At non-failure time locations, the root mean square error (RMSE) is calculated based on the known clean reference sequence: Where n represents the number of non-fault time locations involved in the root mean square error calculation. This represents the reconstructed value under the original dimensions. The reconstructed value under the original dimensions uses the standardized observation immediately preceding the start of the corresponding window as the inverse difference baseline. The reconstructed difference sequence generated by the one-dimensional convolutional residual network is sequentially accumulated according to time position to form the standardized reconstructed value at each time position within the window. Then, inverse standardization is performed using the standardization parameters calculated from the training segment. This process employs the computational relationships corresponding to the first-order difference boundary in step S1 and the inverse difference and inverse standardization in step S5.

[0153] Furthermore, the false positive rate (FPR) was calculated at non-fault transient disturbance time locations, and the precision, recall, and F1 score were calculated point-by-point within the fault interval. The experiment simultaneously recorded the number of trainable parameters, average inference latency per window, and peak memory usage. The mean and standard deviation of each result were reported for five repeated trials. Inference latency was measured under the same hardware, batch size, and number of warm-up cycles.

[0154] like Figure 6 As shown, the upper curve displays the fitting result of the cubic B-spline basis function mapping within a representative test window. The fitted curve exhibits a local shift near isolated high-frequency spikes, indicating that the local control points absorb some non-fault transient disturbances into the normal prediction baseline during the optimization process. The lower curve displays the fitting result of the time-indexed truncated Fourier mapping within the same test window. Its fitted curve does not follow the corresponding isolated spikes, while maintaining continuous tracking of slow trends and major periods. It should be noted that... Figure 6 This is used to illustrate the difference in fitting mechanism between cubic B-spline basis functions and time-indexed truncated Fourier basis functions within a representative window, and does not represent... Figure 6 A complete quantitative detection performance comparison of the two models has been provided. Figure 7 This is further used to illustrate the changes in root mean square error, false alarm rate, and F1 value under different highest retention orders.

[0155] Furthermore, such as Figure 7 As shown, under the condition that the input data, window length, network structure, training objective, and dynamic two-sided threshold parameters remain consistent, the highest retention order K is set to 4, 8, and 16 respectively, and training and testing are repeated using 5 different random seeds for each value. When K is 4, the root mean square error is... The false alarm rate is F1 value When K is 8, the root mean square error is The false alarm rate is F1 value When K is 16, the root mean square error is The false alarm rate is F1 value When K is 4, fewer frequency components are retained, resulting in some underfitting; when K is 16, the high-frequency fitting degrees of freedom increase, and the degree of following high-frequency disturbances is correspondingly improved; when K is 8, the root mean square error and false alarm rate are the lowest, and the F1 value is the highest, achieving a better balance between low-order underfitting and high-order noise following.

[0156] It should be noted that the sliding window length L, the maximum retention order K, and the preset phase order are... Number of hidden channels C, number of residual blocks M, loss weights, model training parameters, and Figure 6 and Figure 7 The experimental results are used to illustrate the specific implementation method of this embodiment and the basis for selecting the highest retention order K, and are not intended to limit the scope of protection of this application to a corresponding fixed value. In actual deployment, the data partitioning method, evaluation index, and repeated test caliber of this embodiment can be adopted, and the highest retention order K can be determined based on the sampling frequency, main period, power spectrum energy of normal training segment, and false alarm rate of validation set of the system operation index.

[0157] Example 2 is an embodiment of the present invention, which provides an unsupervised sequence anomaly detection system based on time-frequency domain fusion, comprising: The window processing module is used to calculate standardized parameters based on the training segment of the system operation index sequence, extract training windows from the training segment, standardize the training windows with standardized parameters, and then perform first-order difference to form training difference windows. The feature processing module is used to train the difference window through time-domain mapping, time-index truncated Fourier mapping and window position-based phase index mapping, and the output is spliced ​​along the feature channel dimension to form fused features; The model training module is used to generate reconstructed difference sequences and difference prediction values ​​based on the fusion features of the one-dimensional convolutional residual model, forming reconstruction loss, prediction loss and second-order smoothing loss. The three losses are used to train the temporal mapping and one-dimensional convolutional residual model. The online processing module is used to extract the window to be detected from the sequence of online system operation indicators, standardize the window to be detected with standardized parameters, and then perform first-order difference; after the aforementioned mapping and splicing, the difference prediction value is generated by a one-dimensional convolutional residual model. The anomaly detection module is used to add the differential predicted value to the standardized value at the end of the detection window and then inversely standardize it to obtain the predicted value. The actual value minus the predicted value at the next moment of the detection window forms the detection residual. The detection residual is judged by the two-sided threshold formed by the normal residual sequence, and an anomaly label is output. The detection residual within the threshold is written into the normal residual sequence.

[0158] This embodiment also provides a computer device applicable to a time-frequency domain fusion-based unsupervised system sequence anomaly detection method, comprising: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the time-frequency domain fusion-based unsupervised system sequence anomaly detection method as proposed in the above embodiment.

[0159] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements an unsupervised system sequence anomaly detection method based on time-frequency domain fusion as proposed in the above embodiments.

[0160] The storage medium proposed in this embodiment belongs to the same inventive concept as the method for detecting sequence anomalies in an unsupervised system based on time-frequency domain fusion proposed in the above embodiments. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.

[0161] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.

[0162] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.

Claims

1. A method for detecting sequence anomalies in an unsupervised system based on time-frequency domain fusion, characterized in that: include, Based on the training segment of the system operation index sequence, standardized parameters are calculated. A training window is extracted from the training segment, and the training window is standardized with the standardized parameters. Then, a first-order difference is made to form a training difference window. The training difference window is processed by time-domain mapping, time-index truncated Fourier mapping, and phase-index mapping based on window position, and the output is concatenated along the feature channel dimension to form a fused feature. The one-dimensional convolutional residual model generates reconstructed difference sequences and difference predictions based on fusion features, forming reconstruction loss, prediction loss and second-order smoothing loss. The three losses are used to train the temporal mapping and the one-dimensional convolutional residual model. The window to be detected is extracted from the sequence of online system operation indicators, and then the window to be detected is standardized with standardized parameters and then first-order difference is performed. After the aforementioned mapping and splicing, the differential prediction value is generated by the one-dimensional convolutional residual model; The differential predicted value is added to the standardized value at the end of the detection window and then inversely standardized to obtain the predicted value. The actual value minus the predicted value at the next moment of the detection window forms the detection residual. The detection residual is judged by the two-sided threshold formed by the normal residual sequence, and an anomaly label is output. The detection residual within the threshold is written into the normal residual sequence.

2. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 1, characterized in that: The time-indexed truncated Fourier map includes: Normalize the index of each time position in the training difference window, or the index of each time position in the first-order difference result of the detection window, to generate sine basis functions and cosine basis functions from the first order to the highest retained order; According to the values ​​of each order of sine basis function and cosine basis function at each time position, the difference values ​​at the same time position are weighted, and the sine weighted results and cosine weighted results of all time positions are summarized respectively. The summaries are normalized according to the number of time positions to form the sine Fourier coefficients and cosine Fourier coefficients of each window level. The time-indexed truncated Fourier map output is formed by weighting the values ​​of the same-order sine basis functions at each time position using the coefficients of the sine Fourier coefficients at each window level, and by weighting the values ​​of the same-order cosine basis functions at each time position using the coefficients of the cosine Fourier coefficients at each window level.

3. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 2, characterized in that: The phase index mapping based on window position includes: The index of each time position in the training difference window, or the index of each time position in the first-order difference result of the window to be detected, is normalized to form a normalized position index. Based on the normalized position index, generate sine position codes and cosine position codes of the first order to the preset phase order; The difference value at each time position is used to perform amplitude weighting on each order of sine and cosine position codes at the same time position, forming a phase index mapping output based on the window position.

4. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 3, characterized in that: The one-dimensional convolutional residual model generates reconstructed difference sequences and difference prediction values ​​based on fusion features, including: The one-dimensional convolutional residual network in the one-dimensional convolutional residual model uses one-dimensional convolutional projection to fuse features and form hidden features, which are then sequentially input into the concatenated residual blocks. Each residual block's main branch undergoes two one-dimensional convolutions, followed by batch normalization. Activation occurs between the two convolutions, and equal-length padding is used in both one-dimensional convolutions. When the number of channels in the residual block input is the same as the number of channels in the main branch output, the residual branch performs an identity mapping on the residual block input. When the number of channels in the residual block input is different from the number of channels in the main branch output, the residual branch uses one-dimensional convolution to project the channels onto the residual block input. The main branch output and the residual branch output are added sequentially at each time position and then activated to form the residual block output. The one-dimensional convolutional residual network uses the output of the last residual block to form a reconstructed difference sequence; the prediction head in the one-dimensional convolutional residual model reads the hidden features at the last time position in the output of the last residual block to form the difference prediction value.

5. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 4, characterized in that: The formation of reconstruction loss, prediction loss, and second-order smoothing loss, and the training of the temporal mapping and one-dimensional convolutional residual model with these three losses, includes: The reconstruction objective is to train the difference window, and the prediction objective is the first-order difference between the standardized value at the next moment after the training window and the standardized value at the end of the training window. The reconstruction loss is formed based on the difference between the reconstructed difference sequence and the reconstruction target; the prediction loss is formed based on the difference between the predicted difference value and the prediction target; and the second-order smoothing loss is formed based on the second-order difference of the reconstructed difference sequence. The learnable parameters of the temporal mapping, the learnable parameters of the one-dimensional convolutional residual network, and the learnable parameters of the prediction head are updated using reconstruction loss, prediction loss, and second-order smoothing loss.

6. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 5, characterized in that: The method of determining the detection residual using a two-sided threshold formed from a normal residual sequence includes: A normal residual sequence is formed based on the normal residuals of the training segment or independent validation segment; Select a preset number of recent normal residuals from the normal residual sequence, determine the residual center based on the median of the recent normal residuals, and determine the residual discrete scale based on the median absolute deviation of the recent normal residuals relative to the residual center. The threshold offset is formed by multiplying the preset scaling coefficient by the residual discrete scale. The upper threshold is formed by adding the threshold offset to the residual center, and the lower threshold is formed by subtracting the threshold offset from the residual center. When the detection residual is greater than the upper threshold or less than the lower threshold, it is judged as abnormal; when the detection residual is greater than or equal to the lower threshold and less than or equal to the upper threshold, it is judged as normal, the detection residual is written into the normal residual sequence, and the bilateral thresholds at the next time step are determined based on the updated normal residual sequence.

7. The unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in claim 6, characterized in that: When the number of continuously abnormal detection residuals reaches the preset freeze count, the system enters a continuous abnormal state and suspends the updating of the normal residual sequence and the two-sided threshold. During the continuous abnormal state, the detection residual is clipped to between the lower threshold and the upper threshold to form a shadow residual, which is written into the shadow window in chronological order. Based on the shadow residual in the shadow window, candidate two-sided thresholds are formed according to the determination method of the two-sided thresholds. During a period of continuous abnormality, the cumulative number of consecutive normal values ​​is counted when the detection residual is determined to be normal. When the number of consecutive normal occurrences reaches the preset recovery count, the bilateral thresholds are updated based on the candidate bilateral thresholds, the continuous abnormal state is exited, and the subsequent detection residuals that are judged to be normal are written into the normal residual sequence. The bilateral thresholds are determined based on the updated normal residual sequence.

8. A sequence anomaly detection system for unsupervised systems based on time-frequency domain fusion, employing the sequence anomaly detection method for unsupervised systems based on time-frequency domain fusion as described in any one of claims 1 to 7, characterized in that, include: The window processing module is used to calculate standardized parameters based on the training segment of the system operation index sequence, extract training windows from the training segment, standardize the training windows with standardized parameters, and then perform first-order difference to form training difference windows. The feature processing module is used to train the difference window through time-domain mapping, time-index truncated Fourier mapping and window position-based phase index mapping, and the output is spliced ​​along the feature channel dimension to form fused features; The model training module is used to generate reconstructed difference sequences and difference prediction values ​​based on the fusion features of the one-dimensional convolutional residual model, forming reconstruction loss, prediction loss and second-order smoothing loss. The three losses are used to train the temporal mapping and one-dimensional convolutional residual model. The online processing module is used to extract the window to be detected from the sequence of online system operation indicators, and then perform first-order difference after standardizing the window to be detected with standardized parameters. After the aforementioned mapping and splicing, the differential prediction value is generated by the one-dimensional convolutional residual model; The anomaly detection module is used to add the differential predicted value to the standardized value at the end of the detection window and then inversely standardize it to obtain the predicted value. The actual value minus the predicted value at the next moment of the detection window forms the detection residual. The detection residual is judged by the two-sided threshold formed by the normal residual sequence, and an anomaly label is output. The detection residual within the threshold is written into the normal residual sequence.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in any one of claims 1 to 7.

10. 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 steps of the unsupervised system sequence anomaly detection method based on time-frequency domain fusion as described in any one of claims 1 to 7.