Load data cleaning method and device for novel power system power distribution network

By constructing a Transformer model that integrates hierarchical dilated convolution and multi-branch attention, along with a conditional fractional diffusion model, the problem of missing and anomaly data in distribution networks in new power systems was solved. This enabled efficient data cleaning and imputation, improving the integrity and quality of the data.

CN121958748APending Publication Date: 2026-05-01STATE GRID HEBEI ELECTRIC POWER RES INST +1
View PDF 0 Cites 1 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
STATE GRID HEBEI ELECTRIC POWER RES INST
Filing Date
2025-11-28
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Traditional power grid data cleaning techniques are not suitable for cleaning multi-source big data in new power systems. They suffer from data anomalies and missing data, and are susceptible to noise interference during data transmission, leading to data instability.

Method used

A model that integrates hierarchical dilated convolution and multi-branch attention Transformer is used to extract features and perform single-step temporal prediction on the payload data. A conditional score diffusion model is used to identify and impute missing and outlier values. Self-supervised training is used to improve data integrity.

Benefits of technology

It enables efficient detection of missing data and identification of anomalies in the distribution network load data of new power systems, improves the integrity and quality of data, and adapts to the complexity and time-varying nature of multi-source load data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958748A_ABST
    Figure CN121958748A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a load data cleaning method and device for a novel power system power distribution network. The method comprises the following steps: obtaining multivariate time sequence load data; the method comprises the following steps: constructing a model fusing hierarchical expansion convolution and a multi-branch attention Transform; performing single-step time sequence prediction on the target monitoring column, and outputting a predicted value and a residual error; carrying out combined judgment on missing values and abnormal values; constructing a conditional fraction diffusion model; introducing self-supervised training and two-dimensional feature fusion; in the conditional diffusion reverse process, random noise is gradually denoised into a filling value conforming to real distribution. According to the method, multi-source load data can be fused, through combination of time sequence feature analysis and deep learning, missing detection, anomaly recognition and adaptive judgment of novel power system power distribution network user load data containing charging stations and distributed photovoltaics are realized, and finally missing data and abnormal data are filled through a conditional score diffusion model. And the completeness and quality of the user load data of the novel active power distribution network are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of power system technology, and in particular to a method for cleaning load data of distribution networks in new power systems. Background Technology

[0002] With the continuous development of new power systems, distribution networks are transforming from traditional distribution networks to active distribution networks that include a large number of distributed generation systems and new loads. Due to the numerous and widespread locations of distributed generation systems and new loads, their complex operating scenarios, and their strong randomness and time-varying nature, distribution network data exhibits characteristics such as multi-source heterogeneity, data dispersion, large scale, rapid changes, and diverse types. Simultaneously, the actual operating environment of the distribution network is constantly changing, and data transmission is subject to various uncertain noise interferences. In the actual measurement environment, the instability of the distribution system itself can cause sudden load changes, and the lack of measurement equipment in the distribution network leads to anomalies and missing load data. Traditional distribution network data cleaning techniques are no longer suitable for cleaning the multi-source big data of new power system distribution networks, and thus have certain limitations.

[0003] Therefore, a better solution is urgently needed. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a method for cleaning load data in a new type of power system distribution network. One or more embodiments of this specification also relate to a device for cleaning load data in a new type of power system distribution network, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a method for cleaning load data in a novel power system distribution network is provided, comprising: Obtain multivariate time series data containing time column, load column and external feature column, perform numerical mapping on text-type external features, and normalize the load column and external feature column respectively to form a feature matrix; A model integrating hierarchical dilated convolution and multi-branch attention Transformer is constructed. The model is trained with the feature matrix as input to achieve single-step temporal prediction of the target monitoring column and output the predicted value and residual. Based on hour-week-month three-dimensional time series grouping, the median and median absolute deviation of the residuals within each group are calculated. The residuals are converted into standardized outlier scores through seasonal normalization. The outlier threshold of each time series group is determined by extreme value theory. Combined with long missing value detection rules and short missing value detection rules, the joint determination of missing values ​​and outliers is realized. Missing values ​​and outliers are treated as missing values. Based on the conditional score diffusion model, self-supervised training is introduced. Random noise is gradually denoised into imputed values ​​that conform to the true distribution through the conditional diffusion reverse process. The model's ability to capture the periodicity of time series and multi-feature dependencies is improved by two-dimensional feature fusion.

[0006] In one possible implementation, obtaining multivariate time series data includes: Acquire user load data with time series and external feature dataset, perform numerical mapping on text-based external features to form an input external feature matrix; Missing segments are identified in the load column. The length of consecutive missing segments is counted. If the length of consecutive missing segments is greater than or equal to 12 hours, it is marked as a long missing segment. If the length of consecutive missing segments is less than 12 hours, it is marked as a short missing segment. The remaining time periods are non-missing segments. Different training weights are set for different time periods. The load column and the external feature matrix are normalized respectively to obtain the normalized load column and the normalized external feature matrix; The normalized load column, the normalized external feature matrix, and the missing marker are aligned by time to form the feature matrix.

