Time sequence load identification method and system based on self-supervised autoregression domain adaptation
By employing a self-supervised autoregressive domain adaptation method, which combines self-supervised learning, autoregressive modeling, and a teacher pseudo-labeling mechanism, the problem of performance degradation in cross-domain scenarios of traditional NILM methods is solved. This achieves high-accuracy load identification and strong transferability, making it suitable for user-side energy consumption analysis and identification in smart grids.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-26
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional non-intrusive load monitoring methods suffer from performance degradation in complex application scenarios involving cross-scene, cross-user, or inconsistent data distributions. In particular, they lack generalization ability in unlabeled target domains, and existing UDA methods fail to effectively address the temporal dependencies and class distribution differences in time series data.
We adopt a self-supervised autoregressive domain adaptation method, which combines self-supervised learning, autoregressive modeling, and teacher pseudo-labeling mechanism with adversarial training to achieve synergistic optimization of feature modeling, domain alignment, and class recognition. This includes self-supervised source domain pre-training, autoregressive domain alignment, and pseudo-label-guided class condition alignment, thereby improving the model's transferability under unlabeled conditions.
It significantly improves the accuracy of load identification, with an average improvement of more than 10%, and achieves strong transferability, high time-series alignment accuracy and classification robustness. It is suitable for load status identification, anomaly detection and energy consumption analysis on the user side of smart grids, and can be deployed without target domain labels.
Smart Images

