A power equipment state prediction method and system based on online test-time adaptation

By screening similar historical samples in power equipment condition prediction and performing time-frequency domain data augmentation and batch training, the problems of distribution offset and noise interference during online testing were solved, achieving more stable and efficient prediction results.

CN122364688APending Publication Date: 2026-07-10HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
Filing Date
2026-02-14
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

Existing online testing adaptation techniques suffer from distribution offset and noise interference issues in power equipment condition prediction, leading to decreased prediction accuracy and insufficient stability.

Method used

The system filters historical samples with high similarity by using a transferable historical sample selection module. Combined with time-frequency domain data augmentation and batch training, it generates an augmented sample set, dynamically adjusts model parameters to adapt to distribution shifts, and uses a dual-stream predictor for prediction.

Benefits of technology

It improves the stability and reliability of power equipment condition prediction, alleviates distribution offset and noise interference, and enhances prediction performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122364688A_ABST
    Figure CN122364688A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for predicting the state of power equipment based on online testing adaptation, comprising: collecting power equipment state data in real time through sensors and forming test samples; filtering a set of adapted historical samples from a historical sample memory bank that meet preset conditions in terms of similarity to the test samples in the latent space through a transferable historical sample selection module, wherein the historical sample memory bank stores historical power equipment state data; performing time-frequency domain hybrid data augmentation on the test samples and the adapted historical sample set through a transferable online augmentation module to generate an augmented sample set; inputting the augmented sample set into a pre-trained power equipment state prediction model for batch training, dynamically adjusting the model parameters to adapt to the distribution shift; and fusing the output of the dual-stream predictor of the power equipment state prediction model to generate the power equipment state prediction result for the next time period. This invention can perform power equipment state prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of power equipment condition prediction technology, and specifically refers to a power equipment condition prediction method and system based on online testing adaptation. Background Technology

[0002] Power equipment generates a large amount of condition monitoring data during operation, such as transformer pressure, flow rate, and oil temperature. This type of data typically changes continuously over time and is a typical example of time series data. Therefore, the problem of power equipment condition prediction essentially falls under the field of time series forecasting technology.

[0003] Online Test-Time Adaptation (OTTA) is a technique that dynamically adjusts model parameters based on real-time input data during the model deployment phase (testing or real-world application). It breaks through the strict boundaries of the traditional "training-inference" phase of predictive models, allowing the model to perform unsupervised or self-supervised incremental lightweight parameter adjustments based on real-time input data streams during the inference process.

[0004] However, existing solutions for applying online test-time adaptation techniques to power equipment condition prediction still have shortcomings. On the one hand, during online testing of time series data, distribution shift issues can easily occur, meaning that the data distribution used in the model training phase is inconsistent with the data distribution in the testing or actual operation phase, leading to a decrease in prediction accuracy. On the other hand, time series data has strong temporal dependencies and random fluctuation characteristics. When updating parameters in online scenarios, the lightweight adjustment process is easily affected by noise, thus impacting the stability of the model adaptation process and the reliability of the prediction results. Summary of the Invention

[0005] To address the technical problems existing in the prior art, the present invention provides a method and system for predicting the state of power equipment based on online testing adaptation, the technical solution of which is as follows: On the one hand, a method for predicting the state of power equipment based on online testing adaptation is provided, the method comprising: S1. Collect power equipment status data in real time through sensors, and use the real-time collected power equipment status data to form a test sample; S2. Through the transferable historical sample selection module, a set of adapted historical samples in the historical sample memory bank that meet the preset conditions in the potential space similarity with the test sample are selected. The historical sample memory bank stores historical power equipment status data. S3. Using a transferable online enhancement module, perform time-frequency domain-based hybrid data enhancement on the test sample and the adapted historical sample set to generate an enhanced sample set; S4. The enhanced sample set is input into the pre-trained power equipment condition prediction model for batch training. The model parameters are dynamically adjusted to adapt to the distribution shift. The output of the dual-flow predictor of the power equipment condition prediction model is fused to generate the power equipment condition prediction result for the next time period.

