A non-technical line loss state evaluation method based on multi-scale space-time feature fusion in a low-voltage power distribution network environment

By employing a multi-scale spatiotemporal feature fusion and integration strategy, combined with multi-scale temporal convolutional networks and long short-term memory networks, the problem of insufficient robustness of feature extraction and clustering algorithms in low-voltage distribution networks is solved, enabling efficient, stable identification and accurate early warning of non-technical line loss conditions.

CN121882971BActive Publication Date: 2026-07-03SHENYANG UNIVERSITY OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENYANG UNIVERSITY OF TECHNOLOGY
Filing Date
2025-12-29
Publication Date
2026-07-03

Smart Images

  • Figure CN121882971B_ABST
    Figure CN121882971B_ABST
Patent Text Reader

Abstract

This invention provides a non-technical line loss status assessment method based on multi-scale spatiotemporal feature fusion in low-voltage distribution network environments, relating to the fields of power big data analysis and intelligent operation and maintenance of distribution networks. The invention constructs a fusion architecture based on multi-scale temporal convolutional networks and long short-term memory networks; extracts multi-scale spatiotemporal features of users from instantaneous power consumption fluctuations to periodic load patterns using MSTBlock units; designs a cluster balance constraint mechanism to ensure that sparse but critical non-technical line loss anomaly warning signals are not obscured by massive amounts of normal power consumption data; adaptively selects graph segmentation or spectral clustering integration strategies based on data scale to output clustering labels, which are then mapped to the evolution trajectory of user power consumption behavior. This invention can identify the level of power consumption anomalies from raw load signals with random fluctuations and interference, and calculates the investigation priority by combining transformer area correlation analysis, significantly improving the accuracy and interpretability of unsupervised assessment decisions for non-technical line losses in distribution networks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power system big data analysis and intelligent operation and maintenance technology for distribution networks, specifically to a non-technical line loss status assessment method based on multi-scale spatiotemporal feature fusion in low-voltage distribution network environments. This method achieves accurate identification and hierarchical early warning of abnormal power consumption states through deep feature mining and unsupervised clustering analysis of electricity consumption time-series data. Background Technology

[0002] With the rapid development of smart grids and advanced metering architectures, achieving full-time-domain line loss status perception and accurate assessment of low-voltage distribution networks has become a core requirement for intelligent decision-making in power systems. In actual distribution network scenarios, the raw electricity consumption time-series signals collected by smart meters generally suffer from inherent challenges such as strong random fluctuations and extreme class imbalances. For example, the collected load data typically includes fluctuations in normal user electricity consumption behavior, metering errors, and environmental noise, and since the vast majority of users are in normal electricity consumption states, the number of samples representing non-technical line loss anomalies such as electricity theft and metering failures is extremely small. This practical constraint makes traditional methods face serious bottlenecks in the implementation of non-technical line loss status assessment, failing to identify potential line loss risks in a timely manner and issue accurate early warnings.

[0003] A major drawback of traditional methods is their insufficient feature extraction capability, making it difficult to adaptively extract discriminative state features directly from noisy, non-stationary raw load signals. Existing methods largely rely on manually designed statistical indicators or simple time-frequency analysis, which have limited ability to capture weak anomalies in the context of random fluctuations in user load. While deep learning models based on a single architecture, such as convolutional neural networks (CNNs), can capture local instantaneous electricity consumption features, they are insufficient at modeling long-term temporal dependencies reflecting the evolution of long-term electricity consumption habits; long short-term memory networks (LSTMs) excel at handling temporal dependencies but are insensitive to multi-scale local behavioral patterns in load signals. This one-sidedness in feature extraction prevents models from comprehensively depicting the evolutionary trajectory of users from normal electricity consumption to abnormal losses, resulting in a weak and low-discriminative feature base for subsequent clustering evaluation.

[0004] Another prominent drawback of traditional clustering methods is the lack of robust mechanisms to handle class imbalance, leading to severely unbalanced evaluation results. In actual electricity consumption data, normal samples constitute the vast majority, while abnormal consumption samples are scarce. Traditional clustering algorithms (such as K-Means) are highly susceptible to this distribution, classifying a few abnormal sample points into neighboring large normal clusters, causing key abnormal patterns to be "submerged" or ignored, resulting in a serious risk of missed reports. Furthermore, these methods typically lack inherent constraints and evaluations on the reasonableness of clustering results, making it impossible for the output to accurately reflect the true distribution of electricity consumption, significantly reducing their practical value.

[0005] Furthermore, the stability and interpretability of traditional methods are insufficient to meet the needs of power operation and maintenance decision-making. The results of a single clustering model are easily affected by initialization and have poor stability; moreover, its decision-making process has low transparency, making it difficult for operation and maintenance personnel to reliably associate clustering labels with specific non-technical line loss causes (such as meter over-connection or transformer failure), making it difficult for the model output to be directly used to guide accurate on-site troubleshooting decisions.

[0006] Against this backdrop, existing technologies are ill-suited to meet the urgent need for automatic, robust, and interpretable state identification of massive, unlabeled, noisy, and extremely unbalanced monitoring data in power distribution networks. Therefore, there is a pressing need for an early warning framework that can directly extract robust features from raw power signals, has built-in mechanisms to ensure assessment balance, and outputs stable data that can guide line loss management decisions. Summary of the Invention

[0007] This invention proposes a non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in low-voltage distribution network environments. It aims to solve the problems that traditional methods struggle to extract complex electricity consumption patterns, have unbalanced non-technical line loss assessment results, and exhibit poor robustness in identification under random fluctuations when facing distribution network load time-series signals.

[0008] This invention provides a non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment. The method includes the following steps:

[0009] Step S1: Obtain the raw electricity load time series data and perform preprocessing;

[0010] Step S2: Input the preprocessed time series data into a multi-scale spatiotemporal feature extraction network, which includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) network module to extract multi-scale local features and long-range temporal dependency features of the time series, respectively.

[0011] Step S3: The multi-scale local features and long-range temporal dependency features are bidirectionally aligned and fused using the cross-attention fusion module to obtain fused features;

[0012] Step S4: Based on the fusion features, generate multiple sets of basic clustering results through multiple independently initialized clustering branches;

[0013] Step S5: Use a cluster balance constraint mechanism to filter the multiple sets of basic clustering results, remove results with abnormal cluster sizes, and obtain a set of high-quality clustering results;

[0014] Step S6: Based on the data scale and data distribution characteristics, adaptively select either a graph segmentation ensemble strategy or a spectral clustering ensemble strategy to integrate the high-quality clustering result set and output the final clustering labels;