Figure CN121786422A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power load monitoring technology, and in particular to a time series load identification method and system based on self-supervised autoregressive domain adaptation. Background Technology
[0002] Building a clean, low-carbon, safe, and efficient modern energy system has become a crucial task for the contemporary power industry. The development of smart grids and user-side energy management technologies has placed higher demands on equipment operating status perception, precise load identification, and data-driven dispatch control. Against this backdrop, Non-Intrusive Load Monitoring (NILM), which only requires collecting total current or voltage information to infer the operating status and energy consumption characteristics of each electrical device, has become an important technology supporting load forecasting, energy efficiency analysis, and demand response.
[0003] Traditional NILM methods rely on supervised learning models with large amounts of labeled data, which places high demands on labeling costs and deployment environments. This is especially problematic in cross-regional, cross-user, or cross-time-period applications, where significant distributional differences—a "domain shift" problem—exist between the source and target domains due to variations in appliance types, usage behaviors, and power grid environments. This severely weakens the model's generalization ability and recognition accuracy. Therefore, researching transfer learning methods for unlabeled target domains has become an important direction in current NILM research.
[0004] Unsupervised Domain Adaptation (UDA), a typical branch of transfer learning, aims to train a model using labeled source domain data and generalize it to an unlabeled target domain. Typical UDA methods fall into two main categories: discrepancy minimization methods and adversarial training methods. The former, such as Maximum Mean Dissimilarity (MMD) and Higher-Order Moment Matching (HoMM), improves transfer performance by minimizing the statistical distribution distance between the source and target domains in the feature space. The latter, through adversarial training structures, introduces a domain discriminator and uses game-theoretic optimization to make it difficult for the feature extractor to distinguish the source of samples, thereby achieving implicit feature alignment.
[0005] However, the above methods are mostly derived from the image domain and have the following problems when directly applied to time series data: (1) Ignoring the temporal dependence of time series and performing domain alignment only at the global feature level may lead to intra-class confusion; (2) The model usually relies on pre-trained weights such as ImageNet, but the time series domain lacks public pre-training resources of similar scale; (3) When the distribution of class conditions is large, pseudo-alignment is easy to occur, leading to misjudgment.
[0006] To address the aforementioned issues, existing research has attempted to improve the performance of UDA methods in time series tasks by combining self-supervised learning, autoregressive modeling, and teacher pseudo-labeling mechanisms. Specifically, self-supervised learning constructs auxiliary tasks such as predicting future time steps and sorting time segments, enabling the model to learn general representations under unlabeled conditions; the autoregressive mechanism enhances the ability to model temporal dependencies in features; and the teacher model can generate high-confidence pseudo-labels, further reducing the difference in class distribution between the source and target domains.
[0007] While some methods have explored the combination of self-supervised and adversarial training, most have not organically integrated these three elements, making them unsuitable for stable and efficient application in complex, cross-domain temporal load recognition scenarios. Therefore, a novel fusion method is urgently needed to collaboratively optimize the entire process from feature modeling and domain alignment to category recognition, thereby achieving highly accurate and robust NILM model transfer capabilities. Summary of the Invention
[0008] To address the problems existing in the prior art, the present invention aims to provide a time-series load identification method and system based on self-supervised autoregressive domain adaptation. This method addresses the performance degradation of traditional non-intrusive load monitoring (NILM) methods in complex application scenarios such as cross-scenario, cross-user, or inconsistent data distribution. This method is particularly suitable for typical weakly supervised environments with unlabeled target domains and limited source domain labels. It boasts advantages such as strong label-free migration capability, strong ability to model time-series features, and strong class distribution alignment capability, and can be widely applied in areas such as user-side load status identification, anomaly detection, and energy consumption analysis in smart grids.
[0009] To achieve the above objectives, the present invention provides the following solution: A time-series load identification method based on self-supervised autoregressive domain adaptation includes: Acquire time series data, encode the time series data for features, and generate a context vector using an autoregressive network. Based on the context vector, establish a contrastive learning objective and set a first joint optimization objective by combining the cross-entropy loss optimized in parallel with the source domain samples to train the discriminative representation of the model's time series prediction capability. The encoding results of the source domain and the target domain are obtained, the encoding results are input into the autoregressive network, and the domain discriminator is used to output the binary classification probability, which is used to update the target encoder and classifier in an adversarial learning manner. The domain discriminator loss is combined to set a second joint optimization objective. The second joint optimization objective is used to make the target domain features gradually align with the source domain in the time structure through adversarial game. A teacher-student structure is established. The teacher model in the teacher-student structure is used to predict the target domain samples and to select the predicted samples with confidence scores higher than the target threshold. Pseudo-labels are obtained and used to construct pseudo-supervised cross-entropy loss. The student model is trained by exponential moving average in conjunction with the update function of the adversarial learning method. The trained student model is output, which is the trained target encoder and classifier. The trained target encoder and classifier are used to predict the load category.
[0010] Optionally, establishing the contrastive learning objective includes: The context vector is mapped to the predicted representation at the target time step, the predicted representation is compared with the true future representation using a dot-product, and the contrastive learning objective is constructed using the InfoNCE loss function. ; in, For temperature coefficient, The set of negative samples in the mini-batch The true future feature vector / latent representation of the i-th time series sample at the k-th prediction step forward is obtained by the encoder. For set The feature vector / latent representation of the j-th candidate sample at the corresponding time step is included in the denominator as both positive and negative samples for comparison. This is the future latent vector representation at time step t+k, which is the predicted value, obtained by the autoregressive predictor based on the context before time step t.
[0011] Optionally, the cross-entropy loss optimized in parallel with the source domain samples includes: ; in, To optimize the cross-entropy loss in parallel with the source domain samples, For the first One source domain sample, For the first Category labels, As a source domain classifier, it receives the features output by the encoder and provides the predicted probability distribution for each category. As a source domain feature encoder, it maps the input time series into feature representations. This represents the total number of source domain samples participating in the training.
[0012] Optionally, setting the first joint optimization objective includes: ; in, This is the balance coefficient.
[0013] Optionally, updating the target encoder and classifier using the adversarial learning method includes: ; The update function of the adversarial learning method is denoted as: , To represent the mathematical expectation of the samples in the target domain, i.e., the average value operation, This is the time-series feature representation obtained by the target domain encoder from the target domain samples; For the domain discriminator D, the target domain features The output is the binary classification probability of "belonging to the source domain".
[0014] Optionally, the domain discriminator loss includes: ; in, For the domain discriminator loss, To represent the mathematical expectation of the source domain samples, i.e., the average value operation, For the domain discriminator D, the source domain features The output is the binary classification probability of "belonging to the source domain".
[0015] Optionally, setting the second joint optimization objective includes: ; Wherein, the second joint optimization objective is , For the domain discriminator loss, To update the function in an adversarial learning manner, the second joint optimization objective is to jointly minimize... and Complete the autoregressive domain alignment.
[0016] Optionally, constructing the pseudo-supervised cross-entropy loss includes: ; in, For pseudo-supervised cross-entropy loss, This is the mathematical expectation of the samples in the target domain, i.e., the average value calculation. For the category of load, The pseudo-labels, obtained from the teacher model and confidence threshold, represent the index of the category to which the target domain sample is believed to belong. This represents the predicted probability of the target domain classifier for the k-th class, i.e., the confidence that a sample in the target domain belongs to the k-th class.
[0017] Optionally, training the student model using the exponential moving average method includes: ; in, To update the smoothness coefficients, This is the parameter vector for the teacher model, where `teacher` represents the model parameters. The student model is the parameter vector of the target model, which consists of the target domain encoder and the classifier.
[0018] To achieve the above objectives, the present invention also provides a time-series load identification system based on self-supervised autoregressive domain adaptation, comprising: The self-supervised source domain pre-training module is used to acquire time series data, encode the time series data for features, generate a context vector using an autoregressive network, establish a contrastive learning objective based on the context vector, and set a first joint optimization objective by combining the cross-entropy loss optimized in parallel with the source domain samples to train the discriminative representation of the model's time series prediction capability. The autoregressive domain alignment module is used to obtain the encoding results of the source domain and the target domain, input the encoding results into the autoregressive network, and use the domain discriminator to output binary classification probabilities. It is used to update the target encoder and classifier in an adversarial learning manner, and set a second joint optimization objective by combining the domain discriminator loss. The second joint optimization objective is used to make the target domain features gradually align with the source domain in the time structure through adversarial game. The pseudo-label-guided class-conditional alignment module is used to establish a teacher-student structure. The teacher model in the teacher-student structure is used to predict target domain samples and filter out predicted samples with confidence scores higher than the target threshold to obtain pseudo-labels. These pseudo-labels are used to construct a pseudo-supervised cross-entropy loss and, together with the update function of the adversarial learning method, train the student model through an exponential moving average method. The trained student model is then output, which is the trained target encoder and classifier. The trained target encoder and classifier are used to predict the load category.
[0019] The beneficial effects of this invention are as follows: This invention has been validated on multiple real-world time-series datasets. Experimental results show that the method can still significantly improve recognition performance in unlabeled target domains, with an average accuracy improvement of over 10%. Specific technical effects include: Strong transferability: The self-supervised pre-training module of this invention effectively alleviates the source domain overfitting problem and improves the target domain adaptability; High time alignment accuracy: The autoregressive discrimination mechanism of this invention makes up for the shortcomings of traditional methods in ignoring time dependence and achieves fine time alignment; Category boundary robustness: The teacher model of this invention provides high-quality pseudo-labels, guides the model to avoid pseudo-alignment, and improves classification robustness; Low deployment cost: This invention does not require target domain labels and can be deployed directly on the user side or edge devices; High versatility: This invention is adaptable to various time-series scenarios, such as electricity consumption behavior recognition, fault detection, and sleep stage analysis. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the 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.
[0021] Figure 1 This is a flowchart of a time series load identification method based on self-supervised autoregressive domain adaptation, according to an embodiment of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0024] This embodiment discloses a time series load identification system based on self-supervised autoregressive domain adaptation, comprising the following three major technical modules: 1) Self-Supervised Source Domain Pre-training Module: This module aims to address the issues of overfitting and weak generalization in traditional transfer learning models. By constructing a future prediction task for time series data, the model learns high-level abstract features with temporal dependencies without requiring labels. The specific implementation is as follows: Input time series data Feed into a one-dimensional convolution encoder ; Extraction time step Previous implicit vector representation The input is fed into an autoregressive network to generate a context vector. ; Through a fully connected network Will Mapped to future time steps The prediction indicates ; Representing the Real Future Perform similarity matching (dot-product): ; Define a contrastive loss function to distinguish between positive and negative samples (i.e., the same sequence and different sequences): Therefore, the loss function can be rewritten as: ; Simultaneously, a supervised classification loss from the source domain is introduced: ; It can be further rewritten as: Joint optimization objective: ; This module enhances the encoder's ability to perceive temporal structure through self-supervised pre-training, enabling the learned features to have stronger transfer and generalization capabilities.
[0025] Autoregressive Domain Discriminant Module: Traditional domain discriminators mostly ignore the temporal information of time series, leading to insufficient feature alignment. This invention designs an autoregressive domain discriminator (DAR), consisting of two parts: Self-regressing network Used to extract the time context information of the input sequence: ; Domain discriminator ,right The output is used for binary classification to distinguish whether a sample comes from the source domain: ; Its optimization objective is to achieve binary cross-entropy adversarial loss.
[0026] Discriminator loss (fixed encoder): ; This module enables the alignment of the source and target domains in the temporal context dimension, thereby improving the accuracy of cross-domain temporal sequence recognition.
[0027] A class-conditional alignment module based on a teacher model is proposed. Considering the potential for class boundary offsets between different domains, simple global alignment may lead to pseudo-alignment. This invention utilizes a "teacher-student model" mechanism to propose a class-conditional alignment method based on confidence pseudo-labels. The core steps are as follows: Building a teacher model Its parameters are updated using an exponential moving average to update the parameters of the student model. : ; The teacher model predicts the probability of samples in the target domain. It also calculates confidence pseudo-labels, which are used to filter out high-confidence samples and construct pseudo-supervised cross-entropy loss to achieve class-conditional alignment. ; Select high-confidence pseudo-label samples and calculate the class-conditional alignment loss: ; The final joint optimization objective is: ; This mechanism effectively guides the model to gradually adjust the category boundaries of the target domain without introducing real labels, thereby improving the accuracy and stability of load identification.
[0028] The core objective of this invention is to improve the generalization performance and transfer capability of a non-intrusive load identification system in cross-user or cross-scenario applications, under the condition that the source domain has labels and the target domain is unlabeled. This method mainly includes three stages: source domain pre-training, autoregressive domain alignment, and pseudo-label-guided class condition adaptation. The invention will be described in detail below from the aspects of data processing, module structure, training mechanism, and inference deployment.
[0029] like Figure 1 As shown, this embodiment discloses a time-series load identification method based on self-supervised autoregressive domain adaptation, including: Data Preparation and Input: To implement the method of this invention, it is first necessary to acquire the total voltage, current, or power time series data of the source and target domains. The input data format is set as follows: ; in, The sampling time length, This represents the channel dimension (e.g., voltage, current, etc.). Source domain samples are labeled data pairs. The target domain samples are unlabeled data. To ensure model stability, all samples are standardized and segmented using a sliding window. The window length can be set to 256, 512, or 1024 steps, and the overlap ratio can be set to 50%.
[0030] Self-supervised source domain pre-training module: 1) Feature encoder design: This invention employs a lightweight one-dimensional convolutional encoder as the feature extraction module. The structure includes: ①Multiple one-dimensional convolutional layers (Conv1D) are used to extract local temporal features; ② Batch normalization (BatchNorm) and activation functions (such as ReLU); ③ Optional residual connections (ResNet-style) enhance deep modeling capabilities.
[0031] The output latent vector is represented as: 2) Self-supervised prediction task: Construct a future-step prediction task. For each time step... From history Predicting the future Latent vectors: ① Use GRU or Transformer as an autoregressive network Generate context vector The self-supervised module and the autoregressive domain alignment module share the same autoregressive network structure for extracting the temporal context vector.
[0032] ② Predictive representation mapped to the target time step ; ③ Representation of the real future Perform dot-product comparison; ④ Construct the contrastive learning objective using the InfoNCE loss function: ; in, For temperature coefficient, This is the set of negative samples in the mini-batch.
[0033] Supervised classification loss: Source domain samples simultaneously have class labels The cross-entropy loss can be optimized in parallel: ; 4) Joint optimization objective: ; in, This is the balance coefficient, and an initial value of 1 is recommended.
[0034] Through this training phase, the source domain feature encoder and its classification head obtain discriminative representations with temporal prediction capabilities, providing a strong feature foundation for subsequent target domain transfer and domain alignment.
[0035] After completing the self-supervised source domain pre-training, the source domain encoder will be... The parameters are copied as initial weights to the target domain encoder. In the middle, the weight transfer from source to target is completed; optionally, some shallow parameters are frozen to maintain general low-level features, and then the deep parameters are fine-tuned in the subsequent autoregressive domain alignment and class conditional alignment stages.
[0036] Autoregressive domain alignment module: This module is used to reduce the distribution difference between the source domain and the target domain in the time dimension when the target domain is unlabeled, thus avoiding the defect of traditional adversarial alignment that ignores the temporal characteristics.
[0037] 1) Autoregressive discriminant structure: Input: Encoding results of the source and target domains , ; Uses an autoregressive network shared with the self-supervised module. Extract contextual features; Domain discriminator Given a simple MLP network, output binary classification probabilities; The discriminator loss is: ; The target encoder is updated using adversarial learning: ; in, This is the adversarial loss between the target encoder and classifier, used to minimize the target domain features while keeping the domain discriminator structure unchanged. Mapped to a distribution that is close to the features of the source domain.
[0038] In the autoregressive domain alignment stage, the domain discriminator and the target encoder adopt an alternating optimization approach, and their joint optimization objective is: ; in, The loss of the aforementioned domain discriminator; To combat loss for the aforementioned target encoder.
[0039] This mechanism improves the transfer effect by gradually aligning the features of the target domain with the source domain over time through adversarial game.
[0040] Pseudo-label-guided class condition alignment module: To address the problem that traditional UDA methods only achieve "marginal distribution alignment" while ignoring "category conditional distribution", this invention introduces a teacher network mechanism to guide the category-level alignment process.
[0041] 1) Teacher-student structure: Teacher Model With student model They have the same structure; Parameter updates are performed using an exponential moving average method: ; in It is used to control the smoothness of updates.
[0042] Pseudo-label generation and confidence filtering: The teacher model makes predictions for samples in the target domain: ; ; Filter out those with confidence scores higher than the threshold For the samples, generate pseudo-labels (here, the pseudo-labels are the discrete category labels obtained after threshold filtering of the previous confidence pseudo-labels): ; Constructing a pseudo-supervised cross-entropy loss: ; By using high-confidence pseudo-labels to guide class condition alignment, the accuracy of boundary modeling and intra-class consistency can be effectively improved.
[0043] Joint training and inference deployment: The training process of this invention adopts a phased strategy: firstly, the source domain encoder and source domain classifier are self-supervised pre-trained using a first joint optimization objective; then, a domain discriminator is introduced, and the discriminator loss is used to perform training. Adversarial loss against the target encoder Autoregressive domain alignment is completed; based on this, a class-conditional alignment loss guided by teacher-student structure and pseudo-labels is further introduced. Fine-grained category alignment is performed on the target encoder.
[0044] In the autoregressive domain alignment and class-conditional alignment stages, the joint optimization objective for the target encoder and its target classifier is: ; in, To combat loss in the target encoder, For pseudo-supervised conditional alignment loss, These are pseudo-label alignment weights, used to balance the impact of both on the target encoder update. After training, the model retains the target domain encoder. With classifier During the inference phase, only the total current and voltage data of the target user need to be input to predict its corresponding load category.
[0045] The model supports deployment on lightweight edge devices, features fast inference speed and low resource consumption, and is suitable for energy consumption monitoring and intelligent sensing systems in scenarios such as homes, buildings, and industrial parks.
[0046] Real-world data validation: To fully validate the adaptability and effectiveness of the self-supervised autoregressive domain adaptation-based load identification method proposed in this invention in real-world scenarios, this paper selects three publicly available non-intrusive load monitoring datasets for experiments: REDD (The Reference Energy Disaggregation Dataset), UK-DALE (UK Domestic Appliance-Level Electricity), and REFIT (The REFIT Electrical Load Measurements Dataset). These three datasets exhibit significant differences in sampling frequency, number of households, measurement duration, and geographical region, effectively simulating typical migration scenarios across regions, users, and distributions, providing a rigorous validation environment for the unsupervised domain adaptation mechanism designed in this invention.
[0047] The REDD dataset, sourced from the United States, contains total load and individual appliance data from six households. The overall data sampling frequency is 1 second, while the raw sampling rate for each appliance channel is 3 seconds. To meet the requirements of unified temporal modeling in this invention and to achieve alignment with the target domain data, all appliance data were upsampled to 1 second using linear interpolation in the experiment. The data collection duration for each household ranged from 3 to 19 days. The REDD dataset is relatively short but contains frequent appliance start-ups and shutdowns, making it suitable for training source domain feature encoders and self-supervised structures.
[0048] The DALE dataset, sourced from the UK, features a longer data collection period, recording electricity data from five households. The overall sampling frequency is either 1 second or 6 seconds, with appliance data sampled at 6 seconds. This paper uses a uniform 1-second frequency for total power data and upsamples the appliance data by 1 second to maintain consistency with REDD. DALE exhibits significant differences in user habits, demonstrating typical cross-national and cross-usage transfer characteristics, making it an ideal scenario for validating the target domain's adaptability.
[0049] The REFIT dataset, also collected in the UK, includes energy consumption data from 20 households between 2013 and 2015, with a sampling period of 8 seconds for total load and appliance data. Considering that REDD and DALE have a 1-second sampling rate, this paper upsamples the total load and appliance data in REFIT by 1 second to achieve cross-dataset domain adaptation and unified modeling. REFIT's long data collection period and diverse device types make it suitable for multi-objective domain evaluation tasks.
[0050] Regarding model input, this paper prepares all datasets using a sliding window segmentation method with a fixed window length of 256. The input samples consist of continuous total current or power sequences, with a unified dimensionality. Six representative common electrical appliances (such as refrigerators, washing machines, microwave ovens, electric kettles, hair dryers, and televisions) were selected from each dataset as recognition targets to construct a multi-class classification task.
[0051] To simulate a real transfer learning environment, the experiment adopted the standard UDA setting of "labeled source domain, unlabeled target domain", specifically divided into the following transfer tasks: REDD→DALE, REDD→REFIT, and DALE→REFIT. During the training phase, only source domain samples and their appliance labels were used to train the model. The target domain data was not provided with any labels for training and was only used to evaluate the recognition performance during the testing phase. The comparison methods included: (1) Source Only, that is, the model trained only in the source domain was directly tested on the target domain; (2) DANN, a classic method of adversarial domain adaptation; (3) TCL and SCADANN, the current mainstream transfer methods for time series optimization; (4) the self-supervised autoregressive domain adaptation method proposed in this invention.
[0052] Experimental results show that in the REDD→DALE transfer task, the method of this invention achieved an F1-Macro score of 87.3%, which is nearly 19.1% and 11.7% higher than Source Only (68.2%) and DANN (75.6%), respectively, significantly outperforming existing methods. In the REDD→REFIT and DALE→REFIT tasks, this method achieved average recognition accuracies of 85.5% and 88.2%, respectively, leading in multiple categories, and maintaining stable recognition ability, especially in difficult-to-classify appliances (such as microwave ovens and televisions).
[0053] Furthermore, this invention also conducted ablation experiments on the pseudo-label guidance mechanism and the autoregressive domain alignment module. After removing the teacher model, the classification boundary of the target domain samples became unclear, and the F1 score decreased by approximately 6%. After removing the autoregressive network, the ability to model temporal dependencies was weakened, and the domain alignment effect significantly decreased, indicating that both modules play a crucial role in the overall performance. Further time complexity tests show that the method of this invention relies only on a single-branch main network during the inference phase, achieving an inference speed of hundreds of times per second on embedded devices such as Raspberry Pi, meeting the requirements of edge deployment.
[0054] In summary, experimental verification based on three real datasets—REDD, DALE, and REFIT—fully demonstrates that the method proposed in this invention exhibits significant improvements in recognition accuracy, good transfer robustness, and superior deployment adaptability in various cross-domain environments. It meets the practical needs of smart grid user-side energy consumption analysis and electricity consumption behavior recognition, and possesses broad prospects for engineering promotion and industrialization potential.
[0055] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.
Claims
1. A time-series load identification method based on self-supervised autoregressive domain adaptation, characterized in that, include: Acquire time series data, encode the time series data for features, and generate a context vector using an autoregressive network. Based on the context vector, establish a contrastive learning objective and set a first joint optimization objective by combining the cross-entropy loss optimized in parallel with the source domain samples to train the discriminative representation of the model's time series prediction capability. The encoding results of the source domain and the target domain are obtained, the encoding results are input into the autoregressive network, and the domain discriminator is used to output the binary classification probability, which is used to update the target encoder and classifier in an adversarial learning manner. The domain discriminator loss is combined to set a second joint optimization objective. The second joint optimization objective is used to make the target domain features gradually align with the source domain in the time structure through adversarial game. A teacher-student structure is established. The teacher model in the teacher-student structure is used to predict the target domain samples and to select the predicted samples with confidence scores higher than the target threshold. Pseudo-labels are obtained and used to construct pseudo-supervised cross-entropy loss. The student model is trained by exponential moving average in conjunction with the update function of the adversarial learning method. The trained student model is output, which is the trained target encoder and classifier. The trained target encoder and classifier are used to predict the load category.
2. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, The established contrastive learning objectives include: The context vector is mapped to the predicted representation at the target time step, the predicted representation is compared with the true future representation using a dot-product, and the contrastive learning objective is constructed using the InfoNCE loss function. ; in, For temperature coefficient, The set of negative samples in the mini-batch The true future feature vector / latent representation of the i-th time series sample at the k-th prediction step forward is obtained by the encoder. For set The feature vector / latent representation of the j-th candidate sample at the corresponding time step is included in the denominator as both positive and negative samples for comparison. This is the future latent vector representation at time step t+k, which is the predicted value, obtained by the autoregressive predictor based on the context before time step t.
3. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, The cross-entropy loss, which is optimized in parallel with the source domain samples, includes: ; in, To optimize the cross-entropy loss in parallel with the source domain samples, For the first One source domain sample, For the first Category labels, As a source domain classifier, it receives the features output by the encoder and provides the predicted probability distribution for each category. As a source domain feature encoder, it maps the input time series into feature representations. This represents the total number of source domain samples participating in the training.
4. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, Setting the first joint optimization objective includes: ; in, This is the balance coefficient.
5. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, Updating the target encoder and classifier using the adversarial learning method includes: ; The update function of the adversarial learning method is denoted as: , To represent the mathematical expectation of the samples in the target domain, i.e., the average value operation, This is the time-series feature representation obtained by the target domain encoder from the target domain samples; For the domain discriminator D, the target domain features Output the binary classification probability of "belonging to the source domain".
6. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, The domain discriminant loss includes: ; in, For the domain discriminator loss, To represent the mathematical expectation of the source domain samples, i.e., the average value operation, For the domain discriminator D, the source domain features Output the binary classification probability of "belonging to the source domain".
7. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, The second joint optimization objective includes: ; Wherein, the second joint optimization objective is , For the domain discriminator loss, To update the function in an adversarial learning manner, the second joint optimization objective is achieved by jointly minimizing... and Complete the autoregressive domain alignment.
8. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, Constructing the pseudo-supervised cross-entropy loss includes: ; in, For pseudo-supervised cross-entropy loss, This is the mathematical expectation of the samples in the target domain, i.e., the average value calculation. For the category of load, The pseudo-labels, obtained from the teacher model and confidence threshold, represent the index of the category to which the target domain sample is believed to belong. This represents the predicted probability of the target domain classifier for the k-th class, i.e., the confidence that a sample in the target domain belongs to the k-th class.
9. The time series load identification method based on self-supervised autoregressive domain adaptation according to claim 1, characterized in that, Training the student model using the exponential moving average method includes: ; in, To update the smoothness coefficients, This is the parameter vector for the teacher model, where `teacher` represents the model parameters. The student model is the parameter vector of the target model, which consists of the target domain encoder and the classifier.
10. A time-series load identification system based on self-supervised autoregressive domain adaptation implemented according to any one of claims 1-9, characterized in that, include: The self-supervised source domain pre-training module is used to acquire time series data, encode the time series data for features, generate a context vector using an autoregressive network, establish a contrastive learning objective based on the context vector, and set a first joint optimization objective by combining the cross-entropy loss optimized in parallel with the source domain samples to train the discriminative representation of the model's time series prediction capability. The autoregressive domain alignment module is used to obtain the encoding results of the source domain and the target domain, input the encoding results into the autoregressive network, and use the domain discriminator to output binary classification probabilities. It is used to update the target encoder and classifier in an adversarial learning manner, and set a second joint optimization objective by combining the domain discriminator loss. The second joint optimization objective is used to make the target domain features gradually align with the source domain in the time structure through adversarial game. The pseudo-label-guided class-conditional alignment module is used to establish a teacher-student structure. The teacher model in the teacher-student structure is used to predict target domain samples and filter out predicted samples with confidence scores higher than the target threshold to obtain pseudo-labels. These pseudo-labels are used to construct a pseudo-supervised cross-entropy loss and, together with the update function of the adversarial learning method, train the student model through an exponential moving average. The trained student model is then output, which is the trained target encoder and classifier. The trained target encoder and classifier are used to predict the load category.