[0006] Optionally, S2 specifically includes: The test sample and each historical sample in the historical sample memory are mapped to the latent space by a pre-trained denoising autoencoder (DAE), and the latent vectors of the test sample and each historical sample are generated accordingly. Calculate the cosine similarity between the latent vector of the test sample and the latent vector of each historical sample, as well as the L1 absolute distance between them in the latent space; First, the historical samples in the historical sample memory are filtered based on a preset L1 distance threshold, and historical samples whose absolute distance does not exceed the threshold are retained; then, the filtered historical samples are sorted in descending order according to the cosine similarity, and the top n historical samples with the highest similarity are selected to form the adapted historical sample set. The formula is as follows:

[0007]

[0008]

[0009]

[0010]

[0011]

[0012] in, Indicates the test sample. Let j represent the encoder of the DAE model. The index of the sample element in the sample; express The sample with index j in the middle; This represents the L1 distance between the latent vector of the test sample and the latent vector of the j-th historical sample. It is a pre-set distance threshold for L1; This represents the similarity distance between potential vectors; This indicates the adaptation to a set of historical samples; This represents the index of a historical sample element after sorting. It is a hyperparameter used to specify the number of historical samples to be used.

[0013] Optionally, S3 specifically includes: Perform a Short-Time Fourier Transform (STFT) on the test sample and each historical sample in the adaptation historical sample set to separate and extract the amplitude and phase components in the time-frequency domain, as shown below:

[0014] STFT Short-time Fourier transform, and The tables represent amplitude and phase separately; The time-domain and frequency-domain information of the test samples are mixed with that of historical samples. While preserving the frequency-domain information, the data is enhanced by relevant historical patterns. When the historical samples and the test samples are close in the latent space, it means that their distributions are similar, and data augmentation based on the historical samples is adopted. Conversely, when the distance between the two is large, it means that their distributions are significantly different, and data augmentation based on the test samples is prioritized. The specific mixing process is as follows:

[0015]

[0016]

[0017] in This represents the frequency domain energy percentage of the w-th time-frequency window. This represents the data-augmented sample set. and These are the mixing coefficients for amplitude and phase, respectively. Applying the inverse short-time Fourier transform to the mixed components yields the enhanced sample set. ,use to indicate The elements in the code are as follows:

[0018] in This represents the short-time inverse Fourier transform.

[0019] Optionally, the rules for determining the mixing coefficient include: When the distance between the latent vectors corresponding to the test sample and the historical sample is less than a threshold, the mixing coefficient changes from a uniform distribution. Mid-sampling means that data augmentation is primarily based on historical samples. If the distance is higher than a threshold, a truncated normal distribution with a high mean and low standard deviation is used. Mid-sampling indicates that data augmentation is primarily performed using the test samples. The sampling distribution of the mixing coefficients is determined as follows:

[0020] in The distance between potential vectors. The threshold hyperparameter is a pre-defined parameter.

[0021] Optionally, S4 specifically includes: The sequence decomposition module decomposes the input time series into trend components. and periodic components By simplifying the complexity of the original data, the model can effectively learn complex time patterns in time series forecasting, enabling it to make better predictions. Decomposed trend components and periodic components The data are fed into a dual-current predictor with the same structure, and the outputs of the dual-current predictor are fused to generate a power equipment state prediction result for the next time period. The specific process is as follows: .

[0022] Optionally, the sequence decomposition module is specifically used for: The LOWESS adaptive decomposition is applied to the input sequence to extract the trend component of the time series, and the difference between the trend component and the original sequence is taken as the periodic component. The two reflect the long-term trend and periodic relationship of the time series, respectively. The sequence decomposition process is shown below:

[0023] Autoregression is achieved through the LOWESS locally weighted regression function, and then the moving average is calculated using the moving average smoothing function.

[0024] Optionally, the power equipment condition prediction model adopts... Loss optimization model parameters, loss function Defined as:

[0025] Where N represents the number of channels in the time series; H represents the true value; H represents the prediction length; k represents the channel index.

