Distribution transformer split-phase load prediction method, device, equipment and medium
By preprocessing and feature extraction of historical load data of distribution transformers, phase-by-phase load analysis is performed using the SwinLSTM-D model, and hierarchical consistency coordination is carried out. This solves the problems of insufficient prediction accuracy and inconsistent results in the existing technology, and realizes high-precision phase-by-phase load prediction to meet the needs of safe operation of distribution networks.
Patent Information
- Application Number
- CN202511412957.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-29
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies for load forecasting of distribution transformers suffer from insufficient forecasting accuracy and inconsistent results. In particular, they are unable to accurately reflect the load change trends of each phase under three-phase unbalanced conditions, and their forecasting performance is poor under light load and heavy overload conditions.
By acquiring historical load data from distribution transformers and preprocessing it, the spatial correlation characteristics between three-phase loads are extracted and quantified. A multi-channel feature map is constructed, and the phase load analysis is performed using the SwinLSTM-D prediction model. Finally, the prediction results are generated through hierarchical consistency coordination processing to ensure that the phase load prediction results are consistent with the total load prediction results.
It enables high-precision prediction of phase loads of distribution transformers, improves the accuracy and reliability of prediction, and meets the requirements for safe operation of distribution networks.
Smart Images

Figure CN121507685A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of power systems, in particular to a distribution transformer split-phase load prediction method, device, equipment and medium. BACKGROUND
[0002] The distribution transformer is a key device in the distribution network that directly distributes electric energy to end users, and its operating state is directly related to the reliability and safety of regional power supply. With the promotion of the "double carbon" goal, new types of sources and loads such as distributed photovoltaic and electric vehicle charging piles are connected to the distribution network in large quantities, resulting in significant changes in the load characteristics of the distribution transformer, which presents stronger volatility, intermittency and significant three-phase imbalance characteristics. Three-phase load imbalance can cause uneven temperature rise and increased loss of the distribution transformer winding, and may even induce single-phase overload, threatening the safe and stable operation of the equipment and the power grid. Therefore, achieving high-precision prediction of the load of each phase of the distribution transformer is an important basis for supporting its state early warning, lean operation and active scheduling.
[0003] However, most traditional prediction methods only focus on the time sequence characteristics of single-phase or total load, ignoring the spatial correlation between three-phase loads, which makes it difficult to accurately reflect the actual trend of each phase load under three-phase imbalance conditions, affecting the prediction accuracy. At the same time, the prediction performance of traditional prediction methods under light load and heavy load conditions is poor. Since the load data samples under light load and heavy load conditions are relatively small, the traditional prediction model does not pay enough attention to these conditions during the training process, resulting in large prediction errors when facing light load or heavy load conditions in actual operation, which cannot meet the requirements of load prediction accuracy for safe operation of the distribution network. It can be seen that the existing technology has the problems of insufficient prediction accuracy and poor reliability, which cannot meet the demand of safe operation of the distribution network.
[0004] The preceding description is intended to provide general background and does not necessarily constitute prior art. SUMMARY
[0005] The embodiments of the present application provide a distribution transformer split-phase load prediction method, device, equipment and medium, which can achieve high-precision prediction of the split-phase load of the distribution transformer, and ensure that the split-phase load prediction result is consistent with the total load prediction result, thereby improving the accuracy and reliability of the split-phase load prediction of the distribution transformer.
[0006] In a first aspect, the embodiments of the present application provide a distribution transformer split-phase load prediction method, comprising:
[0007] Obtaining historical load data of the distribution transformer and preprocessing to obtain a standardized load data set;
[0008] extract and quantify spatial correlation features among three-phase loads based on the standardized load dataset, and construct a corresponding multi-channel feature map;
[0009] perform phase-by-phase load analysis based on the multi-channel feature map through a prediction model fusing spatial and temporal features, and generate a preliminary phase-by-phase load prediction result;
[0010] perform hierarchical consistency coordination processing on the preliminary phase-by-phase load prediction result, and obtain a final phase-by-phase load prediction result consistent with the total load prediction result.
[0011] Further, in some embodiments of the present application, the historical load data of the distribution transformer is obtained and preprocessed to obtain a standardized load dataset, including:
[0012] perform anomaly detection and correction processing on the historical load data to obtain corrected load data;
[0013] perform missing value filling processing on the corrected load data to obtain complete load data;
[0014] perform normalization processing on the complete load data, and map the normalized complete load data to a preset numerical interval to obtain the standardized load dataset.
[0015] Further, in some embodiments of the present application, the standardized load dataset is used to extract and quantify spatial correlation features among three-phase loads, and a corresponding multi-channel feature map is constructed, including:
[0016] based on the standardized load dataset, the maximum information coefficient between the three-phase loads and between each phase load and the total load is calculated, and the maximum information coefficient is used to quantify the correlation strength between the loads;
[0017] screen the load features with a maximum information coefficient higher than a preset correlation threshold;
[0018] encode the screened load features into a multi-channel feature map according to the phase type and time sequence relationship, wherein each channel in the multi-channel feature map represents a feature type, and the rows of the two-dimensional matrix represent time sequences and the columns represent phase features.
[0019] Further, in some embodiments of the present application, the standardized load dataset is used to calculate the maximum information coefficient between the three-phase loads and between each phase load and the total load, including:
[0020] calculate the mutual information value between any two-phase load data;
[0021] under a plurality of different grid division schemes, the maximum value of the mutual information value is calculated respectively;
[0022] The maximum mutual information value is obtained by dividing the calculated maximum mutual information value by the logarithm of the corresponding number of grid divisions.
[0023] Furthermore, in some embodiments of this application, the step of performing phase load analysis based on the multi-channel feature map using a prediction model that integrates spatiotemporal features to generate preliminary phase load prediction results includes:
[0024] The multi-channel feature map is divided into non-overlapping time patches according to the time dimension, and a linear embedding mapping is performed on each time patch to generate a patch embedding sequence, which is then input into the preset SwinLSTM-D prediction model.
[0025] Local spatial features are extracted from the input features through the window attention mechanism in the SwinLSTM-D prediction model.
[0026] The shift-window attention mechanism in the SwinLSTM-D prediction model enables information exchange and fusion between different windows.
[0027] The long-term dependencies in the time series are modeled using the LSTM units in the SwinLSTM-D prediction model.
[0028] The feature sequence output by the LSTM unit is restored to a time-step representation through linear mapping, generating preliminary prediction results of the load of each phase within a specified future time period.
[0029] Furthermore, in some embodiments of this application, the training method of the SwinLSTM-D prediction model includes:
[0030] Based on the load rate of each training sample, each training sample is divided into a light load interval, a normal interval, or a heavy overload interval.
[0031] For training samples assigned to the lightly loaded interval, the weighted mean square error is used as the corresponding first loss function;
[0032] For training samples classified into the normal range, the mean absolute percentage error is used as the corresponding second loss function;
[0033] For training samples divided into heavy overload intervals, the adaptive weighted mean absolute percentage error is used as the corresponding third loss function;
[0034] The SwinLSTM-D prediction model is trained based on a hybrid loss function composed of the first loss function, the second loss function, and the third loss function.
[0035] Furthermore, in some embodiments of this application, the step of performing hierarchical consistency coordination processing on the preliminary phase load forecast results to obtain a final phase load forecast result consistent with the total load forecast result includes:
[0036] Construct a hierarchical structure matrix that represents the aggregate relationship between phase loads and total loads;
[0037] The minimum trace coordination method is used to coordinate the preliminary prediction results of the phase load based on the hierarchical structure matrix.
[0038] By minimizing the trace of the prediction error covariance matrix, the final prediction result of the phase load with consistent numerical values and optimal error is obtained.
[0039] Secondly, embodiments of this application provide a phase-by-phase load prediction device for a distribution transformer, comprising:
[0040] The data acquisition module is used to acquire historical load data of distribution transformers and preprocess it to obtain a standardized load dataset;
[0041] The feature construction module is used to extract and quantify the spatial correlation features between the three-phase loads based on the standardized load dataset, and construct the corresponding multi-channel feature map;
[0042] The load forecasting module is used to perform phase load analysis based on the multi-channel feature map using a forecasting model that integrates spatiotemporal features, and generate preliminary phase load forecasting results.
[0043] The result coordination module is used to perform hierarchical consistency coordination processing on the preliminary phase load prediction results to obtain the final phase load prediction results that are consistent with the total load prediction results.
[0044] Thirdly, embodiments of this application provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the distribution transformer phase load prediction method as described in the first aspect.
[0045] Fourthly, embodiments of this application provide a storage medium storing a computer program capable of being loaded by a processor and executing the distribution transformer phase load prediction method as described in the first aspect.
[0046] This application provides a method, apparatus, equipment, and medium for predicting phase-by-phase load of a distribution transformer. First, historical load data of the distribution transformer is acquired and preprocessed to obtain a standardized load dataset. This eliminates potential anomalies and omissions in the original data, providing high-quality, standardized foundational data for subsequent modeling and reducing prediction errors from the data source. Then, based on the standardized load dataset, the spatial correlation characteristics between the three-phase loads are extracted and quantified, constructing corresponding multi-channel feature maps. This transforms the inherent correlation characteristics between the three-phase loads into effective inputs that the prediction model can recognize, avoiding the limitations of isolated modeling of phase-by-phase loads and neglecting inter-phase coupling patterns, thus supporting the accurate capture of load change characteristics. Next, a prediction model integrating spatiotemporal features is used to analyze the phase-by-phase load based on the multi-channel feature maps, generating preliminary phase-by-phase load prediction results. This fully exploits the spatial correlation and temporal dynamic characteristics of the phase-by-phase loads, effectively improving prediction accuracy. Finally, the preliminary phase-by-phase load prediction results undergo hierarchical consistency coordination processing to obtain final phase-by-phase load prediction results consistent with the overall load prediction results, enhancing the reliability of the prediction results in engineering applications. It is evident that this application can achieve high-precision prediction of phase loads of distribution transformers and ensure that the prediction results of phase loads are consistent with the prediction results of total loads. This solves the problems of insufficient prediction accuracy and inconsistent results in the prior art, improves the accuracy and reliability of phase load prediction of distribution transformers, and thus meets the requirements for safe operation of distribution networks. Attached Figure Description
[0047] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1 This is an application environment diagram of the phase load prediction method for distribution transformers provided in the embodiments of this application;
[0049] Figure 2 This is a schematic flowchart of the phase load prediction method for distribution transformers provided in the embodiments of this application;
[0050] Figure 3 This is a schematic diagram of the structure of the distribution transformer phase load prediction device provided in the embodiments of this application;
[0051] Figure 4 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0052] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of systems and methods consistent with those detailed in the appended claims or with some aspects of this application.
[0053] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover descriptions such as non-exclusive inclusion, so that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, components, features, and elements with the same names in different embodiments of this application may have the same meaning or different meanings, the specific meaning of which must be determined by its interpretation in that specific embodiment or further in conjunction with the context of that specific embodiment.
[0054] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.
[0055] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustrative purposes and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.
[0056] To address the aforementioned technical problems and overcome the shortcomings of existing technologies, this application provides a method, apparatus, equipment, and medium for predicting phase loads of distribution transformers. This method enables high-precision prediction of phase loads of distribution transformers and ensures that the phase load prediction results are consistent with the total load prediction results, thereby improving the accuracy and reliability of phase load prediction for distribution transformers.
[0057] Figure 1 This is a diagram illustrating the application environment of a phase-by-phase load prediction method for distribution transformers in one embodiment. (Refer to...) Figure 1This method for predicting phase loads of distribution transformers is applied to a phase load prediction system for distribution transformers. The system includes a terminal 110 and a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal, specifically a mobile phone, tablet computer, laptop computer, or at least one of these. The server 120 can be a standalone server or a server cluster consisting of multiple servers. The server 120 is configured to execute the aforementioned phase load prediction method for distribution transformers, including: acquiring historical load data of the distribution transformer and preprocessing it to obtain a standardized load dataset; based on the standardized load dataset, extracting and quantifying the spatial correlation characteristics between the three-phase loads, and constructing corresponding multi-channel feature maps; performing phase load analysis based on the multi-channel feature maps using a prediction model that integrates spatiotemporal features, generating preliminary phase load prediction results; and performing hierarchical consistency coordination processing on the preliminary phase load prediction results to obtain final phase load prediction results consistent with the overall load prediction results.
[0058] Please see Figure 2 , Figure 2 This is a flowchart illustrating a phase-by-phase load prediction method for distribution transformers according to an embodiment of this application. Specifically, the phase-by-phase load prediction method for distribution transformers according to an embodiment of this application may include the following steps:
[0059] S1. Obtain historical load data of the distribution transformer and preprocess it to obtain a standardized load dataset;
[0060] Specifically, for step S1, historical load data of the distribution transformer covering the user level, phase level (phase A, phase B, phase C), and total load level is collected. The data needs to include load records at multiple time scales, such as daily, weekly, and seasonal, to comprehensively reflect the dynamic changes in the distribution transformer load. A systematic preprocessing process is performed on the acquired historical load data. First, anomaly detection and correction are performed. For abnormal data points that deviate from the normal trend, the load average of the adjacent time period or similar day is used to replace them. Second, missing values in the data are filled in using methods such as weighted averaging to ensure the integrity of the load sequence. Finally, normalization is performed to map the load data to a preset unified numerical range (such as [0,1]) to eliminate scale differences between different load levels. Through the above preprocessing, data noise is eliminated, missing information is filled in, and the data scale is unified, ultimately forming a standardized load dataset that meets the requirements of subsequent modeling.
[0061] S2. Based on the standardized load dataset, extract and quantify the spatial correlation features among the three-phase loads, and construct the corresponding multi-channel feature map;
[0062] Specifically, for step S2, based on the standardized load dataset, the maximum information coefficient (MIC) is used to quantify the correlation between three-phase loads and between each phase load and the total load. By calculating the mutual information values between different load sequences, and combining this with a multi-grid partitioning scheme to solve for the maximum mutual information value, the maximum information coefficient, with a value range of [0,1], is obtained according to the constraint function. The coefficient directly reflects the strength of the spatial correlation between loads. Based on a preset correlation threshold, key load features with a maximum information coefficient higher than the threshold are selected, and redundant low-correlation features are removed. Subsequently, the selected features are structured and encoded according to phase and time series relationships to construct a multi-channel two-dimensional feature map. Each channel represents a specific type of load feature; the rows of the two-dimensional matrix correspond to the time series dimension (integrating intraday, weekly, and seasonal information), and the columns correspond to the phase feature dimension, realizing a structured representation of the three-phase spatial dependence and multi-cycle time series patterns.
[0063] S3. By using a prediction model that integrates spatiotemporal features, phase load analysis is performed based on multi-channel feature maps to generate preliminary phase load prediction results;
[0064] Specifically, for step S3, a dedicated prediction model integrating spatiotemporal features is adopted. This model has the ability to simultaneously capture spatial and temporal features, enabling collaborative modeling of the "spatial dependence-temporal variation" of three-phase loads. After inputting the multi-channel feature map into the prediction model, the model first performs temporal dimension patching and linear embedding processing on the feature map, transforming it into a feature sequence containing local spatiotemporal information. Subsequently, it extracts the spatial correlation features of the three-phase loads through window attention and cross-window information interaction mechanisms, and then models the long-term temporal dependence of the loads through recursive units. Finally, through feature restoration and output layer calculation, preliminary prediction results of the phase (phase A, phase B, phase C) loads within a specified future time period are generated.
[0065] S4. Perform hierarchical consistency coordination processing on the preliminary phase load forecast results to obtain the final phase load forecast results that are consistent with the total load forecast results;
[0066] Specifically, for step S4, a hierarchical structure matrix is first constructed. This matrix is a summation matrix taking values of {0,1}, explicitly representing the linear aggregation relationship between the bottom-level phase loads and the top-level total load. That is, matrix operations can achieve the aggregation of phase loads into the total load, or the decomposition of the total load into phase loads. A hierarchical consistency coordination method is then used to process the preliminary phase load prediction results based on the constructed hierarchical structure matrix. This method uses the constraint that the sum of the phase prediction values equals the total load prediction value, and minimizes the overall prediction error through an optimization algorithm, ensuring optimal prediction accuracy while satisfying hierarchical consistency. After coordination processing, the final phase load prediction results are obtained that are numerically strictly consistent with the total load prediction results and have the optimal overall error, avoiding physically unreasonable prediction contradictions.
[0067] This embodiment effectively integrates the spatial correlation and multi-cycle temporal patterns of three-phase loads through a coherent process of data preprocessing, spatiotemporal feature construction, fusion modeling, and hierarchical coordination. This not only solves the problems of existing methods neglecting spatial dependence and insufficient utilization of periodic features, but also eliminates the contradiction between phase-specific and total load forecasts through hierarchical consistency coordination. At the same time, the prediction model that integrates spatiotemporal features improves the overall accuracy of phase-specific load forecasting, providing reliable load forecasting support for early warning of phase-specific overload of distribution transformers and safe operation of distribution networks.
[0068] In a specific embodiment, regarding the theoretical basis of hierarchical load forecasting in this example, let the full-level observation vector at time t be P. t ∈R m The lowest-level observation is bt∈Rn. The two satisfy the following linear aggregation relationship.
[0069] P t =Sb t
[0070] Where S∈{0,1}m×n is a summation matrix used to aggregate the lower-level load to a higher level, m is the total number of observations at all levels, and n is the total number of lower-level observations.
[0071] If n = 8 and m = 12, then the matrix can be represented as follows:
[0072]
[0073] In the formula, P t The total power of the distribution transformer at time t is represented; PA,t,PB,t and PC,t are the power of each phase of the distribution transformer; PA1,t,PA2,t,...PC3,t are the user load data.
[0074] To ensure consistent notation for subsequent predictions, an h-step baseline prediction vector with the same order as the Pt components is defined. The linear coordination framework is as follows:
[0075]
[0076] Where, G∈R n×m For the coordination matrix, To coordinate the predicted set; G decomposes the baseline predictions to the bottom layer, and S aggregates them to the full level.
[0077] Two commonly used methods for tiered load forecasting are Bottom-Up (BU) and Top-Down (TD). BU:
[0078] G BU =[0 n×(m-n) |I n (3)
[0079]
[0080] In the formula, 0i×j is the zero matrix, i=n, j=mn, and In is the n-order identity matrix. Substituting into the above formula and then summing by S, we obtain the BU coordinated prediction.
[0081] By proportionally decomposing the top-level baseline to the bottom level, TD is taken as...
[0082]
[0083] in Assign a proportional vector to the underlying layer. Substitute this into the above formula, and then sum up via S to obtain the TD coordinated prediction.
[0084] For the cases where n=4 and m=6, the G matrix forms of BU and TD are as follows:
[0085]
[0086] Furthermore, in some embodiments, step S1, "acquiring historical load data of the distribution transformer and preprocessing it to obtain a standardized load dataset," may specifically include:
[0087] S11. Perform anomaly detection and correction on historical load data to obtain corrected load data;
[0088] Specifically, for step S11, for possible sudden anomalies in the historical load data of the distribution transformer (such as jump values caused by data acquisition equipment failure), a horizontal and vertical dual-dimensional anomaly detection and correction strategy is adopted to identify and eliminate anomalies from the perspectives of single time-series trend and cross-day similarity, respectively.
[0089] For horizontal anomaly detection and correction, the focus is on the local continuity of a single daily load time series data, using "time-load" as the analysis unit. For the load data Y(d,t) of day d and hour t, the average load of that time and the loads of the left and right adjacent hours is calculated, i.e., [Y(d,t-1)+Y(d,t+1)] / 2). A reasonable threshold ε is set (determined based on the distribution transformer load fluctuation range and acquisition accuracy; if the deviation of Y(d,t) from this average exceeds the threshold ε, it is determined to be a horizontal anomaly). The correction method is to directly replace the anomaly value Y(d,t) with the average of the left and right adjacent points to obtain the corrected value Y′(d,t), thereby repairing the local breakage problem within a single time series.
[0090] For vertical anomaly detection and correction, detection is based on the cross-day similarity of load (e.g., similar load patterns on weekdays and weekends). First, n dates with load patterns similar to day d are selected as similar days, and the average load value E(d,t) of these n similar days in hour t is calculated. Then, it is determined whether the absolute deviation between Y(d,t) and E(d,t) exceeds a preset threshold; if it does, it is identified as a vertical anomaly. The correction method involves replacing the anomaly value with the average load value [Y(d-1,t) + Y(d+1,t)] / 2 in hour t of day d-1 and day d+1, utilizing the inter-day correlation of load to ensure the reasonableness of the corrected data.
[0091] Through the above two-dimensional processing, abnormal interferences such as sudden noise and equipment errors in historical load data are eliminated, resulting in continuous and reliable corrected load data.
[0092] S12. Fill in the missing values in the corrected load data to obtain complete load data;
[0093] Specifically, in step S12, the corrected load data may still have missing load values for some periods due to issues such as data acquisition interruptions and transmission delays (e.g., no data records for a certain hour or several consecutive hours). Imputation processing is needed to ensure the integrity of the load sequence. A weighted average imputation method is used. Based on the distribution characteristics of load data before and after the missing period, a weight coefficient ω is assigned to adjacent effective load values. The weights need to be adjusted according to actual conditions such as the length of the missing period and the intensity of load fluctuations: for example, when the missing period is short, the weight of adjacent times is higher; when the load fluctuation is small, the weight distribution is more even. The estimated result of the missing value is obtained through weighted calculation and then imputed into the data sequence. This avoids temporal breaks during subsequent feature extraction due to data missingness, ensuring the continuity and integrity of the load data in the time dimension, and providing a foundation for capturing multi-period time-series patterns.
[0094] S13. Normalize the complete load data and map the normalized complete load data to a preset numerical range to obtain a standardized load dataset;
[0095] Specifically, for step S13, the Min-Max normalization method is adopted. This method is suitable for sequences with a clear value range, such as load data, and can achieve linear scaling of the data. First, the complete load data sequence is traversed to determine the minimum and maximum values in the sequence. Then, for each original load data, a normalized value is calculated through linear transformation, mapping the original data uniformly to the preset numerical range [0,1]. This range is a commonly used input scale for load forecasting models and can adapt to the needs of model parameter optimization.
[0096] This embodiment addresses common issues in historical load data from distribution transformers, such as anomalies, data fragmentation, and inconsistent scales, through a tiered data preprocessing workflow. Anomaly detection and correction eliminate noise caused by acquisition errors, missing value imputation ensures the continuity of time-series data, and normalization achieves data scale uniformity. The final output standardized load dataset exhibits significantly improved quality, providing a clean, complete, and standardized input foundation for subsequent feature extraction based on the maximum information coefficient and spatiotemporal modeling using the SwinLSTM-D model. This reduces model prediction errors from the data source and is a crucial prerequisite for ensuring the accuracy of phase-specific load prediction.
[0097] In a specific embodiment, the phase-level load prediction model for distribution transformers is as follows:
[0098] 1) Horizontal anomaly detection and correction, if
[0099] Then use the average of the left and right neighboring points instead.
[0100]
[0101] In the formula, Y(d,t) is the load at hour t on day d; Y′(d,t) is the corrected value; ε is the threshold, t∈{1,…,24}.
[0102] 2) Vertical anomaly detection and correction
[0103] Calculate the average value at the same time on similar days.
[0104]
[0105] Determine whether the absolute deviation exceeds the threshold.
[0106] |Y(d,t)-E(d,t)|>ε(t) (11)
[0107] In the formula, E(d,t) represents the average load value of n similar days at time t, d∈{1,…,n}, and n represents the number of similar days.
[0108] Then the average of the two consecutive days at the same time is used for correction.
[0109]
[0110] In the formula, Y(d+1,t) and Y(d-1,t) represent the load values on day d+1 and day d-1 at time t.
[0111] 3) Missing value imputation
[0112]
[0113] In the formula, ω represents the weighting coefficient, which is adjusted according to the actual situation.
[0114] 4) Normalization
[0115]
[0116] In the formula, x i * indicates the normalized value, x i For the raw load data, x min and x max These are the minimum and maximum values, respectively.
[0117] Furthermore, in some embodiments, step S2, "based on a standardized load dataset, extracting and quantifying the spatial correlation features among the three-phase loads, and constructing the corresponding multi-channel feature map," may specifically include:
[0118] S21. Based on the standardized load dataset, calculate the maximum information coefficient between the three-phase loads and between each phase load and the total load. The maximum information coefficient is used to quantify the correlation strength between loads.
[0119] Specifically, for step S21, the preprocessed standardized load dataset is used as input. The data covers multi-timescale records (including intraday, weekly, and seasonal periodic information) of the A-phase, B-phase, and C-phase loads and the total load of the distribution transformer. The calculation objects include the correlation between each pair of three-phase loads (such as A-phase and B-phase, A-phase and C-phase, B-phase and C-phase), as well as the correlation between each phase load and the total load (such as A-phase and the total load, B-phase and the total load, C-phase and the total load), comprehensively covering the internal coupling relationship of the distribution transformer load, and calculating the maximum information coefficient between the three-phase loads and between each phase load and the total load.
[0120] S22. Filter load features whose maximum information coefficient is higher than the preset correlation threshold;
[0121] Specifically, for step S22, the preset correlation threshold needs to be determined based on the actual operating characteristics and prediction requirements of the distribution transformer load. If the focus is on prediction accuracy, the threshold can be appropriately lowered to retain more potential correlated features; if the focus is on model efficiency, the threshold can be increased to enhance the effect of redundant feature removal. The threshold is usually optimized through experimental verification to ensure that key coupling features are not missed while effectively compressing the feature dimension. The maximum information coefficient corresponding to each load feature is compared with the preset threshold one by one. Features with coefficients higher than the threshold (such as the correlation features between phase A and the total load, phase B and phase C, etc.) are retained, while low-correlation or uncorrelation features with coefficients lower than the threshold (such as interference features that are almost uncoupled with the phase load) are directly removed. Through targeted screening, redundant information in the load data (such as invalid features derived from random noise, and secondary features that are irrelevant to the phase load prediction) is removed, focusing on the core dependencies between the three-phase loads and between the phase and the total load, reducing the computational complexity of the subsequent model, and avoiding prediction bias caused by noise features dominating the modeling.
[0122] S23. Encode the selected load features into a multi-channel feature map according to phase and time series relationship. Each channel in the multi-channel feature map represents a feature type. The rows of the two-dimensional matrix represent time series and the columns represent phase features.
[0123] Specifically, for step S23, the selected load features are structured and visualized using the "phase dimension-temporal dimension" as the core framework, and a multi-channel two-dimensional feature map is constructed to achieve the fusion representation of spatial dependence and temporal regularity.
[0124] In this multi-channel two-dimensional feature map, each channel corresponds to an independent load feature type. For example, "A-phase load channel", "B-phase load channel", "C-phase load channel", "total load channel" and so on can be set. Different channels carry complete data of a single type of load, which makes it easy for the model to extract detailed information of various features separately.
[0125] Two-dimensional matrix row dimension (time series): Each row of the matrix corresponds to a time node, arranged in chronological order, covering multiple time scales such as intraday (24 hours), weekly (7 days), and seasonal (e.g., 12 months), fully preserving the temporal evolution of load and ensuring that the model can capture load fluctuation characteristics under different periods.
[0126] Two-dimensional matrix column dimension (phase features): Each column of the matrix corresponds to a phase-related feature. For example, it can be arranged in the order of "phase A-phase-phase B-phase-phase C-total load", which intuitively presents the parallel relationship between the features of each phase and the total load feature, providing a structured input for the model to extract the spatial coupling relationship between the three phases.
[0127] The resulting multi-channel feature map transforms the abstract three-phase spatial correlation and multi-period temporal sequence into structured data that the model can recognize, achieving explicit fusion and unified input of the two core features.
[0128] This embodiment achieves accurate quantification of load correlation through the maximum information coefficient, avoiding the bias of subjective feature selection; feature screening effectively removes redundant information and improves modeling efficiency; multi-channel feature maps transform scattered spatial dependencies and temporal patterns into structured inputs, providing a highly correlated, low-redundancy, and strongly integrated feature foundation for subsequent prediction models that fuse spatiotemporal features, ensuring from the source that phase-by-phase load prediction can capture inter-phase coupling patterns and multi-cycle fluctuations, laying a key prerequisite for improving prediction accuracy.
[0129] Furthermore, in some embodiments, step S21, "calculating the maximum information coefficient between the three-phase loads and between each phase load and the total load based on the standardized load dataset," may specifically include:
[0130] S211. Calculate the mutual information value between any two phase load data;
[0131] Specifically, for step S211, the load sequence in the standardized load dataset is used as the processing object, focusing on the calculation of the correlation relationship between any two-phase loads. This includes pairwise combinations between the three phases A, B, and C of the distribution transformer (e.g., A and B, A and C, B and C), as well as combinations of each phase load with the total load (e.g., A and total load, B and total load, C and total load). For any two sets of target loads, a two-dimensional dataset is constructed. This dataset uses time synchronization as the core constraint, ensuring that each two-dimensional dataset corresponds to the X-phase and Y-phase load values at the same time, providing a time-consistent basis for calculating the correlation degree. Based on the mutual information theory in information theory, the correlation strength between the two-phase loads is quantified through a probability density function.
[0132] S212. Calculate the maximum value of mutual information under various different meshing schemes;
[0133] Specifically, for step S212, since the correlation between the two-phase loads may differ at different data scales (e.g., strong correlation in local time periods and weak correlation in global time periods), multiple grid partitioning schemes are used to traverse different data scales to ensure that the strongest correlation signal between the two-phase loads is captured across all scales, avoiding the omission of correlation features caused by a single grid partitioning. The constructed two-dimensional dataset is discretized into a two-dimensional plane, and multiple grid partitioning schemes of "number of rows a × number of columns b" are used (a and b are positive integers, and the total number of grids a × b must meet the constraint conditions) to uniformly divide the two-dimensional plane. For example, different grid sizes such as 2×2, 3×3, 4×4, etc., can be used sequentially, or the values of a and b can be dynamically adjusted according to the distribution density of the load data to cover multi-scale segmentation scenarios from coarse-grained to fine-grained. For each grid partitioning scheme G, the mutual information estimate under that grid is calculated, that is, the joint probability density and marginal probability density are estimated by the data distribution within the grid, and then the mutual information approximation value of the corresponding grid is obtained; after traversing all grid partitioning schemes, the maximum value among all mutual information estimates is selected, which represents the strongest correlation between the two phase loads under all possible data scales.
[0134] S213. Divide the calculated maximum mutual information by the logarithm of the corresponding grid division number to obtain the maximum information coefficient;
[0135] Specifically, for step S213, a constraint function B(n) is introduced to control the maximum number of grid divisions, avoiding data sparsity and distorted mutual information estimation due to excessive grids (e.g., a×b far exceeding the sequence length n), and ensuring that the number of grids increases reasonably with the sequence length. To make the correlation strength of different sequences and different phase combinations comparable, the maximum mutual information value needs to be normalized. The maximum mutual information value is divided by the logarithm of the corresponding number of grid divisions to obtain the maximum information coefficient (MIC). Its core principle is to map the maximum mutual information value to a fixed range through logarithmic operation, eliminating the influence of differences in the number of grids on the results. The value range of the maximum information coefficient is strictly limited to [0,1]. When MIC=1, it indicates that there is a completely deterministic functional relationship between the two phase loads; when MIC=0, it indicates that the two phase loads are completely independent and have no correlation; when it is between 0 and 1, the larger the value, the stronger the correlation, realizing the standardized quantification of the load correlation degree.
[0136] Compared to traditional subjective screening or single-scale analysis, this embodiment captures full-scale correlation features through multi-grid partitioning, avoiding the omission of correlation signals. By normalizing the maximum information coefficient, the correlations of different phase combinations become directly comparable. The final output maximum information coefficient provides a quantitative basis for subsequent feature screening, fundamentally solving the deficiency of existing technologies in accurately characterizing three-phase spatial dependencies.
[0137] In a specific embodiment, the load correlation quantification method based on MIC is as follows:
[0138] Historical load data of distribution transformers at the user, phase, and total load levels were collected. Data cleaning, normalization, and missing data completion were performed to construct a standardized input feature space. The maximum information coefficient (MIC) was introduced to evaluate the correlation of multiple features, eliminating low-correlation features and retaining the input variable X, which has a strong correlation with three-phase load prediction. t The details are as follows:
[0139] For a dataset D = {(xi,yi), i = 1, 2, ..., n} consisting of phase X load X = (x1, x2, ..., xn) and phase Y load Y = (y1, y2, ..., yn), where n is the sequence length, the mutual information calculation model is expressed as:
[0140]
[0141] In the formula, IMI(X;Y) is the mutual information coefficient between phase X and phase Y; p(x,y) is the joint probability density function of phase X and phase Y; p(x) and p(y) are the marginal probability density functions of phase X and phase Y, respectively.
[0142] First, discretize D in a two-dimensional plane and divide it into a×b grids, denoted as G. Let D|G be the probability distribution of a point in D falling into G, and let IMI(D|G,a,b) be the estimated mutual information between phase X and phase Y in this case. Then, select different values of a and b and calculate multiple times to obtain the maximum mutual information I*MI(D|G,a,b) under different grid divisions, expressed as:
[0143]
[0144] The maximum information coefficient is finally obtained and expressed as:
[0145]
[0146] In the formula, B(n) is the constraint function that determines the maximum number of grids, and B(n) is usually taken as n0.6.
[0147] Based on equations (15)-(17), the correlation between the three phases and the overall load can be quantified respectively. The MIC value range is [0,1]. The larger the MIC value between two phases, the deeper the correlation. Conversely, the smaller the MIC value, the shallower the correlation between the two phases.
[0148] Furthermore, in some embodiments, step S3, "using a prediction model that integrates spatiotemporal features to perform phase load analysis based on multi-channel feature maps and generate preliminary phase load prediction results," may specifically include:
[0149] S31. Divide the multi-channel feature map into non-overlapping time patches according to the time dimension, perform linear embedding mapping on each time patch, generate a patch embedding sequence, and input it into the preset SwinLSTM-D prediction model.
[0150] Specifically, for step S31, the input multi-channel feature map has undergone preprocessing, integrating spatial correlations between three-phase loads and multi-period time-series features such as intraday, weekly, and seasonal characteristics. Each channel corresponds to a type of load feature (e.g., phase A, phase B, total load). The two-dimensional matrix structure contains both time series and phase-specific features, providing a structured data foundation for spatiotemporal fusion modeling. Along the time series dimension (matrix row dimension) of the feature map, continuous time steps are divided into non-overlapping patches of size P×P to ensure no redundant coverage of time information. The patch size P is set according to the load cycle characteristics (e.g., when adapting to an intraday 24-hour cycle, P = 4 or 6 can be selected to achieve feature aggregation for local time periods). If the input sequence length is T, when the partitioning step size s = P, M = T / P complete patches can be obtained (T must be an integer multiple of P, or zero-padding can be used for adaptation).
[0151] In the linear embedding mapping process, each P×P patch is first flattened into a one-dimensional vector with a dimension of C×P² (C being the number of feature channels). Then, a linear mapping is performed through the patch embedding layer, using a learnable embedding matrix and bias terms to transform the flattened vector into a feature token of dimension C×P². Finally, a sine wave or learnable positional encoding is superimposed on the token sequence to preserve the temporal order information and avoid losing temporal positional features during modeling. After the above processing, the multi-channel feature map is transformed into a patch embedding sequence of dimension M×d (M being the number of patches and d being the token dimension). This sequence simultaneously carries local spatiotemporal and positional information and is directly input into the feature processing layer of the SwinLSTM-D prediction model.
[0152] S32. Extract local spatial features from the input features using the window attention mechanism in the SwinLSTM-D prediction model;
[0153] Specifically, for step S32, the window attention mechanism is the core module of the SwinLSTM-D model for capturing local spatial correlations. It focuses on the feature interactions within local windows in the patch embedding sequence, adapting to the strong coupling characteristics of three-phase loads in a short period. The input patch embedding sequence is first normalized to eliminate feature scale differences. Then, according to a preset window length, the sequence is divided into several non-overlapping local windows, each containing multiple consecutive patch tokens. There is no overlap between windows, ensuring independent feature extraction in local regions. Within each local window, multi-head self-attention operations are performed on the token features. The tokens are mapped to query (Q), key (K), and value (V) matrices using a weight matrix. A relative position bias M is introduced, and the attention score of each attention head is calculated. Then, the attention scores are weighted and summed on the V matrix to obtain the single-head attention output. Finally, the outputs of H attention heads are concatenated and linearly projected to obtain the local spatial features within the window. The output of window attention undergoes nonlinear feature transformation through two layers of MLP (Multilayer Perceptron), and then performs residual connection with the input normalized sequence. This process preserves the original feature information while fusing local spatial interaction features, ultimately generating a local spatial feature sequence.
[0154] S33. Information exchange and fusion between different windows are achieved through the shift window attention mechanism in the SwinLSTM-D prediction model;
[0155] Specifically, for step S33, Shifted Window Attention (SW-MSA) breaks the window boundaries to achieve cross-window spatial information interaction, overcoming the limitations of local modeling and adapting to the global coupling relationship of three-phase loads over long periods. A cyclic shift operation is performed on the sequence output by window attention, with the shift magnitude S typically being half the window length. After shifting, the window is re-divided according to its length, and the new window will cover the boundary region of the original adjacent windows, creating conditions for cross-window information interaction. Within the re-divided window, the multi-head self-attention and MLP calculation process of window attention is repeated to extract cross-window spatial correlation features. After calculation, a reverse cyclic shift is performed on the sequence to restore the feature positions to the original temporal order, ensuring temporal consistency in subsequent modeling. Window attention and shifted window attention are usually stacked in pairs to form a Swing module. Through multiple rounds of local-global interaction, the local and global spatial dependency features of the three-phase load are gradually fused to generate a dimension-invariant spatial fusion feature sequence.
[0156] S34. Long-term dependencies in time series are modeled using LSTM units in the SwinLSTM-D prediction model;
[0157] Specifically, in step S34, the LSTM unit is a key component of the SwinLSTM-D model for capturing temporal dependencies. It leverages a gating mechanism to address the vanishing gradient problem in long sequences of traditional RNNs, adapting to the modeling needs of long-cycle patterns such as intraday, weekly, and seasonal load variations. The input to the LSTM unit is the spatial fusion feature sequence output by the Swin module, with the input at each time step being the spatial features of the current patch. The hidden state and cell state are initialized (usually set as all-zero vectors) as initial memory for temporal modeling. At each time step, the LSTM unit updates its state through filtering gates, cell state updates, output gates, and gating logic with the hidden state. By recursively updating the hidden and cell states, the LSTM unit can effectively capture cross-time-period dependencies in the load sequence (such as the correlation between weekday morning and evening peak hours, and load trend changes during seasonal transitions), achieving deep fusion of spatial and temporal features.
[0158] S35. The feature sequence output by the LSTM unit is restored to a time step-level representation through linear mapping to generate preliminary prediction results of the load of each phase in the future specified time period;
[0159] Specifically, for step S35, the feature sequence output by the LSTM unit is a patch-level representation, which needs to be restored to a time-step-level representation to match the hourly or minute-level time accuracy requirements of phase load prediction. The inverse patch restoration process includes: clarifying the original time-step range corresponding to each patch and establishing a one-to-one correspondence between patch tokens and time steps; using P sets of linear mapping matrices to restore each patch token to the feature representation of its internal P time steps to ensure restoration accuracy; concatenating all the restored time-step features of all patches in the original time sequence to obtain a time-step-level feature sequence of length T, which is consistent with the time scale of the input feature map. The time-step-level feature sequence is input into the model output layer (linear projection layer), and the feature dimension is mapped to the phase load value dimension through a learnable weight matrix, finally generating the specific values of each phase load in a specified future time period (such as the next 24 hours or 7 days), i.e., the preliminary phase load prediction result.
[0160] This embodiment accurately captures the local and global spatial coupling relationships of three-phase loads through window and shift window attention mechanisms, solving the problem of traditional models neglecting spatial features. The LSTM unit effectively models multi-cycle long-term time-series dependencies, making up for the limitations of single-space modeling. The final preliminary prediction results of phase loads retain the details of inter-phase coupling and conform to the temporal fluctuation law of the load, providing a high-precision foundation for subsequent hierarchical consistency coordination and significantly improving the overall accuracy and robustness of phase load prediction.
[0161] In a specific embodiment, the phase load prediction model based on SwinLSTM-D includes the following structure:
[0162] SwinLSTM model structure
[0163] (1) Input and time patch embedding
[0164] After data preprocessing, input tensor X t At each time step, the area is divided into non-overlapping patches of size P×P, and each patch is flattened into a dimension of C×P. 2 After feature extraction, the data is linearly mapped through a patch embedding layer and then fed into the SwinLSTM cellular layer for processing, ensuring effective representation of local spatial patterns and continuous modeling of temporal information. The input multi-source sequence of length T is as follows:
[0165] X = [x1, ..., x] T ] T ∈R T×F (15)
[0166] In the formula, x t ∈R F Let F be the feature at the t-th time step, and F be the feature dimension.
[0167] X∈R T×F The input matrix is "time × feature", and the patch length is P; when the step size s = P, let
[0168]
[0169] When step size s ≤ P, let
[0170]
[0171] The token sequence is obtained through linear patch embedding and positional encoding.
[0172] z m =p m W e +b e +e m pos (18)
[0173] Z = [z1, ..., z] M ] T ∈R M×d (19)
[0174] In the formula, W e ∈RP F×d b e ∈R d e m pos It can be a sine wave or a learnable position vector.
[0175] (2) Swing Module: Window Attention (W-MSA) and Shift Window (SW-MSA)
[0176] After normalizing Z, the data is divided into non-overlapping windows of length W; multi-head self-attention is performed within each window.
[0177]
[0178] In the formula, W Q W K W V ∈R d×Hdh H is the number of heads, d = H dh M represents the relative position offset within the window. Adding a feedforward network (two layers of MLP) and the residual yields the output of the first block.
[0179]
[0180] To achieve cross-window information exchange, Z′ is cyclically shifted (amplitude S, usually S = W / 2) and then windowed, and the second attention block SW-MSA and MLP are executed.
[0181]
[0182] Similarly, when a single-layer Swing is mapped to Φ swin (Z) = Z″. If L layers are stacked, the output is Z. (L) =Φ swin L (Z).
[0183] (3) Token → Time step “reverse patch”
[0184] Swin outputs Z (L) ∈R M×d The patch-level representation needs to be restored to a time-step sequence. For use by recursive units. Let the t-th time step belong to the patch.
[0185]
[0186] s(t)=t-(m(t)-1)P(26)
[0187] A site-dependent linear expansion was used.
[0188]
[0189] Each patch token is restored to its internal P time-step representation using a P-group linear mapping.
[0190]
[0191] (4) SwinLSTM recursion
[0192] In the SwinLSTM unit, the current time patch is first represented using the Swin module. Inside the SwinLSTM cell, the hidden state and the cell state are updated recursively using a gating mechanism: the filter gate F... t The cell state C is obtained by linear projection of the current patch and the hidden state from the previous time step onto the Swing module; t The previous state and current candidate information are fused by gating; output H. t By C t The nonlinear mapping is given.
[0193]
[0194] In the formula: x t H represents the processed tensor patch. t-1 Let LP represent the hidden state of the previous time step, and F represent the linear projection. t For the output of the filter gate, C t-1 The cell state at the previous time step is represented by tanh, where tanh represents the tanh activation function, and H... t and C t These represent the hidden state and cell state of the current step, respectively.
[0195] (5) SwingTransformer module
[0196] The SwinTransformer module serves as the core of the cell.
[0197] The operating mechanism of the SwinTransformer module is as follows.
[0198]
[0199] In the formula: Z l and Z l+1 Z represents the intermediate output features of the l-th layer and the (l+1)-th layer, respectively. l and Z l+1 Let L1 and L2 represent the output features of the l-th and l+1-th layers, respectively. LN represents the layer normalization operation. W-MSA represents the multi-head self-attention mechanism based on a window. SW-MSA represents the multi-head self-attention mechanism based on a shifted window. MLP is a multilayer perceptron.
[0200] Furthermore, in some embodiments, the training methods for the SwinLSTM-D prediction model include:
[0201] Based on the load rate of each training sample, each training sample is divided into a light load interval, a normal interval, or a heavy overload interval.
[0202] For training samples assigned to the lightly loaded interval, the weighted mean square error is used as the corresponding first loss function;
[0203] For training samples classified into the normal range, the mean absolute percentage error is used as the corresponding second loss function;
[0204] For training samples divided into heavy overload intervals, the adaptive weighted mean absolute percentage error is used as the corresponding third loss function;
[0205] The SwinLSTM-D prediction model is trained using a hybrid loss function consisting of the first, second, and third loss functions.
[0206] Specifically, regarding the training method of the SwinLSTM-D prediction model, the load factor of each training sample needs to be evaluated before training begins. The load factor is the ratio of the actual load to the rated capacity of the equipment, reflecting the operating state of the distribution transformer. Based on the load factor, the training samples are divided into three intervals: light load interval (load factor ≤ 30%), normal interval (30% < load factor < 80%), and heavy overload interval (load factor ≥ 80%). For example, a training sample with a load factor of 20% is classified as a light load interval; if the load factor is 60%, it belongs to the normal interval; and if the load factor reaches 90%, it is classified as a heavy overload interval.
[0207] For training samples in the light-load interval, Weighted Mean Squared Error (WMSE) is used as the loss function. Mean squared error is the average of the squares of the differences between predicted and true values, while weighted mean squared error assigns different weights to different samples or errors. In the light-load interval, because the load values are small, small errors may be relatively more important; therefore, weighting allows for more precise control over the model's sensitivity to these errors.
[0208] For training samples within the normal range, the Mean Absolute Percentage Error (MAPE) is used as the loss function. MAPE is calculated by averaging the percentage of absolute error between the predicted and true values. It reflects the magnitude of the prediction error as a relative value and has good adaptability to data with different units and numerical ranges.
[0209] In the heavily overloaded region, the adaptive weighted mean absolute percentage error (AWMAPE) is used as the loss function. Adaptive weighting means assigning different weights to different samples or errors according to certain predefined rules or dynamic adjustment mechanisms. This can be based on further subdivision of the load rate, hierarchical weights based on error magnitude, or weight adjustments based on specific patterns in the time series.
[0210] The three loss functions mentioned above are combined into a hybrid loss function (HLF). During training, the model simultaneously considers the prediction errors in the light load, normal, and heavy overload regions, and optimizes them according to their respective loss functions. The hybrid loss function can be a simple weighted sum of the individual loss functions, or a more complex combination based on the distribution of the training samples or other factors. By minimizing the hybrid loss function, the model can achieve better prediction performance under different operating conditions.
[0211] This embodiment trains the SwinLSTM-D prediction model by using different loss functions for different load rate ranges and constructing a hybrid loss function. This enables the model to maintain high-precision prediction performance under different operating conditions such as light load, normal, and heavy overload, optimizes the model's prediction ability under extreme conditions, improves the reliability and engineering applicability of prediction results, and provides strong support for the safe operation and precise control of distribution transformers.
[0212] In a specific implementation, to meet the performance requirements of the early warning task at both light and heavy overload ends, a dual-weighted hybrid (DWH) loss is designed as the training objective. Mean Absolute Percentage Error (MAPE) has become the most widely used evaluation metric in the field of time series forecasting, and its calculation method is as follows:
[0213]
[0214] In the formula: N represents the total number of samples, A i It is the actual value, F i To be with A i The corresponding predicted value.
[0215] Based on the nonlinear sensitivity of MAPE (extremely sensitive to small errors when the load is close to zero, and the sensitivity decreases as the load increases), DWH divides the sample into three segments (threshold τ1<τ2) according to the load ratio r (actual load / rated capacity).
[0216] Heavy and overloaded operating conditions (r ≥ τ2): An adaptive weight that monotonically increases with r is superimposed on MAPE. The heavier the overload and the greater the loss, forcing the model to preferentially reduce the prediction error in the high-load area, improving the early warning recall and accuracy.
[0217] Normal operating conditions (τ1 < r < τ2): Directly adopt MAPE to ensure the overall robustness and comparability on mainstream samples.
[0218] Light-load operating conditions (r ≤ τ1): Change to weighted mean square error to suppress noise amplification, and only impose strong penalties on obvious deviations, thus avoiding overfitting under extremely low loads.
[0219] In summary, the calculation formula for the DWH loss function can be expressed as:
[0220]
[0221] In the formula: ω is the weight, and τ1 and τ2 are the function segmentation thresholds.
[0222] Furthermore, in some embodiments, step S4 "Perform hierarchical consistency coordination processing on the preliminary three-phase load prediction results to obtain the final three-phase load prediction results consistent with the total load prediction results" can specifically include:
[0223] S41. Construct a hierarchical structure matrix representing the aggregation relationship between the three-phase load and the total load;
[0224] Specifically, for step S41, before performing hierarchical consistency coordination processing, a hierarchical structure matrix needs to be constructed. This matrix is used to describe the aggregation relationship between the three-phase load and the total load. The hierarchical structure matrix is a mathematical structure, usually represented in matrix form, where each row represents a level (such as the total load level, each phase load level, etc.), and each column represents a specific load measurement point or prediction point. The elements in the matrix represent the aggregation relationship between the levels. For example, the value of the total load level is equal to the sum of the values of each phase load level. By constructing such a matrix, the three-phase load prediction results can be associated with the total load prediction results, providing a basis for subsequent consistency coordination processing.
[0225] S42. Use the minimum trace coordination method to perform coordination processing on the preliminary three-phase load prediction results based on the hierarchical structure matrix;
[0226] Specifically, for step S42, the minimum trace coordination method is a mathematical optimization method used to solve consistency problems in multivariable systems. In phase-by-phase load forecasting for distribution transformers, this method finds the optimal coordination solution by minimizing the trace of the forecast error covariance matrix (i.e., the sum of the diagonal elements of the matrix). Specifically, it finds the solution that minimizes the trace of the error covariance matrix within a solution space that satisfies hierarchical structure matrix constraints. This is equivalent to selecting the solution that minimizes the sum of the variances of the forecast errors among all possible coordination schemes, thereby achieving consistency between the phase-by-phase load forecasting results and the total load forecasting results.
[0227] S43. By minimizing the trace of the prediction error covariance matrix, the final prediction result of the phase load with consistent numerical values and optimal error is obtained;
[0228] Specifically, for step S43, the prediction error covariance matrix is a matrix used to describe the statistical characteristics of the prediction error. Its diagonal elements represent the variance of each prediction variable, and its off-diagonal elements represent the covariance between prediction variables. By minimizing the trace of this matrix, the sum of the variances of all prediction variables can be reduced simultaneously, thereby improving the overall accuracy of the prediction results. In practice, this usually involves constructing an optimization problem, where the objective function is the trace of the prediction error covariance matrix, and the constraint is the hierarchical consistency condition defined by the hierarchical structure matrix. By solving this optimization problem, the coordinated phase load prediction results that minimize the prediction error can be obtained.
[0229] This embodiment constructs a hierarchical structure matrix and uses the minimum trace coordination method to process the preliminary prediction results of phase loads, effectively solving the problem of inconsistency between the phase load prediction results and the total load prediction results. Furthermore, by minimizing the trace of the prediction error covariance matrix, the overall accuracy and reliability of the prediction results are improved.
[0230] In a specific implementation, for the Minimum Trace Optimal Coordination (MinT) theory, given the hierarchical structure matrix S, the baseline predictions obtained independently from each layer are projected onto a "hierarchical consistent" subspace; among all linear summations that make SGS = S true, the solution with the smallest summation error covariance trace is taken as the optimal solution. Assume the baseline error is:
[0231]
[0232] In the formula, Let P represent the baseline prediction error and the predicted value at step h, respectively. T+h That is the current actual value.
[0233] For each G matrix that satisfies SGS = S, the covariance matrix of the h-step prediction error is obtained in the following manner.
[0234]
[0235] In the formula, Wh represents the baseline prediction error variance covariance matrix at step h.
[0236] Assuming the prediction error follows a normal distribution, formulas (34) and (36) are used to generate an unbiased and consistent prediction interval. The coordinated prediction residual lies in V. h The sum of the values on the diagonal of a matrix is called the "trace". Therefore, the ultimate goal is to obtain matrix G, which minimizes the trace in equation (34) and satisfies SGS = S.
[0237] Assume W in (35) h It is a positive definite matrix. Therefore, the expression for the optimal coordination matrix G is:
[0238] G = (S T W h -1 S) -1 S T W h -1 (36)
[0239] Therefore, the comprehensive prediction result obtained using the "MinT" method is as follows.
[0240]
[0241] If Wh = SVhST is a singular matrix, then...
[0242]
[0243] This equation shows that V h It is independent of the coordination matrix G. Considering the cumulative nature of errors, G satisfying SGS = S is a solution to the minimum variance minimization problem (MinT).
[0244] For the baseline covariance matrix estimate, we can see from the summation matrix that W h This is crucial for ensuring the uniformity and numerical stability of MinT. This section proposes two types of estimators, which are suitable for the cases of "small scale / sufficient sample" (sample covariance MinTSa) and "large scale / sparse sample" (shrinking covariance MinTSh), respectively.
[0245] 1) MINTSA
[0246] The covariance matrix obtained by the MinT estimator is an n×n matrix with no zero elements. For MinTSa, we set... where \(k_h>0\), and it is the sample covariance estimator of the benchmark prediction error at \(h = 1\). Since only the samples at \(h = 1\) are used, MinTSa is simpler than MinTSh. When \(m<T\) (i.e., the total number of observations is less than the amount of historical data used), MinTSa performs best.
[0247] At this time, the expression calculated in equation (38) can be further expanded to equation (39) to reflect the MinTSa estimator.
[0248]
[0249] 2) MINTSH
[0250] Let where \(k\) h >0, and is the diagonal element of the shrinkage estimate.
[0251]
[0252] where is the matrix 's diagonal element, \(\lambda\) D is the shrinkage parameter. The off-diagonal elements of D are greatly reduced and approach zero, but the diagonal elements (variances) remain unchanged. Assuming the variance is constant, then \(\lambda\)
[0253]
[0254] where, is the \((i, j)\)th element in the correlation matrix, which shrinks to an identity matrix when \(h = 1\) (one-step ahead). For MinTSa, \(\lambda\) D = 0, so there is When there is a large underlying sequence, the MinTSh estimator is used. For the higher levels of substation transformers, the performance of MinTSh is better than that of MinTSa.
[0255] Calculating 's expression in equation (38) can be further optimized to represent the MinTSh estimator with the following formula.
[0256]
[0257] To comprehensively evaluate the performance of the distribution transformer phase-splitting hierarchical prediction model that combines data-driven and physical constraints, MAPE (see equation 31), Root Mean Square Error (RMSE), and early warning accuracy rate are used as evaluation indicators.
[0258]
[0259] In the formula, TP, FP, and FN represent the number of correct warnings, the number of false alarms, and the number of missed warnings, respectively.
[0260] In summary, the phase-by-phase load prediction method for distribution transformers provided in this embodiment first acquires and preprocesses historical load data of the distribution transformer to obtain a standardized load dataset. This eliminates potential anomalies and missing data in the original data, providing high-quality and standardized basic data for subsequent modeling and reducing prediction errors from the data source. Then, based on the standardized load dataset, it extracts and quantifies the spatial correlation features between the three-phase loads, constructing corresponding multi-channel feature maps. This transforms the inherent correlation characteristics between the three-phase loads into effective inputs that the prediction model can recognize, avoiding the limitations of modeling phase-by-phase loads in isolation and ignoring inter-phase coupling patterns, thus providing support for accurately capturing load change characteristics. Next, a prediction model that integrates spatiotemporal features performs phase-by-phase load analysis based on the multi-channel feature maps, generating preliminary phase-by-phase load prediction results. This fully explores the spatial correlation and temporal dynamic characteristics of phase-by-phase loads, effectively improving prediction accuracy. Finally, the preliminary phase-by-phase load prediction results undergo hierarchical consistency coordination processing to obtain final phase-by-phase load prediction results consistent with the overall load prediction results, enhancing the reliability of the prediction results in engineering applications.
[0261] It should be understood that, although Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0262] To facilitate better implementation of the distribution transformer phase load prediction method of this application, this application also provides a distribution transformer phase load prediction device based on the above-described distribution transformer phase load prediction method. The meanings of the terms used are the same as in the above-described distribution transformer phase load prediction method, and specific implementation details can be found in the description of the method embodiments.
[0263] Please see Figure 3 , Figure 3The diagram below illustrates the structure of a phase-by-phase load prediction device for a distribution transformer provided in this embodiment. Specifically, the device may include a data acquisition module 201, a feature construction module 202, a load prediction module 203, and a result coordination module 204, as follows:
[0264] Data acquisition module 201 is used to acquire historical load data of distribution transformers and preprocess it to obtain a standardized load dataset;
[0265] The feature construction module 202 is used to extract and quantify the spatial correlation features between three-phase loads based on the standardized load dataset, and construct the corresponding multi-channel feature map;
[0266] The load forecasting module 203 is used to perform phase load analysis based on multi-channel feature maps using a forecasting model that integrates spatiotemporal features, and generate preliminary phase load forecasting results.
[0267] The result coordination module 204 is used to perform hierarchical consistency coordination processing on the preliminary prediction results of phase loads to obtain the final prediction results of phase loads that are consistent with the total load prediction results.
[0268] Specific limitations regarding the phase-by-phase load prediction device for distribution transformers can be found in the limitations of the phase-by-phase load prediction method for distribution transformers mentioned above, and will not be repeated here. Each module in the aforementioned phase-by-phase load prediction device for distribution transformers can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in hardware or independently of the processor in a computer device, or stored in software in the memory of a computer device, so that the processor can call and execute the corresponding operations of each module.
[0269] The distribution transformer phase load prediction device provided in this embodiment includes a data acquisition module 201 that acquires historical load data of the distribution transformer and preprocesses it to obtain a standardized load dataset; a feature construction module 202 that extracts and quantifies the spatial correlation features between the three-phase loads based on the standardized load dataset and constructs corresponding multi-channel feature maps; a load prediction module 203 that performs phase load analysis based on the multi-channel feature maps using a prediction model that integrates spatiotemporal features to generate preliminary phase load prediction results; and a result coordination module 204 that performs hierarchical consistency coordination processing on the preliminary phase load prediction results to obtain a final phase load prediction result consistent with the total load prediction result. This embodiment can achieve high-precision prediction of the phase load of the distribution transformer and ensure that the phase load prediction results are consistent with the total load prediction results, solving the problems of insufficient prediction accuracy and inconsistent results in the prior art, improving the accuracy and reliability of phase load prediction for distribution transformers, and thus meeting the requirements for safe operation of the distribution network.
[0270] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 4 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:
[0271] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that... Figure 4 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0272] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines, and performs various functions and processes data by running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301.
[0273] The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and the phase load prediction method for distribution transformers by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 302 may also include a memory controller to provide the processor 301 with access to the memory 302.
[0274] The electronic device also includes a power supply 303 that supplies power to various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0275] The electronic device may also include an input unit 304, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
[0276] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more applications into the memory 302 according to the following instructions, and the processor 301 runs the applications stored in the memory 302 to realize various functions, as follows:
[0277] Historical load data of the distribution transformer is acquired and preprocessed to obtain a standardized load dataset. Based on the standardized load dataset, the spatial correlation characteristics between the three-phase loads are extracted and quantified to construct the corresponding multi-channel feature map. A prediction model that integrates spatiotemporal features is used to perform phase-by-phase load analysis based on the multi-channel feature map to generate preliminary phase-by-phase load prediction results. The preliminary phase-by-phase load prediction results are then subjected to hierarchical consistency coordination processing to obtain the final phase-by-phase load prediction results that are consistent with the overall load prediction results.
[0278] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0279] The embodiments of this application can achieve high-precision prediction of phase load of distribution transformers and ensure that the prediction results of phase load are consistent with the prediction results of total load. This solves the problems of insufficient prediction accuracy and inconsistent results in the prior art, improves the accuracy and reliability of phase load prediction of distribution transformers, and thus meets the requirements of safe operation of distribution network.
[0280] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0281] Therefore, embodiments of this application provide a storage medium storing multiple instructions that can be loaded by a processor to execute steps in any of the distribution transformer phase load prediction methods provided in embodiments of this application. For example, the instructions can execute the following steps:
[0282] Historical load data of the distribution transformer is acquired and preprocessed to obtain a standardized load dataset. Based on the standardized load dataset, the spatial correlation characteristics between the three-phase loads are extracted and quantified to construct the corresponding multi-channel feature map. A prediction model that integrates spatiotemporal features is used to perform phase-by-phase load analysis based on the multi-channel feature map to generate preliminary phase-by-phase load prediction results. The preliminary phase-by-phase load prediction results are then subjected to hierarchical consistency coordination processing to obtain the final phase-by-phase load prediction results that are consistent with the overall load prediction results.
[0283] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0284] The storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0285] Since the instructions stored in the storage medium can execute the steps in any of the distribution transformer phase load prediction methods provided in the embodiments of this application, the beneficial effects that any of the distribution transformer phase load prediction methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0286] The above provides a detailed description of a method, apparatus, equipment, and medium for predicting phase loads of a distribution transformer according to embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for predicting phase load of a distribution transformer, characterized in that, include: Historical load data of distribution transformers are acquired and preprocessed to obtain a standardized load dataset. Based on the standardized load dataset, spatial correlation features among three-phase loads are extracted and quantified, and corresponding multi-channel feature maps are constructed. A prediction model that integrates spatiotemporal features is used to perform phase load analysis based on the multi-channel feature map, generating preliminary phase load prediction results. The preliminary phase load prediction results are processed for hierarchical consistency coordination to obtain the final phase load prediction results that are consistent with the total load prediction results.
2. The method for predicting phase loads of distribution transformers according to claim 1, characterized in that, The process of acquiring and preprocessing historical load data from distribution transformers to obtain a standardized load dataset includes: The historical load data is subjected to anomaly detection and correction processing to obtain corrected load data; Missing values in the corrected load data are filled in to obtain complete load data; The complete load data is normalized, and the normalized complete load data is mapped to a preset numerical range to obtain the standardized load dataset.
3. The method for predicting phase loads of distribution transformers according to claim 1, characterized in that, Based on the standardized load dataset, the spatial correlation features among the three-phase loads are extracted and quantified to construct a corresponding multi-channel feature map, including: Based on the standardized load dataset, the maximum information coefficients between the three-phase loads and between each phase load and the total load are calculated. The maximum information coefficients are used to quantify the correlation strength between loads. Filter load features whose maximum information coefficient is higher than a preset correlation threshold; The selected load features are encoded into a multi-channel feature map according to phase and time sequence relationship, wherein each channel in the multi-channel feature map represents a feature type, the rows of the two-dimensional matrix represent time series, and the columns represent phase features.
4. The method for predicting phase loads of distribution transformers according to claim 3, characterized in that, The calculation of the maximum information coefficients between the three-phase loads and between each phase load and the total load, based on the standardized load dataset, includes: Calculate the mutual information value between any two phase load data; The maximum value of the mutual information value is calculated under various different mesh partitioning schemes; The maximum mutual information value is obtained by dividing the calculated maximum mutual information value by the logarithm of the corresponding number of grid divisions.
5. The method for predicting phase loads of distribution transformers according to claim 1, characterized in that, The prediction model, which integrates spatiotemporal features, performs phase load analysis based on the multi-channel feature map to generate preliminary phase load prediction results, including: The multi-channel feature map is divided into non-overlapping time patches according to the time dimension, and a linear embedding mapping is performed on each time patch to generate a patch embedding sequence, which is then input into the preset SwinLSTM-D prediction model. Local spatial features are extracted from the input features through the window attention mechanism in the SwinLSTM-D prediction model. The shift-window attention mechanism in the SwinLSTM-D prediction model enables information exchange and fusion between different windows. The long-term dependencies in the time series are modeled using the LSTM units in the SwinLSTM-D prediction model. The feature sequence output by the LSTM unit is restored to a time-step representation through linear mapping, generating preliminary prediction results of the load of each phase within a specified future time period.
6. The method for predicting phase loads of distribution transformers according to claim 5, characterized in that, The training methods for the SwinLSTM-D prediction model include: Based on the load rate of each training sample, each training sample is divided into a light load interval, a normal interval, or a heavy overload interval. For training samples assigned to the lightly loaded interval, the weighted mean square error is used as the corresponding first loss function; For training samples classified into the normal range, the mean absolute percentage error is used as the corresponding second loss function; For training samples divided into heavy overload intervals, the adaptive weighted mean absolute percentage error is used as the corresponding third loss function; The SwinLSTM-D prediction model is trained based on a hybrid loss function composed of the first loss function, the second loss function, and the third loss function.
7. The method for predicting phase loads of distribution transformers according to claim 1, characterized in that, The step of performing hierarchical consistency coordination processing on the preliminary phase load forecast results to obtain the final phase load forecast results consistent with the total load forecast results includes: Construct a hierarchical structure matrix that represents the aggregate relationship between phase loads and total loads; The minimum trace coordination method is used to coordinate the preliminary prediction results of the phase load based on the hierarchical structure matrix. By minimizing the trace of the prediction error covariance matrix, the final prediction result of the phase load with consistent numerical values and optimal error is obtained.
8. A phase-by-phase load prediction device for a distribution transformer, characterized in that, include: The data acquisition module is used to acquire historical load data of distribution transformers and preprocess it to obtain a standardized load dataset; The feature construction module is used to extract and quantify the spatial correlation features between the three-phase loads based on the standardized load dataset, and construct the corresponding multi-channel feature map; The load forecasting module is used to perform phase load analysis based on the multi-channel feature map using a forecasting model that integrates spatiotemporal features, and generate preliminary phase load forecasting results. The result coordination module is used to perform hierarchical consistency coordination processing on the preliminary phase load prediction results to obtain the final phase load prediction results that are consistent with the total load prediction results.
9. An electronic device, characterized in that, include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of the distribution transformer phase load prediction method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The computer program is stored and can be loaded by a processor and executed as described in any one of claims 1 to 7.