Transformer area line loss detection method, device and equipment and readable storage medium
By reconstructing the anomaly monitoring model twice and conducting adversarial training, the problem of high false alarm rate of line loss in the distribution area was solved, and accurate identification and reliable detection of non-technical line loss were achieved, reducing the false alarm rate and improving the operational stability of the power grid.
Patent Information
- Application Number
- CN202511497267.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-20
- Publication Date
- 2026-01-13
AI Technical Summary
Existing technologies have a high false alarm rate for line losses in distribution areas, making it difficult to accurately identify non-technical line losses, which leads to unstable power grid operation and energy waste.
An anomaly monitoring model is adopted, including an anomaly indicator generation level, a shared encoder, and a first decoder and a second decoder trained adversarially. By reconstructing the sequence of operating parameters twice, and combining it with the anomaly indicator generation level, line loss anomaly detection is performed. The adversarially trained dual decoders amplify subtle anomalies, thereby improving detection reliability.
By performing two reconstruction processes, the false alarm rate is reduced, the ability to accurately distinguish between normal fluctuations and real anomalies is achieved, the false alarm rate is reduced, the reliability of line loss detection is improved, and the dependence on distribution network topology parameters and load distribution data is reduced.
Smart Images

Figure CN121327718A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power grid technology, and more specifically, to a method, apparatus, equipment, and readable storage medium for detecting line loss in transformer substations. Background Technology
[0002] Distribution area line loss refers to the electrical energy loss incurred during power transmission in a specific distribution area of a power system. It consists of technical line losses and non-technical line losses, such as metering errors and electricity theft. Non-technical line losses caused by malicious behavior not only increase power operation costs and waste energy, but also lead to grid instability problems such as voltage fluctuations, affecting power supply quality. Therefore, accurately identifying non-technical line losses is a key prerequisite for formulating loss reduction measures and optimizing the economic operation of the power grid.
[0003] Traditional methods determine anomalies by comparing theoretical and actual line loss rates to a threshold. However, these methods rely on precise distribution network topology parameters and load distribution data. In actual distribution networks, factors such as new user connections, line rewiring, load data acquisition errors, and distributed power source integration make it difficult to consistently obtain accurate baseline data. This results in significant deviations in theoretical line loss rate calculations, leading to high false alarm and false negative rates in anomaly detection. Therefore, there is an urgent need for a new method for detecting transformer substation line losses to improve the identification rate of line losses in non-technical substation areas. Summary of the Invention
[0004] In view of this, this application provides a method, apparatus, device and readable storage medium for detecting transformer area line loss, in order to solve the shortcomings of the high false alarm rate of transformer area line loss in the prior art.
[0005] To achieve the above objectives, the following solution is proposed:
[0006] A method for detecting line loss in a transformer substation, comprising:
[0007] Determine the type of parameters used to characterize the line loss situation of the target transformer area;
[0008] Obtain the sequence of operating parameters corresponding to the parameter type from the target station area;
[0009] An anomaly detection model is obtained, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially.
[0010] By combining the shared encoder and the first decoder, the sequence of operating parameters is reconstructed to obtain the first output feature;
[0011] By combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain the second output feature;
[0012] The abnormal indicators are combined to generate a hierarchy, and line loss anomaly detection is performed based on the first output feature and the second output feature.
[0013] Optionally, the acquisition of the anomaly monitoring model includes:
[0014] Collect multiple historical operation sequences that match the parameter type from the target station area;
[0015] Construct an autoencoder containing a raw encoder, a first raw decoder, and a second raw decoder;
[0016] With the goal of minimizing the scene reconstruction error of the autoencoder, the autoencoder is initially trained using various historical running sequences;
[0017] Adversarial training is performed on the first preliminary autoencoder and the second preliminary autoencoder until the number of iterations reaches a preset iteration threshold. The first preliminary autoencoder consists of a pre-trained original encoder and a pre-trained first original decoder, and the second preliminary autoencoder consists of a pre-trained original encoder and a pre-trained second original decoder.
[0018] The anomaly indicator generation level is added to the final autoencoder to obtain the anomaly monitoring model.
[0019] Optionally, the step of performing preliminary training on the autoencoder using various historical running sequences with the goal of minimizing the scene reconstruction error of the autoencoder includes:
[0020] The first original decoder is used to reconstruct each historical running sequence to obtain the first training feature. Norm operation is performed on each historical running sequence and the first training feature to determine the first loss value of the first original decoder. The parameters of the autoencoder are adjusted based on the first loss value until the first loss value of the first original decoder reaches the preset stopping condition.
[0021] The second original decoder is used to reconstruct each historical running sequence to obtain the second training feature. Norm operation is performed on each historical running sequence and the second training feature to determine the second loss value of the second original decoder. The parameters of the autoencoder are adjusted based on the second loss value until the second loss value of the second original decoder reaches the preset stopping condition.
[0022] Optionally, the adversarial training of the first preliminary autoencoder and the second preliminary autoencoder includes:
[0023] In each iteration, the first preliminary autoencoder is used to reconstruct each historical running sequence to obtain a first distribution feature; the second preliminary autoencoder is used to reconstruct the first distribution feature to obtain a second distribution feature; the parameters of the first preliminary autoencoder are adjusted with the goal of minimizing the difference between the second distribution feature output by the second preliminary autoencoder and each historical running sequence; the parameters of the second preliminary autoencoder are adjusted with the goal of maximizing the difference between the first distribution feature output by the first preliminary autoencoder and each historical running sequence.
[0024] Optionally, adding the anomaly indicator generation layer to the final autoencoder to obtain the anomaly monitoring model includes:
[0025] Determine a first weight value to characterize the degree to which the reconstruction error represents the anomaly in line loss;
[0026] Determine a second weight value to characterize the degree to which minor operational anomalies characterize line loss anomalies;
[0027] Based on the first weight value and the second weight value, an anomaly indicator generation layer is added after the final autoencoder, and the anomaly monitoring model is obtained after the addition.
[0028] Optionally, the step of generating a hierarchy based on the anomaly indicators and performing line loss anomaly detection based on the first output feature and the second output feature includes:
[0029] Combining the anomaly indicator generation hierarchy, norm operations are performed on the first output feature and the operating parameter sequence to obtain a first difference. Norm operations are performed on the second output feature and the operating parameter sequence to obtain a second difference. A first product between the first difference and the first weight value is calculated. A second product between the second difference and the second weight value is calculated. The sum of the first product and the second product is calculated to obtain an anomaly indicator value. When the anomaly indicator value is higher than a preset indicator threshold, it is determined that the target transformer area has an abnormal line loss.
[0030] Optionally, determining the type of parameter used to characterize the line loss situation of the target transformer area includes:
[0031] The mutual information method is used to determine the type of parameter used to reflect the line loss rate of the target transformer area.
[0032] A transformer substation line loss detection device, comprising:
[0033] The parameter type determination module is used to determine the type of parameters used to characterize the line loss of the target transformer area;
[0034] The operation parameter sequence acquisition module is used to acquire the operation parameter sequence corresponding to the parameter type from the target station area;
[0035] An anomaly monitoring model acquisition module is used to acquire an anomaly monitoring model, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially.
[0036] The first output feature reconstruction module is used to reconstruct the running parameter sequence by combining the shared encoder and the first decoder to obtain the first output feature;
[0037] The second output feature reconstruction module is used to reconstruct the first output feature by combining the shared encoder and the second decoder to obtain the second output feature;
[0038] The line loss anomaly detection module is used to generate a hierarchy by combining the anomaly indicators and to perform line loss anomaly detection based on the first output feature and the second output feature.
[0039] A transformer substation line loss detection device includes a memory and a processor;
[0040] The memory is used to store programs;
[0041] The processor is used to execute the program to implement the various steps of the above-described transformer area line loss detection method.
[0042] A readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps of the above-described method for detecting line loss in transformer substations.
[0043] As can be seen from the above technical solutions, the transformer area line loss detection method provided in this application can determine the parameter type used to characterize the line loss situation of a target transformer area; obtain the operating parameter sequence corresponding to the parameter type from the target transformer area; based on this, this application collects parameter data that can characterize the line loss situation to form an operating parameter sequence, ensuring that the data can characterize the actual operating state of the target transformer area and reducing the impact of redundant parameters on line loss detection; by acquiring an anomaly monitoring model, the anomaly monitoring model includes an anomaly index generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially; combining the shared encoder and the first decoder, The operating parameter sequence is reconstructed to obtain a first output feature. Combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain a second output feature. This application utilizes a game-theoretic mechanism formed by adversarially trained dual decoders. When the second decoder reconstructs the first output feature, if the input operating parameter sequence contains subtle anomalies, such as minor deviations in electricity consumption due to covert electricity theft, the adversarially trained second decoder amplifies the deviation between the second output feature and the normal pattern, increasing sensitivity to abnormal fluctuations in near-normal patterns and reducing false alarms. This double reconstruction process amplifies abnormal operating fluctuations in the operating parameter sequence. Subsequently, this application can combine the anomaly index to generate a hierarchy and perform line loss anomaly detection based on the first and second output features. Based on this, this application can combine the results of the two reconstructions to identify non-technical line losses, improving the reliability of line loss detection. Therefore, this application can reduce irrelevant noise by accurately matching parameter types and target transformer area data, quantify the degree of anomaly by combining the results of the two reconstructions, avoid the one-sidedness of a single reconstruction, and ultimately achieve accurate differentiation between "normal fluctuations" and "real anomalies," reducing the false alarm rate. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0045] Figure 1 This is a flowchart of a transformer substation line loss detection method disclosed in an embodiment of this application;
[0046] Figure 2 This is a structural block diagram of a transformer substation line loss detection device disclosed in an embodiment of this application;
[0047] Figure 3 This is a hardware structure block diagram of a transformer substation line loss detection device disclosed in an embodiment of this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] This application provides a method for detecting line loss in a transformer substation. This method can be applied to various power grid monitoring systems or power grid management systems, as well as to various computer terminals or smart terminals. The executing entity can be the processor or server of the computer terminal or smart terminal.
[0050] Next, combine Figure 1 The method for detecting line loss in transformer substations as described in this application is detailed below, including the following steps:
[0051] Step S1: Determine the type of parameter used to characterize the line loss of the target transformer area.
[0052] Specifically, the types of parameters characterizing line loss can include load factor, three-phase imbalance, power factor, load shape factor, voltage drop at the beginning and end of the line, weather temperature, electricity consumption, power supply, and holidays.
[0053] Step S2: Obtain the sequence of operating parameters corresponding to the parameter type from the target station area.
[0054] Specifically, the weather temperature sequence of the target area can be obtained through the API interface of the public meteorological service platform;
[0055] The power consumption and power supply can be collected every hour. The collected data is cleaned, including removing outliers and filling in missing values using methods such as averaging or spline interpolation, to obtain the power consumption and power supply sequences.
[0056] The load factor reflects the deviation of a distribution transformer from its most economical operating range when the load factor is too high or too low. The calculation formula is as follows:
[0057]
[0058] In the formula: For the first Hourly load rate; For the first Average daily active power per hour; This refers to the rated capacity of the distribution transformer. The calculation formula is:
[0059]
[0060] In the formula: for Xiangdi Hour The active power of each point.
[0061] The line loss in the transformer substation is positively correlated with the square of the three-phase unbalance. Uneven distribution of the three-phase load leads to increased line loss. The current unbalance as defined in the national standard is used to quantify it:
[0062]
[0063] In the formula: For the first Three-phase imbalance in hours; These are the daily average currents of phases A, B, and C for that day.
[0064] The load shape factor describes the time shape of the load curve, reflecting the deviation between the root mean square and average values of the current.
[0065]
[0066] In the formula: For the first The shape factor of the hour; for Phase in Hour The instantaneous current value at each sampling point; and These are the root mean square value and the average value of the three-phase current, respectively.
[0067] A low power factor means that when transmitting the same amount of active power, the total current flowing through the line is greater, leading to a sharp increase in the line's energy loss. The formula for calculating the power factor is as follows:
[0068]
[0069] In the formula: For the first Power factor per hour; and The first Hourly average active and reactive power.
[0070] The voltage drop between the beginning and end of the line is a comprehensive reflection of the line loss level, defined as the daily average voltage difference between the power supply end of the distribution area and a typical end user:
[0071]
[0072] In the formula: For the first Hourly pressure drop at both ends; and These are the hourly average voltages of the transformer secondary side and typical end-users, respectively.
[0073] Step S3: Obtain the anomaly monitoring model.
[0074] Specifically, the anomaly monitoring model may include a shared encoder, a first decoder, a second decoder, and an anomaly indicator generation hierarchy.
[0075] The first decoder and the second decoder were trained adversarially.
[0076] Step S4: Combine the shared encoder and the first decoder to reconstruct the operating parameter sequence and obtain the first output feature.
[0077] Specifically, a shared encoder can be used to map the sequence of operating parameters to the latent space, extract the spatiotemporal coupling characteristics of the line loss scenario, obtain the latent space distribution, and use the first decoder to reconstruct the latent space distribution to obtain the first output feature.
[0078] Step S5: Combine the shared encoder and the second decoder to reconstruct the first output feature to obtain the second output feature.
[0079] Specifically, the second output features can be obtained by reconstructing the data based on the latent spatial distribution and the first output features using the second decoder.
[0080] Step S6: Generate a hierarchy by combining the abnormal indicators, and perform line loss anomaly detection based on the first output feature and the second output feature.
[0081] Specifically, anomaly indicators can be used to generate hierarchical levels, and line loss anomaly detection can be performed based on the first output feature and the second output feature to determine whether there are non-technical line losses in addition to technical line losses.
[0082] As can be seen from the above technical solutions, the transformer area line loss detection method provided in this application can determine the parameter type used to characterize the line loss situation of a target transformer area; obtain the operating parameter sequence corresponding to the parameter type from the target transformer area; based on this, this application collects parameter data that can characterize the line loss situation to form an operating parameter sequence, ensuring that the data can characterize the actual operating state of the target transformer area and reducing the impact of redundant parameters on line loss detection; by acquiring an anomaly monitoring model, the anomaly monitoring model includes an anomaly index generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially; combining the shared encoder and the first decoder, The operating parameter sequence is reconstructed to obtain a first output feature. Combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain a second output feature. This application utilizes a game-theoretic mechanism formed by adversarially trained dual decoders. When the second decoder reconstructs the first output feature, if the input operating parameter sequence contains subtle anomalies, such as minor deviations in electricity consumption due to covert electricity theft, the adversarially trained second decoder amplifies the deviation between the second output feature and the normal pattern, increasing sensitivity to abnormal fluctuations in near-normal patterns and reducing false alarms. This double reconstruction process amplifies abnormal operating fluctuations in the operating parameter sequence. Subsequently, this application can combine the anomaly index to generate a hierarchy and perform line loss anomaly detection based on the first and second output features. Based on this, this application can combine the results of the two reconstructions to identify non-technical line losses, improving the reliability of line loss detection. Therefore, this application can reduce irrelevant noise by accurately matching parameter types and target transformer area data, quantify the degree of anomaly by combining the results of the two reconstructions, avoid the one-sidedness of a single reconstruction, and ultimately achieve accurate differentiation between "normal fluctuations" and "real anomalies," reducing the false alarm rate. This application overcomes the limitations of univariate analysis by deeply integrating power engineering experience into feature engineering, constructing a multi-dimensional scenario feature system that includes key indicators such as load factor, three-phase imbalance, and power factor. This aims to enable the model to accurately characterize the boundary between normal and abnormal modes at the physical level, rather than purely at the numerical level. Through scenario segmentation and multivariate time-series modeling, traditional line loss time-series anomaly detection is reconstructed into an anomaly identification problem for daily operational scenarios, eliminating the strong dependence on distribution network topology parameters and load distribution data, and achieving universal detection capabilities across distribution transformer areas.
[0083] In some embodiments of this application, the process of step S1, determining the parameter type used to characterize the line loss of the target transformer area, is described in detail below:
[0084] S10. Use the mutual information method to determine the type of parameter used to reflect the line loss rate of the target transformer area.
[0085] Specifically, various characteristic parameters such as three-phase voltage, three-phase current, load rate, three-phase unbalance, power factor, load shape factor, voltage drop at the beginning and end, weather temperature, electricity consumption, power supply and holidays are all related to the line loss of the transformer area.
[0086] Considering that different features contribute differently to the line loss rate, and that there is information redundancy among features, directly using all features as input to the model would not only increase the computational burden on the subsequent anomaly detection model, but also potentially introduce noise interference, affecting the model's learning accuracy of key patterns in normal scenarios.
[0087] Therefore, this application introduces the mutual information method to select parameter types that can characterize the line loss of the target transformer area from various characteristic parameters.
[0088] The parameter values of each characteristic parameter at each hour can be combined to form a characteristic index matrix, and the line loss rate at each hour can be combined to form a line loss sequence.
[0089] The feature index matrix and the line loss sequence are linearly mapped to the interval [0,1].
[0090] Mutual information is used to measure the amount of information contained in one random variable about another. For any given characteristic sequence... and line loss rate sequence The mutual information values between them The calculation formula is as follows:
[0091]
[0092] In the formula: yes and The joint probability density function; and They are and The marginal probability density function. In practical calculations, numerical methods such as estimation based on k-nearest neighbors are usually used to calculate the mutual information value of continuous variables. The larger the value, the more characteristic it indicates. With line loss rate The stronger the statistical correlation, the more information that feature contains about the changes in line loss rate. The mutual information values between each feature parameter and the line loss rate are calculated sequentially to obtain a correlation degree vector that quantifies the importance of each feature.
[0093] The average value of the mutual information of each characteristic parameter can be calculated. When the mutual information value of each characteristic parameter exceeds the average value, the characteristic parameter is used as the parameter type to characterize the line loss of the target transformer area.
[0094] As can be seen from the above technical solution, this embodiment provides an optional method for determining the parameter type used to characterize the line loss of a target transformer area. This method introduces mutual information to reduce the dimensionality and "purify" the feature system, quantitatively selecting the core feature subset with the strongest nonlinear correlation to line loss changes. This aims to eliminate information redundancy, strengthen effective signals, and provide an optimal input with high signal-to-noise ratio and low complexity for subsequent unsupervised detection models, thereby improving the sensitivity and accuracy of detection.
[0095] In some embodiments of this application, the process of obtaining the anomaly monitoring model in step S3 is described in detail, and the steps are as follows:
[0096] S30. Collect multiple historical operation sequences that match the parameter type from the target station area.
[0097] Specifically, it can collect historical operating sequences under multiple normal line loss scenarios.
[0098] The cycle for each normal line loss scenario can be the same, such as one day. In this case, the parameter values of each parameter type for each hour within the same day can be combined to form the historical operation sequence of the corresponding normal line loss scenario.
[0099] By combining the various historical execution sequences, we can obtain the scene library W.
[0100] S31. Construct an autoencoder containing a raw encoder, a first raw decoder, and a second raw decoder.
[0101] Specifically, pre-trained autoencoders can be generated.
[0102] S32. With the goal of minimizing the scene reconstruction error of the autoencoder, the autoencoder is initially trained using various historical running sequences.
[0103] Specifically, the initial training objective can be to establish a baseline feature representation of the line loss scenario in the transformer area, and the autoencoder can be trained using a scenario library.
[0104] S33. Perform adversarial training on the first preliminary autoencoder and the second preliminary autoencoder until the number of iterations reaches the preset iteration threshold.
[0105] Specifically, after the autoencoder has achieved the initial training objective, adversarial training can be performed on the first and second initial autoencoders until the number of iterations reaches a preset iteration threshold.
[0106] The iteration threshold can be adjusted based on the training progress of adversarial training.
[0107] The first preliminary autoencoder may consist of a preliminary trained primitive encoder and a preliminary trained first primitive decoder.
[0108] The second preliminary autoencoder may consist of a preliminary trained original encoder and a preliminary trained second original decoder.
[0109] S34. Add the anomaly indicator generation level to the final autoencoder to obtain the anomaly monitoring model.
[0110] Specifically, an anomaly indicator generation hierarchy can be generated, and an anomaly indicator generation hierarchy can be added after the autoencoder to obtain an anomaly monitoring model.
[0111] As can be seen from the above technical solution, this embodiment provides an optional method for training an anomaly monitoring model. This method, through the design of an unsupervised adversarial training framework, can complete model training using only massive amounts of easily obtainable normal line loss scenario data, fundamentally avoiding dependence on scarce and expensive labeled anomaly samples and solving the data bottleneck problem. Through this method, on the one hand, this application, through a dual autoencoder structure with a shared encoder, achieves efficient learning of normal scenario features, avoiding pattern collapse and non-convergence problems in model training with time-series data of transformer line loss; on the other hand, this application introduces game theory, enabling the model to identify subtle anomaly patterns and improve the detection sensitivity for near-normal anomalies (such as periodic electricity theft and hidden equipment faults).
[0112] In some embodiments of this application, step S32, which involves preliminary training of the autoencoder using various historical running sequences with the goal of minimizing the scene reconstruction error of the autoencoder, is described in detail below:
[0113] S320. Reconstruct each historical running sequence using the first original decoder to obtain the first training feature. Perform norm operation on each historical running sequence and the first training feature to determine the first loss value of the first original decoder. Adjust the parameters of the autoencoder based on the first loss value until the first loss value of the first original decoder reaches the preset stopping condition.
[0114] Specifically, the scene library W can be mapped to the latent space using the original encoder, and the features mapped to the latent space can be reconstructed using the first original decoder to restore the original scene. The first loss value of the first original decoder can be determined using the first reconstruction error calculation function, and the parameters of the autoencoder can be adjusted based on the first loss value using the gradient descent method until the first loss value is minimized.
[0115] The first reconstruction error calculation function is shown below:
[0116]
[0117] In the formula: L AE1 AE1 is the first loss value; AE1 is the first preliminary autoencoder. It is an L2 norm.
[0118] S321. Reconstruct each historical running sequence using the second original decoder to obtain the second training feature. Perform norm operation on each historical running sequence and the second training feature to determine the second loss value of the second original decoder. Adjust the parameters of the autoencoder based on the second loss value until the second loss value of the second original decoder reaches the preset stopping condition.
[0119] Specifically, the scene library W can be mapped to the latent space using the original encoder, and the features mapped to the latent space can be reconstructed using the second original decoder to restore the original scene. The second loss value of the second original decoder can be determined using the second reconstruction error calculation function, and the parameters of the autoencoder can be adjusted based on the second loss value using the gradient descent method until the second loss value is minimized.
[0120] The second reconstruction error calculation function is shown below:
[0121]
[0122] In the formula: L AE2 AE2 is the second loss value; AE2 is the second preliminary autoencoder.
[0123] As can be seen from the above technical solution, this embodiment provides an optional method for preliminary training. By using the above method, the first original decoder and the second original decoder are trained on the same target respectively, so that the two decoders can learn the baseline feature representation of the normal line loss scenario of the transformer area.
[0124] In some embodiments of this application, the process of performing adversarial training on the first preliminary autoencoder and the second preliminary autoencoder in step S33 is described in detail, and the steps are as follows:
[0125] S330. In each iteration, the first preliminary autoencoder is used to reconstruct each historical running sequence to obtain a first distribution feature; the second preliminary autoencoder is used to reconstruct the first distribution feature to obtain a second distribution feature; the parameters of the first preliminary autoencoder are adjusted with the goal of minimizing the difference between the second distribution feature output by the second preliminary autoencoder and each historical running sequence; the parameters of the second preliminary autoencoder are adjusted with the goal of maximizing the difference between the first distribution feature output by the first preliminary autoencoder and each historical running sequence.
[0126] Specifically, the training objective of the first preliminary autoencoder is to minimize the difference between the second distribution feature output by the second preliminary autoencoder and each historical running sequence, so that the second preliminary autoencoder generates a second distribution feature that approximates the normal line loss scenario.
[0127] The training objective of the second preliminary autoencoder is to maximize the difference between the first distribution feature output by the first preliminary autoencoder and each historical running sequence, so that the first preliminary autoencoder can transform unconventional fluctuations into detectable difference signals through backpropagation.
[0128] Therefore, the loss function can be:
[0129]
[0130]
[0131] In the formula: n is the number of iterations.
[0132] As can be seen from the above technical solution, this embodiment provides an optional method for adversarial training of a first preliminary autoencoder and a second preliminary autoencoder. The above method can further improve the sensitivity and accuracy of non-technical line loss identification in this application.
[0133] In some embodiments of this application, the process of step S34, adding the anomaly indicator generation level to the final autoencoder to obtain the anomaly monitoring model, is described in detail as follows:
[0134] S340. Determine the first weight value used to characterize the degree to which the reconstruction error characterizes the anomaly of line loss.
[0135] Specifically, the sum of the first weight value and the second weight value is 1.
[0136] The values of the first and second weights can be adjusted according to different usage scenarios.
[0137] For example, in high-reliability line loss monitoring such as metering equipment fault detection, the reconstruction error can be amplified so that the first weight value is greater than the second weight value.
[0138] S341. Determine a second weight value to characterize the degree to which minor operational anomalies characterize line loss anomalies.
[0139] Specifically, when the sensitivity to non-technical line loss is high, the second weight value can be increased to make the second weight value greater than the first weight value.
[0140] S342. Based on the first weight value and the second weight value, an anomaly indicator generation level is added after the final autoencoder to obtain the anomaly monitoring model.
[0141] Specifically, the first weight value and the second weight value can be combined to construct an anomaly indicator generation layer after the output layer of the final autoencoder, thus obtaining an anomaly monitoring model.
[0142] As can be seen from the above technical solution, this embodiment provides an optional way to generate an anomaly monitoring model. The above method can add an anomaly indicator generation model after the autoencoder has been trained twice. Only the autoencoder that needs to be iterated needs to be trained, and there is no need to train the anomaly indicator generation layer, which can effectively accelerate the training process.
[0143] In some embodiments of this application, the process of step S6, generating a hierarchy based on the anomaly indicators, and performing line loss anomaly detection based on the first output feature and the second output feature, is described in detail below:
[0144] S60. Combining the abnormal indicator generation hierarchy, perform norm operation on the first output feature and the operating parameter sequence to obtain a first difference; perform norm operation on the second output feature and the operating parameter sequence to obtain a second difference; calculate the first product between the first difference and the first weight value; calculate the second product between the second difference and the second weight value; calculate the sum of the first product and the second product to obtain an abnormal indicator value; when the abnormal indicator value is higher than a preset indicator threshold, determine that the target transformer area has an abnormal line loss.
[0145] Specifically, the abnormal indicator value can be calculated using the dual-path anomaly calculation function.
[0146] The dual-path anomaly calculation function can be:
[0147]
[0148] In the formula, This is the first weight value; This is the second weight value; For the sequence of running parameters; This is an abnormal indicator value.
[0149] If the abnormal indicator value is not higher than the indicator threshold, it is determined that there is no abnormal line loss in the target transformer area.
[0150] As can be seen from the above technical solution, this embodiment provides an optional method for detecting line loss anomalies by combining the anomaly indicator generation level and based on the first output feature and the second output feature. Through the above method, the anomaly judgment label can be directly output by comparing the scene difference quantification and adaptive threshold, eliminating the inefficient link of secondary screening by manual rules, realizing end-to-end automated detection, and meeting the engineering requirements of real-time monitoring of line loss in transformer areas.
[0151] Next, we will combine Figure 2 The transformer area line loss detection device provided in this application is described in detail. The transformer area line loss detection device described below can be compared with the transformer area line loss detection method described above.
[0152] See Figure 2 It can be observed that the transformer area line loss detection device may include:
[0153] The parameter type determination module 10 is used to determine the parameter type used to characterize the line loss of the target transformer area;
[0154] The operation parameter sequence acquisition module 20 is used to acquire the operation parameter sequence corresponding to the parameter type from the target station area;
[0155] An anomaly monitoring model acquisition module 30 is used to acquire an anomaly monitoring model, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially.
[0156] The first output feature reconstruction module 40 is used to reconstruct the running parameter sequence by combining the shared encoder and the first decoder to obtain the first output feature;
[0157] The second output feature reconstruction module 50 is used to reconstruct the first output feature by combining the shared encoder and the second decoder to obtain the second output feature;
[0158] The line loss anomaly detection module 60 is used to generate a hierarchy by combining the anomaly indicators and to perform line loss anomaly detection based on the first output feature and the second output feature.
[0159] Furthermore, the parameter type determination module 10 may include:
[0160] The mutual information method uses units to determine the parameter types that reflect the line loss rate of the target transformer area.
[0161] Furthermore, the anomaly monitoring model acquisition module 30 may include:
[0162] The historical operation sequence acquisition unit is used to acquire multiple historical operation sequences that match the parameter type from the target station area;
[0163] The autoencoder building unit is used to build an autoencoder containing a raw encoder, a first raw decoder, and a second raw decoder.
[0164] The autoencoder preliminary training unit is used to perform preliminary training on the autoencoder using various historical running sequences with the goal of minimizing the scene reconstruction error of the autoencoder.
[0165] The autoencoder adversarial training unit is used to perform adversarial training on the first preliminary autoencoder and the second preliminary autoencoder until the number of iterations reaches a preset iteration threshold. The first preliminary autoencoder consists of a pre-trained original encoder and a pre-trained first original decoder, and the second preliminary autoencoder consists of a pre-trained original encoder and a pre-trained second original decoder.
[0166] An anomaly monitoring model construction unit is used to add the anomaly indicator generation level to the final autoencoder to obtain the anomaly monitoring model.
[0167] Furthermore, the initial training unit of the autoencoder may include:
[0168] The first autoencoder preliminary training subunit is used to reconstruct each historical running sequence using the first original decoder to obtain the first training feature, perform norm operation on each historical running sequence and the first training feature to determine the first loss value of the first original decoder, and adjust the parameters of the autoencoder based on the first loss value until the first loss value of the first original decoder reaches the preset stopping condition.
[0169] The second autoencoder preliminary training subunit is used to reconstruct each historical running sequence using the second original decoder to obtain the second training feature, perform norm operation on each historical running sequence and the second training feature to determine the second loss value of the second original decoder, and adjust the parameters of the autoencoder based on the second loss value until the second loss value of the second original decoder reaches the preset stopping condition.
[0170] Furthermore, the autoencoder adversarial training unit may include:
[0171] The parameter adjustment subunit is used to reconstruct each historical running sequence using the first preliminary autoencoder to obtain a first distribution feature during each iteration; reconstruct the first distribution feature using the second preliminary autoencoder to obtain a second distribution feature; adjust the parameters of the first preliminary autoencoder with the goal of minimizing the difference between the second distribution feature output by the second preliminary autoencoder and each historical running sequence; and adjust the parameters of the second preliminary autoencoder with the goal of maximizing the difference between the first distribution feature output by the first preliminary autoencoder and each historical running sequence.
[0172] Furthermore, the anomaly monitoring model building unit may include:
[0173] The first anomaly monitoring model construction subunit is used to determine the first weight value used to characterize the degree of reconstruction error on the anomaly characterization of line loss;
[0174] The second anomaly monitoring model construction subunit is used to determine the second weight value used to characterize the degree of characterization of minor operational anomalies on line loss anomalies.
[0175] The third anomaly monitoring model construction subunit is used to add an anomaly indicator generation level after the final autoencoder based on the first weight value and the second weight value, and the anomaly monitoring model is obtained after the addition.
[0176] Furthermore, the line loss anomaly detection module 60 may include:
[0177] An abnormal indicator value calculation unit is used to combine the abnormal indicator generation level, perform norm operation on the first output feature and the operating parameter sequence to obtain a first difference, perform norm operation on the second output feature and the operating parameter sequence to obtain a second difference, calculate a first product between the first difference and the first weight value, calculate a second product between the second difference and the second weight value, calculate the sum of the first product and the second product to obtain an abnormal indicator value, and determine that the target area has an abnormal line loss when the abnormal indicator value is higher than a preset indicator threshold.
[0178] The transformer substation line loss detection device provided in this application embodiment can be applied to transformer substation line loss detection equipment, such as PC terminals, cloud platforms, servers, and server clusters. Optionally, Figure 3 The hardware structure block diagram of the transformer area line loss detection equipment is shown. (Refer to...) Figure 3 The hardware structure of the transformer area line loss detection equipment may include: at least one processor 1, at least one communication interface 2, at least one memory 3, and at least one communication bus 4;
[0179] In this embodiment, the number of processor 1, communication interface 2, memory 3, and communication bus 4 is at least one, and processor 1, communication interface 2, and memory 3 communicate with each other through communication bus 4.
[0180] Processor 1 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement embodiments of the present invention.
[0181] Memory 3 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device;
[0182] The memory stores a program, which the processor can call. The program is used for:
[0183] Determine the type of parameters used to characterize the line loss situation of the target transformer area;
[0184] Obtain the sequence of operating parameters corresponding to the parameter type from the target station area;
[0185] An anomaly detection model is obtained, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially.
[0186] By combining the shared encoder and the first decoder, the sequence of operating parameters is reconstructed to obtain the first output feature;
[0187] By combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain the second output feature;
[0188] The abnormal indicators are combined to generate a hierarchy, and line loss anomaly detection is performed based on the first output feature and the second output feature.
[0189] Optionally, the refined and extended functions of the program can be referred to the above description.
[0190] This application embodiment also provides a readable storage medium that can store a program suitable for execution by a processor, the program being used for:
[0191] Determine the type of parameters used to characterize the line loss situation of the target transformer area;
[0192] Obtain the sequence of operating parameters corresponding to the parameter type from the target station area;
[0193] An anomaly detection model is obtained, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially.
[0194] By combining the shared encoder and the first decoder, the sequence of operating parameters is reconstructed to obtain the first output feature;
[0195] By combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain the second output feature;
[0196] The abnormal indicators are combined to generate a hierarchy, and line loss anomaly detection is performed based on the first output feature and the second output feature.
[0197] Optionally, the refined and extended functions of the program can be referred to the above description.
[0198] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such 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 said element.
[0199] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0200] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. The various embodiments of this application can be combined with each other. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for detecting line loss in a transformer substation, characterized in that, include: Determine the type of parameters used to characterize the line loss situation of the target transformer area; Obtain the sequence of operating parameters corresponding to the parameter type from the target station area; An anomaly detection model is obtained, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially. By combining the shared encoder and the first decoder, the sequence of operating parameters is reconstructed to obtain the first output feature; By combining the shared encoder and the second decoder, the first output feature is reconstructed to obtain the second output feature; The abnormal indicators are combined to generate a hierarchy, and line loss anomaly detection is performed based on the first output feature and the second output feature.
2. The method for detecting line loss in a transformer substation according to claim 1, characterized in that, The method for acquiring the anomaly monitoring model includes: Collect multiple historical operation sequences that match the parameter type from the target station area; Construct an autoencoder containing a raw encoder, a first raw decoder, and a second raw decoder; With the goal of minimizing the scene reconstruction error of the autoencoder, the autoencoder is initially trained using various historical running sequences; Adversarial training is performed on the first preliminary autoencoder and the second preliminary autoencoder until the number of iterations reaches a preset iteration threshold. The first preliminary autoencoder consists of a pre-trained original encoder and a pre-trained first original decoder, and the second preliminary autoencoder consists of a pre-trained original encoder and a pre-trained second original decoder. The anomaly indicator generation level is added to the final autoencoder to obtain the anomaly monitoring model.
3. The method for detecting line loss in transformer substations according to claim 2, characterized in that, The step of initially training the autoencoder using various historical running sequences, with the goal of minimizing the scene reconstruction error, includes: The first original decoder is used to reconstruct each historical running sequence to obtain the first training feature. Norm operation is performed on each historical running sequence and the first training feature to determine the first loss value of the first original decoder. The parameters of the autoencoder are adjusted based on the first loss value until the first loss value of the first original decoder reaches the preset stopping condition. The second original decoder is used to reconstruct each historical running sequence to obtain the second training feature. Norm operation is performed on each historical running sequence and the second training feature to determine the second loss value of the second original decoder. The parameters of the autoencoder are adjusted based on the second loss value until the second loss value of the second original decoder reaches the preset stopping condition.
4. The method for detecting line loss in transformer substations according to claim 2, characterized in that, The adversarial training of the first preliminary autoencoder and the second preliminary autoencoder includes: In each iteration, the first preliminary autoencoder is used to reconstruct each historical running sequence to obtain a first distribution feature; the second preliminary autoencoder is used to reconstruct the first distribution feature to obtain a second distribution feature; the parameters of the first preliminary autoencoder are adjusted with the goal of minimizing the difference between the second distribution feature output by the second preliminary autoencoder and each historical running sequence; the parameters of the second preliminary autoencoder are adjusted with the goal of maximizing the difference between the first distribution feature output by the first preliminary autoencoder and each historical running sequence.
5. The method for detecting line loss in a transformer substation according to claim 2, characterized in that, The step of adding the anomaly indicator generation layer to the final autoencoder to obtain the anomaly monitoring model includes: Determine a first weight value to characterize the degree to which the reconstruction error represents the anomaly in line loss; Determine a second weight value to characterize the degree to which minor operational anomalies characterize line loss anomalies; Based on the first weight value and the second weight value, an anomaly indicator generation layer is added after the final autoencoder, and the anomaly monitoring model is obtained after the addition.
6. The method for detecting line loss in a transformer substation according to claim 5, characterized in that, The step of generating a hierarchy based on the anomaly indicators and performing line loss anomaly detection based on the first output feature and the second output feature includes: Combining the anomaly indicator generation hierarchy, norm operations are performed on the first output feature and the operating parameter sequence to obtain a first difference. Norm operations are performed on the second output feature and the operating parameter sequence to obtain a second difference. A first product between the first difference and the first weight value is calculated. A second product between the second difference and the second weight value is calculated. The sum of the first product and the second product is calculated to obtain an anomaly indicator value. When the anomaly indicator value is higher than a preset indicator threshold, it is determined that the target transformer area has an abnormal line loss.
7. The method for detecting line loss in transformer substations according to any one of claims 1-6, characterized in that, The method for determining the types of parameters used to characterize the line loss of the target transformer area includes: The mutual information method is used to determine the type of parameter used to reflect the line loss rate of the target transformer area.
8. A transformer substation line loss detection device, characterized in that, include: The parameter type determination module is used to determine the type of parameters used to characterize the line loss of the target transformer area; The operation parameter sequence acquisition module is used to acquire the operation parameter sequence corresponding to the parameter type from the target station area; An anomaly monitoring model acquisition module is used to acquire an anomaly monitoring model, which includes an anomaly indicator generation hierarchy, a shared encoder, and a first decoder and a second decoder trained adversarially. The first output feature reconstruction module is used to reconstruct the running parameter sequence by combining the shared encoder and the first decoder to obtain the first output feature; The second output feature reconstruction module is used to reconstruct the first output feature by combining the shared encoder and the second decoder to obtain the second output feature; The line loss anomaly detection module is used to generate a hierarchy by combining the anomaly indicators and to perform line loss anomaly detection based on the first output feature and the second output feature.
9. A transformer substation line loss detection device, characterized in that, Including memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the transformer area line loss detection method as described in any one of claims 1-7.
10. A readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements each step of the transformer area line loss detection method as described in any one of claims 1-7.