Power distribution substation line loss anomaly tracing method and system based on space-time correlation and user behavior graph

CN123012903APending Publication Date: 2026-10-30国网甘肃省电力公司甘南供电公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611262775.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]根据以上现有技术中的不足,本发明的目的在于提供一种基于时空相关性与用户行为图谱的配电台区线损异常溯源方法及系统,解决现有无法对线损异常进行源头定位、传播路径追踪及诱因识别的技术问题

Benefits of technology

[0051]本发明通过对台区各节点线损率时序数据进行多分量分解,提取反映偶发性异常信息的残差分量,并基于四分位距确定各节点的自适应阈值,能够精确感知各节点是否发生线损异常及其发生的具体时段。该方法不依赖数据服从正态分布的假设,对离群值具有较强鲁棒性,克服了现有技术中阈值设定依赖人工经验、普适性差的缺陷。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012903A_ABST
    Figure CN123012903A_ABST
Patent Text Reader

Abstract

The application discloses a power distribution substation line loss anomaly tracing method and system based on space-time correlation and user behavior atlas, and belongs to the technical field of line loss detection of power distribution networks. The method comprises the following steps: collecting line loss rate time series data, obtaining residual components through time series decomposition, determining an adaptive threshold based on extreme value distribution, marking abnormal time periods and constructing an abnormal node set; tracing back along the substation topology in reverse, determining the starting time of node changes through first-order difference, locating the abnormal source and recording the propagation path; extracting user daily load curve morphology and power factor characteristics, clustering to construct a typical behavior mode library, and calculating behavior anomaly indexes; associating and matching the propagation path nodes and the behavior anomaly indexes, determining the cause type and generating a structured tracing report. The application realizes the source positioning, propagation tracking and cause identification of line loss anomalies, and provides systematic technical support for line loss lean management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of power distribution network line loss detection technology, specifically to a method and system for tracing the source of abnormal line loss in power distribution substations based on spatiotemporal correlation and user behavior maps. Background Technology

[0002] Distribution transformer substations, as key power supply networks connecting distribution transformers to user power terminal equipment, are the infrastructure for low-voltage power supply. With the continuous development of new power systems, the proportion of distributed energy, mainly photovoltaics, in distribution transformer substations is gradually increasing, transforming them from traditional passive networks to bidirectional active networks. Simultaneously, the diversification and intelligentization of user electricity consumption behaviors have made the load characteristics of these substations more complex.

[0003] Existing technologies have proposed line loss prediction schemes for active distribution transformer areas. For example, Chinese patent CN202510013759.1 (CN119416099B) discloses a method for predicting line loss in active distribution transformer areas. This method decomposes historical line loss data of the active distribution transformer area into line loss data for each meter, analyzes the correlation weights between line loss influencing factors and meter line loss data, and uses a multi-classifier and a bidirectional long short-term memory network to predict meter line loss. The predicted line loss for the transformer area is then obtained by superimposing and reconstructing the data. However, this technical solution focuses on line loss prediction, with its core being the prediction of future line loss rates, rather than conducting source analysis on existing line loss anomalies. When the line loss rate is abnormally high or low, this solution cannot answer questions such as where the anomaly occurred, where it started to propagate, and what caused it. Furthermore, this solution does not consider the spatiotemporal propagation characteristics of abnormal events in the physical topology of the transformer area, nor does it perform correlation analysis between changes in user electricity consumption behavior and line loss anomalies, making it difficult to meet the needs of accurate anomaly location and cause identification in actual line loss management.

[0004] To address the shortcomings of the existing technologies, this invention provides a method and system for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps. The aim is to solve the technical problems that existing technologies cannot locate the source of abnormal line loss, trace its propagation path, and identify the causes. Summary of the Invention

[0005] In view of the shortcomings of the prior art, the purpose of this invention is to provide a method and system for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs, so as to solve the technical problems of existing systems being unable to locate the source of abnormal line loss, track the propagation path and identify the cause.

[0006] To achieve the above objectives, the present invention adopts the following technical solution;

[0007] A method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps includes the following steps:

[0008] Collect time-series data of line loss rate of each node in the transformer area, perform time-series decomposition on the sequence of each node to obtain residual components, determine the adaptive threshold of each node according to the extreme value distribution of the residual components, mark the time when the residual value exceeds the corresponding threshold as an abnormal time and merge it into an abnormal time period, and form an abnormal node set of nodes with abnormal time periods.

[0009] Starting from the abnormal node, backtracking is performed level by level along the reverse direction of the transformer area topology to obtain the line loss rate change curve of the upstream node before the abnormal period. The first-order difference value of the curve is calculated, and the position where the difference value continuously exceeds the positive threshold is taken as the starting time of the change of the node. The upstream node whose change starting time is earlier than the starting time of the abnormal period of the abnormal node is marked as the candidate source node and the backtracking continues until the termination condition is met. Among all the candidate source nodes, the node with the deepest tracing level is selected as the abnormal source node, and the propagation path from the source node to each abnormal node is recorded.

[0010] Collect time-series data of electricity consumption of each user, extract the morphological features of daily load curves and power factor change features, cluster the feature vectors of each user to form a typical behavior pattern library, calculate the similarity distance between the real-time feature vector and its corresponding typical pattern center and normalize it as a behavior anomaly indicator.

[0011] The nodes along the propagation path are associated and matched with abnormal behavior indicators. For user meter nodes, the abnormal behavior indicators and abnormal line loss magnitude are combined to determine the cause type. For transformer or branch nodes, the cause type is determined based on the statistical values ​​of abnormal behavior indicators of downstream users. The cause discrimination results are aggregated along the propagation path to generate a source tracing report.

[0012] As a further aspect of the present invention, the step of performing time-series decomposition on each node sequence to obtain residual components specifically includes:

[0013] The time series of line loss rate for each node is decomposed into three components: long-term trend component, periodic component, and residual component. The decomposition relationship is: line loss rate time series = long-term trend component + periodic component + residual component.

[0014] The process of extracting the long-term trend component of the time series of line loss rate using moving average filtering includes: determining the width of the filtering window, extracting the line loss rate values ​​of all times within the filtering window corresponding to the target time as the center and calculating the arithmetic mean, which is used as the long-term trend estimate of the target time. The above calculation is performed on each target time in chronological order to form a complete long-term trend component sequence.

[0015] Subtract the long-term trend component from the line loss rate sequence point by point to obtain the detrended sequence;

[0016] The dominant period of the detrended sequence is identified using periodogram analysis, including: setting the candidate period range to 1 hour to 24 hours; for each candidate period, dividing the detrended sequence into several complete segments according to the candidate period; collecting the values ​​at the same phase position in all segments to form a set; calculating the mean and variance of the set; using the sum of the ratios of the squares of the means to the variances of all phase positions as the statistic of the candidate period; traversing all candidate periods and selecting the period with the largest statistic as the dominant period.

[0017] The detrending sequence is grouped by phase position according to the dominant period, and the average value of each phase position is taken to obtain the periodic component value. The average values ​​are arranged in phase order and extended to the same length as the original sequence to obtain the periodic component sequence.

[0018] Subtracting the long-term trend component and the periodic component from the original sequence yields the residual component sequence.

[0019] As a further aspect of the present invention, the width of the filtering window is an odd number; for the moments near the boundary at both ends of the time series of line loss rate, a mirror expansion method is used to complete the original sequence, and the existing values ​​at the beginning of the sequence are mirrored and copied sequentially to the front of the sequence, and the existing values ​​at the end of the sequence are mirrored and copied sequentially to the back of the sequence, so that each target moment in the sequence can take the full width of the filtering window within the filtering window range.

[0020] As a further aspect of the present invention, determining the adaptive threshold for each node based on the extreme value distribution of the residual components specifically includes:

[0021] Quartiles of statistical residual component sequences and third quarter Calculate the interquartile range ;

[0022] Below the threshold Upper bound threshold As an anomaly detection boundary;

[0023] Iterate through each residual value in the residual component sequence. If the residual value is lower than the lower threshold, it is considered abnormally low. If the residual value is higher than the upper threshold, it is considered abnormally high.

[0024] As a further aspect of the present invention, the step of merging abnormal moments into abnormal time periods specifically involves:

[0025] Abnormal moments that are consecutive in time or with an interval of no more than two sampling intervals at the same node are merged into one abnormal time period, and the start and end times of the abnormal time period are recorded.

[0026] After merging, the set of abnormal time periods for this node is represented as follows: ,in This represents the number of abnormal periods for that node; For the first The start time of each abnormal period; For the first The end time of each abnormal period; Abnormal time period number.

[0027] As a further aspect of the present invention, the step of taking the position where the difference value continuously exceeds the positive threshold as the starting time of the node change specifically includes:

[0028] Using the start time of the abnormal period as the reference time, obtain the numerical sequence of line loss rate of the node within the backtracking time window before the reference time. The length of the backtracking time window is 3 times the duration of the abnormal period.

[0029] The first-order difference value is calculated point by point for the sequence. The first-order difference value is the difference between the line loss rate at the next time step and the line loss rate at the previous time step.

[0030] Starting from the beginning of the sequence, iterate through each first-order difference value. When three or more consecutive first-order difference values ​​exceed the positive threshold of 0.5 times the standard deviation of the historical line loss rate of that node, record the time corresponding to the first difference value as the starting time of the change of that node.

[0031] As a further aspect of the present invention, marking upstream nodes whose change start time is earlier than the start time of the abnormal period of the abnormal node as candidate source nodes specifically includes:

[0032] Based on the topology of the distribution area, an upstream and downstream relationship mapping table is established between each node. The distribution transformer outlet is taken as the root node. Each node is organized into a directed tree structure according to the path direction of power flow from the root node to the user terminal. The direct upstream neighbor node and direct downstream neighbor node of each node are recorded.

[0033] Obtain the direct upstream neighbor nodes of the abnormal node;

[0034] If the change start time of the direct upstream neighbor node is earlier than the change start time of the abnormal node, and the time difference between the two does not exceed 10 sampling intervals, then the direct upstream neighbor node is marked as a candidate source node, and its change start time is recorded.

[0035] If no candidate source node can be marked, the abnormal node is determined to be the source node itself, and the tracing of that branch is stopped.

[0036] As a further aspect of the present invention, the daily load curve morphology features include: the time of occurrence of the daily peak value, the time of occurrence of the daily trough value, the peak-to-trough difference rate, the absolute values ​​of the average slope of the rising segment and the average slope of the falling segment; the power factor variation features include: the daily average power factor and the daily variance of the power factor fluctuation; the daily load curve morphology features and the power factor variation features together constitute a 7-dimensional behavioral feature vector;

[0037] The average slope of the rising segment is the regression slope obtained by using the least squares method to perform linear regression fitting on active power data points extracted during the period from the daily trough to the daily peak. The absolute value of the average slope of the falling segment is the absolute value of the regression slope obtained by using the least squares method to perform linear regression fitting on active power data points extracted during the period from the daily peak to the daily trough of the next day.

[0038] As a further aspect of the present invention, the step of clustering user feature vectors to form a typical behavior pattern library specifically includes:

[0039] Collect the active power sequence and reactive power sequence of each user's electricity meter over a continuous 30 days. Using days as the unit of division, extract the behavioral feature vector for each day and merge the behavioral feature vectors of all users over all dates into a feature vector set.

[0040] The similarity distance between any two user feature vectors is calculated using the dynamic time warping algorithm, including: for two feature sequences, constructing a cumulative distance matrix. The rows of the matrix correspond to the time values ​​of the first eigenvector, and the columns correspond to the time values ​​of the second eigenvector. The value of each position in the matrix is ​​equal to the minimum of the cumulative distances between the two eigenvalues ​​at that position plus the distances between the three adjacent positions to the left, below, and to the lower left. The value at the lower right corner of the matrix is ​​taken as the dynamic time-normalized distance between the two eigenvectors.

[0041] Using dynamic time-warped distance as a similarity distance metric, hierarchical clustering is performed on all feature vectors using a bottom-up aggregation strategy. Initially, each sample forms its own class. Each time, the two closest classes are selected and merged. The distance between the new class and other classes is updated to the minimum distance between the two classes before merging and other classes. This process continues until all samples are merged into a preset number of classes.

[0042] For each class, the mean vector of all sample feature vectors within the class is calculated as the center of the class. The sample curve closest to the center of the class is taken as the center curve of the typical electricity consumption behavior pattern, and each center curve is labeled with the corresponding time period type label.

[0043] For any user's electricity consumption data collected in real time during the current time period, extract their behavioral feature vector and determine the class corresponding to the time period type label. Construct a cumulative distance matrix between the user's feature vector and the center vector of the class. Use the value in the lower right corner of the matrix as the dynamic time-normalized distance. Divide this distance by the maximum distance between all users and the same center curve during the current time period for normalization. If the maximum distance is less than 1, take 1. The normalized value is used as the abnormal behavior indicator of the user during the current time period.

[0044] This application also provides a distribution substation line loss anomaly tracing system based on spatiotemporal correlation and user behavior graphs, including:

[0045] The data acquisition module is used to acquire the line loss rate time-series data of each node in the distribution substation and the power consumption time-series data of each user.

[0046] The anomaly detection module is used to perform the functions of anomaly period detection and anomaly node set generation in the above methods;

[0047] The spatiotemporal positioning module is used to perform the functions of tracing the source node of the anomaly and recording the propagation path in the above method;

[0048] The behavior analysis module is used to perform the functions of clustering typical electricity consumption behavior patterns and calculating abnormal behavior indicators in the above methods.

[0049] The report generation module is used to perform the functions of cause identification and structured source tracing report generation in the above methods.

[0050] In summary, due to the adoption of the above technical solutions, the beneficial technical effects of the invention are as follows: Compared with the prior art, the method for tracing the source of abnormal line loss in distribution substations and the pricing intelligent agent based on spatiotemporal correlation and user behavior maps provided by the present invention have the following beneficial effects:

[0051] This invention decomposes the time-series data of line loss rate at each node in a transformer substation into multiple components, extracts residual components reflecting occasional anomalies, and determines adaptive thresholds for each node based on interquartile ranges. This allows for precise detection of whether line loss anomalies occur at each node and the specific time period in which they occur. This method does not rely on the assumption that the data follows a normal distribution, exhibits strong robustness to outliers, and overcomes the shortcomings of existing technologies that rely on manual experience for threshold setting and have poor universality.

[0052] This invention establishes a mapping relationship between upstream and downstream nodes based on the physical topology of the transformer substation. Starting from an abnormal node, it traces back level by level along the reverse direction of the topology. By determining the starting time of the line loss rate change of each node through the judgment that the first-order difference value continuously exceeds a positive threshold, the upstream node with the earlier starting time of the change is marked as the candidate source node. By comparing the tracing depth, the source node of the abnormality can be accurately located and the complete propagation path can be recorded, filling the gap in the existing technology for spatial localization of line loss anomalies and tracking of propagation paths.

[0053] This invention constructs a 7-dimensional behavioral feature vector by extracting the morphological characteristics of users' daily load curves (time of daily peak value, time of daily valley value, peak-valley difference rate, average slope of the rising segment, and average slope of the falling segment) and power factor variation characteristics (daily average power factor and daily variance of power factor fluctuation). It then uses dynamic time warping distance as a similarity metric for hierarchical clustering to form a library of typical electricity consumption behavior patterns. By comparing and normalizing real-time electricity consumption behavior features with the centers of typical patterns using dynamic time warping distance, the invention quantifies the degree to which user electricity consumption behavior deviates from its typical pattern, solving the technical challenge of existing technologies failing to correlate changes in user behavior with abnormal line losses.