[0026] On the other hand, a power equipment condition prediction system based on online testing adaptation is provided, the system comprising: The data acquisition module is used to collect real-time status data of power equipment through sensors, and to form test samples using the real-time collected power equipment status data. The filtering module is used to filter the set of adapted historical samples in the historical sample memory bank that meet the preset conditions of similarity with the test sample in the potential space through the transferable historical sample selection module. The historical sample memory bank stores historical power equipment status data. An enhancement module is used to perform time-frequency domain-based hybrid data enhancement on the test samples and the adapted historical sample set through a transferable online enhancement module, thereby generating an enhanced sample set. The prediction module is used to input the enhanced sample set into the pre-trained power equipment state prediction model for batch training, dynamically adjust the model parameters to adapt to the distribution offset, and the output of the dual-stream predictor of the power equipment state prediction model is fused to generate the power equipment state prediction result for the next time period.

[0027] On the other hand, an electronic device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the above-described method for predicting the state of power equipment based on online testing.

[0028] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the above-described method for predicting the state of power equipment based on online testing.

[0029] The beneficial effects of the technical solution provided by this invention include at least the following: Compared to existing methods, this invention achieves superior performance in power equipment condition prediction tasks, providing an efficient and feasible solution for online adaptive prediction of time series data. Specifically: (1) The present invention designs a transferable historical sample selection module to select historical samples that are similar to the test samples. By intelligently selecting historical distribution information that is similar to the current data pattern, the historical distribution information is fully utilized to enhance the model's adaptability to new distributions, effectively alleviate the problem of model performance degradation caused by distribution shift during online time series testing, and ensure the prediction stability and reliability during the testing phase.

[0030] (2) This invention transforms the original online learning paradigm of updating with a single sample and innovatively reintroduces a batch training mechanism in online scenarios to alleviate the interference of noise, further reduce the negative impact of distribution shift, and balance the real-time performance of online learning with the stability of batch training.

[0031] (3) The present invention enhances the time series data based on the frequency domain, and enhances the time series data from both the amplitude and phase perspectives, thereby avoiding the destruction of frequency domain information that is crucial for prediction.

[0032] (4) The present invention decomposes the input time series through the sequence decomposition module, and effectively learns the complex time patterns in time series prediction by simplifying the complexity of the original data, so that the model can make better predictions.

[0033] (5) The present invention is highly versatile and has a wide range of applications: it is designed as a general-purpose online test adaptive method that can be seamlessly integrated into any online time series prediction model without requiring significant modifications to the original model architecture, and has good compatibility and scalability. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in 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.

[0035] Figure 1 This is a flowchart of a power equipment state prediction method based on online testing, provided by an embodiment of the present invention. Figure 2 This is a general block diagram of a power equipment state prediction method based on online testing adaptation provided in an embodiment of the present invention; Figure 3 This is a block diagram of a power equipment state prediction system based on online testing adaptation provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0036] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.

[0037] This invention provides a method for predicting the state of power equipment based on online testing. This method can be implemented by an electronic device, which can be a terminal or a server. Figure 1 The flowchart of this method is shown below. Figure 2 The diagram shown is an overall block diagram of the method. The processing flow may include the following steps: S1. Collect power equipment status data in real time through sensors, and use the real-time collected power equipment status data to form a test sample; For example, taking a power plant scenario with an oil-immersed power transformer as an example, the power equipment status data collected in this embodiment of the invention includes parameters such as transformer pressure, flow rate, and oil temperature. The aforementioned power equipment status data is real-time collected streaming data and arranged in chronological order, constituting time-series data.

[0038] This invention utilizes real-time collected power equipment status data to form a test sample.

[0039] The present invention provides the following problem definition: Given a time series prediction model (i.e., a power equipment status prediction model, specifically a transformer model or other models, which are not limited in this invention and are all within the protection scope of this invention) pre-trained on a training set. Given a set of unlabeled time series segments, the goal of online testing is to utilize the predictive model in an online manner. The model infers future values ​​of samples under a distribution shift by embedding labeled knowledge. In this problem, the learning process takes place in a series of rounds: the model receives a dataset of length... Backtracking window The predicted length is Prediction window The parameters are updated based on the received true values ​​to improve the model's predictive performance in subsequent rounds. The goal of this invention is to continuously optimize the prediction model. This is to mitigate the negative impact of distribution shift.