[0007] One possible implementation involves constructing a model that integrates hierarchical dilated convolutions and multi-branch attention Transformers, including: Construct sliding window samples from the feature matrix, set the window length, form a model input sequence block for each time point, and predict the target quantity at the next time point; The input sequence block is linearly up-dimensional to the latent space dimension, and local to central dependencies are extracted through multi-scale hierarchical dilated convolution. The output channels are then concatenated. The concatenated output is fed into a multi-branch attention block, which includes a multi-head attention branch, a globally learnable attention branch, and a local convolutional domain enhancement branch. The three branch outputs are concatenated and linearly fused in the channel dimension. The output is then processed by the residual and feedforward network to form the Transformer block output. The last token is taken as the representation, and a one-step prediction is obtained through linear decoding. The model is trained using weighted root mean square error, and the absolute residuals are preserved.

[0008] In one possible implementation, the joint determination of missing values ​​and outliers includes: The absolute residuals are grouped according to the hour-week-month of the timestamp, and the median and median absolute deviation are calculated for the residual set in each group; Normalize each group to obtain a standardized outlier score; For each group, a threshold is set using extreme value theory. When the standardized outlier score exceeds the threshold, it is judged as an outlier. Combined with the missing segment identification rule, if it is a long missing segment, it is directly judged as an abnormal missing segment. If it is a short missing segment, a prediction rationality check is performed for judgment.

[0009] In one possible implementation, filling based on a conditional fractional diffusion model includes: Missing values ​​and outliers are marked as missing, a missing mask is generated, and the load column and exogenous feature column that need to be filled are normalized to form the observation matrix of the multivariate time series. Training samples are constructed using a sliding window method. The window length and step size are set, and the time series dataset is split by sliding window to generate a sample set. A conditional fractional diffusion model is constructed. Its forward diffusion process uses a Markov chain that gradually adds Gaussian noise to the target sequence to transform the original sequence into a sequence of approximately random noise. The backward diffusion process uses a conditional denoising network to gradually generate a filled sequence that conforms to the true distribution from the noise. Observations are introduced as conditions in the process. A self-supervised masking mechanism is introduced to generate a target mask and a condition mask for each window, and the target and condition are mixed at time t to construct the input; A conditional noise prediction network is introduced to guide the inverse diffusion generation process. The conditional noise prediction network includes an input coding layer, a time-step embedding layer, a residual dilated convolutional layer, a two-dimensional attention enhancement module, and an output fusion layer. Given conditional observations and the imputation target, noise is added to the target part for sampling according to the forward process. Training is performed by minimizing the loss function. In the inference stage, all real observations are used as conditions, the target region is empty, and imputation values ​​are generated step by step according to the reverse process.

[0010] In one possible implementation, the multi-branch attention block includes: Multi-head attention branches are expanded in a multi-head manner using scaled dot product attention. Globally learnable attention branches use learnable alignment matrices; Local convolutional neighborhood enhancement branches utilize convolution operations; The three branch outputs are spliced ​​together and linearly fused in the channel dimension.

[0011] In one possible implementation, the conditional noise prediction network includes: The input coding layer concatenates the noisy target, the observation, and the mask, and then performs one-dimensional convolution to increase the dimension. The time-step embedding layer performs sinusoidal encoding on the diffusion step, and obtains the time feature vector through MLP projection, which is then injected as the modulation signal. The residual dilated convolution module consists of several layers of dilated convolution modules connected in series. Each layer uses the dilation rate to perform multi-scale temporal modeling and incorporates two-dimensional attention, including temporal attention and feature attention. The output fusion module aggregates all skip connections and finally outputs noise via convolution.

[0012] According to a second aspect of the embodiments of this specification, a novel power system distribution network load data cleaning device is provided, comprising: The data acquisition module is configured to acquire multivariate time series data containing time columns, load columns, and external feature columns, perform numerical mapping on text-type external features, and normalize the load columns and external feature columns respectively to form a feature matrix. The model building module is configured to build a model that integrates hierarchical dilated convolution and multi-branch attention Transformer. The model is trained with the feature matrix as input to achieve single-step temporal prediction of the target monitoring column and output the predicted value and residual. The anomaly detection module is configured to calculate the median and median absolute deviation of the residuals within each group based on hour-week-month three-dimensional time series grouping, convert the residuals into standardized anomaly scores through seasonal normalization, determine the anomaly threshold of each time series group using extreme value theory, and combine long missing value detection rules and short missing value detection rules to achieve joint detection of missing values ​​and anomalies. The data imputation module is configured to treat the missing values ​​and outliers as missing values. Based on the conditional score diffusion model, it introduces self-supervised training and gradually denoises random noise into imputation values ​​that conform to the true distribution through the conditional diffusion reverse process. It also improves the model's ability to capture the periodicity of time series and multi-feature dependencies through two-dimensional feature fusion.

[0013] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the above-described method for cleaning load data of power distribution networks in new power systems.

[0014] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the above-described method for cleaning load data of a novel power system distribution network.

[0015] According to a fifth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is instructed to perform the steps of the above-described method for cleaning load data of a new type of power system distribution network.