[0054] This invention performs spatiotemporal correlation matching between propagation path nodes and abnormal behavior indicators. For user meter nodes, the combined abnormal behavior indicators and line loss anomaly magnitude determine the cause as a sudden change in user electricity consumption behavior or meter measurement deviation / line contact anomaly. For transformer or branch nodes, the statistical values ​​of downstream user abnormal behavior indicators determine the cause as a convergence of downstream user abnormal behavior or physical factors such as line aging / joint oxidation. Finally, the cause determination results are aggregated along the propagation path to generate a structured source tracing report, realizing a complete source tracing chain from anomaly discovery to source location and cause analysis. This provides a systematic technical solution for the accurate location and cause analysis of line loss anomalies in distribution substations, effectively supporting lean line loss management and anti-electricity theft investigation. Attached Figure Description

[0055] Figure 1 A flowchart of a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs;

[0056] Figure 2 The flowchart is for a distribution substation line loss anomaly tracing method S100 based on spatiotemporal correlation and user behavior graph;

[0057] Figure 3 The flowchart of S200 is a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs.

[0058] Figure 4 S300 flowchart is a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs.

[0059] Figure 5 The flowchart of S400 is a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are for illustrative purposes only and are not intended to limit the scope of the invention.

[0061] 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.

[0062] like Figure 1 As shown, this application illustrates an exemplary method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps, specifically including the following steps:

[0063] S100. Abnormal event perception and location: Collect time series data of line loss rate of each node in the transformer area, perform time series decomposition on the sequence of each node to obtain residual components, determine the adaptive threshold of each node according to the extreme value distribution of the residual components, mark the time when the residual value exceeds the corresponding threshold as abnormal time and merge it into abnormal time period, and form an abnormal node set of nodes with abnormal time periods.

[0064] S200. Anomaly source tracing and propagation path recording: Starting from the anomaly node, backtracking step by step along the reverse direction of the transformer area topology to obtain the line loss rate change curve of the upstream node before the anomaly period. Calculate the first-order difference value of the curve and take the position where the difference value first continuously exceeds the positive threshold as the starting time of the change of the node. Mark the upstream nodes whose change start time is earlier than the start time of the anomaly period of the anomaly node as candidate source nodes and continue to trace upwards until the termination condition. Select the node with the deepest tracing level among all candidate source nodes as the anomaly source node and record the propagation path from the source node to each anomaly node.

[0065] S300. Construction of user electricity consumption behavior map and quantification of behavior anomalies: Collect time-series data of electricity consumption of each user, extract the morphological features of daily load curves and power factor change features, cluster the feature vectors of each user to form a typical behavior pattern library, calculate the dynamic time regularization distance between the real-time feature vector and its corresponding typical pattern center and normalize it as a behavior anomaly indicator.

[0066] S400. Spatiotemporal correlation fusion discrimination and source tracing report generation associates and matches nodes on the propagation path with abnormal behavior indicators. For user meter nodes, the combined abnormal behavior indicators and abnormal line loss amplitude determine the cause as a sudden change in behavior or equipment factors. For transformer or branch nodes, the average value of abnormal behavior indicators of downstream users determines the cause as a convergence of downstream behaviors or physical factors. The source tracing report is generated by aggregating the cause discrimination results along the propagation path.

[0067] The core technical logic of this method includes: First, achieving accurate perception and location of abnormal events through temporal decomposition and adaptive threshold detection; second, establishing upstream and downstream node mapping relationships based on the physical topology of the transformer area, and determining the source and propagation path of the anomaly through reverse step-by-step tracing; third, constructing a typical behavior pattern library through user electricity behavior feature extraction and clustering, and quantifying the degree of behavior deviation with dynamic time regularization distance; finally, performing spatiotemporal correlation matching between propagation path nodes and behavioral anomaly indicators, jointly identifying the type of anomaly cause and generating a structured source tracing report.

[0068] By employing the above technical logic, this method realizes a complete tracing chain from anomaly detection to source location and cause analysis, providing a systematic technical solution for the accurate location and cause analysis of distribution transformer area line loss anomalies.

[0069] Please refer to Figure 2 The diagram illustrates an exemplary method S100 for tracing abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior graphs. The purpose of S100 is to achieve accurate perception of abnormal line loss events by performing multi-component decomposition and adaptive threshold detection on the time-series data of line loss rate of each node in the substation, and to determine whether there are abnormalities in each node and the specific time period during which the abnormalities occur.

[0070] To achieve the above technical objectives, S100 includes the following technical steps:

[0071] S110. Collect time-series data of line loss rate at each node, including the line loss rate at the distribution transformer outlet, monitoring points of each branch line, and user meter nodes within the distribution substation area, within a continuous time window. Use the same sampling interval within the collection time window. Synchronous sampling is performed at each node, and the entire acquisition time window is divided into... Each sampling time is sequentially numbered as follows: ,in The start time of the corresponding data collection time window. The sampling interval corresponds to the end time of the acquisition time window. Optimal duration is 15 minutes. Total duration of the data acquisition window. ;

[0072] Through the above synchronous sampling process, each node within the transformer area generates a numerical sequence of line loss rates aligned with the time axis. Time series of line loss rates of each node Represented as:

[0073] ;

[0074] in, For the first Each node at time... Line loss rate; This refers to the length of the data acquisition time window.

[0075] Line loss rate sequence for each node within the transformer area Perform time-series decomposition operations separately. The goal of time-series decomposition is to decompose the sequences of each node. It can be broken down into three components with different physical meanings: long-term trend component Periodic components and residual components The decomposition relationship is as follows:

[0076] ;

[0077] The purpose of time series decomposition is to separate the influencing factors at different time scales in the line loss rate sequence. Among them, the long-term trend component... This reflects the slow changes in line loss rate over a longer time scale, such as the overall upward or downward trend of line loss rate caused by factors such as equipment aging, seasonal changes, and changes in electricity consumption structure; periodic component. This reflects the regular fluctuations in line loss rate over a fixed time period, such as the alternation of peak and off-peak electricity consumption during the day, and the differences in electricity consumption between weekdays and holidays, which are caused by periodic factors affecting line loss rate; residual components This reflects the random deviation of the line loss rate after removing the two regular components mentioned above. This part contains information about occasional abnormal events and is the main analysis object for subsequent anomaly detection.

[0078] S120. Long-term trend components are extracted using moving average filtering. The basic principle of moving average filtering is to average the data within a certain window before and after the target time, thereby eliminating the influence of short-period fluctuations and random noise, and retaining low-frequency trend components.

[0079] In practice, moving average filtering includes:

[0080] Determine the filter window width: Denote the filter window width as... , The value of determines the length of time covered by the moving average, since the time interval between adjacent sampling points is . When the window width is When, window coverage Sampling points, from the first sampling point to the second sampling point. There are a total of sampling points If there are 1 sampling interval, then the time span covered by the filter window is:

[0081] ;

[0082] Filter window width The preferred values ​​are 7 or 15. It is suitable for scenarios where data fluctuates frequently and rapid trend changes need to be tracked, making the trend component more sensitive to short-term changes; Suitable for scenarios with high data noise and requiring stronger smoothing effects to extract stable long-term trends, making trend components smoother and more stable. Filter window width. Other odd numbers can also be used depending on the characteristics of the actual data, such as 5, 9, 11, 13, 21, etc., with a general range from 3 to 51. Unless otherwise specified, the default value is used. Perform trend extraction.