[0015] Step S7: Map the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level, and combine the loss fluctuation evolution trajectory of the transformer area meter to automatically calculate the investigation priority of abnormal users and generate accurate operation and maintenance suggestions for the low-voltage distribution network.

[0016] The specific method for obtaining fused features by bidirectionally aligning and fusing the multi-scale local features and long-range temporal dependency features through the cross-attention fusion module in step S3 includes:

[0017] The cross-attention fusion module achieves the alignment and fusion of the multi-scale local features and the long-range temporal dependency features through bidirectional attention calculation;

[0018] The bidirectional attention calculation includes:

[0019] The first attention branch uses the multi-scale local features as the query vector and the long-range temporal dependency features as the key vector and value vector for calculation.

[0020] The second attention branch uses the long-range temporal dependency features as the query vector and the multi-scale local features as the key vector and value vector for calculation.

[0021] Both attention sets are implemented using a 4-head multi-head attention mechanism, and the output formula for a single attention head is:

[0022]

[0023] Where h=4 is the number of attention heads. Scaling factor For TCN projection features in the first Subspace mapping of size The LSTM projection features are respectively in the th Mapping of key vectors and value vector subspaces for each head;

[0024] After concatenating the outputs of the four attention heads, the complete output of bidirectional attention is obtained: The calculation formula is as follows:

[0025]

[0026] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features;

[0027] Following the cross-attention fusion module, a multi-head self-attention module is also included, which is used to perform global correlation modeling on the fused features to generate enhanced features;

[0028] Specifically, assume the input X∈R n×m×d Where n is the number of samples, m is the time step, and d is the feature dimension, the self-attention mechanism calculates attention weights through a linear transformation of the query, key, and value; the output of each attention head h is:

[0029]

[0030] Where, d h For each head dimension, d k This is the scaling factor;

[0031] In the TCN model, the Multi-Head Self-Attention layer receives features output by the multi-scale temporal convolutional network (TCN) module, modeling long-distance relationships between time steps. In the TCN-LSTM model, it further processes the features fused from the multi-scale TCN module and the long short-term memory (LSTM) module, enhancing cross-time step correlation. The TCN module performs multi-scale local-global feature extraction, while the LSTM module captures long-range temporal dependencies and integrates cross-attention and multi-head self-attention features. The results of multiple heads are merged via concatenation, calculated using the following formula:

[0032]

[0033] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features.

[0034] Further, the original electricity load time series data mentioned in step S1 is load current, active power, or electricity consumption data that characterizes user electricity consumption behavior and is obtained through smart meters or acquisition terminals in the Advanced Metering Architecture (AMI). The sampling interval of the electricity load time series data is once every 15 minutes. The preprocessing includes: cleaning the original electricity load data, filling in missing values, and removing outliers caused by meter failures. Subsequently, the continuous data is sliced ​​into sliding windows to generate a fixed-length sample sequence that reflects the daily electricity consumption pattern or weekly electricity consumption pattern.

[0035] Further, in step S2, the preprocessed time series data is input into a multi-scale spatiotemporal feature extraction network. This network includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) module. Specific methods for extracting multi-scale local features and long-range temporal dependency features of the time series include:

[0036] The multi-scale spatiotemporal feature extraction network includes at least one multi-scale spatiotemporal block (MST Block), which is connected in series with the multi-scale temporal convolutional network (TCN) module and the long short-term memory network (LSTM) module.

[0037] The multi-scale temporal convolutional network (TCN) module is composed of multiple sets of multi-scale TCN blocks stacked together. Each set of multi-scale TCN blocks is configured with multiple dilated convolutional layers with different dilation rates in parallel, which are used to extract local features under different receptive fields.

[0038] In the multi-scale TCN block, the dilation rate of the holed convolutional layer is configured as 1, 2, and 4;

[0039] The initial number of filters in the multi-scale temporal convolutional network (TCN) module is 8, and the number of filters increases by a preset multiple as the network depth increases.

[0040] The Long Short-Term Memory (LSTM) network module has a two-layer stacked structure, with 64 LSTM units in the first layer and 32 LSTM units in the second layer.

[0041] In the Multi-Scale Spatiotemporal Block (MST Block), the features output by the Multi-Scale Temporal Convolutional Network (TCN) module need to undergo dimensionality adjustment before being input into the Long Short-Term Memory (LSTM) network module, so as to adjust the feature dimensions to a time-step-first format.

[0042] The multi-scale temporal convolutional network (TCN) module is used to adaptively extract multi-scale local features from instantaneous power consumption fluctuations to periodic power consumption patterns; the long short-term memory (LSTM) network module is used to capture long-range temporal dependencies in the long-term evolution of user power consumption habits and non-technical line loss conditions.

[0043] Furthermore, the specific method for generating multiple sets of basic clustering results based on the fusion features through multiple independently initialized clustering branches in step S4 includes:

[0044] Based on the fusion features, M sets of basic clustering results are generated through M independently initialized clustering branches; where M is an integer greater than 1, each clustering branch is independent of each other by randomly initializing its weight matrix, and after forward propagation of the fusion features, a set of basic clustering labels is generated using the K-Means clustering algorithm; the M sets of basic clustering labels together constitute the basic clustering result sequence.

[0045] Furthermore, the specific method for using the cluster balance constraint mechanism in step S5 to screen the multiple sets of basic clustering results, removing results with abnormal cluster sizes, and obtaining a set of high-quality clustering results includes:

[0046] Based on the preset lower limit value lr and upper limit value ur of the cluster size, a penalty score is calculated for each group of basic clustering results through a penalty function; wherein, the penalty score is obtained by accumulating the difference between the number of samples in each cluster and lr × ideal cluster size, and the difference between the number of samples and ur × ideal cluster size;

[0047] Several basic clustering results with the lowest penalty scores are selected to form the set of high-quality clustering results; where lr and ur are 0.3 and 1.5 respectively.

[0048] Furthermore, the specific method for adaptively selecting a graph segmentation ensemble strategy or a spectral clustering ensemble strategy to integrate the high-quality clustering result set based on the data scale and data distribution characteristics, and outputting the final clustering labels in step S6, includes:

[0049] Determine whether the number of samples N corresponding to the high-quality clustering result set is greater than a preset threshold T, where T=1000;

[0050] If N > T, then the pymetis graph segmentation ensemble strategy based on the minimum cut theory of graph theory is selected. By constructing a sample association graph and performing multi-level partitioning optimization, the final clustering labels are obtained.