[0040] For example, when the current time is the 10th second, the backtracking window can select the power equipment status data at the 8th, 9th and 10th seconds, and combine the status data corresponding to the above time points to form a time series sample, which is used as a test sample to input into the prediction model to predict the power equipment status in the next time period (the prediction window length is H and can be preset).

[0041] S2. Through the transferable historical sample selection module, a set of adapted historical samples in the historical sample memory bank that meet the preset conditions of similarity with the test sample in the potential space are selected. The historical sample memory bank stores historical power equipment status data and updates the historical sample memory bank through the first-in-first-out (FIFO) strategy. For example, a historical sample database (in this embodiment of the invention, a historical sample database is established, denoted as...). The historical samples in the data can be time series data of power equipment status data combinations of 1, 2, and 3 seconds, time series data of power equipment status data combinations of 2, 3, and 4 seconds, and time series data of power equipment status data combinations of 3, 4, and 5 seconds.

[0042] Optionally, S2 specifically includes: The test sample and each historical sample in the historical sample memory are mapped to the latent space by a pre-trained denoising autoencoder (DAE), and the latent vectors of the test sample and each historical sample are generated accordingly. In this embodiment of the invention, when a test sample (denoted as...) is received... When testing, a transferable historical sample selection module is used to filter historical samples in the memory bank that are semantically similar to and have a similar distribution to the test samples. This selection is achieved through a mapping model; any model that can maintain the semantic consistency between the original data and the mapped data can be used as the mapping model. Given that denoising autoencoders (DAEs) inherently possess the ability to maintain semantic consistency between input and output, this embodiment of the invention selects a DAE as the mapping model. In the initial stage, the DAE model is pre-trained on the training set in an unsupervised manner; during the testing phase, its parameters are frozen to remain unchanged. When test samples are introduced... Then, the sample and the historical samples stored in the memory are projected into the latent space and latent vectors are generated.

[0043] Calculate the cosine similarity between the latent vector of the test sample and the latent vector of each historical sample, as well as the L1 absolute distance between them in the latent space; First, the historical samples in the historical sample memory are filtered based on a preset L1 distance threshold, and historical samples whose absolute distance does not exceed the threshold are retained. Then, the filtered historical samples are sorted in descending order according to the cosine similarity, and the top n historical samples with the highest similarity are selected to form the adapted historical sample set. Calculate the cosine similarity between the latent vector of the test sample and the latent vector of each historical sample; The formula is as follows:

[0044]

[0045]

[0046]

[0047]

[0048]

[0049] in, Indicates the test sample. Let j represent the encoder of the DAE model. The index of the sample element in the sample; express The sample with index j in the middle; This represents the L1 distance between the latent vector of the test sample and the latent vector of the j-th historical sample. It is a pre-set distance threshold for L1; This represents the similarity distance between potential vectors; This indicates the adaptation to a set of historical samples; This represents the index of a historical sample element after sorting. It is a hyperparameter used to specify the number of historical samples to be used.

[0050] Traditional online time series forecasting often obtains historical distribution information by directly using the most recent historical samples over the time span. This invention innovatively proposes intelligent historical sample selection. By effectively utilizing historical samples with distributions that are relatively similar to the test samples, this invention can effectively alleviate the distribution shift problem and improve prediction performance.

[0051] S3. Using a transferable online enhancement module, perform time-frequency domain-based hybrid data enhancement on the test sample and the adapted historical sample set to generate an enhanced sample set; During online test-time adaptation, embodiments of the present invention mitigate the negative impact of distribution shift by introducing batch training, which can be achieved through data augmentation techniques. However, existing data augmentation methods, such as linear mixing and pruning mixing, focus on mixing time series in the time domain, which destroys frequency domain information that is crucial for prediction. Since distribution shift is more significant in online test-time adaptation, preserving the frequency domain information of the time series becomes particularly critical.

[0052] To better preserve frequency domain information, this invention proposes a transferable online enhancement module. This module employs a dual-stream enhancement method focusing on frequency domain amplitude and phase, and selects a set of adapted historical samples whose distribution closely matches that of the test sample. As a source of enhancement, this measure ensures that the amplitude and phase of the data augmentation samples are reasonably interpolated based on the test samples, avoiding destructive interference in the frequency domain.

