Abnormal signal detection method and device based on self-supervised contrast learning
Through the self-supervised comparison learning method, the transformer timing signals are segmented and processed, and the potential representation is output using the stacked expanded convolutional network model, which solves the shortcomings of the existing methods in local feature extraction and detection accuracy, and realizes efficient and accurate abnormal signal detection.
Patent Information
- Application Number
- CN202510363911.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-24
AI Technical Summary
The existing time series anomaly detection methods have shortcomings in local feature extraction and detection accuracy, and it is difficult to effectively process complex timing data, especially non-stationary and highly dynamic signals.
Using an abnormal signal detection method based on self-supervised comparison learning, by dividing the timing signal of the to-process transformer into signal segments, a potential representation is output using a stacked expansion convolutional network model, and whether the signal is abnormal is determined based on the score.
It realizes efficient and accurate abnormal signal detection of power transformer, improves detection accuracy and robustness, and can better capture the long-term and short-term dependencies of timing signals.
Smart Images

Figure CN120197002A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of transformer condition monitoring, and particularly to an abnormal signal detection method and device based on self-supervised contrastive learning. Background Art
[0002] The condition monitoring of transformers is a key element in ensuring the safe operation of power systems. To monitor the operating state of equipment, various sensors are usually installed at different positions of the transformer, and a large number of time series signals during the operation of the equipment are recorded through high-frequency sampling. With the help of time series anomaly detection technology, abnormal patterns in system operation can be efficiently discovered, potential abnormalities in the transformer insulation system can be identified in a timely manner, thereby effectively preventing catastrophic failures and reducing economic losses.
[0003] However, mining abnormal patterns from complex time series is a highly challenging task, and existing time series anomaly detection methods still have the following deficiencies:
[0004] Difficulty in extracting redundant information and local features: High-frequency sampling by sensors generates a large amount of redundant information, and global features mask local dynamic anomalies, making it difficult for traditional methods to effectively extract key local features.
[0005] Low detection accuracy: Existing methods (such as methods based on statistics, similarity, prediction, reconstruction, etc.) perform poorly in processing complex time series data, especially in adapting to non-stationary and highly dynamic signals. Summary of the Invention
[0006] The purpose of this application is to provide an abnormal signal detection method (Self-supervised Temporal Anomaly Detection via Contrastive Learning, STAD-CL) and device based on self-supervised contrastive learning, which solve the deficiencies of traditional methods in local feature extraction and detection accuracy, and achieve efficient and accurate detection of abnormal signals in power transformers.
[0007] To achieve the above purpose, this application provides the following solutions:
[0008] In the first aspect, this application provides an abnormal signal detection method based on self-supervised contrastive learning, including:
[0009] Periodically obtain the time series signal of the transformer to be processed;
[0010] Divide the time series signal of the transformer to be processed into several signal segments;
[0011] Using the target sub - segments as input, and outputting the latent representation of each of the signal segments by using the trained stacked dilated convolutional network model, where the target sub - segments refer to any two overlapping time periods in each of the signal segments;
[0012] Calculating the score of each of the signal segments according to the latent representation;
[0013] Judging whether the to - be - processed transformer time - series signal is abnormal according to all the scores.
[0014] In a second aspect, the present application provides a computer device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the computer program to implement the abnormal signal detection method based on self - supervised contrastive learning described in the first aspect above.
[0015] In a third aspect, the present application provides a computer - readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the abnormal signal detection method based on self - supervised contrastive learning described in the first aspect.
[0016] In a fourth aspect, the present application provides a computer program product, including a computer program, and when the computer program is executed by a processor, it implements the abnormal signal detection method based on self - supervised contrastive learning described above.
[0017] According to the specific embodiments provided by the present application, the present application has the following technical effects:
[0018] The present application provides an abnormal signal detection method and device based on self - supervised contrastive learning. The method includes: dividing the to - be - processed transformer time - series signal into several signal segments, processing the target sub - segments by using the trained stacked dilated convolutional network model, outputting the latent representation of the signal segments, and judging whether the to - be - processed transformer time - series signal is abnormal according to the scores of the latent representation, where the target sub - segments are any two overlapping time periods in the signal segments obtained after dividing the to - be - processed transformer time - series signal. By effectively segmenting the signal and dividing the long - time - series signal into multiple local segments, each segment can capture the subtle changes in the time series, ensuring that abnormal signals are fully exposed and improving the detection accuracy; by ensuring that the signal has a consistent representation in the overlapping area, the model can better capture the long - term and short - term dependencies of the time - series signal, thereby improving the robustness of the detection. Therefore, the present application solves the deficiencies of traditional methods in local feature extraction and detection accuracy, and realizes efficient and accurate detection of abnormal signals of power transformers. Description of the Drawings
[0019] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0020] Figure 1 It is an application environment diagram of an abnormal signal detection method based on self-supervised contrast learning in Embodiment 1 of the present application;
[0021] Figure 2 It is a schematic flowchart of an abnormal signal detection method based on self-supervised contrast learning provided in Embodiment 1 of the present application;
[0022] Figure 3 It is a framework diagram of the abnormal signal detection method based on self-supervised contrast learning in Embodiment 1 of the present application, where Figure 3 in (a) is the main flowchart of the abnormal signal detection method based on self-supervised contrast learning in Embodiment 1 of the present application, Figure 3 in (b) is a schematic diagram of the result of time series window segmentation in Embodiment 1 of the present application, Figure 3 in (c) is a schematic diagram of the result of positive sample pair screening in Embodiment 1 of the present application, Figure 3 in (d) is a schematic diagram of the process of the double-layer contrast loss function in Embodiment 1 of the present application;
[0023] Figure 4 It is a schematic diagram of the principle of dilated convolution calculation in Embodiment 1 of the present application;
[0024] Figure 5 It is a schematic diagram of the structure of a computer device provided in Embodiment 2 of the present application. Detailed implementation manners
[0025] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present application.
[0026] To make the above objects, features, and advantages of the present application more obvious and understandable, the present application will be further described in detail below with reference to the accompanying drawings and specific implementation manners.
[0027] Embodiment 1
[0028] Considering the transformer condition monitoring process, the high-frequency sampling of sensors generates a large amount of redundant information, which increases the difficulty of feature extraction. Since the signal usually contains a long time series, dynamic features (such as peaks, mutations, and oscillations) often only appear in a local time period, and there may be no significant differences between global features. This makes it easy to cover up key abnormal features by directly processing the entire time series, while increasing the computational burden. Therefore, how to effectively extract and focus on local dynamic features becomes an important issue.
[0029] Secondly, the standard for defining anomalies is a fundamental problem in anomaly detection. Anomalies are usually defined as outliers or novel samples that deviate from normal patterns, showing unusual and irregular characteristics. At the same time, abnormal signals account for a very low proportion of the data set, making data labeling difficult and expensive, making it difficult to effectively apply traditional supervised learning methods based on labeled data. Therefore, it is particularly important to develop methods to build anomaly detection models using only normal signals.
[0030] Traditional time series anomaly detection methods mainly include statistical methods and similarity measurement-based methods. Statistical methods aim to learn statistical models that represent the typical behavior of time series. Similarity measurement-based methods, on the other hand, identify outliers that are significantly different from most data points by measuring the similarities between different time series. Common similarity measurement methods include distance-, density-, and clustering-based techniques. However, these methods often result in lower detection accuracy when dealing with real data of high latitudes and complex time series. With the development of emerging technologies such as deep learning and self-supervised learning, methods that can deeply mine complex structure time series information have become the most attractive choice for time series anomaly detection. At present, time series anomaly detection methods based on deep learning are mainly divided into three categories: prediction-based, reconstruction-based, and representation-based methods.
[0031] Prediction-based methods rely on learning models to predict the values of subsequent data points or sequences based on a certain point in time or a recent window. To assess the degree of abnormality of the input value, the predicted value is compared with the actual value, and the deviation is considered an indicator of abnormality. However, prediction methods have certain limitations, especially when dealing with highly dynamic and rapidly changing time series. Since the future state is affected by many unknown factors, the prediction is often difficult to accurately reflect the actual situation. Therefore, although prediction-based models detect anomalies through prediction errors, their performance is often unsatisfactory when dealing with continuously changing time series data and they have difficulty adapting to complex time series patterns.
[0032] Different from prediction methods, reconstruction-based models can provide more accurate anomaly detection by directly using current time-series data for reconstruction. These methods construct a reconstruction model for normal data and judge the difference between the abnormal data and the reconstruction model. However, reconstruction methods also have certain drawbacks. First, they may introduce detection delays in some cases because anomalies can only be identified after data reconstruction is completed. Second, the performance of reconstruction methods highly depends on the modeling quality of normal data. If normal behaviors have high variability or non-stationarity, the reconstruction effect may be affected. In scenarios where detection accuracy is crucial and delay is acceptable, reconstruction-based methods are still a more suitable choice, but their limitations make them inapplicable to all cases.
[0033] In contrast, representation-based models perform anomaly detection by learning the latent representation of the input time series, bypassing the drawbacks of traditional prediction and reconstruction methods. These models can not only handle high-dimensional, non-linear, and complex time-series data but also extract deep structural information of the data in the latent space, thus effectively dealing with complex features such as noise, non-stationarity, and seasonality. Most importantly, representation-based models make anomaly detection more accurate and robust by learning robust representations, especially outstanding in the case of scarce labeled data because they can usually learn valuable representations in the framework of unsupervised or self-supervised learning. Since representation learning can comprehensively capture multi-level information of time-series data, this makes the advantages of representation-based models in anomaly detection more obvious.
[0034] In view of this, regarding the defects existing in the related technologies:
[0035] Difficulty in extracting redundant information and local features: High-frequency sampling of sensors generates a large amount of redundant information, and global features obscure local dynamic anomalies, making it difficult for traditional methods to effectively extract key local features.
[0036] Dependence on labeled data: The proportion of abnormal samples is low, and the labeling cost is high, making it difficult to apply traditional supervised learning methods.
[0037] Low detection accuracy: Existing methods (such as methods based on statistics, similarity, prediction, reconstruction, etc.) perform poorly in processing complex time-series data, especially with poor adaptability to non-stationary and highly dynamic signals.
[0038] Insufficient model generalization ability: Existing models have poor robustness under data distribution changes or noise interference and are difficult to adapt to the dynamic environment of actual scenarios.
[0039] In view of this, this embodiment provides an anomaly signal detection method based on self-supervised contrast learning, which can effectively identify abnormal discharges occurring in transformers. This method can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be set separately, integrated on the server 104, placed on the cloud or other servers. The terminal 102 can send the periodically acquired transformer time series signals to be processed to the server 104. After receiving the transformer time series signals to be processed, the server 104 divides the transformer time series signals to be processed into several signal segments; uses the target sub-segment as the input, and outputs the latent representation of each signal segment by using the trained stacked dilated convolutional network model, where the target sub-segment refers to any two overlapping time periods in each signal segment; calculates the score of each signal segment according to the latent representation; determines whether the transformer time series signals to be processed are abnormal according to all the scores. The server 104 can feedback the determination result of whether the transformer time series signals to be processed are abnormal to the terminal 102. In addition, in some embodiments, the abnormal signal detection method based on self-supervised contrast learning can also be implemented separately by the server 104 or the terminal 102. For example, the terminal 102 can directly process the transformer time series signals to be processed by using the abnormal signal detection method based on self-supervised contrast learning, or the server 104 can obtain the transformer time series signals to be processed from the data storage system and process them by using the abnormal signal detection method based on self-supervised contrast learning.
[0040] Among them, the terminal 102 can be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers, and can also be a cloud server.
[0041] Such as Figure 2 As shown, this embodiment provides an abnormal signal detection method based on self-supervised contrast learning. This method is executed by a computer device, and can be specifically executed alone by a computer device such as a terminal or a server, or jointly executed by a terminal and a server. In the embodiments of the present application, taking this method applied to Figure 1 the server 104 in as an example for illustration, it includes the following steps 201 to step 205. Among them:
[0042] Step 201, periodically acquire the transformer time series signals to be processed;
[0043] Step 202, divide the transformer time series signals to be processed into several signal segments;
[0044] Step 203: Using the target sub - segment as the input, and outputting the latent representation of each of the signal segments by using the trained stacked dilated convolutional network model, where the target sub - segment refers to any two overlapping time periods in each of the signal segments;
[0045] Step 204: Calculating the score of each of the signal segments according to the latent representation;
[0046] Step 205: Judging whether the transformer time - series signal to be processed is abnormal according to all the scores.
[0047] To make those skilled in the art more clear about the above process of this embodiment, the following is a specific explanation.
[0048] As Figure 3 shown in (a), the overall process of the abnormal signal detection method in this embodiment includes:
[0049] The first step: Data acquisition. The data studied in this embodiment is the monitoring signal of a power transformer. An ultrasonic sensor is installed on the surface of the power transformer. The sampling frequency of the ultrasonic sensor is 500000 SPS. Signal data of 100 ms is collected and uploaded every 5 minutes, with a total of 50000 sampling points, obtaining multiple groups of transformer time - series signals.
[0050] The second step: Cutting a group of signals to obtain multiple short segments, that is, several signal segments. All signals are processed in the same cutting manner to obtain a set of short segments.
[0051] The third step: Constructing a training data set consisting entirely of normal signal segments, building a deep network of stacked dilated convolutions, and adopting a contrastive learning method. The input is the signals of any two partially overlapping time periods in the short segments, and the overlapping time - period signals should be the same. The loss function for network training adopts a two - level contrastive loss function, as Figure 3 shown in (d).
[0052] The fourth step: According to the stacked dilated convolutional network, a score output for each signal segment can be obtained. Since normal signals share potential global and local features and their representations are usually the same, while abnormal signals have deviated features and their scores will exceed the normal range. By statistically analyzing the distribution of scores of all normal signal segments, an abnormal threshold θ is dynamically generated based on percentiles. If the output of the network exceeds θ, the signal segment is determined to be abnormal.
[0053] The fifth step: Setting a threshold δ. If the number of abnormal signal segments in a group of signals collected in practice exceeds δ, then the signal is determined to be an abnormal signal.
[0054] The technical solution of this embodiment is realized through the following measures, and the main steps include:
[0055] Step 1: Data acquisition.
[0056] Step 2: Signal segmentation. The time series window cutting strategy is adopted to segment each group of signals into multiple short segments. As shown in (b) of Figure 3 , assuming the length of signal x is l, the segmentation window size is w, and the sliding step is s. Then the definition of signal segmentation is:
[0057] x j = x[(j - 1)s:(j - 1)s + w], j = 1, 2, 3,..., (l - w) / s + 1;
[0058] where x j refers to the j-th segment after segmentation.
[0059] Step 3: In the same way as in Step 2, all normal signals are segmented (the screening process of positive samples is shown in (c) of Figure 3 ), and several signal segments are obtained. The set of signal segments of all normal signals constitutes a new training data set. Let the signal set be {x1, x2,..., x i}, and the segmentation results of all normal signals are:
[0060]
[0061] where
[0062] Step 4: Construct a stacked dilated convolutional network, as shown in Figure 4 , which includes 10 dilated convolutional layers, uses GELU as the activation function, and adds the input directly to the output of the convolutional layer. The specific formula is as follows:
[0063] z = GELU(DilatedConv1D(x)) + x;
[0064] where the calculation formula of DilatedConv1d is as follows:
[0065]
[0066] x is the input signal (it should be noted that the input signal here is two overlapping time periods randomly selected from the short segments), the convolutional kernel is w, t is the time index, K is the size of the convolutional kernel, r is the dilation rate, and the dilation rate r of each layer increases according to the rule of 2 i , where i is the current layer number and k is the index.
[0067] Step 5: Based on the network model in Step 4, a self-supervised contrastive learning framework is proposed. The core idea is to learn a robust representation of time series segments through contrastive learning of positive samples at the same time series. To generate new context representations, the signal segments are randomly cropped. The specific process is as follows:
[0068] 1. For the signal segment x j , randomly extract two overlapping time periods [a1, b1] and [a2, b2], where the conditions are satisfied:
[0069] 0 < a1 ≤ a2 ≤ b1 ≤ b2 ≤ T;
[0070] where T is the total duration of the signal, and [a2, b1] is the overlapping part of the two time periods, and the representation in the context view should be consistent. Input the signals of these two small time periods into the constructed deep network.
[0071] 2. Construct a two-layer contrastive learning framework aimed at optimizing the feature representation of time series data through contrastive learning. It includes:
[0072] 1) Instance contrastive learning: For each signal segment, generate a pair of positive samples (i.e., two overlapping time periods [a1, b1] and [a2, b2]), and calculate the contrastive loss between them. Define the instance contrastive loss as:
[0073]
[0074] where, and represent the high-dimensional encodings of the positive sample pair. The goal is to improve the feature discrimination ability by minimizing the distance between the positive sample pairs of the same signal;
[0075] where, represents the instance contrastive loss of the i-th group of data; B represents the batch size; j represents the j-th group of data; represents the high-dimensional encoding of the first target sample sub-segment in the i-th group of data, represents the high-dimensional encoding of the second target sample sub-segment in the i-th group of data. The goal is to improve the feature discrimination ability by minimizing the distance between the positive sample pairs of the same signal; represents the high-dimensional encoding of the first target sample sub-segment in the j-th group of data, represents the high-dimensional encoding of the second target sample sub-segment in the j-th group of data. The positions of these two sub-segments are consistent with and . For example, for a group of signals 5000, the first target sample sub-segment is in the interval 2000 - 3000, and the second target sample sub-segment is in the interval 2500 - 3500.
[0076] 2) Temporal contrastive learning: By contrasting between time steps, the model's ability to capture the dynamic relationships in time series is enhanced. Specifically, the temporal contrastive loss is defined as:
[0077]
[0078] where represents the temporal contrastive loss of the i-th group of data at time step t; Ω represents the entire time series range; and respectively represent the vectors weighted by the attention mechanism at time step t for the first target sample sub-segment and the second target sample sub-segment in the i-th group of data (i.e., the feature representations generated by the attention mechanism); and respectively represent the vectors weighted by the attention mechanism at time step t' for the first target sample sub-segment and the second target sample sub-segment in the i-th group of data; and respectively represent the attention weights of sample i at time step t; and respectively refer to the original feature representations of the first target sample sub-segment and the second target sample sub-segment in the i-th group of data at time step t.
[0079] and The calculation formulas of
[0080]
[0081] are as follows: t The calculation formula of the attention weight a
[0082]
[0083] where z t represents the feature at time step t. This enables the model to focus on relevant time steps, thereby enhancing its ability to capture the temporal dynamics of the data.
[0084] 3. Loss function combination: The instance contrastive loss and the temporal contrastive loss are weighted and combined to form the final loss function:
[0085]
[0086] where N is the number of samples and T is the number of time steps. By adjusting the contributions of the two through hyperparameters, the expressive ability of the model in capturing time series features is optimized.
[0087] Step 6: Anomaly detection
[0088] 1) Input signal segmentation: Divide the input signal into multiple segments \(x\). j and calculate the latent representation \(z\) for each segment.
[0089] 2) Calculate the anomaly score: Calculate the anomaly score for each segment according to the feature dimension \(d\) of the latent representation:
[0090]
[0091] 3) Generate a dynamic threshold: Dynamically generate the anomaly threshold \(\theta\) based on the distribution of scores of all segments (99% is normal and 1% is abnormal), and determine whether each segment is abnormal:
[0092]
[0093] Step 7: Overall signal anomaly determination
[0094] 1. Count the number of abnormal segments: Count the number of segments marked as abnormal among all segments.
[0095] 2. Judge the signal anomaly: Set the threshold \(\delta\). If the number of abnormal segments exceeds \(\delta\), classify the entire signal as abnormal:
[0096]
[0097] To verify the effectiveness of this embodiment, according to three time signal datasets of transformers, this embodiment uses the STAD-CL model and 5 comparative benchmark models to calculate the average evaluation metrics on these datasets. The results are shown in Table 1. When evaluating the overall performance of the model, the F1 score, as the harmonic mean of Precision and Recall, provides a balance of these two metrics. The results in Table 1 show that the STAD-CL model always achieves the best overall performance on all three datasets.
[0098] This experimental result shows that the STAD-CL model not only performs outstandingly among multiple benchmark models, but also can maintain consistent superior performance on different datasets, demonstrating the effectiveness and reliability of the model in processing complex time series data.
[0099] Table 1 Performance evaluation results
[0100]
[0101] A STAD-CL method proposed in this embodiment aims to accurately identify abnormal discharge data in the time-series signals of power transformers through self-supervised learning. Different from traditional anomaly detection methods, the STAD-CL model is trained only with normal data and does not rely on manually labeled abnormal data. It has a powerful self-learning ability and can automatically discover potential abnormal patterns from normal signals.
[0102] To address the problem that anomalies in time-series signals often manifest as local feature mutations, STAD-CL adopts an innovative Temporal Slicing strategy for time-series window cutting. This strategy effectively divides the signal by splitting the long time-series signal into multiple local segments, enabling each segment to capture the subtle changes in the time series. Since abnormal discharge signals usually exhibit significant changes within a local time window, Temporal Slicing can ensure that abnormal signals are fully exposed, improving the detection accuracy.
[0103] Considering that time-series signals are continuous and have a certain temporal dependence, a strategy of forcing the representation consistency in the overlapping regions is introduced to prevent the model from experiencing representation collapse during training, that is, the same signal is mapped to completely different representations in adjacent time periods. By ensuring that the signal has a consistent representation within the overlapping regions, the model can better capture the long-term and short-term dependencies of time-series signals, thereby enhancing the robustness of detection.
[0104] To further improve the learning ability of the model, this embodiment innovatively proposes a double contrast loss, which combines instance-level contrast and contrast in the time dimension. This dual contrast learning mechanism extends the traditional contrast learning framework. It not only focuses on the internal consistency of the same signal in different time segments but also, by introducing an attention mechanism, automatically adjusts the attention weights of the model for key time steps, thereby strengthening the representation ability of the model in complex time-series data.
[0105] Finally, by combining the anomaly score and the detection method, STAD-CL can continuously optimize the recognition accuracy of abnormal signals during training and accurately screen out signals with significant abnormal features. This method not only improves the detection effect of abnormal discharge data of power transformers but also has extremely high adaptability in practical applications and can handle different types of time-series data and dynamic working environments.
[0106] The present application also provides an application scenario, which applies the above-mentioned anomaly signal detection method based on self-supervised contrastive learning. Specifically: The anomaly signal detection method based on self-supervised contrastive learning provided in this embodiment can be applied to the scenario of power equipment health monitoring. This scenario includes a data collection and preprocessing link, an anomaly signal detection and analysis link, and a device fault prediction and maintenance decision-making link. The anomaly signal detection method based on self-supervised contrastive learning provided in this embodiment belongs to the key technology in the anomaly signal detection and analysis link. This method can effectively improve the fault warning ability of transformer equipment, reduce the probability of faults, and is widely applied to fields such as power equipment health monitoring, fault prediction, and maintenance decision-making support.
[0107] Embodiment 2
[0108] This embodiment provides a computer device, which can be a server or a terminal, and its internal structure diagram can be as Figure 5 shown. This computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of this computer device is used to store data in the anomaly signal detection method based on self-supervised contrastive learning. The input / output interface of this computer device is used to exchange information between the processor and external devices. The communication interface of this computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements the anomaly signal detection method based on self-supervised contrastive learning in Embodiment 1.
[0109] Those skilled in the art can understand that Figure 5 the structure shown in
[0110] Embodiment 3
[0111] This embodiment provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the abnormal signal detection method based on self-supervised contrastive learning in Embodiment 1.
[0112] Embodiment 4
[0113] This embodiment provides a computer program product including a computer program, which, when executed by a processor, implements the abnormal signal detection method based on self-supervised contrastive learning in Embodiment 1.
[0114] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with relevant regulations.
[0115] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memories can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.
[0116] In each of the embodiments provided in the present application, the database involved may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., without limitation. In each of the embodiments provided in the present application, the processor may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without limitation.
[0117] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0118] Specific examples are used in this article to elaborate on the principles and implementation manners of the present application. The description of the above embodiments is only used to help understand the method and its core idea of the present application; at the same time, for those of ordinary skill in the art, according to the idea of the present application, there will be changes in the specific implementation manners and application scopes. In summary, the content of this specification should not be construed as a limitation to the present application.
Claims
1. A method for detecting abnormal signals based on self-supervised contrastive learning, characterized in that: The abnormal signal detection method based on self-supervised contrastive learning includes: Periodically obtain the transformer timing signal to be processed; Dividing the transformer timing signal to be processed into a plurality of signal segments; Taking a target sub-segment as input, outputting a potential representation of each of the signal segments using a trained stacked dilated convolutional network model, wherein the target sub-segment refers to any two overlapping time periods in each of the signal segments; calculating a score for each of the signal segments according to the latent representation; Whether the transformer timing signal to be processed is abnormal is determined based on all the scores.
2. The abnormal signal detection method based on self-supervised contrastive learning according to claim 1 is characterized in that: The training process of the stacked dilated convolutional network model specifically includes: Periodically obtain historical transformer timing signals; Segmenting the historical transformer timing signal into a plurality of historical signal segments; Constructing a training sample set based on all normal historical signal segments; Training a stacked dilated convolutional network model according to target sample sub-segments, wherein the target sample sub-segments refer to any two overlapping time periods in each normal historical signal segment in the training sample set; When the loss function is minimized, the training of the stacked dilated convolutional network model is completed, wherein the loss function is a function determined according to the instance contrast loss and the time contrast loss, and both the instance contrast loss and the time contrast loss are variables calculated based on the target sample sub-segment.
3. The abnormal signal detection method based on self-supervised contrastive learning according to claim 1 is characterized in that: The step of dividing the transformer timing signal to be processed into a plurality of signal segments specifically includes: The transformer timing signal to be processed is segmented using a timing window cutting strategy to obtain a plurality of signal segments.
4. The abnormal signal detection method based on self-supervised contrastive learning according to claim 1 is characterized in that: Judging whether the transformer timing signal to be processed is abnormal according to all the scores specifically includes: Determining whether each of the signal segments is abnormal according to the score; Whether the transformer timing signal to be processed is abnormal is determined based on the number of all abnormal signal segments and the number threshold.
5. The abnormal signal detection method based on self-supervised contrastive learning according to claim 2 is characterized in that: The calculation formula of the contrast loss of the example is: in, represents the instance contrast loss of the i-th group of data; B represents the size of the batch; j represents the j-th group of data; Represents a high-dimensional encoding of the first target sample sub-segment in the i-th group of data; Represents a high-dimensional encoding of the second target sample sub-segment in the i-th group of data; Represents a high-dimensional encoding of the first target sample sub-segment in the j-th group of data; Represents the high-dimensional encoding of the second target sample sub-segment in the j-th group of data.
6. The abnormal signal detection method based on self-supervised contrastive learning according to claim 2, characterized in that: The calculation formula of the time contrast loss is: in, represents the time contrast loss of the i-th group of data at time step t; Ω represents the entire time series range; and Respectively represent the vectors of the first target sample sub-segment and the second target sample sub-segment in the i-th group of data after being weighted by the attention mechanism at time step t; and Respectively represent the vectors of the first target sample sub-segment and the second target sample sub-segment in the i-th group of data after being weighted by the attention mechanism at time step t'; and Respectively represent the attention weight of sample i at time step t; and They respectively refer to the original feature representations of the first target sample sub-segment and the second target sample sub-segment in the i-th group of data at time step t.
7. The abnormal signal detection method based on self-supervised contrastive learning according to claim 1, characterized in that: The stacked dilated convolutional network model includes 10 dilated convolutional layers.
8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the abnormal signal detection method based on self-supervised contrastive learning as described in any one of claims 1 to 7.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the abnormal signal detection method based on self-supervised contrastive learning described in any one of claims 1 to 7 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the abnormal signal detection method based on self-supervised contrastive learning described in any one of claims 1 to 7 is implemented.