[0051] If N ≤ T, then the spectral clustering ensemble strategy based on spectral graph theory is selected. By constructing a consensus matrix and performing feature decomposition and sample mapping, the final cluster labels are obtained.

[0052] Furthermore, the specific method for automatically calculating the investigation priority of abnormal users by mapping the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level and combining the evolution trajectory of the loss fluctuation of the transformer area's total meter in step S7 includes:

[0053] Based on the final cluster labels output in step S6, the average electricity consumption deviation of each cluster center during the evaluation period is calculated. Based on the deviation ratio between the average electricity consumption deviation of each cluster center during the evaluation period and the baseline value of normal electricity consumption patterns, clusters with a deviation ratio ≥ 30% are mapped to a high-risk level, clusters with a deviation ratio ≤ 10% and < 30% are mapped to a medium-risk level, and clusters with a deviation ratio < 10% are mapped to a low-risk level. The baseline value of normal electricity consumption patterns is taken as the average electricity consumption value of the same type of users in the same area during the same evaluation period. The evaluation period is uniformly set to 30 days. The average electricity consumption deviation is calculated using the average absolute value of the difference between the electricity consumption data of all users within the cluster and the baseline value.

[0054] Extract the load curve of users with a high risk warning level and align it with the daily line loss rate fluctuation curve of the transformer area table on the time axis; determine whether the abnormal decrease time point of user load and the abnormal increase time point of transformer area line loss are in the same time interval.

[0055] Users who simultaneously meet the criteria of belonging to a high-risk cluster and whose abnormal time points coincide with a surge in transformer area losses are set as the highest investigation priority. An abnormal user list is automatically generated according to the priority, and the suspected fault type of the user in the clustering results is directly output to guide accurate on-site investigation.

[0056] Compared with the prior art, the present invention has the following advantages:

[0057] 1. Robust and adaptive feature extraction of raw load signals under complex power consumption environments: Through the fusion architecture of multi-scale TCN and LSTM, it can automatically extract multi-scale local features from the raw meter sequence with random fluctuations, from instantaneous power consumption changes to periodic load patterns, and effectively capture the long-range time-series dependence of user power consumption habits. This overcomes the shortcomings of traditional line loss analysis methods that rely too much on manual noise reduction and feature engineering, and can comprehensively depict the evolution trajectory of users from normal power consumption to abnormal losses, providing a highly discriminative feature representation for unsupervised evaluation.

[0058] 2. Effectively ensures the evaluation balance and risk detection capability under extremely sparse abnormal samples such as electricity theft: By introducing a cluster balance constraint mechanism and a multi-branch integration strategy, it can automatically identify and eliminate biased clustering results caused by normal electricity consumption samples occupying the absolute majority; this ensures that sparse but critical non-technical line loss abnormal samples can form independent clusters, significantly reducing the risk of anomaly underreporting and solving the problem that traditional algorithms are easily buried by large class samples in scenarios with scarce abnormal samples.

[0059] 3. Improved stability of the assessment process, interpretability of decisions, and accuracy of on-site inspections: Based on the adaptive selection of the optimal integration strategy (pymetis or spectral clustering) based on data scale, stable final cluster labels are generated; at the same time, by intuitively mapping the cluster labels to the warning level and combining them with the time axis alignment verification of the loss fluctuation of the transformer area meter, the "black box" clustering model is transformed into an understandable basis for judging abnormal behavior; this provides power operation and maintenance personnel with direct and reliable suggestions for investigation priorities, effectively solving the pain points of high false negative rate and difficulty in guiding accurate inspections in traditional methods, and enhancing the practical value of the technology in distribution network line loss management.

[0060] Based on the implementation methods provided in the above aspects, this application can be further combined to provide more implementation methods. Attached Figure Description

[0061] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims. The above and other objects, features, and advantages of the exemplary embodiments of the present invention will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the present invention are shown by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein:

[0062] Figure 1 The MSN framework diagram provided by this invention;

[0063] Figure 2 The MSTBlock architecture diagram provided by this invention;

[0064] Figure 3 The integration strategy diagram provided for this invention;

[0065] Figure 4 The PyMetis integration strategy diagram provided by this invention;

[0066] Figure 5 This is a diagram illustrating the spectral clustering integration strategy provided by the present invention. Detailed Implementation

[0067] The exemplary embodiments disclosed in this application will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of this application are shown in the drawings, it should be understood that this application can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of this application and to fully convey the scope of this application to those skilled in the art. Unless otherwise specified, the technical means used in the embodiments are conventional means well known to those skilled in the art.

[0068] Combination Figure 1 As shown, the present invention provides a time series clustering method based on multi-scale spatiotemporal feature fusion and adaptive integration, which includes the following steps:

[0069] Step S1: Obtain the raw electricity load time series data and perform preprocessing;

[0070] Step S2: Input the preprocessed time series data into a multi-scale spatiotemporal feature extraction network, which includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) network module to extract multi-scale local features and long-range temporal dependency features of the time series, respectively.

[0071] Step S3: The multi-scale local features and long-range temporal dependency features are bidirectionally aligned and fused using the cross-attention fusion module to obtain fused features;

[0072] Step S4: Based on the fusion features, generate multiple sets of basic clustering results through multiple independently initialized clustering branches;

[0073] Step S5: Use a cluster balance constraint mechanism to filter the multiple sets of basic clustering results, remove results with abnormal cluster sizes, and obtain a set of high-quality clustering results;

[0074] Step S6: Based on the data scale and data distribution characteristics, adaptively select either a graph segmentation ensemble strategy or a spectral clustering ensemble strategy to integrate the high-quality clustering result set and output the final clustering labels;

[0075] Step S7: Map the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level, and combine the loss fluctuation evolution trajectory of the transformer area meter to automatically calculate the investigation priority of abnormal users and generate accurate operation and maintenance suggestions for the low-voltage distribution network.

[0076] Specifically, Figure 1 The detailed design of MSN is shown, where each MST module dynamically configures log2m groups of multi-scale TCN blocks (initial filter count is 8, multi-scale convolutional kernel size is 3 / 5 / 7, and dilation rate is 1 / 2 / 4). Combined with two layers of LSTM units (64 units in the first layer and 32 units in the second layer), it captures multi-scale local features and long-range temporal dependencies of the sequence. A cross-attention fusion module achieves bidirectional dependency modeling between TCN global features and LSTM sequence features. A four-head self-attention mechanism further enhances the global correlation of features. Finally, the features are flattened to generate a 128-dimensional vector as the input feature space for K-means clustering. Cluster balance is evaluated based on lower bound (lr=0.3) and upper bound (ur=1.5) constraints. High-quality clustering results with no or low violations are selected, while low-quality results with abnormal cluster sizes are removed. The PyMetis graph segmentation algorithm and spectral clustering ensemble method are used for ensemble clustering to generate the final cluster assignments. Clustering performance is evaluated using Rand. The exponential metric, compared with the true label, enables efficient, robust, and interpretable time series clustering analysis.