[0053] Optionally, S3 specifically includes: Perform a Short-Time Fourier Transform (STFT) on the test sample and each historical sample in the adaptation historical sample set to separate and extract the amplitude and phase components in the time-frequency domain, as shown below:

[0054] STFT Short-time Fourier transform, and The tables represent amplitude and phase separately; The time-domain and frequency-domain information of the test samples and historical samples are mixed to enhance the data by retaining the frequency-domain information and using relevant historical patterns. When the historical samples and the test samples are close in the latent space, it means that their distributions are similar, and data augmentation based on the historical samples is adopted. Conversely, when the distance between the two is large, it means that their distributions are significantly different, and data augmentation based on the test samples is prioritized. The specific mixing process is as follows:

[0055]

[0056] P

[0057] in This represents the frequency domain energy percentage of the w-th time-frequency window. This represents the data-augmented sample set. and These are the mixing coefficients for amplitude and phase, respectively. Applying the inverse short-time Fourier transform to the mixed components yields the enhanced sample set. ,use to indicate The elements in the code are as follows:

[0058] in This represents the short-time inverse Fourier transform.

[0059] Optionally, the rules for determining the mixing coefficient include: When the distance between the latent vectors corresponding to the test sample and the historical sample is less than a threshold, the mixing coefficient changes from a uniform distribution. Mid-sampling means using historical samples as the primary source for data augmentation (in this case, the test sample is similar to the historical sample, and the pre-trained model has already learned the features of the historical sample, so using historical samples as the primary source for data augmentation eliminates the need to relearn test samples that are similar to the historical sample). If the distance is higher than a threshold, the normal distribution is truncated from the high mean and low standard deviation. Mid-sampling indicates that data augmentation is primarily performed using test samples (in this case, the test samples differ significantly from historical samples, requiring further relearning of the test sample features). The sampling distribution of the mixing coefficients is determined as follows:

[0060] in The distance between potential vectors. The threshold hyperparameter is a pre-defined parameter.

[0061] S4. The enhanced sample set is input into the pre-trained power equipment condition prediction model for batch training. The model parameters are dynamically adjusted to adapt to the distribution shift. The output of the dual-flow predictor of the power equipment condition prediction model is fused to generate the power equipment condition prediction result for the next time period.

[0062] Enhanced samples obtained in the embodiments of the present invention Subsequently, the augmented samples and test samples are concatenated into a batch and input into the pre-trained power equipment state prediction model for batch training. Compared with the method of updating the model using only a single test sample, this significantly reduces the negative impact of noise on model optimization (the introduction of noise can cause the model to deviate from the original optimization path and reduce model performance. To address this issue, this embodiment of the invention cleverly utilizes historical distribution information to neutralize the noise information carried by the test samples. Since batch training has more trainable samples than single-sample training, the model is more robust and less susceptible to noise interference. Therefore, this embodiment of the invention concatenates the augmented samples with the test samples and inputs them into the model for training to mitigate the interference of noise).

[0063] Optionally, S4 specifically includes: The sequence decomposition module decomposes the input time series into trend components. and periodic components By simplifying the complexity of the original data, the model can effectively learn complex time patterns in time series forecasting, enabling it to make better predictions. Decomposed trend components and periodic components The data are fed into a dual-current predictor with the same structure, and the outputs of the dual-current predictor are fused to generate a power equipment state prediction result for the next time period. The specific process is as follows: .

[0064] Optionally, the sequence decomposition module is specifically used for: The LOWESS adaptive decomposition is applied to the input sequence to extract the trend component of the time series, and the difference between the trend component and the original sequence is taken as the periodic component. The two reflect the long-term trend and periodic relationship of the time series, respectively. The sequence decomposition process is shown below:

[0065] Autoregression is achieved through the LOWESS locally weighted regression function, and then the moving average is calculated using the moving average smoothing function.

[0066] Optionally, the power equipment condition prediction model adopts... Loss optimization model parameters, loss function Defined as:

[0067] Where N represents the number of channels in the time series; H represents the true value; H represents the prediction length; k represents the channel index.

