Power data anomaly detection method, system, device and medium based on graph computing
By optimizing the preprocessing of power data and constructing graph models, and using graph computing algorithms for anomaly detection, the problem of poor power data detection in the existing technology is solved, and efficient and accurate anomaly detection and intuitive result output are achieved, providing The power system provides stable operation support.
Patent Information
- Application Number
- CN202410805141.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2044-06-21
AI Technical Summary
The existing technology lacks a pre-processing method for power data in power data anomaly detection and cannot fully consider its characteristics and needs, resulting in low data quality and affecting the detection effect; at the same time, the existing technology ignores the deep correlation and correlation of power data. Complex relationships affect the accuracy and comprehensiveness of detection.
By optimizing the preprocessing operations of power data, we build a power data graph model, extract structural and attribute features, and use graph computing algorithms to perform anomaly detection, generate anomaly detection results, and perform visual output.
It improves the accuracy, comprehensiveness and efficiency of power data anomaly detection, provides a high-quality data foundation and intuitive detection results, and supports the safe and stable operation of the power system.
Smart Images

Figure CN118378023B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power big data analysis and data mining, and more specifically to a method, system, device and medium for detecting power data anomaly based on graph computing. Background Art
[0002] With the rapid development of smart grids and the construction of energy internet, power data has become an important source of information in the fields of power grid operation monitoring, fault warning, and energy optimization and allocation. However, due to the complexity of equipment in the power system and the expansion of the power grid, the amount of power data has exploded, and the types and complexity of data are also increasing. Therefore, how to efficiently and accurately extract useful information from massive power data and detect possible anomalies in real time has become a major challenge facing the power industry.
[0003] Traditional power data anomaly detection methods are usually based on statistical principles or simple threshold judgments. These methods ignore the structure and relationship information between power data and only focus on a single attribute or indicator of the data, resulting in limited accuracy of anomaly detection.
[0004] In recent years, the rapid development of graph computing technology has provided a new idea for solving the problem of power data anomaly detection. Graph computing technology is a data processing method based on graph structure, which can use graph models to intuitively reflect the structure and relationship of power data, providing a rich information basis for anomaly detection.
[0005] However, despite the significant advantages of graph computing technology in power data anomaly detection, existing technologies still have some defects. First, the preprocessing operation of power data is a key step in building a high-quality power data graph model, but existing preprocessing methods often lack pertinence and fail to fully consider the characteristics and requirements of power data. This may result in low quality of preprocessed data and affect the effect of subsequent anomaly detection.
[0006] Secondly, when constructing a graph model of power data, existing technologies often only consider part of the structure and relationship information of power data, ignoring the deep-level associations and complex relationships between data. This may result in the graph model being unable to fully reflect the actual situation of power data, thus affecting the accuracy and comprehensiveness of anomaly detection.
[0007] In addition, when using graph computing algorithms for anomaly detection, existing technologies lack optimization and improvement for the characteristics of power data. Power data has unique characteristics such as time series, spatiality, and correlation, which put forward special requirements for the selection and design of anomaly detection algorithms. However, existing technologies often do not fully consider these characteristics, resulting in limited effectiveness and efficiency of anomaly detection. Summary of the invention
[0008] In view of the above problems, the purpose of the present invention is to provide a method, system, device and medium for power data anomaly detection based on graph computing, which improves the accuracy, comprehensiveness and efficiency of power data anomaly detection by optimizing the preprocessing operations of power data, improving the method of constructing the power data graph model, and improving the application of graph computing algorithms in power data anomaly detection.
[0009] To achieve the above object, the present invention is implemented through the following technical solutions: a method for detecting anomalies in power data based on graph computing, comprising:
[0010] Extract power big data, and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in turn;
[0011] Based on the preprocessed power big data, a power data graph model is constructed according to the structure and relationship of power data;
[0012] Based on the power data graph model, the structural characteristics and attribute characteristics of power data are extracted;
[0013] According to the structural characteristics and attribute characteristics of power data, the graph computing algorithm is used to perform anomaly detection on the power data graph model and generate anomaly detection results;
[0014] Visualize the anomaly detection results.
[0015] Furthermore, the extraction of power big data sequentially performs data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data, including:
[0016] Extract power big data, create unique constraints, and use unique constraints to detect and remove duplicate data records in power big data;
[0017] Use the isolation forest algorithm to detect outliers in power big data and perform outlier correction;
[0018] Format conversion and standardization of power big data;
[0019] Classify the power big data according to data attributes, and scale each type of data according to its mean and standard deviation to make the power big data normally distributed;
[0020] Obtain the data source information of power big data and standardize the data format, unit and coding of different data sources into a unified format;
[0021] Determine the mapping relationship between the corresponding fields of the power big data from different data sources, use ETL tools to extract, transform and load the power big data, and store it in a unified data set;
[0022] Obtain the power big data in a unified data set and use the autoencoder to perform data dimension reduction;
[0023] The power big data is grouped according to preset standards, samples are extracted from each group of data, and all samples are aggregated into sample data.
[0024] Furthermore, based on the preprocessed power big data, according to the structure and relationship of the power data, a power data graph model is constructed, including:
[0025] Based on the sample data, identify the key entities in the sample data and the association relationships between the key entities;
[0026] Define key entities as nodes, define the relationships between key entities as edges, and use the graph database to build a graph model;
[0027] Import sample data, create a corresponding graph structure based on the defined nodes and edges, determine the direction of the edges, and generate a power data graph model.
[0028] Furthermore, the types of key entities include but are not limited to generators, substations, power lines, and power equipment.
[0029] Furthermore, the structural features and attribute features of the power data are extracted based on the power data graph model, including:
[0030] Traverse all nodes in the power data graph model;
[0031] For each node, determine the node degree by counting the number of edges connected to it;
[0032] Use the shortest path algorithm to find all paths between any two nodes, evaluate the efficiency of each path based on the attributes of the nodes and edges on the path, and take the path with the highest efficiency as the optimal path between the two nodes;
[0033] Select any type of key entity, locate the node of the key entity in the power data graph model, and extract the attribute information of the node;
[0034] Find all edges representing power lines in the power data graph model and extract edge attributes; edge data includes but is not limited to voltage level, current limit, transmission capacity, and real-time load.
[0035] Further, the method of performing anomaly detection on the power data graph model using a graph computing algorithm according to the structural characteristics and attribute characteristics of the power data and generating anomaly detection results includes:
[0036] Select a matching graph computing algorithm based on the needs of anomaly detection; graph computing algorithms include: neighbor-based algorithms, graph embedding-based algorithms, and graph neural network-based algorithms;
[0037] Input structural features and attribute features into graph computing algorithms to identify abnormal data;
[0038] Check the data characteristics of abnormal data and determine the abnormal type based on the data characteristics of abnormal data;
[0039] Generate anomaly detection results based on abnormal data and anomaly type.
[0040] Further, the visual output of the abnormality detection result includes:
[0041] Use visualization tools to graphically display anomaly detection results.
[0042] Correspondingly, the present invention also discloses a power data anomaly detection system based on graph computing, comprising:
[0043] The preprocessing module is used to extract power big data and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in sequence;
[0044] A model building module is used to build a power data graph model based on the preprocessed power big data and the structure and relationship of the power data;
[0045] A feature extraction module is used to extract structural features and attribute features of power data based on the power data graph model;
[0046] A calculation module, used to perform anomaly detection on the power data graph model using a graph calculation algorithm according to the structural characteristics and attribute characteristics of the power data, and generate anomaly detection results;
[0047] The result display module is used to visualize the anomaly detection results.
[0048] Accordingly, the present invention discloses a power data anomaly detection device based on graph computing, comprising:
[0049] A memory, used for storing a power data anomaly detection program based on graph computing;
[0050] A processor is used to implement the steps of the power data anomaly detection method based on graph calculation as described in any one of the above items when executing the power data anomaly detection program based on graph calculation.
[0051] Accordingly, the present invention discloses a readable storage medium, on which is stored a graph-based power data anomaly detection program. When the graph-based power data anomaly detection program is executed by a processor, the steps of the graph-based power data anomaly detection method as described in any one of the above items are implemented.
[0052] Compared with the prior art, the present invention has the following beneficial effects:
[0053] 1. The present invention realizes comprehensive, efficient and accurate anomaly detection of power data by optimizing the preprocessing process of power data, constructing a power data graph model, accurately extracting features, efficiently and accurately detecting anomalies, and intuitive visual output, thus providing strong support for the safe and stable operation of the power system.
[0054] 2. Through a detailed data preprocessing process, including data cleaning, data transformation, data integration and data simplification, the present invention can effectively remove duplicate records and outliers in power big data, improve data accuracy and consistency, and provide a high-quality data foundation for subsequent analysis.
[0055] 3. In the process of constructing the power data graph model, the present invention fully considers the key entities in the power data (such as generators, substations, power lines, etc.) and the relationships between them, so that the structure and relationship of the power data can be fully displayed, providing more comprehensive and accurate information for anomaly detection.
[0056] 4. Based on the electric power data graph model, the present invention can accurately extract the structural characteristics and attribute characteristics of electric power data by traversing nodes, calculating node degrees, and finding optimal paths. These characteristics can comprehensively reflect the characteristics of electric power data and provide strong support for subsequent anomaly detection.
[0057] 5. The present invention utilizes graph computing algorithms to perform anomaly detection on the electric power data graph model, which can fully utilize the advantages of graph computing in processing graph structured data. Through efficient methods such as neighbor-based algorithms, graph embedding-based algorithms, or graph neural network-based algorithms, abnormal data can be accurately identified and the type of anomaly can be determined, thereby greatly improving the accuracy and efficiency of anomaly detection.
[0058] 6. The present invention outputs the abnormality detection results in a visual manner, making the detection results more intuitive and easy to understand, which is convenient for users to quickly understand the abnormal situation and processing results, and improves the practicality and operability of abnormality detection.
[0059] It can be seen that compared with the prior art, the present invention has outstanding substantive features and significant progress, and the beneficial effects of its implementation are also obvious. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0061] Figure 1 It is a method flow chart of a specific implementation mode of the present invention.
[0062] Figure 2 It is a system structure diagram of a specific implementation mode of the present invention.
[0063] In the figure, 1. Preprocessing module; 2. Model building module; 3. Feature extraction module; 4. Calculation module; 5. Result display module. DETAILED DESCRIPTION
[0064] In order to enable those skilled in the art to better understand the scheme of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0065] See also Figure 1 As shown, this embodiment provides a method for detecting anomalies in power data based on graph computing, comprising the following steps:
[0066] S1: Extract power big data and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in sequence.
[0067] In a specific implementation manner, the specific process of this step is as follows:
[0068] 1. Log in to the power big data platform and extract power big data.
[0069] 2. Use the CREATE TABLE statement or ALTER TABLE statement with the ADD CONSTRAINT clause to create a unique constraint, and use the unique constraint to detect and remove duplicate data records in power big data.
[0070] 3. Use the isolation forest algorithm to detect outliers in power big data and perform outlier correction. When performing outlier correction, outliers can be deleted or replaced.
[0071] 4. Convert and standardize the format of power big data. Since power big data may come from multiple different data sources, the data format may not be uniform. During the data cleaning process, the data needs to be converted and standardized to ensure data consistency and analyzability.
[0072] 5. Classify the power big data according to the data attributes, and scale each type of data according to its mean and standard deviation to make the power big data normally distributed. You can also use the method of scaling the data proportionally to make it fall into a small specific interval. The purpose is to make the scaled data easier to compare and analyze.
[0073] 6. Obtain the data source information of power big data and standardize the data format, unit and coding of different data sources into a unified format.
[0074] 7. Determine the mapping relationship between the corresponding fields of the power big data from different data sources, use ETL tools to extract, transform and load the power big data, and store it in a unified data set. ETL tools have powerful data transformation and mapping functions, which can effectively simplify the process of data merging.
[0075] 8. Obtain the power big data in the unified data set and use the autoencoder to perform data dimensionality reduction. Among them, the autoencoder is a neural network model that learns the low-dimensional representation of data through unsupervised learning. The autoencoder consists of two parts: the encoder and the decoder. The encoder compresses the input data into a low-dimensional representation, and the decoder restores the low-dimensional representation to the original data. By optimizing the reconstruction error, the autoencoder can learn the low-dimensional representation of the data.
[0076] 9. Group the power big data according to preset standards, extract samples from each group of data, and aggregate all samples into sample data.
[0077] As an example, the script content of this step is as follows:
[0078] import pandas as pd
[0079] from sklearn.preprocessing import StandardScaler, MinMaxScaler
[0080] from sklearn.ensemble import IsolationForest
[0081] import sqlite3
[0082] # 1. Log in to the power big data platform and extract data (this step usually involves API calls or database queries, and here it is assumed that the data has been exported to a local file)
[0083] df = pd.read_csv('power_data.csv')
[0084] # 2. Remove duplicate data
[0085] df.drop_duplicates(inplace=True)
[0086] # 3. Outlier detection and correction - using the isolation forest algorithm
[0087] isof = IsolationForest(contamination=0.01)
[0088] isof.fit(df)
[0089] df['anomaly'] = isof.predict(df)
[0090] df = df[df['anomaly'] == 1] # Delete rows marked as anomalies
[0091] df.drop(columns=['anomaly'], inplace=True)
[0092] # 4. Format conversion and standardization
[0093] # Assume that the numerical columns need to be standardized
[0094] num_cols = df.select_dtypes(include='number').columns.tolist()
[0095] 22scaler = StandardScaler()
[0096] 23df[num_cols] = scaler.fit_transform(df[num_cols])
[0097] # 5. Scaling the data
[0098] min_max_scaler = MinMaxScaler()
[0099] df[num_cols] = min_max_scaler.fit_transform(df[num_cols])
[0100] # 6-7. Data source information standardization and ETL
[0101] # Based on the standardization and mapping of the data source, directly use DataFrame to represent it
[0102] # 8. Data Dimensionality Reduction - Using Autoencoder (This is just a conceptual demonstration, actual application requires training model)
[0103] # from tensorflow.keras.layers import Input, Dense
[0104] # from tensorflow.keras.models import Model
[0105] # input_dim = df.shape[1]
[0106] # encoding_dim = int(input_dim / 2)
[0107] # input_layer = Input(shape=(input_dim,))
[0108] # encoded = Dense(encoding_dim, activation='relu')(input_layer)
[0109] # decoded = Dense(input_dim, activation='sigmoid')(encoded)
[0110] # autoencoder = Model(input_layer, decoded)
[0111] S2: Based on the preprocessed power big data, a power data graph model is constructed according to the structure and relationship of the power data.
[0112] In a specific implementation, firstly, based on the sample data, the key entities in the sample data and the association relationships between the key entities are identified, wherein the types of key entities include but are not limited to generators, substations, power lines, and power equipment.
[0113] Then, the key entities are defined as nodes, the associations between the key entities are defined as edges, and the graph model is constructed using a graph database. In the graph model, nodes represent entities of the power system, such as generators, substations, power lines, power equipment, etc. Edges represent the relationship between nodes, such as a power line connecting two substations, or a generator supplying power to a substation. Correspondingly, the attribute information of the edge can represent the parameters of the power line, such as voltage level, current limit, transmission capacity, real-time load, etc. In addition, this method can use graph databases such as Neo4j, JanusGraph, GraphX, etc. to construct a graph model.
[0114] Finally, the sample data is imported, the corresponding graph structure is created according to the defined nodes and edges, and the direction of the edges is determined to generate the power data graph model. In addition, the weight or attribute of the edge can be added to represent additional information such as power flow and voltage level.
[0115] As an example, the script content of this step is as follows:
[0116] from neo4j import GraphDatabase
[0117] # Initialize the Neo4j driver
[0118] driver = GraphDatabase.driver("bolt: / / localhost:7687", auth=("neo4j","password"))
[0119] # Create nodes and relationships
[0120] with driver.session() as session:
[0121] # Create nodes for the generator
[0122] session.run("CREATE (:Generator {name: 'Generator1', capacity:1000})")
[0123] # Assume there is a power line connecting two substations
[0124] session.run("""
[0125] MATCH (station1:Substation), (station2:Substation)
[0126] WHERE station1.name = 'StationA' AND station2.name = 'StationB'
[0127] CREATE (station1)-[:CONNECTED_TO {length: 100, voltage: 220}]->(station2)
[0128] """)
[0129] driver.close()
[0130] S3: Based on the power data graph model, the structural characteristics and attribute characteristics of power data are extracted.
[0131] In a specific implementation, all nodes in the power data graph model are first traversed; for each node, the node degree of the node is determined by calculating the number of edges connected to it; the node degree reflects the importance and connectivity of the node in the graph.
[0132] Then, the shortest path algorithm is used to find all paths between any two nodes, and the efficiency of each path is evaluated according to the properties of the nodes and edges on the path, and the path with the highest efficiency is taken as the optimal path between the two nodes. At this point, the extraction of structural features is completed.
[0133] When extracting attribute features, first select any type of key entity, locate the node of this type of key entity in the power data graph model, and extract the attribute information of the node. The extracted attribute information is all information related to the working capacity and status of the node. Then, find all the edges representing the power lines in the power data graph model and extract the attributes of the edges; the edge data includes but is not limited to voltage level, current limit, transmission capacity, and real-time load.
[0134] It is important to note that when extracting features, it is necessary to ensure that the selected features can fully and accurately reflect the structure and properties of the power system. At the same time, the correlation and redundancy between different features should be fully considered to avoid extracting too many similar or irrelevant features. According to the specific application scenarios and requirements, select appropriate feature extraction methods and tools.
[0135] As an example, the script content of this step is as follows:
[0136] import networkx as nx
[0137] import pandas as pd
[0138] from py2neo import Graph
[0139] graph_db = Graph(uri="bolt: / / localhost:7687", user="neo4j", password="password")
[0140] query = "MATCH (n) RETURN n"
[0141] nodes_df = pd.DataFrame(graph_db.run(query).data())
[0142] G = nx.Graph()
[0143] G.add_node('Generator1', type='Generator', capacity=1000)
[0144] G.add_node('SubstationA', type='Substation')
[0145] G.add_node('SubstationB', type='Substation')
[0146] G.add_edge('SubstationA', 'SubstationB', type='LINE', length=100,voltage=220)
[0147] # Structural feature extraction: node degree
[0148] node_degrees = dict(G.degree())
[0149] for node, degree in node_degrees.items():
[0150] print(f"Node {node} has a degree of {degree}")
[0151] # Attribute feature extraction: extract attributes from nodes and edges
[0152] properties = {}
[0153] for node in G.nodes(data=True):
[0154] properties[node[0]] = node[1]
[0155] for edge in G.edges(data=True):
[0156] if edge[2]:# Prevent edges without attributes
[0157] properties[f"{edge[0]}-{edge[1]}"] = edge[2]
[0158] # Save attribute features to DataFrame for further analysis
[0159] props_df = pd.DataFrame.from_dict(properties, orient='index')
[0160] print(props_df)
[0161] S4: Based on the structural characteristics and attribute characteristics of the power data, the graph computing algorithm is used to perform anomaly detection on the power data graph model and generate anomaly detection results.
[0162] In a specific implementation, firstly, a matching graph computing algorithm is selected according to the needs of anomaly detection; the graph computing algorithm includes: a neighbor-based algorithm, a graph embedding-based algorithm, and a graph neural network-based algorithm. Specifically, the local anomaly factor LOF algorithm, the Node2Vec algorithm, the GraphSAGE algorithm, the GCN algorithm, and the GraphSAGE+LSTM algorithm can be used.
[0163] Then, the structural features and attribute features are input into the graph computing algorithm to identify abnormal data. During identification, the graph computing algorithm will learn the patterns of normal data and identify abnormal data that is significantly different from the normal pattern.
[0164] Finally, check the data features of the abnormal data, determine the abnormal type based on the data features of the abnormal data, and generate anomaly detection results based on the abnormal data and the abnormal type.
[0165] As an example, the script content of this step is as follows:
[0166] def detect_anomalies_on_edges(G, threshold):
[0167] anomalies = []
[0168] for u, v, data in G.edges(data=True):
[0169] if 'voltage' in data and data['voltage']>threshold:
[0170] anomalies.append((u, v))
[0171] return anomalies
[0172] # Set voltage abnormality threshold
[0173] voltage_threshold = 250
[0174] anomalous_edges = detect_anomalies_on_edges(G, voltage_threshold)
[0175] print("Anomalous edges based on voltage:", anomalous_edges)
[0176] S5: Visualize and output the anomaly detection results.
[0177] In a specific implementation manner, the Gephi tool or the NetworkX tool displays the abnormal results in a graphical manner to facilitate understanding and analysis.
[0178] As an example, the script content of this step is as follows:
[0179] import matplotlib.pyplot as plt
[0180] # Draw a network diagram and mark abnormal edges
[0181] pos = nx.spring_layout(G)# Use spring layout
[0182] # Draw normal edges
[0183] nx.draw_networkx_edges(G, pos, edgelist=set(G.edges()) - set(anomalous_edges))
[0184] # Draw abnormal edges using different colors
[0185] nx.draw_networkx_edges(G, pos, edgelist=anomalous_edges, edge_color='r', width=2)
[0186] # Draw nodes
[0187] nx.draw_networkx_nodes(G, pos, node_size=500)
[0188] # Draw node labels
[0189] nx.draw_networkx_labels(G, pos)
[0190] plt.title("Power Grid with Anomalous Edges Highlighted")
[0191] plt.show()
[0192] The present invention provides a method for detecting anomalies in power data based on graph computing. By optimizing the preprocessing process of power data, constructing a power data graph model, accurately extracting features, efficiently and accurately detecting anomalies, and intuitive visual output, it achieves comprehensive, efficient and accurate anomaly detection of power data, providing strong support for the safe and stable operation of the power system.
[0193] See also Figure 2 As shown, the present invention also discloses a power data anomaly detection system based on graph computing, including: a preprocessing module 1, a model building module 2, a feature extraction module 3, a calculation module 4 and a result display module 5.
[0194] The preprocessing module 1 is used to extract the power big data and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in sequence.
[0195] The model building module 2 is used to build a power data graph model based on the preprocessed power big data and the structure and relationship of the power data.
[0196] The feature extraction module 3 is used to extract the structural features and attribute features of the power data based on the power data graph model.
[0197] The calculation module 4 is used to perform anomaly detection on the power data graph model using a graph calculation algorithm according to the structural characteristics and attribute characteristics of the power data, and generate anomaly detection results.
[0198] The result display module 5 is used to visualize the anomaly detection results.
[0199] The specific implementation of the power data anomaly detection system based on graph computing in this embodiment is basically the same as the specific implementation of the power data anomaly detection method based on graph computing described above, and will not be repeated here.
[0200] The present invention also discloses a power data anomaly detection device based on graph computing, comprising a processor and a memory; wherein, when the processor executes the power data anomaly detection program based on graph computing stored in the memory, the steps of the power data anomaly detection method based on graph computing as described in any one of the above items are implemented.
[0201] Furthermore, the power data anomaly detection device based on graph computing in this embodiment may also include:
[0202] The input interface is used to obtain the graph-based power data anomaly detection program imported from the outside, and save the obtained graph-based power data anomaly detection program to the memory, and can also be used to obtain various instructions and parameters transmitted by external terminal devices, and transmit them to the processor, so that the processor can use the above various instructions and parameters to carry out corresponding processing. In this embodiment, the input interface can specifically include but is not limited to a USB interface, a serial interface, a voice input interface, a fingerprint input interface, a hard disk reading interface, etc.
[0203] The output interface is used to output various data generated by the processor to the terminal device connected thereto, so that other terminal devices connected to the output interface can obtain various data generated by the processor. In this embodiment, the output interface may specifically include but is not limited to a USB interface, a serial interface, etc.
[0204] A communication unit is used to establish a remote communication connection between the power data anomaly detection device based on graph computing and an external server, so that the power data anomaly detection device based on graph computing can mount the image file to the external server. In this embodiment, the communication unit may specifically include but is not limited to a remote communication unit based on wireless communication technology or wired communication technology.
[0205] The keyboard is used to obtain various parameter data or instructions input by the user by tapping the keycaps in real time.
[0206] A display is used to display relevant information of the power data anomaly detection process based on graph computing in real time.
[0207] The mouse can be used to assist users in inputting data and simplify user operations.
[0208] The present invention also discloses a readable storage medium, wherein the readable storage medium includes a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable hard disk, a CD-ROM or any other form of storage medium known in the technical field. The readable storage medium stores a graph-based power data anomaly detection program, and when the graph-based power data anomaly detection program is executed by a processor, the steps of the graph-based power data anomaly detection method described in any one of the above items are implemented.
[0209] In summary, the present invention improves the accuracy, comprehensiveness and efficiency of power data anomaly detection by optimizing the preprocessing operation of power data, improving the construction method of the power data graph model, and improving the application of graph calculation algorithm in power data anomaly detection.
[0210] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the method disclosed in the embodiment, since it corresponds to the system disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0211] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0212] In the several embodiments provided by the present invention, it should be understood that the disclosed systems, systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.
[0213] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0214] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.
[0215] Similarly, each processing unit in each embodiment of the present invention may be integrated into one functional module, or each processing unit may exist physically, or two or more processing units may be integrated into one functional module.
[0216] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0217] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0218] The above is a detailed introduction to the graph-based power data anomaly detection method, system, device and readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.
Claims
1. A method for detecting anomalies in power data based on graph computing, characterized in that: include: Extract power big data, and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in turn; Based on the preprocessed power big data, a power data graph model is constructed according to the structure and relationship of power data; Based on the power data graph model, the structural characteristics and attribute characteristics of power data are extracted; According to the structural characteristics and attribute characteristics of power data, the graph computing algorithm is used to perform anomaly detection on the power data graph model and generate anomaly detection results; Visualize the anomaly detection results; The extraction of power big data, sequentially performing data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data, includes: Extract power big data, create unique constraints, and use unique constraints to detect and remove duplicate data records in power big data; Use the isolation forest algorithm to detect outliers in power big data and perform outlier correction; Format conversion and standardization of power big data; The power big data is classified according to data attributes, and each type of data is scaled according to its mean and standard deviation to make the power big data normally distributed; Obtain the data source information of power big data and standardize the data format, unit and coding of different data sources into a unified format; Determine the mapping relationship between the corresponding fields of the power big data from different data sources, use ETL tools to extract, transform and load the power big data, and store it in a unified data set; Obtain the power big data in a unified data set and use the autoencoder to perform data dimension reduction processing; The power big data is grouped according to the preset standards, samples are extracted from each group of data, and all samples are aggregated into sample data; The power data graph model is constructed based on the preprocessed power big data and the structure and relationship of the power data, including: Based on the sample data, identify key entities in the sample data and the association relationships between the key entities; Define key entities as nodes, define the relationships between key entities as edges, and use the graph database to build a graph model; Import sample data, create a corresponding graph structure based on the defined nodes and edges, determine the direction of the edges, and generate a power data graph model; The types of key entities include: generators, substations, power lines, and power equipment; The method of extracting structural features and attribute features of power data based on the power data graph model includes: Traverse all nodes in the power data graph model; For each node, determine the node degree by counting the number of edges connected to it; Use the shortest path algorithm to find all paths between any two nodes, evaluate the efficiency of each path based on the attributes of the nodes and edges on the path, and take the path with the highest efficiency as the optimal path between the two nodes; Select any type of key entity, locate the node of the key entity in the power data graph model, and extract the attribute information of the node; Find all edges representing power lines in the power data graph model and extract edge attributes; edge data includes: voltage level, current limit, transmission capacity, and real-time load.
2. The method for detecting anomalies in power data based on graph computing according to claim 1, characterized in that: The method of performing anomaly detection on the power data graph model using a graph computing algorithm according to the structural characteristics and attribute characteristics of the power data and generating anomaly detection results includes: Select a matching graph computing algorithm based on the needs of anomaly detection; graph computing algorithms include: neighbor-based algorithms, graph embedding-based algorithms, and graph neural network-based algorithms; Input structural features and attribute features into graph computing algorithms to identify abnormal data; Check the data characteristics of abnormal data and determine the abnormal type based on the data characteristics of abnormal data; Generate anomaly detection results based on abnormal data and anomaly type.
3. The method for detecting anomaly of power data based on graph computing according to claim 2, characterized in that: The visual output of the anomaly detection result includes: Use visualization tools to graphically display anomaly detection results.
4. A power data anomaly detection system based on graph computing, characterized in that: The system adopts the power data anomaly detection method based on graph calculation as described in any one of claims 1 to 3; The system comprises: The preprocessing module is used to extract power big data and perform data cleaning, data transformation, data integration and data simplification preprocessing operations on the power big data in sequence; A model building module is used to build a power data graph model based on the preprocessed power big data and the structure and relationship of the power data; A feature extraction module is used to extract structural features and attribute features of power data based on the power data graph model; A calculation module, used to perform anomaly detection on the power data graph model using a graph calculation algorithm according to the structural characteristics and attribute characteristics of the power data, and generate anomaly detection results; The result display module is used to visualize the anomaly detection results.
5. A power data anomaly detection device based on graph computing, characterized in that: include: A memory, used for storing a power data anomaly detection program based on graph computing; A processor, configured to implement the steps of the method for detecting anomalies of power data based on graph computing as claimed in any one of claims 1 to 3 when executing the program for detecting anomalies of power data based on graph computing.
6. A readable storage medium, characterized in that: The readable storage medium stores a graph-based power data anomaly detection program, which, when executed by a processor, implements the steps of the graph-based power data anomaly detection method according to any one of claims 1 to 3.
Citation Information
Patent Citations
Distribution network state on-line detection method based on graph neural network
CN115114990A
Visual power grid model fault response method and system
CN116822334A
Cited By
Power data quality evaluation method and system based on anomaly detection
CN119782966A
A power data quality evaluation method and system based on anomaly detection
CN119782966B