[0016] This specification provides a method and apparatus for cleaning load data in distribution networks of new power systems. The method includes: acquiring multivariate time-series load data; constructing a model that integrates hierarchical dilated convolution and multi-branch attention Transformer; performing single-step time-series prediction on the target monitoring column and outputting the predicted value and residual; jointly determining missing and outlier values; constructing a conditional fractional diffusion model; introducing self-supervised training and two-dimensional feature fusion; and using a conditional diffusion reverse process to gradually denoise random noise into imputed values ​​that conform to the true distribution. This method enables the fusion of multi-source load data, combined with time-series feature analysis and deep learning, to achieve missing data detection, anomaly identification, and adaptive determination of user load data in distribution networks of new power systems including charging stations and distributed photovoltaics. Finally, the conditional fractional diffusion model is used to impute missing and outlier data, improving the completeness and quality of user load data in new active distribution networks. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a novel power system distribution network load data cleaning method provided in one embodiment of this specification. Figure 2 This is a network structure diagram of a multi-head attention method for cleaning load data in a new type of power system distribution network, provided by one embodiment of this specification. Figure 3 This is a network structure diagram of conditional fraction diffusion for a novel power system distribution network load data cleaning method provided in one embodiment of this specification; Figure 4 This is a schematic diagram of the structure of a novel power system distribution network load data cleaning device provided in one embodiment of this specification; Figure 5 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0018] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0019] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.

[0020] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0021] This specification provides a method for cleaning load data in a new type of power system distribution network. It also relates to a device for cleaning load data in a new type of power system distribution network, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.

[0022] See Figure 1 , Figure 1 A flowchart is shown of a novel power system distribution network load data cleaning method according to an embodiment of this specification, which specifically includes the following steps.

[0023] Step 101: Obtain multivariate time series data containing time column, load column and external feature column, perform numerical mapping on text-type external features, and normalize the load column and external feature column respectively to form a feature matrix.

[0024] In one possible implementation, acquiring multivariate time-series data includes: acquiring user load data and external feature datasets with time series characteristics; performing numerical mapping on textual external features to form an input external feature matrix; identifying missing segments in the load column, counting the length of consecutive missing segments, marking segments as long missing segments if the length is greater than or equal to 12 hours, and marking segments as short missing segments if the length is less than 12 hours, with other time periods being non-missing segments, and setting different training weights for different time periods; normalizing the load column and the external feature matrix to obtain normalized load columns and normalized external feature matrices; and aligning the normalized load columns, normalized external feature matrices, and missing segment markers by time to form a feature matrix.

[0025] In practical applications, user load data with time series is acquired. and external feature datasets Numerical mapping is performed on textual external features to form an input external feature matrix. , External characteristic number; The load data consists of user load data from a specific community that includes charging piles and distributed generation. The time precision is 1 hour and the time length is 1 year. The external feature data includes precipitation, temperature, 10m wind speed, relative humidity, sunshine duration within 1 hour, irradiance, and weekday / restday. The text-type external feature: weekday / restday is numerically mapped, with weekdays mapped to the number 1 and restdays mapped to the number 0.

[0026] Identify missing segments in the load column and count the length of consecutive missing segments. If the length of consecutive missing segments is... 12h, marked as a long missing segment; if the consecutive missing length The first 12 hours are marked as short missing segments; the remaining time periods are non-missing segments; different training weights are assigned to different time periods. :

[0027] For the load column respectively With external feature matrix Normalization is performed to obtain and ; Normalized load column Normalized external feature matrix and missing markers Aligned by time, forming a feature matrix:

[0028] In the formula, The length of the time series. The number of channel dimensions.

[0029] Step 102: Construct a model that integrates hierarchical dilated convolution and multi-branch attention Transformer. Using the feature matrix as input, train the model to achieve single-step temporal prediction of the target monitoring column and output the predicted value and residual.

[0030] In one possible implementation, constructing a model that integrates hierarchical dilated convolution and multi-branch attention Transformer includes: constructing sliding window samples for the feature matrix, setting the window length, forming a model input sequence block for each time point, and predicting the target quantity at the next time step; linearly upscaling the input sequence block to the latent space dimension, extracting local to central dependencies through multi-scale hierarchical dilated convolution, and concatenating the output channels; feeding the concatenated output into a multi-branch attention block, which includes a multi-head attention branch, a globally learnable attention branch, and a local convolutional domain enhancement branch, concatenating and linearly fusing the outputs of the three branches in the channel dimension, forming a Transformer block output through the residual and feedforward network, taking the last token representation, and obtaining a one-step prediction through linear decoding; training the model using weighted root mean square error and saving the absolute residual.

[0031] In practical applications, the obtained feature matrix Construct a sliding window sample, assuming the window length is... For each Forming model input sequence blocks Predict the target quantity for the next moment. : ; For the obtained input sequence block Perform linear dimensionality upscaling to the latent space dimension :

[0032] In the formula, This represents the latent space after dimensionality upgrade. It is a linear projection matrix. This is the input bias.

[0033] Local-to-mid-local dependencies are extracted using multi-scale hierarchical dilated convolution.

[0034] In the formula, for In time location ,aisle The amount; For an expansion coefficient of At any moment ,aisle The convolution output; For dilated convolution kernels with dilation coefficients of Time, Channel , No. The weight of each core position; The kernel size; The dilation factor represents the sampling interval of the convolution kernel in the time dimension. The concatenated multi-scale output channels are denoted as... .

[0035] In one possible implementation, the multi-branch attention block includes: a multi-head attention branch, using scaled dot product attention, unfolded in a multi-head form; a globally learnable attention branch, using a learnable alignment matrix; a local convolutional neighborhood enhancement branch, using convolution operations; and concatenating and linearly fusing the outputs of the three branches in the channel dimension.