[0068] During the adaptation process in online testing, this embodiment of the invention uses the true values ​​of all samples. and model prediction output The mean square error and mean absolute error between the two are used as the final evaluation metrics to compare model performance.

[0069] The batch training combined with online transferable data augmentation method proposed in this invention is a general module designed to alleviate the distribution shift problem in online learning. This adaptability allows it to be applied to any online time series prediction model. The flexibility of this method allows for seamless integration with various models, enhancing their robustness to changes in data distribution. Furthermore, this method is not limited to a specific algorithm or framework, meaning that as more advanced deep models develop, it can be embedded to further improve performance.

[0070] like Figure 3 As shown, this embodiment of the invention also provides a power equipment condition prediction system based on online testing adaptation, the system comprising: The acquisition module 310 is used to acquire power equipment status data in real time through sensors and to form a test sample using the acquired power equipment status data. The filtering module 320 is used to filter the set of adapted historical samples in the historical sample memory library that meet the preset conditions of similarity with the test sample in the potential space. The historical sample memory library stores historical power equipment status data. Enhancement module 330 is used to perform time-frequency domain-based hybrid data enhancement on the test sample and the set of adapted historical samples to generate an enhanced sample set; The prediction module 340 is used to input the enhanced sample set into the pre-trained power equipment state prediction model for batch training, dynamically adjust the model parameters to adapt to the distribution offset, and the output of the dual-stream predictor of the power equipment state prediction model is fused to generate the power equipment state prediction result for the next time period.

[0071] The power equipment condition prediction system based on online testing adaptation provided in this embodiment of the invention has a functional structure that corresponds to the power equipment condition prediction method based on online testing adaptation provided in this embodiment of the invention, and will not be described again here.

[0072] Figure 4 This is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of the present invention. The electronic device 400 may vary considerably due to different configurations or performance. It may include one or more central processing units (CPUs) 401 and one or more memories 402. The memory 402 stores at least one instruction, which is loaded and executed by the processor 401 to implement the steps of the above-described method for predicting the state of power equipment based on online testing.

[0073] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including instructions that can be executed by a processor in a terminal to perform the aforementioned power equipment state prediction method adapted during online testing. For example, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, or optical data storage device.

[0074] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0075] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for predicting the state of power equipment based on online testing adaptation, characterized in that, The method includes: S1. Collect power equipment status data in real time through sensors, and use the real-time collected power equipment status data to form a test sample; S2. Through the transferable historical sample selection module, a set of adapted historical samples in the historical sample memory bank that meet the preset conditions in the potential space similarity with the test sample are selected. The historical sample memory bank stores historical power equipment status data. S3. Using a transferable online enhancement module, perform time-frequency domain-based hybrid data enhancement on the test sample and the adapted historical sample set to generate an enhanced sample set; S4. The enhanced sample set is input into the pre-trained power equipment condition prediction model for batch training. The model parameters are dynamically adjusted to adapt to the distribution shift. The output of the dual-flow predictor of the power equipment condition prediction model is fused to generate the power equipment condition prediction result for the next time period.

2. The method according to claim 1, characterized in that, S2 specifically includes: The test sample and each historical sample in the historical sample memory are mapped to the latent space by a pre-trained denoising autoencoder (DAE), and the latent vectors of the test sample and each historical sample are generated accordingly. Calculate the cosine similarity between the latent vector of the test sample and the latent vector of each historical sample, as well as the L1 absolute distance between them in the latent space; First, the historical samples in the historical sample memory are filtered based on a preset L1 distance threshold, and historical samples whose absolute distance does not exceed the threshold are retained. Then, the filtered historical samples are sorted in descending order according to the cosine similarity, and the top n historical samples with the highest similarity are selected to form the adapted historical sample set. The formula is as follows: ; ; ; ; ; ; in, Indicates the test sample. Let j represent the encoder of the DAE model. The index of the sample element in the sample; express The sample with index j in the middle; This represents the L1 distance between the latent vector of the test sample and the latent vector of the j-th historical sample. It is a pre-set distance threshold for L1; This represents the similarity distance between potential vectors; This indicates the adaptation to a set of historical samples; This represents the index of a historical sample element after sorting. It is a hyperparameter used to specify the number of historical samples to be used.

