Line loss positioning method and system based on artificial intelligence and big data analysis
Through artificial intelligence and big data analysis, combined with GNN and Transformer, a line loss prediction model is built, which solves the problem of line loss positioning in complex networks of power systems, realizes efficient line loss prediction and fault detection, and improves the efficiency of power grid operation and maintenance.
Patent Information
- Application Number
- CN202510366731.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-26
- Publication Date
- 2025-06-27
AI Technical Summary
The complex network structure and high-dimensional, heterogeneous, and time-varying data of modern power systems increase the difficulty of line loss positioning, and it is difficult for the existing technology to effectively predict and position line loss.
Using a method based on artificial intelligence and big data analysis, the data set is expanded through data augmentation and generation of adversarial networks, combined with graph neural network (GNN) and Transformer to extract features, build a line loss prediction model, and use dynamic error feedback correction to adapt to grid changes, combine statistics and frequency analysis to identify abnormal points, and use grid topology diagrams to mark abnormal locations.
It improves the accuracy and adaptability of line loss positioning, enhances the generalization ability of the model, and provides intuitive fault detection and troubleshooting guidance.
Smart Images

Figure CN120217250A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of line loss management, and particularly to a line loss location method and system based on artificial intelligence and big data analysis. Background Art
[0002] Modern power systems usually include multiple levels and nodes such as power plants, substations, high-voltage transmission lines, and distribution networks. These nodes and lines are interconnected to form a huge complex network. The complex network structure increases the difficulty of power line loss location.
[0003] The topological structure of the power grid changes continuously over time. For example, the transfer of load, the maintenance of equipment, the handling of faults, etc. will cause frequent changes in the network topology, increasing the complexity of line loss location. Moreover, during the operation of the power system, various types of data are involved, including voltage, current, power, load conditions, etc. These data come from different sensors and monitoring devices, with high dimensionality and heterogeneity, increasing the complexity of analysis. At the same time, various types of data in the power system have high time variability and non-linearity. For example, the change of the all-day load curve, seasonal fluctuations, and drastic changes caused by emergencies, etc., make line loss prediction and location more difficult. Summary of the Invention
[0004] In order to solve the above problems, the purpose of the present invention is to provide a line loss location method based on artificial intelligence and big data analysis, which combines artificial intelligence and big data analysis to achieve line loss location, effectively improves the line loss location ability and accuracy, and adapts to the complex environment and changes in the operation of the power grid.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions:
[0006] A line loss location method based on artificial intelligence and big data analysis, comprising the following steps:
[0007] S1: Collect voltage, current, power, and timestamp data from smart meters, sensors, and historical records, and use data augmentation and generative adversarial networks to expand the dataset;
[0008] S2: Fusion of GNN and Transformer to extract features from the augmented dataset obtained from the generator, and fuse these features into a comprehensive feature vector to construct a training dataset;
[0009] S3: Construct a line loss prediction model, train it based on the training dataset, and during real-time prediction, through dynamic error feedback correction, make real-time adjustment of the model to adapt to the rapid changes in the power grid state;
[0010] S4: Based on the line loss prediction model, obtain data in real time for prediction and analysis to obtain line loss abnormal points;
[0011] S5: Based on the outliers, combined with statistical analysis and frequency analysis, identify the potential causes of abnormal line losses;
[0012] S6: Mark the location and time of the outliers based on the power grid topology diagram, facilitating on-site inspection and handling by maintenance personnel.
[0013] Further, the specific content of S1 is as follows:
[0014] S11: Collect voltage, current, power, and timestamp data from smart meters, sensors, and historical records;
[0015] S12: Expand the dataset based on data augmentation methods, including noise addition, time sliding, and data interpolation;
[0016] S13: Construct a generator G and a discriminator D, and generate more samples similar to real data by alternately training the generator and the discriminator:
[0017] The discriminator D distinguishes between real data x and generated data G(z), and maximizes D:
[0018]
[0019] Among them, D is the discriminator model; G is the generator model; x ∼ p data (x) represents the real data sampled from the real data distribution p data ; z ∼ p z (z) represents the noise input sampled from the prior noise distribution p z ; log D(x) is the logarithmic probability that the real data x is determined to be real data by the discriminator D; log(1 - D(G(z))) represents the logarithmic probability that the generated sample G(z) is determined to be fake data by the discriminator D; represents the output of the discriminator D on the real data x; represents the output of the discriminator D on the generated data G(z);
[0020] The generator G attempts to deceive the discriminator D and minimize D:
[0021]
[0022] Further, fuse GNN and Transformer to extract features from the augmented dataset obtained from the generator, and fuse these features into a comprehensive feature vector to construct a training dataset, specifically as follows:
[0023] Represent the power network as a graph G′ = (V′, E′), where V′ represents nodes (such as substations) and E′ represents edges; assume the initial feature vector of each node v is
[0024] The GNN updates node features through information aggregation among the neighbor nodes of a node. The update rule for the feature of node v at the l-th layer is:
[0025]
[0026] where, represents the feature vector of node v at the (l + 1)-th layer; is the feature vector of node u at the l-th layer; N(v) represents the neighbor nodes of node v; W (l) and b (l) are the weight and bias at the l-th layer respectively; σ is the non-linear activation function;
[0027] After L layers of propagation, the features of each node v are extracted and aggregated into the global feature vector H G :
[0028]
[0029] In Transformer, the multi-head self-attention mechanism is used to calculate the attention weights in the input sequence:
[0030]
[0031] where, Q, K, and U are the query, key, and value matrices respectively, and d k is the dimension of the key;
[0032] The calculation formula for multi-head self-attention is:
[0033] MultiHead(Q, K, U) = Concat(head1,..., head i ,..., head h )W 0 ;
[0034] where, each head head i is expressed as:
[0035] head i = Attention(QW i Q , KW i K , UW i U );
[0036] where, W i Q is the query matrix weight of the i-th head; W iK is the key matrix weight for the i-th head; W i U is the value matrix weight for the i-th head; W 0 is the output weight matrix;
[0037] After being processed by multiple layers of Transformer encoders, the output features h of the last layer are obtained T , and the global feature vector H is obtained through a pooling operation T ;
[0038] Fuse the features extracted by GNN and Transformer to form a comprehensive feature vector.
[0039] Furthermore, bilinear pooling is used to fuse the features extracted by GNN and Transformer, as follows:[[]]
[0040] First, calculate the outer product of the GNN and Transformer feature vectors:
[0041]
[0042] where B is a matrix representing all possible second-order interactions between the feature vectors;
[0043] Then, use a linear transformation matrix W bp, to reduce the dimension of the outer product matrix to a preset dimension to obtain the final comprehensive feature vector:
[0044] H fused = vec(B)W bp
[0045] where vec(B) represents flattening the matrix B into a vector.
[0046] Furthermore, the line loss prediction model adopts a fully connected neural network composed of multi-layer perceptrons, as follows:
[0047] The fully connected neural network includes an input layer, a hidden layer, and an output layer; the input layer inputs the comprehensive feature vector;
[0048] The hidden layer includes several fully connected layers, and each layer is equipped with a non-linear activation function. The output of the l'-th layer is:
[0049] h (l′) = σ(W (l′) h (l′-1) + b (l′) );
[0050] where W (l′) and b (l′) are the weight matrix and bias vector of the l'-th layer respectively; h(l′-1) is the output of the upper layer;
[0051] The output layer outputs a linear neuron for line loss prediction:
[0052] y = W (out) h (L′) + b (out) ;
[0053] where W (out) and b (out) are the weight matrix and bias vector of the output layer respectively; L′ is the total number of hidden layers;
[0054] During the training process, the mean squared error is used as the loss function to measure the error between the predicted value and the true value, and the gradient descent method is used to minimize the loss function.
[0055] Furthermore, dynamic error feedback correction is used, specifically as follows:
[0056] Calculate the real-time prediction error:
[0057]
[0058] where and y t are the predicted value and the true value at time t respectively;
[0059] Based on the real-time prediction error, online learning is carried out to update the model parameters:
[0060]
[0061] where θ is the model parameter; η′ is the online learning rate.
[0062] Furthermore, based on the outliers, combined with statistical analysis and frequency analysis, the potential causes of line loss outliers are identified, specifically as follows:
[0063] Calculate the mean and standard deviation of N adjacent data of the outlier x:
[0064]
[0065] Compare the data at the outlier with the mean and standard deviation to identify the deviation, including skewness and kurtosis:
[0066]
[0067] Calculate the difference of the time series data to identify the rapidly changing situation, and use the frequency domain method to analyze the data to identify the anomalies at specific frequencies or periodicity;
[0068] Perform a fast Fourier transform on the time-series data x(t) and convert it to the frequency domain:
[0069]
[0070] Analyze the spectrum ∣X(f)∣ and identify the frequency components greater than the threshold;
[0071] Calculate the power spectral density of the time-series data and identify the changes in energy at specific frequencies:
[0072]
[0073] Compare the PSD of the data before and after the anomaly point to identify the abnormal frequency characteristics;
[0074] Based on the results of statistical and frequency analysis, combined with expert knowledge, determine the cause of the anomaly.
[0075] Further, step S6 is specifically as follows:
[0076] Convert the power grid topology data into a graph. Draw nodes according to the power grid topology data. Each node represents a key point in the power grid (such as a substation or a user), and different colors or shapes are used to distinguish node types (for example, substations are represented by blue, and users are represented by green); draw edges according to the connection relationships in the topology data, and each edge represents a transmission line. Different line types and colors can be used to represent different power lines (for example, main lines are represented by solid lines, and branch lines are represented by dashed lines).
[0077] According to the location ID of the anomaly point, add a mark to the corresponding node or edge. Different anomaly types can be marked with different icons or colors (for example, a red circle represents a device failure, and a yellow triangle represents a load fluctuation); add a time label to each anomaly point mark, and display the specific time of the anomaly occurrence in the form of an icon or floating information. Classify and display different types of anomaly points, and further annotate based on icons and colors (such as anomaly description information).
[0078] Further, based on the power grid topology data, use the force-directed layout algorithm to calculate the positions of the anomaly nodes on the graph, solve the iterative positions of the nodes, and reach a mechanical equilibrium state.
[0079] Mark the anomaly points according to the final positions of the nodes to ensure that the marks are accurately placed on the corresponding nodes or lines:
[0080] The anomaly point marks carry specific time information and use the floating label function of the drawing tool in combination.
[0081] A line loss location system based on artificial intelligence and big data analysis, comprising a processor, a memory, and a computer program stored on the memory. When the processor executes the computer program, it specifically executes the steps in the above-mentioned line loss location method based on artificial intelligence and big data analysis.
[0082] The present invention has the following beneficial effects:
[0083] 1. The present invention combines artificial intelligence and big data analysis to achieve line loss location, effectively improving the line loss location ability and accuracy, and adapting to the complex environment and changes in power grid operation;
[0084] 2. The present invention obtains multi-dimensional and multi-timestamp data from smart meters, sensors, and historical records, ensuring the diversity and comprehensiveness of the data. And it expands the dataset through data augmentation and GAN technology, increasing the quantity and quality of the data, making up for the lack of real data, and enhancing the generalization ability of the model;
[0085] 3. The present invention integrates the feature extraction of GNN and Transformer. Through GNN, it effectively captures the complex relationships between nodes and edges in the power grid topology, extracts the power grid structure features. Through Transformer, it captures the temporal dynamic features, and fuses various features into a comprehensive feature vector, enhancing the model's understanding and processing ability of multi-dimensional information;
[0086] 4. This application also uses statistical and frequency analysis to deeply explore the causes of abnormal points, improving the effectiveness of fault detection and elimination. Through topological graph marking and abnormal point location, it provides intuitive reference and efficient operation guidance for maintenance personnel. BRIEF DESCRIPTION OF THE DRAWINGS
[0087] Figure 1 is a flowchart of the method of the present invention;
[0088] Figure 2 is a schematic diagram of the model in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0089] The following further describes the present invention in detail with reference to the drawings and specific embodiments:
[0090] Refer to Figure 1 , in this embodiment, a line loss location method based on artificial intelligence and big data analysis is provided, which is characterized by including the following steps:
[0091] S1: Collect voltage, current, power, and timestamp data from smart meters, sensors, and historical records, and expand the dataset using data augmentation and generative adversarial network (GAN);
[0092] S2: Extract features from the augmented dataset obtained from the generator by integrating GNN and Transformer, and fuse these features into a comprehensive feature vector to construct a training dataset;
[0093] S3: Construct a line loss prediction model, train it based on the training dataset, and during real-time prediction, through dynamic error feedback correction and real-time adjustment of the model, adapt to the rapid changes in the power grid state;
[0094] S4: Based on the line loss prediction model, obtain data in real time for prediction and analysis to obtain line loss abnormal points;
[0095] S5: Based on the abnormal points, combine statistical analysis and frequency analysis to identify the potential causes of the line loss abnormal points;
[0096] S6: Mark the location and time of the abnormal points based on the power grid topology map to facilitate on-site inspection and handling by maintenance personnel.
[0097] In this embodiment, S1 is specifically:
[0098] S11: Collect voltage, current, power, and timestamp data from smart meters, sensors, and historical records;
[0099] S12: Augment the dataset based on data augmentation methods, including noise addition, time sliding, and data interpolation;
[0100] S13: Construct a generator G and a discriminator D, and generate more samples similar to real data by alternately training the generator and the discriminator:
[0101] The discriminator D distinguishes between real data x and generated data G(z), and maximizes D:
[0102]
[0103] where D is the discriminator model; G is the generator model; x ∼ p data (x) represents real data sampled from the real data distribution p data ; z ∼ p z (z) represents the noise input sampled from the prior noise distribution p z ; log D(x) is the logarithmic probability that the real data x is judged as real data by the discriminator D; log(1 - D(G(z))) represents the logarithmic probability that the generated sample G(z) is judged as fake data by the discriminator D; represents the output of the discriminator D on the real data x; represents the output of the discriminator D on the generated data G(z);
[0104] The generator G attempts to deceive the discriminator D and minimize D:
[0105]
[0106] In this embodiment, GNN and Transformer are fused to extract features from the augmented dataset obtained from the generator, and these features are fused into a comprehensive feature vector to construct a training dataset, as follows:
[0107] The power network is represented as a graph G′=(V′,E′), where V′ represents nodes (such as substations) and E′ represents edges (such as power lines);
[0108] Let the initial feature vector of each node v be containing information such as voltage, current, and power;
[0109] GNN updates node features through information aggregation between the neighbor nodes of the node. The update rule of the feature of node v at the l-th layer is:
[0110]
[0111] where represents the feature vector of node v at the (l + 1)-th layer; is the feature vector of node u at the l-th layer; N(v) represents the neighbor nodes of node v; W (l) and b (l) are the weight and bias at the l-th layer respectively; σ is a non-linear activation function;
[0112] After L layers of propagation, the features of each node v are extracted and aggregated into a global feature vector H G :
[0113]
[0114] In Transformer, the multi-head self-attention mechanism is used to calculate the attention weights in the input sequence:
[0115]
[0116] where Q, K, and U are the query, key, and value matrices respectively, and d k is the dimension of the key;
[0117] The calculation formula of multi-head self-attention is:
[0118] MultiHead(Q,K,U)=Concat(head1,...,head i ,...,head h )W 0 ;
[0119] Among them, each head i is expressed as:
[0120] head i = Attention(QW i Q , KW i K , UW i U );
[0121] Among them, W i Q is the query matrix weight of the i-th head; W i K is the key matrix weight of the i-th head; W i U is the value matrix weight of the i-th head; W 0 is the output weight matrix;
[0122] After being processed by multiple layers of Transformer encoders, the output features h T of the last layer are obtained, and the global feature vector H T is obtained through a pooling operation;
[0123] The features extracted by GNN and Transformer are fused to form a comprehensive feature vector.
[0124] In this embodiment, bilinear pooling is used to fuse the features extracted by GNN and Transformer, specifically as follows:
[0125] First, calculate the outer product of the GNN and Transformer feature vectors:
[0126]
[0127] Among them, B is a matrix representing all possible second-order interactions between feature vectors;
[0128] Then, use a linear transformation matrix W bp, to reduce the dimension of the outer product matrix to a preset dimension to obtain the final comprehensive feature vector:
[0129] H fused = vec(B)W bp
[0130] Among them, vec(B) represents flattening the matrix B into a vector.
[0131] In this embodiment, the line loss prediction model adopts a fully connected neural network composed of a multi-layer perceptron, specifically as follows:
[0132] The fully connected neural network includes an input layer, a hidden layer, and an output layer; the input layer inputs a comprehensive feature vector;
[0133] The hidden layer includes a number of fully connected layers, and each layer is equipped with a non-linear activation function. The output of the l'-th layer is:
[0134] h (l′) =σ(W (l′) h (l′-1) +b (l′) );
[0135] where W (l′) and b (l′) are the weight matrix and the bias vector of the l'-th layer respectively; h (l′-1) is the output of the previous layer;
[0136] The output layer outputs a linear neuron for line loss prediction:
[0137] y=W (out) h (L′) +b (out) ;
[0138] where W (out) and b (out) are the weight matrix and the bias vector of the output layer respectively; L' is the total number of layers of the hidden layer;
[0139] During the training process, the mean squared error is used as the loss function to measure the error between the predicted value and the true value, and the gradient descent method is used to minimize the loss function.
[0140] In this embodiment, dynamic error feedback correction is used, specifically as follows:
[0141] Calculate the real-time prediction error:
[0142]
[0143] where, and y t are the predicted value and the true value at time t respectively;
[0144] Based on the real-time prediction error, online learning is performed to update the model parameters:
[0145]
[0146] where θ is the model parameter; η' is the online learning rate.
[0147] In this embodiment, based on the outliers, combined with statistical analysis and frequency analysis, the potential causes of the line loss outliers are identified, specifically as follows:
[0148] Calculate the average value and standard deviation of N data adjacent to the abnormal point x:
[0149]
[0150] Compare the data at the abnormal point with the average value and standard deviation to identify the deviation amount, including skewness and kurtosis:
[0151]
[0152] Calculate the difference of time series data, identify the rapid change situation, and use the frequency domain method to analyze the data to identify the anomalies at specific frequencies or periodicity;
[0153] Perform a fast Fourier transform on the time series data x(t) and convert it to the frequency domain:
[0154]
[0155] Analyze the spectrum ∣X(f)∣ and identify the frequency components greater than the threshold;
[0156] Calculate the power spectral density of the time series data and identify the changes in energy at specific frequencies:
[0157]
[0158] Compare the PSD of the data before and after the abnormal point to identify the abnormal frequency characteristics;
[0159] Based on the results of statistical and frequency analysis, combined with expert knowledge, determine the cause of the anomaly.
[0160] ① Load fluctuation detection:
[0161] Check whether there are significant load fluctuations before and after the abnormal point. By comparing the statistical characteristics and difference characteristics of current and power, identify load anomalies: If multiple load characteristics change rapidly at the same time, and there are significant deviations and kurtosis changes, it can be judged as load fluctuation.
[0162] ② Equipment fault detection:
[0163] Combined with equipment information, check the characteristics related to faults, such as current mutation, voltage abnormality, frequency interference, etc. Monitor the health status of the equipment, and determine whether the equipment may be faulty through historical data analysis and current data fluctuation characteristics.
[0164] ③ Periodic anomaly:
[0165] If a significant increase in specific frequency components is identified in the spectrum analysis, it may indicate the existence of periodic anomalies, such as voltage harmonics or periodic load changes.
[0166] In this embodiment, step S6 is specifically as follows:
[0167] Convert the power grid topology data into a graph. Draw nodes according to the power grid topology data, where each node represents a key point in the power grid (such as a substation or a user), and different colors or shapes are used to distinguish node types (for example, substations are represented by blue, and users are represented by green); draw edges according to the connection relationships in the topology data, and each edge represents a transmission line. Different line types and colors can be used to represent different power lines (for example, main lines are represented by solid lines, and branch lines are represented by dashed lines).
[0168] Add marks to the corresponding nodes or edges according to the location ID of the abnormal points. Different abnormal types can be marked with different icons or colors (for example, a red circle represents a device failure, and a yellow triangle represents a load fluctuation); add a time label to each abnormal point mark, and display the specific time when the abnormality occurred in the form of an icon or floating information, and classify and display different types of abnormal points, and further mark them on the basis of icons and colors (such as abnormal description information).
[0169] In this embodiment, based on the power grid topology data, use the force-directed layout algorithm to calculate the positions of abnormal nodes on the graph, solve the iterative positions of the nodes, and reach a mechanical equilibrium state.
[0170] Mark the abnormal points according to the final positions of the nodes to ensure that the marks are accurately placed on the corresponding nodes or lines:
[0171] The abnormal point marks carry specific time information and use the floating label function of the graphic tool in cooperation with Tang.
[0172] A line loss positioning system based on artificial intelligence and big data analysis, including a processor, a memory, and a computer program stored on the memory. When the processor executes the computer program, it specifically executes the steps in the above-mentioned line loss positioning method based on artificial intelligence and big data analysis
[0173] Those skilled in the art should understand that the embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0174] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, as well as the combination of flows and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices produce means for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0175] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory produce a manufactured article including instruction means for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0176] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in the flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in multiple blocks.
[0177] As mentioned above, the above are only preferred embodiments of the present invention, and the present invention is not limited to other forms. Any person skilled in the relevant art may use the disclosed technical content to make changes or modifications into equivalent embodiments with equivalent changes. However, any simple modifications, equivalent changes, and modifications made to the above embodiments based on the technical essence of the present invention without departing from the technical solution content of the present invention still fall within the protection scope of the technical solution of the present invention.
Claims
1. A line loss location method based on artificial intelligence and big data analysis, characterized in that: The following steps are involved: S1: Collect voltage, current, power and timestamp data from smart meters, sensors and historians, and augment the dataset using data augmentation and generative adversarial networks; S2: Fusion GNN and Transformer extract features from the expanded data set obtained by the generator, and fuse these features into a comprehensive feature vector to construct a training data set; S3: Build a line loss prediction model and train it based on the training data set. During real-time prediction, adjust the model in real time through dynamic error feedback correction to adapt to the rapid changes in the power grid status. S4: Based on the line loss prediction model, data is acquired in real time for prediction and analysis to obtain abnormal line loss points; S5: Based on the abnormal points, combined with statistical analysis and frequency analysis, identify the potential causes of abnormal line loss points; S6: Based on the grid topology map, the location and time of abnormal points are marked to facilitate on-site inspection and processing by operation and maintenance personnel.
2. The line loss location method based on artificial intelligence and big data analysis according to claim 1 is characterized in that: The S1 is specifically: S11: Collect voltage, current, power and timestamp data from smart meters, sensors and historians; S12: Expand the dataset based on data enhancement methods, including noise addition, time sliding, and data interpolation; S13: Construct the generator G and the discriminator D, and generate more samples similar to real data by alternately training the generator and the discriminator: The discriminator D distinguishes between real data x and generated data G(z), maximizing D: Among them, D is the discriminator model; G is the generator model; x~p data (x) represents the distribution of real data p data The real data sampled from z (z) represents the noise distribution from the prior z The noise input sampled from ; logD(x) is the logarithmic probability that the real data x is judged as real data by the discriminator D; log(1-D(G(z))) represents the logarithmic probability that the generated sample G(z) is judged as false data by the discriminator D; Represents the output of the discriminator D on the real data x; represents the output of the discriminator D on the generated data G(z); The generator G tries to deceive the discriminator D so that D is minimized:
3. The line loss location method based on artificial intelligence and big data analysis according to claim 2 is characterized in that: The fusion GNN and Transformer extract features from the expanded data set obtained by the generator, and fuse these features into a comprehensive feature vector to construct a training data set, as follows: The power network is represented as a graph G′=(V′,E′), where V′ represents a node (such as a substation) and E′ represents an edge; Assume that the initial eigenvector of each node v is GNN updates node features by aggregating information between neighboring nodes. The update rule of node v’s features in layer l is: in, Represents the feature vector of node v at layer l+1; is the feature vector of node u in layer l; N(v) represents the neighbor nodes of node v; W (l) and b (l) are the weight and bias of the lth layer respectively; σ is the nonlinear activation function; After propagation through L layers, the features of each node v are extracted and aggregated into a global feature vector H at the graph level. G : In Transformer, a multi-head self-attention mechanism is used to calculate the attention weights in the input sequence: where Q, K, and U are query, key, and value matrices, respectively, and d k is the dimension of the key; The calculation formula of Multi-head self-attention is: MultiHead(Q,K,U)=Concat(head1,...,head i ,...,head h )W 0 ; Among them, each head i It is expressed as: head i =Attention(QW i Q ,KW i K ,UW i U ); Among them, W i Q is the query matrix weight of the i-th head; W i K is the key matrix weight of the i-th head; W i U is the value matrix weight of the i-th head; W 0 is the output weight matrix; After being processed by the multi-layer Transformer encoder, the output feature h of the last layer is obtained T , the global feature vector H is obtained through pooling operation T ; The features extracted by GNN and Transformer are fused to form a comprehensive feature vector.
4. The line loss location method based on artificial intelligence and big data analysis according to claim 3 is characterized in that: Use bilinear pooling to fuse the features extracted by GNN and Transformer, as follows: First, calculate the outer product of the GNN and Transformer feature vectors: Where B is a matrix representing all possible second-order interactions between eigenvectors; Then use a linear transformation matrix W bp, Reduce the outer product matrix to a preset dimension to obtain the final comprehensive feature vector: H fused =vec(B)W bp Among them, vec(B) means flattening the matrix B into a vector.
5. The line loss location method based on artificial intelligence and big data analysis according to claim 1 is characterized in that: The line loss prediction model uses a fully connected neural network composed of multi-layer perceptrons, as follows: The fully connected neural network includes an input layer, a hidden layer and an output layer; the input layer inputs a comprehensive feature vector; The hidden layer includes several fully connected layers, each of which is equipped with a nonlinear activation function. The output of the l′th layer is: h (l′) =σ(W (l′) h (l′-1) +b (l′) ); Among them, W (l′) and b (l′) are the weight matrix and bias vector of the l′th layer respectively; h (l′-1) is the output of the previous layer; The output layer outputs a linear neuron for line loss prediction: y=W (out) h (L′) +b (out) ; Among them, W (out) and b (out) are the weight matrix and bias vector of the output layer respectively; L′ is the total number of hidden layers; During the training process, the mean square error is used as the loss function to measure the error between the predicted value and the true value, and the gradient descent method is used to minimize the loss function.
6. A line loss location method based on artificial intelligence and big data analysis according to claim 5, characterized in that: The dynamic error feedback correction is used as follows: Calculate the real-time prediction error: in, and t are the predicted value and true value at time t respectively; Perform online learning based on real-time prediction errors and update model parameters: Among them, θ is the model parameter; η′ is the online learning rate.
7. The line loss location method based on artificial intelligence and big data analysis according to claim 1 is characterized in that: Based on the abnormal points, combined with statistical analysis and frequency analysis, the potential causes of abnormal line loss points are identified, as follows: Calculate the mean and standard deviation of N adjacent data points of the outlier point x: Compare the data at the outlier points with the mean and standard deviation to identify deviations, including skewness and kurtosis: Calculate the difference of time series data to identify rapid changes, and use frequency domain methods to analyze data to identify anomalies at periodicity or specific frequencies; Perform fast Fourier transform on the time series data x(t) and convert it to the frequency domain: Analyze the spectrum |X(f)| and identify the frequency components greater than the threshold; Compute the power spectral density of time series data to identify changes in energy at specific frequencies: Compare the PSD of the data before and after the abnormal point to identify the abnormal frequency characteristics; Based on the statistical and frequency analysis results and combined with expert knowledge, the cause of the abnormality is determined.
8. The line loss location method based on artificial intelligence and big data analysis according to claim 1 is characterized in that: The step S6 is specifically as follows: Convert the grid topology data into a graph, draw nodes according to the grid topology data, each node represents a key point in the grid, and use different colors or shapes to distinguish node types; draw edges according to the connection relationship in the topology data, each edge represents a transmission line, and use different line types and colors to represent different power lines; According to the location ID of the anomaly point, a mark is added to the corresponding node or edge. Different anomaly types are marked with different icons or colors. A time label is added to each anomaly point mark to display the specific time when the anomaly occurred in the form of an icon or floating information. Different types of anomalies are classified and displayed, and further labeled based on icons and colors.
9. The line loss location method based on artificial intelligence and big data analysis according to claim 8, characterized in that: Based on the power grid topology data, the force-directed layout algorithm is used to calculate the position of abnormal nodes on the graph, solve the iterative position of the nodes, and achieve a mechanical equilibrium state. Mark the outliers according to the final position of the nodes, ensuring that the marks are accurately placed on the corresponding nodes or lines: The abnormal point marks are marked with specific time information, using the floating label function of Tang's graphics tool.
10. A line loss location system based on artificial intelligence and big data analysis, characterized in that: It includes a processor, a memory, and a computer program stored in the memory. When the processor executes the computer program, it specifically performs the steps in the line loss location method based on artificial intelligence and big data analysis as described in any one of claims 1 to 9.
Citation Information
Cited By
Real-time line loss analysis method and system based on cross-modal measurement data fusion
CN120634062A
Power grid line loss abnormity correlation diagnosis method based on deep learning
CN121097682A