[0036] like Figure 2 As shown, the multi-head attention network structure used in this embodiment is a core component of the Transformer model that integrates hierarchical dilated convolution and multi-branch attention. This structure includes three parallel branches: Branch A (Multi-head Attention Branch) adopts the Scaled Dot-Product Attention mechanism, which divides the input sequence into Query, Key and Value matrices through linear projection and expands them in a multi-head form to capture the temporal dependencies in different subspaces.

[0037] Branch B (Globally Learnable Attention Branch) uses a learnable alignment matrix that is randomly initialized and updated during training to adaptively model global time series patterns.

[0038] Branch C (Local Convolutional Domain Enhancement Branch) enhances the local features of the input sequence through one-dimensional convolution operations, thereby improving the model's ability to capture short-term dynamics.

[0039] The outputs of the three branches are concatenated along the channel dimension and integrated through a linear fusion layer to form the final output of the attention block. This output is then processed by residual connections and a feedforward neural network to form the representation of the Transformer block, and the last token is taken as the hidden state for temporal prediction.

[0040] Specifically, will Feed into a multi-branch attention block: Branch A is a multi-head attention branch, and its output is denoted as...

[0041] Scaling dot product attention is defined as:

[0042] In the formula, A Query, Key, and Value matrix; This represents the dimension of the Key vector. Further, it is expanded in a multi-head form:

[0043] In the formula, For multi-head output projection weight matrix; For the total Number. Each The definition is as follows:

[0044] In the formula, For the first indivual Projection weights over the Query, Key, and Value matrices; Branch B is the globally learnable attention branch, and its output is denoted as... :

[0045] In the formula, It is a learnable alignment matrix that can be randomly initialized.

[0046] Branch C is a local convolutional neighborhood enhancement, and its output is denoted as... :

[0047] Furthermore, the three branch outputs are concatenated and linearly fused along the channel dimension:

[0048] In the formula, , These are the parameters for the fusion layer.

[0049] Furthermore, the output will be... The residual and feedforward network form the Transformer block output: Finally, the last-token is used to represent: ; Furthermore, a one-step prediction is obtained through linear decoding: ,in, , These are the parameters for the linear decoding layer; Training using weighted root mean square error:

[0050] In the formula, These are the training weights from step 1. The absolute residuals are preserved. ; Step 103: Based on the hour-week-month three-dimensional time series grouping, calculate the median and median absolute deviation of the residuals within each group. Convert the residuals into standardized outlier scores through seasonal normalization. Use extreme value theory to determine the outlier threshold for each time series group. Combine long missing value detection rules and short missing value detection rules to achieve joint determination of missing values ​​and outliers.

[0051] In one possible implementation, the joint determination of missing and outlier values ​​includes: grouping the absolute residuals by hour-week-month according to the timestamp; calculating the median and median absolute deviation for the residual set within each group; normalizing each group to obtain a standardized outlier score; setting a threshold for the standardized outlier score set of each group using extreme value theory; when the standardized outlier score exceeds the threshold, it is judged as an outlier; and combining this with the missing segment identification rule, if it is a long missing segment, it is directly judged as an outlier; if it is a short missing segment, a prediction rationality check is performed for determination.

[0052] In practical applications, the absolute residuals are grouped according to the hour-week-month of the timestamp. For each The residual set within Calculate the median of Deviation from median : ; Furthermore, for each Normalization is performed to obtain standardized anomaly scores:

[0053] For each Standardized anomaly score set Using extreme value theory, a threshold is set. ,when , If a segment is identified as an outlier, and the missing segment identification rules are combined, if it is a long missing segment, it is directly identified as an abnormal missing segment; if it is a short missing segment, a prediction rationality check is performed for determination.

[0054] Step 104: Treat missing values ​​and outliers as missing values. Based on the conditional score diffusion model, introduce self-supervised training. Through the reverse process of conditional diffusion, gradually denoise the random noise into imputed values ​​that conform to the true distribution. Improve the model's ability to capture the periodicity of time series and multi-feature dependencies through two-dimensional feature fusion.

[0055] In one possible implementation, imputation based on a conditional fractional diffusion model includes: marking both missing and outlier values ​​as missing, generating a missing mask, and normalizing the load column and exogenous feature column to be imputed to form an observation matrix of the multivariate time series; constructing training samples using a sliding window approach, setting the window length and step size, and dividing the time series dataset into a sample set; constructing a conditional fractional diffusion model, in which the forward diffusion process uses a Markov chain that progressively adds Gaussian noise to the target sequence to transform the original sequence into a sequence of approximately random noise, and the backward diffusion process uses a conditional denoising network to progressively generate a sequence that conforms to the true fractional diffusion model from the noise. The imputation sequence is constructed by introducing observations as conditions. A self-supervised masking mechanism is introduced to generate target and condition masks for each window, and the target and conditions are mixed at time step to construct the input. A conditional noise prediction network is introduced to guide the inverse diffusion generation process. The conditional noise prediction network includes an input encoding layer, a time-step embedding layer, a residual dilated convolutional layer, a two-dimensional attention enhancement module, and an output fusion layer. Given the conditional observations and the imputation target, noise is applied to the target part for sampling according to the forward process. The system is trained by minimizing the loss function. During the inference phase, all real observations are used as conditions, the target region is empty, and the imputation value is generated step by step according to the inverse process.