[0077] Optionally, the original electricity load time series data mentioned in step S1 is load current, active power or electricity consumption data that characterizes the user's electricity consumption behavior and is obtained through smart meters or acquisition terminals in the Advanced Metering Architecture (AMI).

[0078] The sampling interval for the electricity load time series data is once every 15 minutes; the preprocessing includes: cleaning the original electricity load data, filling in missing values ​​and removing outliers caused by meter malfunctions; then, slicing the continuous data into sliding windows to generate a fixed-length sample sequence reflecting daily or weekly electricity consumption patterns. Optionally, in step S2, the preprocessed data is input into a multi-scale spatiotemporal feature extraction network, which includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) network module. Specific methods for extracting multi-scale local features and long-range temporal dependency features of the time series include:

[0079] The multi-scale spatiotemporal feature extraction network includes at least one multi-scale spatiotemporal block (MST Block), which is connected in series with the multi-scale temporal convolutional network (TCN) module and the long short-term memory network (LSTM) module.

[0080] The multi-scale temporal convolutional network (TCN) module is composed of multiple sets of multi-scale TCN blocks stacked together. Each set of multi-scale TCN blocks is configured with multiple dilated convolutional layers with different dilation rates in parallel, which are used to extract local features under different receptive fields.

[0081] In the multi-scale TCN block, the dilation rate of the holed convolutional layer is configured as 1, 2, and 4;

[0082] The initial number of filters in the multi-scale temporal convolutional network (TCN) module is 8, and the number of filters increases by a preset multiple as the network depth increases.

[0083] The Long Short-Term Memory (LSTM) network module has a two-layer stacked structure, with 64 LSTM units in the first layer and 32 LSTM units in the second layer.

[0084] In the Multi-Scale Spatiotemporal Block (MST Block), the features output by the Multi-Scale Temporal Convolutional Network (TCN) module need to undergo dimensionality adjustment before being input into the Long Short-Term Memory (LSTM) network module, so as to adjust the feature dimensions to a time-step-first format.

[0085] The multi-scale temporal convolutional network (TCN) module adaptively extracts multi-scale local features from instantaneous power consumption fluctuations to periodic power consumption patterns. The long short-term memory (LSTM) network module captures long-range temporal dependencies in the evolution of user power consumption habits and the long-term evolution of non-technical line loss conditions. Specifically, the multi-scale features are dynamically integrated through the adaptive attention fusion mechanism of the multi-scale TCN, and the clustering robustness is improved by combining 200 randomly initialized branches and cluster balance constraints. The MultiScaleTCN-LSTM feature extraction unit is the core feature extraction unit of the MSN model. Through the synergistic effect of multi-scale local-global feature extraction of the multi-scale TCN, long-range temporal dependency capture of the LSTM, and feature fusion of cross attention + self-attention and global correlation modeling, time series features with multi-scale details, temporal coherence, and global correlation are generated, providing highly discriminative input for subsequent clustering.

[0086] Optionally, the specific method for performing bidirectional alignment and fusion of the multi-scale local features and long-range temporal dependency features through the cross-attention fusion module in step S3 to obtain the fused features includes:

[0087] The cross-attention fusion module achieves the alignment and fusion of the multi-scale local features and the long-range temporal dependency features through bidirectional attention calculation;

[0088] The bidirectional attention calculation includes:

[0089] The first attention branch uses the multi-scale local features as the query vector and the long-range temporal dependency features as the key vector and value vector for calculation.

[0090] The second attention branch uses the long-range temporal dependency features as the query vector and the multi-scale local features as the key vector and value vector for calculation.

[0091] Both attention sets are implemented using a 4-head multi-head attention mechanism, and the output formula for a single attention head is:

[0092]

[0093] Where h=4 is the number of attention heads. This is a scaling factor (to prevent the softmax gradient from vanishing due to excessively large scores). For TCN projection features in the first Subspace mapping of size The LSTM projection features are respectively in the th Mapping of key vectors and value vector subspaces for each head;

[0094] After concatenating the outputs of the four attention heads, the complete output of bidirectional attention is obtained: The calculation formula is as follows:

[0095]

[0096] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features;

[0097] Following the cross-attention fusion module, a multi-head self-attention module is also included, which is used to perform global correlation modeling on the fused features to generate enhanced features;

[0098] Specifically, assume the input X∈R n×m×d Where n is the number of samples, m is the time step, and d is the feature dimension, the self-attention mechanism calculates attention weights through a linear transformation of the query, key, and value; the output of each attention head h is:

[0099]

[0100] Where, d h For each head dimension, d k This is the scaling factor;

[0101] In the TCN model, the Multi-Head Self-Attention layer receives features output by the multi-scale temporal convolutional network (TCN) module, modeling long-distance relationships between time steps. In the TCN-LSTM model, it further processes the features fused from the multi-scale TCN module and the long short-term memory (LSTM) module, enhancing cross-time step correlation. The TCN module performs multi-scale local-global feature extraction, while the LSTM module captures long-range temporal dependencies and integrates cross-attention and multi-head self-attention features. The results of multiple heads are merged via concatenation, calculated using the following formula:

[0102]

[0103] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features.

[0104] Specifically, such as Figure 2As shown, in time series data, multi-scale local patterns (such as short-term fluctuations, medium-term trends, and long-term cycles) and long-range dependencies across time steps together constitute the core features. Traditional single networks struggle to capture both simultaneously. This paper designs a collaborative architecture of multi-scale TCN and LSTM to achieve complementary modeling. Multi-scale TCN efficiently covers local-global features at different time granularities through dilated convolutions and multi-scale convolutional kernels, while LSTM accurately captures long-range temporal correlations through gating mechanisms. The combination of the two achieves a comprehensive characterization of the inherent dynamic structure of time series.