[0083] Perform moving average calculation: for time series of line loss rates Each target moment in , with target time Centered on the filter, the range of the filter window corresponding to that moment is determined as follows: That is, from time At that time ,common 1 sampling point. Extract the line loss rate values ​​corresponding to all times within this window range: .

[0084] Regarding this Sum the individual line loss rate values ​​and divide by . Calculate their arithmetic mean, and use it as the target time. Long-term trend estimate By averaging the values ​​of multiple sampling points within a window, positive and negative fluctuations within the window cancel each other out, suppressing random noise while preserving the overall level of the line loss rate over the window's time scale. A larger window width allows for more sampling points to participate in the averaging, resulting in stronger suppression of random noise and smoother trend components; however, an excessively large window width may also mask genuine rapid trend changes, leading to trend tracking lag. Therefore, The selection of the appropriate parameter needs to strike a balance between noise suppression and trend tracking sensitivity.

[0085] Handling boundary issues at the edges of a sequence: For target times at the beginning and end of a sequence that are close to the boundary, when the target time... or At the target time The window centered on the sequence exceeds the sequence boundary and cannot be filled. There are several numerical values. To address this boundary issue, a mirror expansion method is used to pad the original sequence.

[0086] The specific operation of mirror expansion is as follows: At the beginning of the sequence, the existing values ​​at the beginning of the sequence are mirrored sequentially forward. When the target time is near the beginning of the sequence, the missing values ​​at the beginning of the sequence are mirrored and filled sequentially from the beginning to the end, so that the filter window can obtain symmetrical expansion values ​​at the beginning of the sequence. Specifically, for the value that needs to be expanded at the beginning of the sequence... Location When the value is , take the first value from the original sequence. The value at the nth position is used as the mirror expansion value, that is, the symmetrical position of the copied sequence from the beginning to the end. The same mirror principle is used at the end of the sequence: for the position where the value of the nth position after the sequence needs to be copied... When taking the value at the nth position, take the nth position from the original sequence. The values ​​at each position are used as mirror expansion values, which are the symmetrical positions of the copied sequence from the tail to the front.

[0087] Through the above mirroring expansion operation, the sequence head is forward and the sequence tail is backward, respectively. Each mirrored supplementary value ensures that every target time in the sequence can be fully captured within the filtering window. A set of values ​​ensures that the moving average calculation can be performed throughout the entire sequence.

[0088] Generate complete long-term trend component sequences, in chronological order. The moving average calculation is performed sequentially for each target time point to obtain the long-term trend estimate for each time point. All calculation results are then arranged in chronological order to form a complete long-term trend component sequence. :

[0089] ;

[0090] The long-term trend component sequence has the same length as the original sequence. The value at each position represents the long-term change level of the original line loss rate around that moment, eliminating short-term fluctuations caused by factors such as intraday electricity consumption fluctuations and random noise.

[0091] S130. Extract the periodic component and residual component, and convert the line loss rate sequence. Subtract the long-term trend component point by point To obtain the detrended sequence The detrended sequence mainly contains periodic components and residual components, which need to be further separated.

[0092] Periodic chart analysis was used to identify the dominant period of the detrended sequence. As a preferred approach, the candidate period range was set from 1 hour to 24 hours, corresponding to 4 to 96 sampling points. For each candidate period... Detrending sequence The period is divided into several complete segments, each segment containing... Phase position Collect the same phase position in all segments. The values ​​at each point form a set; calculate the mean of this set. With variance .

[0093] Mean value at each phase position and variance The calculation method is as follows:

[0094] ;

[0095] The formula represents the first... The first periodic segment Take the values ​​from each position and calculate the average.

[0096] ;

[0097] in, To represent the detrended sequence By period The number of complete segments obtained from the segmentation. , This is a floor function; For periodic segment index numbers;

[0098] The sum of the ratios of the squared mean to the variance of all phase positions is used as the statistic for the candidate period. :

[0099] ;

[0100] The larger this statistic, the stronger the periodicity of the sequence within that period. Iterate through all candidate periods and select... The longest period is used as the dominant period of the line loss rate sequence at that node. :

[0101] ;

[0102] Dominant cycle The detrended sequence is grouped according to its phase position, and the average value is taken at each phase position to obtain the periodic component value. :

[0103] ;

[0104] To follow the dominant cycle The number of complete segments obtained from the segmentation;

[0105] In phase order Arrange the average values ​​and extend them to the same length as the original sequence to form a complete periodic component sequence. .

[0106] Subtracting the long-term trend component and the periodic component from the original sequence yields the residual component sequence. :

[0107] ;

[0108] The residual component reflects the degree of random deviation of the line loss rate after removing trend changes and periodic fluctuations. When the transformer area is operating normally, the residual component should exhibit a small random fluctuation around the zero value; when an abnormal event occurs in the transformer area, the residual component will show a significant positive or negative deviation, and this deviation is the target signal for subsequent anomaly detection.

[0109] S140. Adaptive threshold determination and anomalous moment marking, for the residual component sequence of each node. An adaptive threshold is determined using an extreme value statistical method based on interquartile range. The statistical residual component sequences are then analyzed. Quartiles of a sequence and third quarter Calculate the interquartile range Below the threshold and upper bound threshold As an anomaly detection boundary:

[0110] ;

[0111] ;

[0112] The residual value is lower than The time was judged as abnormally low; the residual value was higher than The data is identified as abnormally high; this method does not rely on the assumption that the data follows a normal distribution and has strong robustness to outliers.

[0113] Traversing the residual component sequence Each residual value in ,when or When a node is identified as having an abnormal deviation in line loss rate at that moment, that moment is marked as an abnormal moment. A residual value higher than the upper threshold indicates an abnormally high line loss rate, which may correspond to situations such as electricity theft or under-reporting of electricity consumption by meters; a residual value lower than the lower threshold indicates an abnormally low line loss rate, which may correspond to situations such as over-reporting of electricity consumption by meters.

[0114] S150. Abnormal Time Period Merging and Abnormal Node Set Generation: This function merges consecutive or intermittently separated abnormal moments of the same node into a single abnormal time period, recording the start and end times of this period. The merging rule of intermittently separated by no more than two sampling intervals filters out isolated noise points and avoids incorrectly merging independent abnormal events that are far apart in time.

[0115] All nodes that exhibit at least one abnormal time period constitute the abnormal node set. Each abnormal node and its corresponding abnormal time period set Composing an abnormal event log, in which This represents the number of abnormal periods for that node; For the first The start time of each abnormal period; For the first The end time of each abnormal period; Abnormal time period number;

[0116] Please refer to Figure 3 The flowchart illustrates an exemplary method S200 for tracing the source of abnormal line loss in a distribution substation based on spatiotemporal correlation and user behavior graphs according to this application.

[0117] In a method for tracing the source of line loss anomalies in distribution substations based on spatiotemporal correlation and user behavior graphs, the purpose of S200 is to determine the source node of the anomaly by backtracking backward level by level based on the physical topology of the substation and to record the complete path of the anomaly propagating along the topology.

[0118] To achieve the above technical objectives, S200 includes the following technical steps:

[0119] S210. Establish an upstream and downstream topology mapping table. Based on the transformer substation topology, establish an upstream and downstream relationship mapping table between each node. Specifically, taking the distribution transformer outlet as the root node, traverse every branch line fork point and every user meter access point in the transformer substation power supply network, organizing each node into a directed tree structure according to the path of power flow from the root node to the user terminal. ,in For a set of nodes, It is a set of directed edges, where each directed edge points from an upstream node to a downstream node.

[0120] In a directed tree In this context, for any node, its node relationships are defined as follows:

[0121] Direct upstream neighbor nodes: in a directed tree In a distribution transformer, if there is a unique path from the root node to the current node, the node immediately preceding it on that path and located upstream of it is called the current node's direct upstream neighbor. The direct upstream neighbor is the last node before which electrical energy flows to the current node. For the root node, i.e., the outlet of the distribution transformer, its direct upstream neighbor is empty, indicating that the root node has no upstream nodes.

[0122] Direct downstream neighbor nodes: The set of all directed edges that point directly to a given node are called the direct downstream neighbor nodes of that node. These nodes are the next level nodes that electrical energy directly reaches after flowing out of this node.

[0123] To facilitate the description of topological relationships in subsequent steps, the direct upstream neighbor of any node will be denoted as . The direct downstream neighbor node is denoted as After traversing all nodes, a mapping table of upstream and downstream relationships is generated, containing each node and its corresponding direct upstream and downstream neighbors, providing topology query support for subsequent reverse tracing.

[0124] After traversing all nodes, generate a list containing each node and its corresponding node. and The upstream and downstream relationship mapping table provides topology query support for subsequent reverse hierarchical tracing.

[0125] S220. Extract the start time of change of abnormal nodes. For each abnormal node determined in S150... and their corresponding abnormal periods Starting from the beginning of this abnormal period Using the baseline time, obtain the line loss rate data of this node before the baseline time to analyze the trend of change before the anomaly occurs.

[0126] The time window for this historical data is a backtracking time window, and its length is denoted as . In this embodiment, ;

[0127] The sequence of line loss rates within the backtracking time window Notation:

[0128] ;

[0129] in, For nodes Before the anomaly initiation time, the first The line loss rate of each sampling point, i.e., the earliest data point within the backtracking window. For nodes Before the anomaly initiation time, the first Line loss rate at each sampling point For nodes The line loss rate of the most recent sampling point before the onset of the anomaly, i.e., the last normal data point before the anomaly occurred;

[0130] Calculate the first difference value point by point for this sequence :

[0131] ;

[0132] The range of values ​​is That is, from the second moment of the backtracking window to the last moment of the backtracking window.

[0133] when When, it indicates that the line loss rate has increased compared to the previous moment; when When the line loss rate decreases compared to the previous moment, it indicates that the line loss rate has decreased.

[0134] S230. Determine the starting point of the continuous increase in the line loss rate, starting from the beginning position of the sequence. Start by iterating through each first-order difference value. When three or more consecutive first-order difference values ​​exceed a preset positive threshold, At that time, the moment corresponding to the first of the three difference values ​​is recorded as the starting moment when the line loss rate of that node begins to rise continuously. .

[0135] Positive threshold Take 0.5 times the standard deviation of the historical line loss rate of the node. The threshold is used to distinguish between normal fluctuations and trend changes: when the difference value is lower than the threshold, it is regarded as random fluctuation under normal operation; when the difference value continuously exceeds the threshold, it indicates that the line loss rate has formed a continuous upward trend.

[0136] The criteria for determining that three consecutive difference values ​​exceed the threshold have the following technical considerations: a single difference value exceeding the threshold may be a momentary spike caused by random fluctuations, which is insufficient to determine a trend change; if three or more consecutive difference values ​​exceed the threshold, it indicates that the line loss rate has formed a sustained upward trend rather than a random fluctuation, which has clear physical significance and is an effective clue for source tracing analysis.

[0137] If no three consecutive difference values ​​exceeding the threshold are detected within the backtracking time window, the node will not record the start time of the change in this abnormal event and will not participate in the tracing as a candidate source node in subsequent steps.

[0138] S240. Candidate source node identification: Obtain all direct upstream neighbor nodes of the abnormal node along the upstream-downstream relationship mapping table. For each direct upstream neighbor node, use the same method as in S220 and S230, with the same reference time. and the same time window length Calculate the starting point of the change curve of its line loss rate within the same time window.

[0139] The start time of the change in the direct upstream neighbor node is compared with the start time of the change in the abnormal node. If the start time of the change in the direct upstream neighbor node is earlier than the start time of the change in the abnormal node, and the time difference between the two does not exceed the preset maximum time difference threshold, then the change is considered complete. If so, mark the direct upstream neighbor node as a candidate source node and record the start time of its change. Take 10 sampling intervals.

[0140] The technical basis for this judgment logic is as follows: In a power supply topology, electrical energy flows from upstream nodes to downstream nodes. When an anomaly occurs at a certain point, causing a change in the line loss rate, this change will propagate from upstream to downstream along the direction of electrical energy flow. Therefore, if the start time of the line loss rate change at the upstream node is earlier than that at the downstream node, and the time difference is within a reasonable propagation delay range, it indicates that the anomaly was propagated from the upstream node to the downstream node.

[0141] After marking is completed, if no candidate source node is marked, it means that the abnormal node itself is the source node, and the tracing of this branch is stopped; if one or more candidate source nodes are successfully marked, the subsequent execution continues to trace upward level by level.

[0142] S250. Trace upwards level by level until the termination condition is met. Starting from the newly marked candidate source node, continue upstream along the upstream-downstream relationship mapping table to obtain its direct upstream neighbor node. Repeat the change start time comparison process from S220 to S240, calculate the change start time of the direct upstream neighbor node and compare it with the change start time of the current candidate source node. If the change start time of the direct upstream neighbor node is earlier and the time difference is within a preset range, then further mark it as a candidate source node and continue tracing.

[0143] Repeat this process until the tracing of this branch is stopped when any of the following termination conditions are met:

[0144] (1) The current candidate source node has no direct upstream neighbor node, that is, it has reached the root node (distribution transformer outlet), indicating that the abnormal source has been traced back to the power supply entry level of the distribution area;

[0145] (2) The number of traceable levels has reached the preset maximum traceability depth. , To prevent the tracing efficiency from decreasing or getting stuck in an infinite loop due to excessively deep topology levels;

[0146] (3) Among all upstream nodes at the current level, no new candidate source node was marked. That is, the change start time of all direct upstream neighbor nodes does not meet the condition that it is earlier than the current candidate source node and the time difference is within the preset range, indicating that the current candidate source node is the final source on this branch.

[0147] S260. Determine the anomaly source node and propagation path. Among all marked candidate source nodes, calculate the tracing depth of each node. The tracing depth is defined as follows: the root node has a tracing depth of 0, and the depth increases by 1 for each downstream node. Select the node with the largest tracing depth value as the anomaly source node for this anomaly event, and take the start time of the change in the source node as the start time of the anomaly. The deepest tracing depth means that the node is located at the upstream of the anomaly propagation path, i.e., the node that changed first.

[0148] A risk propagation path is recorded as the sequence of nodes traversed from the source node down through each candidate source node to each anomalous node:

[0149] ;

[0150] This path reflects the complete path of the anomaly propagating from the source node along the power supply topology to each downstream anomalous node.

[0151] The risk propagation paths corresponding to all abnormal nodes constitute a risk propagation path set, which will serve as one of the inputs for spatiotemporal correlation fusion and discrimination in subsequent steps.

[0152] Please refer to Figure 4 The flowchart illustrates an exemplary method S300 for tracing the source of abnormal line loss in a distribution substation based on spatiotemporal correlation and user behavior graphs, as described in this application.

[0153] In a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps, the purpose of S300 is to quantify the degree to which each user's real-time electricity consumption behavior deviates from its typical pattern by constructing a user electricity consumption behavior feature system and establishing a typical behavior pattern library, so as to provide a quantitative basis for behavioral dimensions for subsequent cause identification.

[0154] To achieve the above technical objectives, S300 includes the following technical steps:

[0155] S310. Collect user power time-series data, collecting continuous power data from each user's meter within the transformer area. Daily active power sequence and reactive power sequence ,in For user node identification, For date indexing, , Take 30 days, The sampling times are within the day, with a sampling interval of 15 minutes, totaling 96 sampling points throughout the day. The power sequence of each user is segmented on a daily basis to obtain... Group daily power data.