[0056] In practical applications, both identified missing values ​​and outliers are marked as missing, and a missing mask is generated. ,in Indicates the first Step is the observed value. Indicates the first For missing values; and fill in the missing values ​​in the load column. Exogenous Feature Column After normalization, the observation matrix constitutes a multivariate time series. ,Include , length is The time window; defining the timestamp of the time series as The time series dataset that constitutes this can be represented as: ; Furthermore, to accommodate the temporal dependencies of the time series, a sliding window approach is used to construct training samples: let the window length be... Step size is For time series datasets Perform sliding window segmentation to generate a sample set. ,in The starting position of the window. This is the end position of the window; Construct a conditional score diffusion model, such as Figure 3As shown, the conditional score diffusion model used in this embodiment of the invention is used for generative imputation of missing and outlier values. The model structure includes the following layers: Input encoding layer: Receives noisy target sequence, observation sequence and mask sequence, concatenates these inputs and then performs one-dimensional convolution operation to increase the dimensionality and uniformly map them to the model dimension.

[0057] Time-step embedding layer: The diffusion step is sinusoidally position-encoded and projected through a multilayer perceptron (MLP) to obtain a time feature vector, which is dynamically injected into subsequent layers as a modulation signal.

[0058] Residual dilated convolutional layers: These consist of multiple dilated convolutional modules cascaded together, each using a different dilation rate to achieve multi-scale temporal modeling. Each layer's computation includes a gating mechanism (formed by the product of hyperbolic tangent and sigmoid activation functions) and residual normalization to prevent gradient explosion and control information flow.

[0059] Two-dimensional attention enhancement module: introduced after residual convolution, including temporal attention (calculated along the time dimension) and feature attention (calculated along the feature channel dimension) to improve the model's ability to capture the periodicity of time series and multiple feature dependencies.

[0060] Output fusion layer: Aggregates features from all skip connections and finally outputs the predicted noise through convolution operations to guide the denoising generation of the inverse diffusion process.

[0061] During training and inference, the model constructs training samples using observed data as conditions through a self-supervised masking mechanism, and gradually generates filler values ​​that conform to the distribution of real data from random noise during the back-diffusion process.

[0062] The forward diffusion process of the conditional fractional diffusion model employs a Markov chain that progressively adds Gaussian noise to the target sequence, transforming the original sequence into a sequence with approximately random noise. :

[0063]

[0064] In the formula, ; The small positive constant representing the noise level is generated using a spin scheduling strategy; Furthermore, the reverse diffusion process is the inverse of the forward diffusion process, gradually removing noise through a conditional denoising network. Generate imputed sequences that conform to the true distribution Observations are introduced during the process. As a condition:

[0065] And it uses conditional DDPM parameterization:

[0066] In the formula, For noise function, conditionally observed As input; A self-supervised masking mechanism is introduced to generate a target mask for each window. With condition mask At any moment At this point, the objective and conditions are combined, and the input is constructed uniformly as follows: In the formula, This represents element-wise multiplication, ensuring that the model only sees noisy samples in the missing regions and retains the true values ​​in the observed regions. In one possible implementation, the conditional noise prediction network includes: an input encoding layer that concatenates the noisy target, observations, and a mask, then performs one-dimensional convolution to increase the dimensionality; a temporal embedding layer that sinusoidally encodes the diffusion step, projects it onto an MLP to obtain a temporal feature vector, and injects it as a modulation signal; a residual dilated convolutional module, which consists of several layers of dilated convolutional modules connected in series, each layer using dilation rate to perform multi-scale temporal modeling, and adding two-dimensional attention of temporal attention and feature attention; and an output fusion module that aggregates all skip connections and finally outputs noise via convolution.

[0067] In practical applications, a conditional noise prediction network is introduced. To guide the inverse diffusion generation process; the overall structure of the network includes an input encoding layer, a time-step embedding layer, a residual dilated convolutional layer, a two-dimensional attention enhancement module, and an output fusion layer; Furthermore, in the input coding layer, the input includes the noisy target, the observation value, and the mask, which are concatenated and then increased in dimensionality through one-dimensional convolution:

[0068] In the formula: It is a one-dimensional convolution operator that maps the input channels uniformly to the model dimension; Furthermore, in the time-step embedding layer, for the diffusion step... Perform sine encoding:

[0069] The time feature vector is obtained by MLP projection: As a modulation signal injection for each residual block, dynamic time modulation is achieved; Furthermore, in the residual dilated convolution module, the network consists of several layers of dilated convolution modules connected in series, and the calculation formula for each layer is:

[0070] In the formula, To represent the expansion rate, multi-scale temporal modeling is achieved through periodic stacking; To embed time into a mapping with Same dimension additive modulation; They are hyperbolic tangent and Activation, the product of the two forms a gating mechanism to control the intensity of information flow; These are residual output and cross-layer jumper characteristics, respectively. To normalize the residual output and prevent signal explosion; Furthermore, after residual convolution, adding two-dimensional attention, including temporal and feature attention, enhances the model's ability to capture the periodicity and multi-feature dependencies of time series data.

[0071] Furthermore, in the output fusion module, all skip connections are aggregated:

[0072] Final convolution output noise:

[0073] Given conditional observations and interpolation target Based on the forward process of the diffusion model in step 4.2, noise is applied to the target part. Perform sampling. To achieve the cumulative retention rate; training is performed by minimizing the following loss function:

[0074] Furthermore, the reasoning phase takes all real observations as conditions. The target area is empty. To be supplemented, it will be generated step by step based on the reverse process of the above diffusion model:

[0075] Furthermore, the conditional positions remain unchanged after each iteration:

[0076] when When the reconstructed sequence is obtained The value at the target location is the model filling result.

[0077] This application utilizes the GTA-Transformer anomaly detection model, which integrates hierarchical dilated convolution and multi-branch attention, to extract features and perform single-step prediction on multivariate time-series input data. It captures short-term dynamics through local convolution and models medium- to long-term dependencies through multi-head attention, thus obtaining high-precision residuals. Furthermore, seasonal standardization is applied to the residuals, and extreme value theory is used to determine the anomaly threshold, enabling joint identification of spike anomalies, short missing values, and long missing values. Further, after anomaly and missing value identification, a conditional fractional diffusion model is used to generatively impute identified missing segments. This model takes observed data and temporal exogenous features as conditional inputs, constructs pseudo-missing values ​​during training through a self-supervised masking strategy, and generates imputed values ​​consistent with the true distribution during the inference phase based on a posterior sampling-based inverse diffusion process. Through an integrated design of identification and filling, this invention enables the fusion of multi-source load data, combined with time-series feature analysis and deep learning, to achieve missing data detection, anomaly identification, and adaptive judgment of user load data in new power system distribution networks including charging stations and distributed photovoltaics. Finally, a conditional fractional diffusion model is used to fill in missing and abnormal data, thereby improving the integrity and quality of user load data in new active distribution networks.

[0078] Corresponding to the above method embodiments, this specification also provides embodiments of a load data cleaning device for a novel power system distribution network. Figure 4 A schematic diagram of a novel power system distribution network load data cleaning device according to one embodiment of this specification is shown. Figure 4 As shown, the device includes: The data acquisition module 401 is configured to acquire multivariate time series data containing time column, load column and external feature column, perform numerical mapping on text-type external features, and normalize the load column and the external feature column respectively to form a feature matrix. The model building module 402 is configured to build a model that integrates hierarchical dilated convolution and multi-branch attention Transformer, and train the model to achieve single-step temporal prediction of the target monitoring column with the feature matrix as input, and output the predicted value and residual. The anomaly determination module 403 is configured to calculate the median and median absolute deviation of the residuals in each group based on hour-week-month three-dimensional time series grouping, convert the residuals into standardized anomaly scores through seasonal normalization, determine the anomaly threshold of each time series group using extreme value theory, and combine long missing detection rules and short missing detection rules to achieve joint determination of missing values ​​and outliers. The data imputation module 404 is configured to treat the missing values ​​and the outliers as missing values. Based on the conditional score diffusion model, it introduces self-supervised training and gradually denoises random noise into imputation values ​​that conform to the true distribution through the conditional diffusion reverse process. It also improves the model's ability to capture the periodicity of time series and multi-feature dependencies through two-dimensional feature fusion.

[0079] In one possible implementation, obtaining multivariate time series data includes: Acquire user load data with time series and external feature dataset, perform numerical mapping on text-based external features to form an input external feature matrix; Missing segments are identified in the load column. The length of consecutive missing segments is counted. If the length of consecutive missing segments is greater than or equal to 12 hours, it is marked as a long missing segment. If the length of consecutive missing segments is less than 12 hours, it is marked as a short missing segment. The remaining time periods are non-missing segments. Different training weights are set for different time periods. The load column and the external feature matrix are normalized respectively to obtain the normalized load column and the normalized external feature matrix; The normalized load column, the normalized external feature matrix, and the missing marker are aligned by time to form the feature matrix.

[0080] One possible implementation involves constructing a model that integrates hierarchical dilated convolutions and multi-branch attention Transformers, including: Construct sliding window samples from the feature matrix, set the window length, form a model input sequence block for each time point, and predict the target quantity at the next time point; The input sequence block is linearly up-dimensional to the latent space dimension, and local to central dependencies are extracted through multi-scale hierarchical dilated convolution. The output channels are then concatenated. The concatenated output is fed into a multi-branch attention block, which includes a multi-head attention branch, a globally learnable attention branch, and a local convolutional domain enhancement branch. The three branch outputs are concatenated and linearly fused in the channel dimension. The output is then processed by the residual and feedforward network to form the Transformer block output. The last token is taken as the representation, and a one-step prediction is obtained through linear decoding. The model is trained using weighted root mean square error, and the absolute residuals are preserved.

[0081] In one possible implementation, the joint determination of missing values ​​and outliers includes: The absolute residuals are grouped according to the hour-week-month of the timestamp, and the median and median absolute deviation are calculated for the residual set in each group; Normalize each group to obtain a standardized outlier score; For each group, a threshold is set using extreme value theory. When the standardized outlier score exceeds the threshold, it is judged as an outlier. Combined with the missing segment identification rule, if it is a long missing segment, it is directly judged as an abnormal missing segment. If it is a short missing segment, a prediction rationality check is performed for judgment.