[0105] In MSN, the multi-scale TCN module is responsible for extracting multi-scale local-global features. The multi-scale TCN module uses a combination of three kernel sizes and three dilation rates to achieve full-scale feature capture from short-term to long-term and from local to global, rapidly expanding the receptive field and covering global information across the entire sequence length through pooling operations. Each branch contains log2m groups of multi-scale TCN blocks (m is the time series length, and the number of blocks is rounded up). The initial number of filters is 8, and the number of filters in each TCN block is increased accordingly. The feature vectors are multiplied by one to enhance their expressive power. The resulting feature vectors are normalized using a softmax activation function, ensuring the weight vectors sum to 1. The normalized weights directly reflect the importance of each feature path and can dynamically adjust the contribution of features at each scale based on the characteristics of the input sequence.

[0106] The LSTM module focuses on capturing long-range temporal dependencies. Since the dimensional order of the output features from the multi-scale TCN module is inconsistent with the input requirements of LSTM, the feature dimensional order is first adjusted, converting the format from features first, time step last, to time step first, features last, ensuring compatibility with the LSTM input specification. The LSTM module adopts a two-layer stacked architecture. The first layer has 64 units, preserving complete temporal correlation information and providing comprehensive temporal context for the second layer. The second layer has 32 units, no longer preserving temporal dimensions, and only compresses and integrates the temporal features output from the first layer, ultimately outputting a fixed-dimensional long-range dependency feature vector. In device health monitoring, performance degradation is often a gradual, long-term process. The two-layer LSTM unit can effectively capture the degradation dependencies throughout the device's lifecycle, preventing the loss of state evolution information due to the discretization of a single time slice.

[0107] LSTM dynamically filters and retains key historical information through a gating mechanism, effectively filtering out irrelevant noise. The input gate controls the inclusion of new information, the forget gate determines the retention and discarding of historical information, and the output gate regulates the output of the current state. Assuming the input sequence contains a certain number of samples, each sample possessing specific dimensional features at different time steps, the LSTM block updates and generates the current state based on the previous time step's state and the current time step's input. The current state is jointly determined by the output gate's output value and the nonlinear transformation result of the cell state. The computational cost of this module is reasonably controlled. The computational cost of the first layer is related to the number of samples, the feature dimension, and 64 units, while the computational cost of the second layer is determined based on the output dimension of the first layer and 32 units, ensuring modeling accuracy while avoiding excessive computational consumption.

[0108] In the MSN model, the cross-attention fusion module is the core bridge connecting the multi-scale TCN and LSTM, responsible for achieving deep interaction and fusion of the two types of features, significantly improving the correlation and discriminative power of features, and providing high-quality input for subsequent self-attention modeling. This module breaks through the limitations of traditional feature stitching through a collaborative design of feature dimension unification, bidirectional attention computation, and feature optimization fusion, achieving complementary enhancement of multi-scale local-global features and long-range temporal dependent features, comprehensively characterizing the inherent dynamic structure of time series. Specifically, the module first unifies the feature dimensions through projection operations, and then performs bidirectional attention computation. The bidirectional attention computation is divided into two branches: the first branch uses TCN projected features as the query (Q) and LSTM projected features as the key (K) and value (V), calculating the attention output; the second branch uses LSTM projected features as the query (Q) and TCN projected features as the key (K) and value (V). Both sets of attention are implemented using a 4-head multi-head attention mechanism, and the output formula for a single attention head is:

[0109] (1)

[0110] Where h=4 is the number of attention heads. This is a scaling factor (to prevent the softmax gradient from vanishing due to excessively large scores). For TCN projection features in the first Subspace mapping of size The LSTM projection features are respectively in the th The mapping between the key vector and value vector subspace of each head.

[0111] After concatenating the outputs of the four attention heads, the complete output of bidirectional attention is obtained: The calculation formula is as follows:

[0112] (2)

[0113] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features.

[0114] In the MSN model, multi-head self-attention serves as a feature extraction and modeling tool, responsible for capturing long-distance dependencies in time-series data, significantly improving the model's ability to understand complex patterns and global context. Four attention heads are initialized, splitting the fused features into four subspaces for parallel attention computation. Each attention head captures the global correlations between features from a different perspective, thus comprehensively characterizing the sequence's intrinsic structure and dynamic changes. Specifically, assuming the input X∈Rn×m×d (n is the number of samples, m is the time step, and d is the feature dimension), the self-attention mechanism calculates attention weights through linear transformations of query, key, and value. The output of each attention head h is:

[0115] (3)

[0116] Where d h For each head dimension, This is the scaling factor.

[0117] MSN initializes num_heads=4 attention heads, calculates and concatenates the outputs of each head, maintaining the output dimension at n×m×128. The multi-head self-attention mechanism not only enhances the expressive power of features but also forms a complementary synergy with TCN and LSTM. TCN extracts multi-scale local-global features, LSTM captures long-range temporal dependencies, and the multi-head self-attention mechanism integrates the global context by processing multiple perspectives in parallel. In the TCN model, the MultiHeadSelfAttention layer receives features output from the multi-scale TCN module, modeling long-distance relationships between time steps. In the TCN-LSTM model, it further processes the features fused from TCN and LSTM, enhancing the correlation across time steps. The multi-scale local-global feature extraction of multi-scale TCN, the long-range temporal dependency capture of LSTM, and the feature fusion of cross-attention and multi-head self-attention are all achieved through concatenation. The formula for merging the results of multiple heads is as follows:

[0118] (4)

[0119] Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features.

[0120] Optionally, the specific method for generating multiple sets of basic clustering results based on the fusion features through multiple independently initialized clustering branches in step S4 includes:

[0121] Based on the fusion features, M sets of basic clustering results are generated through M independently initialized clustering branches; where M is an integer greater than 1, each clustering branch is independent of each other by randomly initializing its weight matrix, and after forward propagation of the fusion features, a set of basic clustering labels is generated using the K-Means clustering algorithm; the M sets of basic clustering labels together constitute the basic clustering result sequence.

[0122] Optionally, the specific method for using the cluster balance constraint mechanism in step S5 to filter the multiple sets of basic clustering results and remove results with abnormal cluster sizes to obtain a set of high-quality clustering results includes:

[0123] Based on the preset lower limit value lr and upper limit value ur of the cluster size, a penalty score is calculated for each group of basic clustering results through a penalty function; wherein, the penalty score is obtained by accumulating the difference between the number of samples in each cluster and lr × ideal cluster size, and the difference between the number of samples and ur × ideal cluster size;

[0124] Several basic clustering results with the lowest penalty scores are selected to form the set of high-quality clustering results; where lr and ur are 0.3 and 1.5 respectively.

[0125] Optionally, the specific method for integrating the high-quality clustering result set by adaptively selecting a graph segmentation ensemble strategy or a spectral clustering ensemble strategy based on the data scale and data distribution characteristics in step S6, and outputting the final clustering labels, includes:

[0126] Determine whether the number of samples N corresponding to the high-quality clustering result set is greater than a preset threshold T, where T=1000;

[0127] If N > T, then the pymetis graph segmentation ensemble strategy based on the minimum cut theory of graph theory is selected. By constructing a sample association graph and performing multi-level partitioning optimization, the final clustering labels are obtained.

[0128] If N ≤ T, then the spectral clustering ensemble strategy based on spectral graph theory is selected. By constructing a consensus matrix and performing feature decomposition and sample mapping, the final cluster labels are obtained.

[0129] Optionally, the specific method for automatically calculating the investigation priority of abnormal users by mapping the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level and combining the loss fluctuation evolution trajectory of the transformer area's total meter in step S7 includes:

[0130] Based on the final cluster labels output in step S6, the average electricity consumption deviation of each cluster center during the evaluation period is calculated. Based on the deviation ratio between the average electricity consumption deviation of each cluster center during the evaluation period and the baseline value of normal electricity consumption patterns, clusters with a deviation ratio ≥ 30% are mapped to a high-risk level, clusters with a deviation ratio ≤ 10% and < 30% are mapped to a medium-risk level, and clusters with a deviation ratio < 10% are mapped to a low-risk level. The baseline value of normal electricity consumption patterns is taken as the average electricity consumption value of the same type of users in the same area during the same evaluation period. The evaluation period is uniformly set to 30 days. The average electricity consumption deviation is calculated using the average absolute value of the difference between the electricity consumption data of all users within the cluster and the baseline value.

[0131] Extract the load curve of users with a high risk warning level and align it with the daily line loss rate fluctuation curve of the transformer area table on the time axis; determine whether the abnormal decrease time point of user load and the abnormal increase time point of transformer area line loss are in the same time interval.

[0132] Users who simultaneously meet the criteria of belonging to a high-risk cluster and whose abnormal time points coincide with a surge in transformer area losses are set as the highest investigation priority. An abnormal user list is automatically generated according to the priority, and the suspected fault type of the user in the clustering results is directly output to guide accurate on-site investigation.

[0133] Specifically, Figure 1 This demonstrates the specific process by which the ensemble strategy module receives the clustering result sequence and obtains the final cluster labels through the Pymetis graph segmentation ensemble strategy and the spectral clustering ensemble strategy. The MSN model ensemble strategy is selected based on data size, data distribution characteristics, and accuracy and efficiency requirements: when processing a large sample size (e.g., n>1000) and the data clustering structure exhibits obvious local correlations, such as periodic time-series signals, the Pymetis graph segmentation ensemble strategy is chosen; when the sample size is moderate or small (e.g., n≤1000) and the data exhibits a non-convex, overlapping, or other complex distribution, such as long-period dependent time-series data, the spectral clustering ensemble strategy is preferred. Both strategies use high-quality basic clustering results filtered by a penalty function as input and achieve ensemble integration through different mathematical logics, such as... Figure 3 As shown.

[0134] Based on the MSN model with 200 independent branches, the weights of each branch are randomly initialized using the `randomize` function (weight range [-1, 1]), allowing each branch to extract time-series features from different feature perspectives. K-Means clustering (number of clusters equals the number of true data categories) is performed on the output features of each branch, generating 200 sets of basic cluster labels, forming a clustering result sequence. Subsequently, a penalty function quantifies the reasonableness of the cluster size for each clustering result. Specifically, the penalty function sets a lower limit of cluster size `lr` = 0.3 and an upper limit of `ur` = 1.5. The sum of the differences in the number of samples below the lower limit and the sum of the differences in the number of samples above the upper limit for each cluster in each result are calculated. High-quality results are selected, and low-quality labels with abnormally large cluster sizes are removed, forming a set of cluster results, providing highly reliable input for ensemble processing.

[0135] The pymetis ensemble strategy, based on the minimum cut theory of graph theory, focuses on the clustering needs of large-scale time series data with significant local correlations. It achieves efficient ensemble by transforming the sample relationships into a graph structure and combining multi-level partitioning optimization. MSN chooses the pymetis ensemble strategy when processing time series data with a large sample size (e.g., n>1000) to effectively avoid high-complexity computations and ensure the stability of clustering results.

[0136] In the graph structure modeling stage, this strategy uses a set of high-quality basic clustering results filtered by a penalty function as input to construct a weighted undirected sample association graph. Each node in the graph uniquely corresponds to a time series sample, and the weight of the edge between nodes is determined by the frequency with which the sample pair (i,j) belongs to the same cluster in all cluster results. The higher the frequency, the greater the edge weight, which can effectively and intuitively quantify the clustering consistency of two samples from the perspective of multi-branch features.

[0137] Figure 4 This paper demonstrates the detailed design of the PyMetis ensemble strategy. The core idea of ​​the PyMetis ensemble strategy is to obtain the optimal clustering labels through multi-level graph partitioning optimization. Specifically, firstly, graph coarsening is performed. A greedy matching algorithm is used to merge closely related nodes with high edge weights into supernodes, gradually compressing the graph size until the number of nodes is less than a preset value of 100. Next, initial partitioning is performed. A recursive binary search is used on the coarsened, smaller-sized graph to complete the initial subgraph partitioning according to the preset target cluster number k. An imbalance factor (default value 1.05) is set to strictly control the difference in the number of nodes in each subgraph to not exceed 5%, ensuring balanced cluster size. Finally, the initial partitioning results are mapped back to the original graph size, and the cluster label corresponding to each sample is output.

[0138] Figure 5This paper presents the detailed design of a spectral clustering ensemble strategy. Based on spectral graph theory and matrix factorization, this strategy can effectively handle small-to-medium-scale, complex-distributed (e.g., non-convex, overlapping) time series data. Through its consensus matrix construction and spectral graph factorization architecture, it effectively captures global correlations between samples from high-quality basic clustering results filtered by a penalty function. By using spectral graph theory and matrix factorization methods, it compresses high-dimensional sample consensus relationships into a low-dimensional linearly separable space, effectively handling time series data with small sample sizes (e.g., n < 1000).