[0156] S320. Extract the daily load curve morphology features for each user. Daily active power sequence The following five features are extracted to form the daily load curve shape feature vector:

[0157] Feature 1: The time when the daily peak occurs, i.e. Find the time corresponding to the maximum value in the sequence;

[0158] Feature 2: The time when the daily trough occurs, i.e., at... Find the time corresponding to the minimum value in the sequence;

[0159] Feature 3: Peak-to-valley difference rate, which is the difference between the daily maximum and the daily minimum divided by the daily maximum.

[0160] Feature 4: The average slope of the rising segment, taken from the time of the daily trough. Peak time of day During the time period between the two periods, active power data points within that period are extracted, and linear regression fitting is performed using the least squares method to obtain the regression slope as the average slope of the rising segment, reflecting the growth rate of user electricity load during the demand rising phase.

[0161] Feature 5: The absolute value of the average slope of the descending segment is taken from the daily peak time. The next day at the valley value During the time period between the peak and the valley, active power data points (including the peak value to the end of the day and the valley value to the beginning of the next day) are extracted. The least squares method is used to perform linear regression fitting, and the absolute value of the regression slope is taken to reflect the rate at which the user's electricity load falls from the peak.

[0162] Optionally, the slope of the above least squares linear regression The calculation formula is:

[0163] ;

[0164] To extract the number of data points within a time period, For the first The sampling time of each data point For the first The active power value of each data point.

[0165] S330. Extract power factor features for each user. Daily reactive power sequence Calculate the power factor at each time step:

[0166] ;

[0167] The two features, the daily average power factor and the daily variance of power factor, together with the five features in S320, constitute the user's complete behavioral feature vector for that day, with a dimension of 7.

[0168] Among them, the daily average power factor The calculation formula is:

[0169] ;

[0170] Daily fluctuation variance of power factor The calculation formula is:

[0171] ;

[0172] S340. A typical electricity consumption behavior pattern library is constructed, merging the behavioral feature vectors of all users across all dates into a feature vector set. A dynamic time warping algorithm is used to calculate the similarity distance between the feature vectors of any two daily load curve shapes. The dynamic time warping distance is calculated recursively through dynamic programming: for two feature sequences... and Construct the cumulative distance matrix The rows of the matrix correspond to the eigenvectors. The values ​​at each time point, and the corresponding eigenvectors. The values ​​at each time point. Each position in the matrix. The value is equal to the absolute distance between the two feature values ​​at that location. Add the minimum cumulative distance among the three adjacent positions to the left, bottom, and bottom left, that is:

[0173] ;

[0174] in, The matrix row index corresponds to the eigenvector. The sequence position; The matrix column index corresponds to the eigenvector. The sequence position; This is the cumulative distance to the leftmost adjacent position. This represents the cumulative distance between adjacent positions below. This represents the cumulative distance between the left and right adjacent positions. The boundary conditions of the matrix are... , , This is to ensure that the path starts from the origin.

[0175] Fill the entire matrix row by row and column by column in a left-to-right, top-to-bottom order. The final value of the bottom right corner of the matrix is... This is the dynamic time warping distance between two sequences. The smaller the distance, the more similar the shapes of the two daily load curves are.

[0176] Using this distance as a similarity metric, hierarchical clustering is performed on all feature vectors. Hierarchical clustering employs a bottom-up aggregation strategy. Initially, each sample forms its own class. Each time, the two closest classes are selected and merged. The distance between the new class and other classes is updated to the minimum of the distances between the two merged classes and other classes. This process continues until all samples are merged into a preset number of classes.

[0177] After clustering is completed, for each class, the mean vector of all sample feature vectors in the class is calculated as the class center. The sample curve closest to the class center is taken as the center curve of the typical electricity consumption behavior pattern of the class. Each center curve is labeled with its corresponding time period type label, which includes weekday peak type, holiday type, nighttime type, etc.

[0178] S350. Calculation of abnormal behavior indicators: For any user's electricity consumption data collected in real time during the current time period, extract its behavioral feature vector, determine the class corresponding to the time period type label of the current time period, and calculate the dynamic time warping distance between the user's feature vector and the class center.

[0179] The user's behavioral feature vector is denoted as The center vector of this class is denoted as Both have a dimension of 7. This 7-dimensional feature vector is composed of the 5 daily load curve morphology features extracted by S320 and the 2 power factor features extracted by S330. The distance is calculated using the same dynamic time warping algorithm as in S340, constructing a 7×7 cumulative distance matrix. :

[0180] Final 7×7 cumulative distance matrix The value in the bottom right corner This is the dynamic time-warped distance between the user's feature vector and the class center vector.

[0181] This distance is normalized by dividing it by the maximum distance of all users to the same central curve during the current time period. The normalization calculation method is as follows:

[0182] ;

[0183] in, The set of all users within the current time period; Indicates users within the current time period;

[0184] If the maximum value is less than 1, then it is taken as 1, meaning the denominator is at least 1. The normalized value is the abnormal behavior index of the user in the current time period, with a value range of [0,1]. The larger the value, the more serious the deviation of the user's current electricity consumption behavior from its typical pattern.

[0185] Please refer to Figure 5 The diagram illustrates a flowchart of an exemplary distribution area line loss anomaly tracing method S400 based on spatiotemporal correlation and user behavior graphs, as presented in this application.

[0186] In a method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps, the purpose of S400 is to integrate and distinguish the source location results with the behavior analysis results, determine the type of abnormal cause for each node, and generate a complete structured source tracing report.

[0187] To achieve the above technical objectives, S400 includes the following technical steps:

[0188] S410. Spatiotemporal correlation matching: All nodes in the risk propagation path set determined in step S260 are correlated and matched with the behavioral anomaly indicators calculated in step S350 according to node identifier and abnormal time period. For each node on the propagation path, if the node is a user's electricity meter node, the behavioral anomaly indicators of the corresponding user during the abnormal time period and the abnormal line loss amplitude during the abnormal time period are obtained. The abnormal line loss amplitude is defined as the ratio of the maximum deviation of the residual exceeding the upper threshold during the abnormal time period to the upper threshold, which is used to quantify the severity of the line loss deviating from the normal range. If the matching is unsuccessful, the behavioral anomaly indicators of the node are set to the default value of 0.

[0189] S420. User meter node cause determination: For each user meter node on the path, execute the following cause determination logic: compare the abnormal behavior index with the first threshold, which is 0.6; compare the abnormal line loss amplitude with the second threshold, which is 0.15.

[0190] When the abnormal behavior indicator exceeds the first threshold and the abnormal line loss exceeds the second threshold, the cause of the abnormality at this node is determined to be a sudden change in the user's electricity consumption behavior, indicating that the user has added high-power equipment, changed their electricity consumption habits, or exhibited abnormal electricity consumption behavior during this period. When the abnormal behavior indicator does not exceed the first threshold but the abnormal line loss exceeds the second threshold, the cause of the abnormality at this node is determined to be a metering deviation or an increase in the contact resistance of the line after the meter, indicating that the user's electricity consumption behavior is normal but there is a physical abnormality in the metering or line components.

[0191] For the causes of sudden changes in user electricity consumption behavior, the confidence level is calculated by weighting the abnormal behavior index and the abnormal line loss amplitude. The abnormal behavior index has a weight of 0.6, and the abnormal line loss amplitude has a weight of 0.4. The confidence level calculation formula is as follows:

[0192] Confidence level = 0.6 × behavioral anomaly index + 0.4 × line loss anomaly amplitude;

[0193] For the causes of meter measurement deviation, the confidence level is calculated by weighting the degree of normality of behavior (i.e., 1 minus the abnormality index of behavior) and the abnormality of line loss. The weight of normality of behavior is 0.4, and the weight of abnormality of line loss is 0.6. The confidence level calculation formula is as follows:

[0194] Confidence level = 0.4 × (1 − behavioral anomaly index) + 0.6 × line loss anomaly amplitude;

[0195] S430. Transformer and Branch Node Cause Identification: For distribution transformer outlet nodes or branch line monitoring nodes along the path, obtain the set of all downstream user meter nodes and calculate the average value of abnormal user behavior indicators in this set. If the average value exceeds a third threshold (0.5), the abnormality at this node is determined to be caused by the convergence of abnormal downstream user behavior, i.e., multiple downstream users simultaneously exhibit abnormal electricity consumption behavior, the effects of which are superimposed at the branch node or transformer outlet. If the average value does not exceed the third threshold, the abnormality at this node is determined to be caused by physical factors such as line aging or joint oxidation, i.e., although downstream user electricity consumption behavior is normal, the branch line or transformer itself has abnormal physical losses.

[0196] The confidence score for the trigger is the normalized value obtained by comparing the average value of the abnormal behavior indicators of downstream users with a third threshold. When the average value exceeds the threshold, the confidence score is calculated using the following formula:

[0197] ;

[0198] That is, the confidence level is 1 when the average value reaches 0.5, and 1 when it exceeds 0.5; when the average value is below 0.5, it is determined to be a physical factor contributing to the cause, and the confidence level is calculated using the following formula:

[0199] ;

[0200] That is, the lower the average value, the higher the confidence level of the physical factor as the cause.

[0201] S440. Structured source tracing report generation: Starting from the anomaly source node, each node is arranged sequentially along the propagation path. The node identifier, anomaly cause type, and cause confidence level of each node are linked together in order to form a chain-like causal explanation from source to end. The final generated structured source tracing report includes: anomaly source node identifier, anomaly start time, identifier sequence of each node along the hierarchical propagation path, anomaly cause type corresponding to each node, and confidence score for each cause classification. The report is output in JSON structured format.

[0202] Example 2:

[0203] A distribution substation line loss anomaly tracing system based on spatiotemporal correlation and user behavior mapping includes:

[0204] The data acquisition module is used to acquire the line loss rate time-series data of each node in the distribution substation and the power consumption time-series data of each user.

[0205] The anomaly detection module is used to perform the abnormal time period detection and abnormal node set generation functions in step S100 of the aforementioned method. This module performs multi-component decomposition on the acquired time series data of line loss rate of each node, extracts the residual components, and uses an extreme value statistical method based on interquartile range to determine an adaptive threshold. The moments when the residual value exceeds the corresponding threshold are marked as abnormal moments, and after merging into abnormal time periods, an abnormal node set is generated.

[0206] The spatiotemporal positioning module is used to perform the anomaly source node tracing and risk propagation path recording functions in step S200 of the aforementioned method. Starting from the anomaly node, this module traces back level by level in the reverse direction based on the transformer area topology. Through first-order difference value calculation and determination of continuous exceedance of positive thresholds, it determines the starting time of the continuous increase in line loss rate of each node. Upstream nodes whose starting time is earlier than the anomaly node are marked as candidate source nodes. Among all candidate source nodes, the node with the deepest tracing level is selected as the anomaly source node, and the propagation path from the source node to each anomaly node is recorded.

[0207] The behavior analysis module is used to perform the typical electricity consumption behavior pattern clustering and behavior anomaly index calculation functions in step S300 of the aforementioned method. This module extracts the daily load curve shape characteristics and power factor change characteristics of users, clusters the feature vectors of each user to form a typical behavior pattern library, calculates the dynamic time-normalized distance between the real-time feature vector and its respective typical pattern center, and normalizes it as a behavior anomaly index.

[0208] The report generation module is used to perform the cause identification and structured source tracing report generation functions in step S400 of the aforementioned method. This module associates and matches nodes along the propagation path with abnormal behavior indicators. For user meter nodes, it determines the cause as a sudden behavioral change or equipment factor by combining abnormal behavior indicators with abnormal line loss amplitude. For transformer or branch nodes, it determines the cause as a convergence of downstream behaviors or physical factors based on the average value of abnormal behavior indicators of downstream users. The module aggregates the cause identification results along the propagation path to generate a structured source tracing report.

[0209] The pricing output module is used to calculate the technical value score corresponding to the abnormal event based on the location of the abnormal source, the length of the propagation path, the type of abnormal cause and the scope of impact in the structured traceability report, and to generate the corresponding pricing strategy based on the technical value score.

[0210] Example 3:

[0211] A typical application of a distribution network line loss anomaly tracing method based on spatiotemporal correlation and user behavior graphs on a certain technology trading platform is shown below, employing the following system configuration and testing scheme:

[0212] System Configuration:

[0213] A line loss anomaly tracing system corresponding to the aforementioned method is deployed on the backend of the technology trading platform. The system adopts a distributed microservice architecture. The data acquisition module connects to the real-time data stream of the transformer area electricity consumption information collection system through a message queue. The anomaly detection module, spatiotemporal positioning module, behavior analysis module, and report generation module run as independent microservices in a containerized environment, and the modules interact with each other through RESTful APIs. The pricing output module connects to the platform's technology trading pricing engine.

[0214] Test plan:

[0215] A 10kV distribution substation in actual operation was selected as the test object. This substation has one distribution transformer, six branch line monitoring points, and 187 user meter nodes. Time-series data on line loss rate and user power consumption were collected for 30 consecutive days, with a data sampling interval of 15 minutes. The method of this invention and the traditional line loss prediction method were used to conduct comparative tests on the test substation. The comparison results are shown in the table below:

[0216] Abnormal detection rate 67.3% 94.7% Source location accuracy Unable to locate 91.2% Accuracy of trigger identification Unrecognized 87.6% Average traceability time >2 hours (manual) <3 minutes (automatic)

[0217] The sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0218] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the present invention, and should all be included within the protection scope of the present invention.

Claims

1. A method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps, characterized in that, Includes the following steps: Collect time-series data of line loss rate of each node in the transformer area, perform time-series decomposition on the sequence of each node to obtain residual components, determine the adaptive threshold of each node according to the extreme value distribution of the residual components, mark the time when the residual value exceeds the corresponding threshold as an abnormal time and merge it into an abnormal time period, and form an abnormal node set of nodes with abnormal time periods. Starting from the abnormal node, backtracking is performed level by level along the reverse direction of the transformer area topology to obtain the line loss rate change curve of the upstream node before the abnormal period. The first-order difference value of the curve is calculated, and the position where the difference value continuously exceeds the positive threshold is taken as the starting time of the change of the node. The upstream node whose change starting time is earlier than the starting time of the abnormal period of the abnormal node is marked as the candidate source node and the backtracking continues until the termination condition is met. Among all the candidate source nodes, the node with the deepest tracing level is selected as the abnormal source node, and the propagation path from the source node to each abnormal node is recorded. Collect time-series data of electricity consumption of each user, extract the morphological features of daily load curves and power factor change features, cluster the feature vectors of each user to form a typical behavior pattern library, calculate the similarity distance between the real-time feature vector and its corresponding typical pattern center and normalize it as a behavior anomaly indicator. The nodes along the propagation path are associated and matched with abnormal behavior indicators. For user meter nodes, the abnormal behavior indicators and abnormal line loss magnitude are combined to determine the cause type. For transformer or branch nodes, the cause type is determined based on the statistical values ​​of abnormal behavior indicators of downstream users. The cause discrimination results are aggregated along the propagation path to generate a source tracing report.

2. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The process of performing time-series decomposition on each node sequence to obtain residual components specifically includes: The time series of line loss rate for each node is decomposed into three components: long-term trend component, periodic component, and residual component. The decomposition relationship is: line loss rate time series = long-term trend component + periodic component + residual component. The process of extracting the long-term trend component of the time series of line loss rate using moving average filtering includes: determining the width of the filtering window, extracting the line loss rate values ​​of all times within the filtering window corresponding to the target time as the center and calculating the arithmetic mean, which is used as the long-term trend estimate of the target time. The above calculation is performed on each target time in chronological order to form a complete long-term trend component sequence. Subtract the long-term trend component from the line loss rate sequence point by point to obtain the detrended sequence; The periodogram analysis method is used to identify the dominant period of the detrended sequence, including: setting the candidate period range to 1 hour to 24 hours; for each candidate period, dividing the detrended sequence into several complete segments according to the candidate period; collecting the values ​​at the same phase position in all segments to form a set; calculating the mean and variance of the set; using the sum of the ratios of the squares of the mean to the variances of all phase positions as the statistic of the candidate period; traversing all candidate periods and selecting the period with the largest statistic as the dominant period. The detrending sequence is grouped by phase position according to the dominant period, and the average value of each phase position is taken to obtain the periodic component value. The average values ​​are arranged in phase order and extended to the same length as the original sequence to obtain the periodic component sequence. Subtracting the long-term trend component and the periodic component from the original sequence yields the residual component sequence.

3. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 2, characterized in that, The width of the filtering window is an odd number. For the moments near the boundary at both ends of the time series of line loss rate, a mirror expansion method is used to fill in the original sequence. The existing values ​​at the beginning of the sequence are mirrored and copied in sequence to the front of the sequence, and the existing values ​​at the end of the sequence are mirrored and copied in sequence to the back of the sequence, so that each target moment in the sequence can take the full width of the filtering window within the filtering window range.

4. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The step of determining the adaptive threshold for each node based on the extreme value distribution of the residual components specifically includes: Quartiles of statistical residual component sequences and third quarter Calculate the interquartile range ; Below the threshold Upper bound threshold As an anomaly detection boundary; Iterate through each residual value in the residual component sequence. If the residual value is lower than the lower threshold, it is considered abnormally low. If the residual value is higher than the upper threshold, it is considered abnormally high.

5. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The process of merging abnormal moments into abnormal time periods specifically involves: Abnormal moments that are consecutive in time or with an interval of no more than two sampling intervals at the same node are merged into one abnormal time period, and the start and end times of the abnormal time period are recorded. After merging, the set of abnormal time periods for this node is represented as follows: ,in This represents the number of abnormal periods for that node; For the first The start time of each abnormal period; For the first The end time of each abnormal period; Abnormal time period number.

6. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The step of taking the position where the difference value continuously exceeds the positive threshold as the starting time of the node change specifically includes: Using the start time of the abnormal period as the base time, obtain the numerical sequence of line loss rate of the node within the backtracking time window before the base time. The length of the backtracking time window is 3 times the duration of the abnormal period. The first-order difference value is calculated point by point for the numerical sequence of line loss rate. The first-order difference value is the difference between the line loss rate at the next time step and the line loss rate at the previous time step. Starting from the beginning of the sequence, iterate through each first-order difference value. When three or more consecutive first-order difference values ​​exceed the positive threshold of 0.5 times the standard deviation of the historical line loss rate of that node, record the time corresponding to the first difference value as the starting time of the change of that node.

7. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The step of marking upstream nodes whose change start time is earlier than the start time of the abnormal period of the abnormal node as candidate source nodes specifically includes: Based on the topology of the distribution area, an upstream and downstream relationship mapping table is established between each node. The distribution transformer outlet is taken as the root node. Each node is organized into a directed tree structure according to the path direction of power flow from the root node to the user terminal. The direct upstream neighbor node and direct downstream neighbor node of each node are recorded. Obtain the direct upstream neighbor nodes of the abnormal node; If the change start time of the direct upstream neighbor node is earlier than the change start time of the abnormal node, and the time difference between the two does not exceed 10 sampling intervals, then the direct upstream neighbor node is marked as a candidate source node, and its change start time is recorded. If no candidate source node can be marked, the abnormal node is determined to be the source node itself, and the tracing of that branch is stopped.

8. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The daily load curve morphology features include: the time of occurrence of the daily peak value, the time of occurrence of the daily trough value, the peak-to-trough difference rate, the absolute values ​​of the average slope of the rising segment and the average slope of the falling segment; the power factor variation features include: the daily average power factor and the daily variance of the power factor fluctuation; the daily load curve morphology features and the power factor variation features together constitute a 7-dimensional behavioral feature vector; The average slope of the rising segment is the regression slope obtained by using the least squares method to perform linear regression fitting on active power data points extracted during the period from the daily trough to the daily peak. The absolute value of the average slope of the falling segment is the absolute value of the regression slope obtained by using the least squares method to perform linear regression fitting on active power data points extracted during the period from the daily peak to the daily trough of the next day.

9. The method for tracing the source of abnormal line loss in distribution substations based on spatiotemporal correlation and user behavior maps according to claim 1, characterized in that, The process of clustering user feature vectors to form a typical behavior pattern library specifically includes: Collect the active power sequence and reactive power sequence of each user's electricity meter over a continuous 30 days. Using days as the unit of division, extract the behavioral feature vector for each day and merge the behavioral feature vectors of all users over all dates into a feature vector set. The similarity distance between any two user feature vectors is calculated using the dynamic time warping algorithm, including: for two feature sequences, constructing a cumulative distance matrix. The rows of the matrix correspond to the time values ​​of the first eigenvector, and the columns correspond to the time values ​​of the second eigenvector. The value of each position in the matrix is ​​equal to the minimum of the cumulative distances between the two eigenvalues ​​at that position plus the distances between the three adjacent positions to the left, below, and to the lower left. The value at the lower right corner of the matrix is ​​taken as the dynamic time-normalized distance between the two eigenvectors. Using dynamic time-warped distance as a similarity distance metric, hierarchical clustering is performed on all feature vectors using a bottom-up aggregation strategy. Initially, each sample forms its own class. Each time, the two closest classes are selected and merged. The distance between the new class and other classes is updated to the minimum distance between the two classes before merging and other classes. This process continues until all samples are merged into a preset number of classes. For each class, the mean vector of all sample feature vectors within the class is calculated as the center of the class. The sample curve closest to the center of the class is taken as the center curve of the typical electricity consumption behavior pattern, and each center curve is labeled with the corresponding time period type label. For any user's electricity consumption data collected in real time during the current time period, extract their behavioral feature vector and determine the class corresponding to the time period type label. Construct a cumulative distance matrix between the user's feature vector and the center vector of the class. Use the value in the lower right corner of the matrix as the dynamic time-normalized distance. Divide this distance by the maximum distance between all users and the same center curve during the current time period for normalization. If the maximum distance is less than 1, take 1. The normalized value is used as the abnormal behavior indicator of the user during the current time period.

10. A distribution substation line loss anomaly tracing system based on spatiotemporal correlation and user behavior graphs, used to implement the method described in any one of claims 1 to 9, characterized in that, include: The data acquisition module is used to acquire the line loss rate time-series data of each node in the distribution substation and the power consumption time-series data of each user. An anomaly perception module is used to perform the functions of anomaly period detection and anomaly node set generation as described in any one of 1 to 9; The spatiotemporal positioning module is used to perform the anomaly source node tracing and propagation path recording functions as described in any one of 1 to 9; The behavior analysis module is used to perform the typical electricity consumption behavior pattern clustering and behavior anomaly index calculation functions as described in any one of 1 to 9. The report generation module is used to perform the cause identification and structured source tracing report generation functions as described in any one of 1 to 9.

Citation Information

Patent Citations

  • Active power distribution area line loss prediction method, system and device and storage medium

    CN119416099A

  • A method, system, device and storage medium for predicting line loss in an active distribution station area

    CN119416099B