[0082] In one possible implementation, filling based on a conditional fractional diffusion model includes: Missing values ​​and outliers are marked as missing, a missing mask is generated, and the load column and exogenous feature column that need to be filled are normalized to form the observation matrix of the multivariate time series. Training samples are constructed using a sliding window method. The window length and step size are set, and the time series dataset is split by sliding window to generate a sample set. A conditional fractional diffusion model is constructed. Its forward diffusion process uses a Markov chain that gradually adds Gaussian noise to the target sequence to transform the original sequence into a sequence of approximately random noise. The backward diffusion process uses a conditional denoising network to gradually generate a filled sequence that conforms to the true distribution from the noise. Observations are introduced as conditions in the process. A self-supervised masking mechanism is introduced to generate a target mask and a condition mask for each window, and the target and condition are mixed at time t to construct the input; A conditional noise prediction network is introduced to guide the inverse diffusion generation process. The conditional noise prediction network includes an input coding layer, a time-step embedding layer, a residual dilated convolutional layer, a two-dimensional attention enhancement module, and an output fusion layer. Given conditional observations and the imputation target, noise is added to the target part for sampling according to the forward process. Training is performed by minimizing the loss function. In the inference stage, all real observations are used as conditions, the target region is empty, and imputation values ​​are generated step by step according to the reverse process.

[0083] In one possible implementation, the multi-branch attention block includes: Multi-head attention branches are expanded in a multi-head manner using scaled dot product attention. Globally learnable attention branches use learnable alignment matrices; Local convolutional neighborhood enhancement branches utilize convolution operations; The three branch outputs are spliced ​​together and linearly fused in the channel dimension.

[0084] In one possible implementation, the conditional noise prediction network includes: The input coding layer concatenates the noisy target, the observation, and the mask, and then performs one-dimensional convolution to increase the dimension. The time-step embedding layer performs sinusoidal encoding on the diffusion step, and obtains the time feature vector through MLP projection, which is then injected as the modulation signal. The residual dilated convolution module consists of several layers of dilated convolution modules connected in series. Each layer uses the dilation rate to perform multi-scale temporal modeling and incorporates two-dimensional attention, including temporal attention and feature attention. The output fusion module aggregates all skip connections and finally outputs noise via convolution.

[0085] The above is a schematic scheme of a load data cleaning device for a novel power system distribution network according to this embodiment. It should be noted that the technical solution of this load data cleaning device for a novel power system distribution network belongs to the same concept as the technical solution of the aforementioned load data cleaning method for a novel power system distribution network. Details not described in detail in the technical solution of the load data cleaning device for a novel power system distribution network can be found in the description of the aforementioned technical solution of the load data cleaning method for a novel power system distribution network.

[0086] Figure 5 A structural block diagram of a computing device 500 according to one embodiment of this specification is shown. The components of the computing device 500 include, but are not limited to, a memory 510 and a processor 520. The processor 520 is connected to the memory 510 via a bus 530, and a database 550 is used to store data.

[0087] The computing device 500 also includes an access device 540, which enables the computing device 500 to communicate via one or more networks 560. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 540 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or a Near Field Communication (NFC) interface.

[0088] In one embodiment of this specification, the above-described components of the computing device 500 and Figure 5 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 5 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0089] The computing device 500 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 500 can also be a mobile or stationary server.

[0090] The processor 520 executes the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described method for cleaning load data in a novel power system distribution network. The above is a schematic representation of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the above-described method for cleaning load data in a novel power system distribution network belong to the same concept. Details not described in detail in the technical solution of the computing device can be found in the description of the technical solution of the above-described method for cleaning load data in a novel power system distribution network.

[0091] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described method for cleaning load data in a novel power system distribution network.

[0092] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the above-described method for cleaning load data of a new type of power system distribution network. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described method for cleaning load data of a new type of power system distribution network.

[0093] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, the computer is instructed to perform the steps of the above-described method for cleaning load data of a new type of power system distribution network.

[0094] The above is an illustrative scheme of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the above-described method for cleaning load data of a new type of power system distribution network belong to the same concept. For details not described in detail in the technical solution of the computer program, please refer to the description of the technical solution of the above-described method for cleaning load data of a new type of power system distribution network.

[0095] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0096] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0097] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0098] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0099] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A method for cleaning load data in a new type of power system distribution network, characterized in that, include: A multivariate time series data containing a time column, a load column, and an external feature column is obtained. The textual external features are numerically mapped, and the load column and the external feature column are normalized to form a feature matrix. A model integrating hierarchical dilated convolution and multi-branch attention Transformer is constructed. The model is trained with the feature matrix as input to achieve single-step temporal prediction of the target monitoring column and output the predicted value and residual. Based on hour-week-month three-dimensional time series grouping, the median and median absolute deviation of the residuals in each group are calculated. The residuals are converted into standardized outlier scores through seasonal normalization. The outlier threshold of each time series group is determined by extreme value theory. The joint determination of missing values ​​and outliers is achieved by combining long missing value detection rules and short missing value detection rules. The missing values ​​and outliers are considered as missing values. Based on the conditional score diffusion model, self-supervised training is introduced. The random noise is gradually denoised into imputation values ​​that conform to the true distribution through the conditional diffusion reverse process. The model's ability to capture the periodicity of time series and multi-feature dependencies is improved through two-dimensional feature fusion.

2. The method according to claim 1, characterized in that, The acquisition of multivariate time series data includes: Acquire user load data with time series and external feature dataset, perform numerical mapping on text-based external features to form an input external feature matrix; The load column is identified for missing segments. The length of consecutive missing segments is counted. If the length of consecutive missing segments is greater than or equal to 12 hours, it is marked as a long missing segment. If the length of consecutive missing segments is less than 12 hours, it is marked as a short missing segment. The remaining time periods are non-missing segments. Different training weights are set for different time periods. The load column and the external feature matrix are normalized respectively to obtain the normalized load column and the normalized external feature matrix; The normalized load column, the normalized external feature matrix, and the missing marker are aligned by time to form the feature matrix.