[0139] Specifically, this strategy employs global co-occurrence frequency normalization encoding to provide explicit global association information for cluster results, constructing an n×n symmetric consensus matrix (where n is the number of samples). The matrix elements quantify the frequency of sample pairs sharing the same cluster across all clustering results, and after normalization, clearly characterize the global clustering consistency of the samples. Subsequently, Laplacian matrix processing and eigenvalue decomposition mechanisms are used to model the global dependencies in the sample consensus network. First, the degree matrix is ​​calculated to eliminate interference from differences in node degree. Then, a Laplacian matrix is ​​generated through symmetric normalization to highlight the global association structure of the samples. Finally, eigenvalue decomposition is performed on the Laplacian matrix to extract the eigenvectors corresponding to the k smallest eigenvalues. Finally, a cluster partitioning output function is performed in a low-dimensional space, mapping the high-dimensional nonlinear sample consensus relationship to cluster partitioning results in a low-dimensional linear space, with each cluster corresponding to a set of clustering labels.

[0140] Inspired by the principle of preserving global structure in spectral mapping, our spectral clustering strategy generates stable low-dimensional sample representations by performing L2 normalization on the row vectors of the feature matrix and adding optimization constraints by calculating intra-cluster similarity and inter-cluster differences. This prevents clustering failure under complex distributions and effectively limits the dispersion of sample distribution in low-dimensional space, thereby ensuring the effective preservation of global association information of samples and guaranteeing the effective reconstruction of complex temporal patterns (such as non-convex and cross-overlapping distributions) in the original time series data in the clustering results.

[0141] Example

[0142] This embodiment aims to verify the universality and clustering accuracy of the MSN framework proposed in this invention when handling complex time-series patterns. Considering that electricity load data is essentially a time series with strong periodicity, non-stationarity, and noise interference, this section conducts benchmark experiments based on the internationally recognized UCR public time-series dataset. This dataset covers typical time-series patterns in multiple fields such as electricity load and sensor monitoring, and can simulate complex electricity consumption behavior trajectories in a distribution network environment. The training parameters are set as follows:

[0143] During training, branch=200, lr=0.3, ur=1.5, filter count=8, kernel size=3, max pooling window=2, LSTM first layer=64 units, second layer=32 units.

[0144] Table 1 shows the experimental environment configuration.

[0145]

[0146] To verify the effectiveness of MSN, it was compared and analyzed with traditional convolutional neural network (CNN), long short-term memory (LSTM) network, and the current state-of-the-art multi-scale temporal mixture model TimeMixer.

[0147] The experiments used the UCR time series dataset as the core test set, covering eight typical subsets. The data types encompassed periodic signals, non-stationary sequences, and multimodal data, comprehensively covering common application scenarios of time series clustering. All datasets were divided into training and test sets according to standard procedures and used together to ensure full utilization of data distribution information. The number of classes in each dataset was used as the cluster number input for K-Means clustering. The values ​​in the table below represent the RAND index of each model on different datasets.

[0148] Table 2 shows the RAND index for each model on different datasets.

[0149]

[0150] Quantitative analysis of the data in the table shows that the MSN model achieves an average Rand index of 0.818503 on eight typical datasets, significantly outperforming other comparative models: it improves performance by 11.9% compared to a simple convolutional neural network (CNN) (0.731624) and by 5.0% compared to a long short-term memory network (LSTM) (0.779434). More importantly, compared to the current state-of-the-art multi-scale hybrid model TimeMixer (0.775035), MSN still achieves a 5.6% performance improvement, validating its effectiveness in targeted optimization for unsupervised temporal clustering tasks. Specifically, on the Coffee dataset, the MSN model achieves a Rand index of 1.0, achieving completely accurate clustering; while on difficult subsets with non-convex and complex data distributions such as BeetleFly and DodgerLoopGame, the MSN model still maintains a stable Rand index above 0.61, demonstrating superior robustness and generalization ability compared to comparative models such as TimeMixer.

[0151] The MSN framework proposed in this invention constructs an end-to-end solution from raw power load monitoring data to non-technical line loss status assessment by deeply integrating multi-scale TCN and LSTM. It effectively overcomes the technical bottleneck of random load fluctuation interference and extreme imbalance of abnormal samples in distribution network scenarios. The model utilizes an adaptive integration strategy and cluster balance constraint mechanism, combined with transformer area correlation analysis logic, to directly map massive power load signals into understandable user power consumption behavior evolution trajectories. This enables unsupervised automatic identification and accurate early warning of non-technical line loss status in low-voltage distribution networks, providing a direct and reliable decision-making basis for distribution network loss reduction, efficiency improvement, and precise operation and maintenance.

[0152] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment, characterized in that, The method includes the following steps: Step S1: Obtain the raw electricity load time series data and perform preprocessing; Step S2: Input the preprocessed time series data into a multi-scale spatiotemporal feature extraction network, which includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) network module to extract multi-scale local features and long-range temporal dependency features of the time series, respectively. Step S3: The multi-scale local features and long-range temporal dependency features are bidirectionally aligned and fused using the cross-attention fusion module to obtain fused features; Step S4: Based on the fusion features, generate multiple sets of basic clustering results through multiple independently initialized clustering branches; Step S5: Use a cluster balance constraint mechanism to filter the multiple sets of basic clustering results, remove results with abnormal cluster sizes, and obtain a set of high-quality clustering results; Step S6: Based on the data scale and data distribution characteristics, adaptively select either a graph segmentation ensemble strategy or a spectral clustering ensemble strategy to integrate the high-quality clustering result set and output the final clustering labels; Step S7: Map the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level, and combine the loss fluctuation evolution trajectory of the transformer area meter to automatically calculate the investigation priority of abnormal users and generate accurate operation and maintenance suggestions for the low-voltage distribution network. The specific method for obtaining fused features by bidirectionally aligning and fusing the multi-scale local features and long-range temporal dependency features through the cross-attention fusion module in step S3 includes: The cross-attention fusion module achieves the alignment and fusion of the multi-scale local features and the long-range temporal dependency features through bidirectional attention calculation; The bidirectional attention calculation includes: The first attention branch uses the multi-scale local features as the query vector and the long-range temporal dependency features as the key vector and value vector for calculation. The second attention branch uses the long-range temporal dependency features as the query vector and the multi-scale local features as the key vector and value vector for calculation. Both attention sets are implemented using a 4-head multi-head attention mechanism, and the output formula for a single attention head is: Where h=4 is the number of attention heads. Scaling factor For TCN projection features in the first Subspace mapping of size The LSTM projection features are respectively in the th Mapping of key vectors and value vector subspaces for each head; After concatenating the outputs of the four attention heads, the complete output of bidirectional attention is obtained: The calculation formula is as follows: Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features; Following the cross-attention fusion module, a multi-head self-attention module is also included, which is used to perform global correlation modeling on the fused features to generate enhanced features; Specifically, assume the input X∈R n×m×d Where n is the number of samples, m is the time step, and d is the feature dimension, the self-attention mechanism calculates attention weights through a linear transformation of the query, key, and value; the output of each attention head h is: Where, d h For each head dimension, d k This is the scaling factor; In the TCN model, the Multi-Head Self-Attention layer receives features output by the multi-scale temporal convolutional network (TCN) module, modeling long-distance relationships between time steps. In the TCN-LSTM model, it further processes the features fused from the multi-scale TCN module and the long short-term memory (LSTM) module, enhancing cross-time step correlation. The TCN module performs multi-scale local-global feature extraction, while the LSTM module captures long-range temporal dependencies and integrates cross-attention and multi-head self-attention features. The results of multiple heads are merged via concatenation, calculated using the following formula: Where h=4, the output dimension is fixed at 128, which is used to reflect the deep abstraction of features.

2. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, The original electricity load time series data mentioned in step S1 is load current, active power or electricity consumption data that characterizes the user's electricity consumption behavior, obtained through smart meters or acquisition terminals in the Advanced Metering Architecture (AMI). The sampling interval for the electricity load time series data is once every 15 minutes; the preprocessing includes: cleaning the raw electricity load data, filling in missing values ​​and removing outliers caused by meter malfunctions. The continuous data is then sliced ​​using a sliding window to generate a fixed-length sample sequence that reflects daily or weekly electricity consumption patterns.

3. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, Step S2 involves inputting the preprocessed time series data into a multi-scale spatiotemporal feature extraction network. This network includes a cascaded multi-scale temporal convolutional network (TCN) module and a long short-term memory (LSTM) module. Specific methods for extracting multi-scale local features and long-range temporal dependency features of the time series include: The multi-scale spatiotemporal feature extraction network includes at least one multi-scale spatiotemporal block (MST Block), which is connected in series with the multi-scale temporal convolutional network (TCN) module and the long short-term memory network (LSTM) module. The multi-scale temporal convolutional network (TCN) module is composed of multiple sets of multi-scale TCN blocks stacked together. Each set of multi-scale TCN blocks is configured with multiple convolutional layers with different dilation rates in parallel, which are used to extract local features under different receptive fields. In the multi-scale TCN block, the dilation rate of the convolutional layer is configured as 1, 2, and 4; The initial number of filters in the multi-scale temporal convolutional network (TCN) module is 8, and the number of filters increases by a preset multiple as the network depth increases. The Long Short-Term Memory (LSTM) network module has a two-layer stacked structure, with 64 LSTM units in the first layer and 32 LSTM units in the second layer. In the Multi-Scale Spatiotemporal Block (MST Block), the features output by the Multi-Scale Temporal Convolutional Network (TCN) module need to undergo dimensionality adjustment before being input into the Long Short-Term Memory (LSTM) network module, so as to adjust the feature dimensions to a time-step-first format. The multi-scale temporal convolutional network (TCN) module is used to adaptively extract multi-scale local features from high-frequency shocks to low-frequency fluctuations; the long short-term memory (LSTM) network module is used to capture long-range temporal dependencies in the process of device performance degradation.

4. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, The specific method for generating multiple sets of basic clustering results based on the fusion features through multiple independently initialized clustering branches in step S4 includes: Based on the fusion features, M sets of basic clustering results are generated through M independently initialized clustering branches; where M is an integer greater than 1, each clustering branch is independent of each other by randomly initializing its weight matrix, and after forward propagation of the fusion features, a set of basic clustering labels is generated using the K-Means clustering algorithm; the M sets of basic clustering labels together constitute the basic clustering result sequence.

5. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, The specific method for using the cluster balance constraint mechanism in step S5 to filter the multiple sets of basic clustering results, removing results with abnormal cluster sizes, and obtaining a set of high-quality clustering results includes: Based on the preset lower limit value lr and upper limit value ur of the cluster size, a penalty score is calculated for each group of basic clustering results through a penalty function; wherein, the penalty score is obtained by accumulating the difference between the number of samples in each cluster and lr × ideal cluster size, and the difference between the number of samples and ur × ideal cluster size; Several basic clustering results with the lowest penalty scores are selected to form the set of high-quality clustering results; where lr and ur are 0.3 and 1.5 respectively.

6. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, The specific method for integrating the high-quality clustering result set by adaptively selecting a graph segmentation ensemble strategy or a spectral clustering ensemble strategy based on the data scale and data distribution characteristics, and outputting the final clustering labels in step S6, includes: Determine whether the number of samples N corresponding to the high-quality clustering result set is greater than a preset threshold T, where T=1000; If N > T, then the pymetis graph segmentation ensemble strategy based on the minimum cut theory of graph theory is selected. By constructing a sample association graph and performing multi-level partitioning optimization, the final clustering labels are obtained. If N ≤ T, then the spectral clustering ensemble strategy based on spectral graph theory is selected. By constructing a consensus matrix and performing feature decomposition and sample mapping, the final cluster labels are obtained.

7. The non-technical line loss condition assessment method based on multi-scale spatiotemporal feature fusion in a low-voltage distribution network environment according to claim 1, characterized in that, The specific method for automatically calculating the investigation priority of abnormal users by mapping the state attributes corresponding to the final clustering labels to the preset non-technical line loss early warning level and combining the loss fluctuation evolution trajectory of the transformer area's total meter in step S7 includes: Based on the final cluster labels output in step S6, the average electricity consumption deviation of each cluster center during the evaluation period is calculated. Based on the deviation ratio between the average electricity consumption deviation of each cluster center during the evaluation period and the baseline value of normal electricity consumption patterns, clusters with a deviation ratio ≥ 30% are mapped to a high-risk level, clusters with a deviation ratio ≤ 10% and < 30% are mapped to a medium-risk level, and clusters with a deviation ratio < 10% are mapped to a low-risk level. The baseline value of normal electricity consumption patterns is taken as the average electricity consumption value of the same type of users in the same area during the same evaluation period. The evaluation period is uniformly set to 30 days. The average electricity consumption deviation is calculated using the average absolute value of the difference between the electricity consumption data of all users within the cluster and the baseline value. Extract the load curve of users with a high risk warning level and align it with the daily line loss rate fluctuation curve of the transformer area table on the time axis; determine whether the abnormal decrease time point of user load and the abnormal increase time point of transformer area line loss are in the same time interval. Users who simultaneously meet the criteria of belonging to a high-risk cluster and whose abnormal time points coincide with a surge in transformer area losses are set as the highest investigation priority. An abnormal user list is automatically generated according to the priority, and the suspected fault type of the user in the clustering results is directly output to guide accurate on-site investigation.