3. The method according to claim 2, characterized in that, S3 specifically includes: Perform a Short-Time Fourier Transform (STFT) on the test sample and each historical sample in the adaptation historical sample set to separate and extract the amplitude and phase components in the time-frequency domain, as shown below: ; Where STFT represents the short-time Fourier transform. and The tables represent amplitude and phase separately; The time-domain and frequency-domain information of the test samples are mixed with that of historical samples. While preserving the frequency-domain information, the data is enhanced by relevant historical patterns. When the historical samples and the test samples are close in the latent space, it means that their distributions are similar, and data augmentation based on the historical samples is adopted. Conversely, when the distance between the two is large, it means that their distributions are significantly different, and data augmentation based on the test samples is prioritized. The specific mixing process is as follows: ; ; ; in This represents the frequency domain energy percentage of the w-th time-frequency window. This represents the data-augmented sample set. and These are the mixing coefficients for amplitude and phase, respectively. Applying the inverse short-time Fourier transform to the mixed components yields the enhanced sample set. ,use to indicate The elements in the code are as follows: ; in This represents the short-time inverse Fourier transform.

4. The method according to claim 3, characterized in that, The rules for determining the mixing coefficient include: When the distance between the latent vectors corresponding to the test sample and the historical sample is less than a threshold, the mixing coefficient changes from a uniform distribution. Mid-sampling means that data augmentation is primarily based on historical samples. If the distance is higher than a threshold, a truncated normal distribution with a high mean and low standard deviation is used. Mid-sampling indicates that data augmentation is primarily performed using the test samples. The sampling distribution of the mixing coefficients is determined as follows: ; in The distance between potential vectors. The threshold hyperparameter is a pre-defined threshold.

5. The method according to claim 1, characterized in that, S4 specifically includes: The sequence decomposition module decomposes the input time series into trend components. and periodic components By simplifying the complexity of the original data, the model can effectively learn complex time patterns in time series forecasting, enabling it to make better predictions. Decomposed trend components and periodic components The data are fed into a dual-current predictor with the same structure, and the outputs of the dual-current predictor are fused to generate a power equipment state prediction result for the next time period. The specific process is as follows: 。 6. The method according to claim 5, characterized in that, The sequence decomposition module is specifically used for: The LOWESS adaptive decomposition is applied to the input sequence to extract the trend component of the time series, and the difference between the trend component and the original sequence is taken as the periodic component. The two reflect the long-term trend and periodic relationship of the time series, respectively. The sequence decomposition process is shown below: ; Autoregression is achieved through the LOWESS locally weighted regression function, and then the moving average is calculated using the moving average smoothing function.

7. The method according to claim 1, characterized in that, The power equipment condition prediction model adopts Loss optimization model parameters, loss function Defined as: ; Where N represents the number of channels in the time series; H represents the true value; H represents the prediction length; k represents the channel index.

8. A power equipment condition prediction system based on online testing adaptation, characterized in that, The system includes: The data acquisition module is used to collect real-time status data of power equipment through sensors, and to form test samples using the real-time collected power equipment status data. The filtering module is used to filter the set of adapted historical samples in the historical sample memory bank that meet the preset conditions of similarity with the test sample in the potential space through the transferable historical sample selection module. The historical sample memory bank stores historical power equipment status data. An enhancement module is used to perform time-frequency domain-based hybrid data enhancement on the test samples and the adapted historical sample set through a transferable online enhancement module, thereby generating an enhanced sample set. The prediction module is used to input the enhanced sample set into the pre-trained power equipment state prediction model for batch training, dynamically adjust the model parameters to adapt to the distribution offset, and the output of the dual-stream predictor of the power equipment state prediction model is fused to generate the power equipment state prediction result for the next time period.

9. An electronic device comprising a processor and a memory, wherein the memory stores at least one instruction, characterized in that, The at least one instruction is loaded and executed by the processor to implement the power equipment state prediction method based on online testing as described in any one of claims 1-7.

10. A computer-readable storage medium storing at least one instruction, characterized in that, The at least one instruction is loaded and executed by the processor to implement the power equipment state prediction method based on online testing as described in any one of claims 1-7.