3. The method according to claim 2, characterized in that, The model constructed by fusing hierarchical dilated convolution and multi-branch attention Transformer includes: Construct sliding window samples for the feature matrix, set the window length, form a model input sequence block for each time point, and predict the target quantity at the next time point; The input sequence block is linearly up-dimensional to the latent space dimension, and local to central dependencies are extracted through multi-scale hierarchical dilated convolution. The output channels are then concatenated. The concatenated output is fed into a multi-branch attention block, which includes a multi-head attention branch, a globally learnable attention branch, and a local convolutional domain enhancement branch. The three branch outputs are concatenated and linearly fused in the channel dimension, and then the residual and feedforward network are used to form the Transformer block output. The last token is taken as the representation, and a one-step prediction is obtained through linear decoding. The model is trained using weighted root mean square error, and the absolute residuals are preserved.

4. The method according to claim 3, characterized in that, The joint determination of missing values ​​and outliers includes: The absolute residuals are grouped according to the hour-week-month of the timestamp, and the median and median absolute deviation are calculated for the residual set in each group; Normalize each group to obtain a standardized outlier score; For each group's standardized outlier score set, an extreme value theory is used to set a threshold. When the standardized outlier score exceeds the threshold, it is judged as an outlier. Combined with the missing segment identification rules, if it is a long missing segment, it is judged as an abnormal missing segment. If it is a short missing segment, a prediction rationality check is performed for judgment.

5. The method according to claim 1, characterized in that, The filling based on the conditional fractional diffusion model includes: Both the missing values ​​and the outliers are marked as missing, a missing mask is generated, and the load column and the external feature column that need to be filled are normalized to form the observation matrix of the multivariate time series. Training samples are constructed using a sliding window method, with a set window length and step size. The time series dataset is then segmented using a sliding window to generate a sample set. A conditional fractional diffusion model is constructed. Its forward diffusion process uses a Markov chain that gradually adds Gaussian noise to the target sequence to transform the original sequence into a sequence of approximately random noise. The backward diffusion process uses a conditional denoising network to gradually generate a filled sequence that conforms to the true distribution from the noise. Observations are introduced as conditions in the process. A self-supervised masking mechanism is introduced to generate a target mask and a condition mask for each window, and the target and condition are mixed at time t to construct the input; A conditional noise prediction network is introduced to guide the inverse diffusion generation process. The conditional noise prediction network includes an input encoding layer, a time-step embedding layer, a residual dilated convolutional layer, a two-dimensional attention enhancement module, and an output fusion layer. Given conditional observations and the imputation target, noise is added to the target part for sampling according to the forward process. Training is performed by minimizing the loss function. In the inference stage, all real observations are used as conditions, the target region is empty, and imputation values ​​are generated step by step according to the reverse process.

6. The method according to claim 1, characterized in that, The multi-branch attention block includes: Multi-head attention branches are expanded in a multi-head manner using scaled dot product attention. Globally learnable attention branches use learnable alignment matrices; Local convolutional neighborhood enhancement branches utilize convolution operations; The three branch outputs are spliced ​​together and linearly fused in the channel dimension.

7. The method according to claim 5, characterized in that, The conditional noise prediction network includes: The input coding layer concatenates the noisy target, observations, and mask, and then performs one-dimensional convolution to increase the dimensionality. The time-step embedding layer performs sinusoidal encoding on the diffusion step, and obtains the time feature vector through MLP projection, which is then injected as the modulation signal. The residual dilated convolution module consists of several layers of dilated convolution modules connected in series. Each layer uses the dilation rate to perform multi-scale temporal modeling and incorporates two-dimensional attention, including temporal attention and feature attention. The output fusion module aggregates all skip connections and finally outputs noise via convolution.

8. A load data cleaning device for a new type of power system distribution network, characterized in that, include: The data acquisition module is configured to acquire multivariate time series data containing time columns, load columns, and external feature columns, perform numerical mapping on text-type external features, and normalize the load columns and external feature columns respectively to form a feature matrix. The model building module is configured to build a model that integrates hierarchical dilated convolution and multi-branch attention Transformer. The model is trained with the feature matrix as input to achieve single-step temporal prediction of the target monitoring column and output the predicted value and residual. The anomaly detection module is configured to calculate the median and median absolute deviation of the residuals within each group based on hour-week-month three-dimensional time series grouping, convert the residuals into standardized anomaly scores through seasonal normalization, determine the anomaly threshold of each time series group using extreme value theory, and combine long missing value detection rules and short missing value detection rules to achieve joint detection of missing values ​​and anomalies. The data imputation module is configured to treat the missing values ​​and outliers as missing values. Based on the conditional score diffusion model, it introduces self-supervised training and gradually denoises random noise into imputation values ​​that conform to the true distribution through the conditional diffusion reverse process. It also improves the model's ability to capture the periodicity of time series and multi-feature dependencies through two-dimensional feature fusion.

9. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions. When the computer-executable instructions are executed by the processor, they implement the steps of the load data cleaning method for the distribution network of a novel power system as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method for cleaning load data of a novel power system distribution network as described in any one of claims 1 to 7.

Citation Information

Cited By

  • Intelligent control system and method based on time sequence filling network

    CN122194709A