Electric power metering equipment anomaly detection method and device based on knowledge graph
By constructing an abnormal detection knowledge graph for power metering equipment, using the related information between the equipment and user behavior data, accurate detection and rapid operation and maintenance of abnormalities of power metering equipment are achieved, and the problem of inaccurate detection results in the prior art is solved.
Patent Information
- Application Number
- CN202510059415.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-04-22
AI Technical Summary
In the detection of abnormality of power metering equipment, it is difficult to fully utilize the related information and user behavior data between the equipment in the prior art, resulting in inaccurate detection of detection results and difficult to quickly feedback.
Using a knowledge graph-based method, the power state data of the power metering equipment is obtained, pre-processed, and based on the abnormal state nodes and attributes defined in the constructed abnormality detection knowledge graph, the closest abnormal state is determined through similarity calculation, thereby obtaining the associated abnormal failure cause and operation and maintenance operation guidance.
It improves the accuracy and reliability of abnormal detection, reduces misjudgment and misjudgment, helps operation and maintenance personnel to quickly locate problems and take effective measures, and improves equipment operation and maintenance efficiency.
Smart Images

Figure CN119862518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of electric power metering, and in particular to a method and device for detecting anomalies in electric power metering equipment based on a knowledge graph. Background Art
[0002] With the rapid development of smart grids and the widespread application of electric energy metering equipment, the importance of metering equipment such as electric energy meters in power grid operation has increased significantly. However, metering anomalies (such as abnormal electric energy meter data, metering errors, and equipment failures) pose a serious threat to the normal operation of the power system and user experience. Traditional anomaly detection methods are obviously insufficient in dealing with complex scenarios, multi-source data, and dynamic changes.
[0003] Current metrology anomaly detection methods mainly rely on traditional models based on rules or statistical analysis, which have the following shortcomings: Lack of dynamic adjustment capabilities, making it difficult to adapt to different power areas, equipment characteristics and seasonal changes in electricity consumption. Lack of integration in the data processing process, making it difficult to quickly feed back analysis results to the operation and maintenance department. Failure to fully utilize the correlation information between devices and user behavior data for abnormal root cause analysis and family (e.g., electricity meters of the same brand, electricity meters in the same application environment) defect diagnosis. Summary of the invention
[0004] In view of this, the present application provides a method for detecting anomalies in electric metering equipment based on a knowledge graph to solve the technical problem in the prior art that the correlation information between devices and user behavior data cannot be fully utilized for abnormal root cause analysis.
[0005] According to a first aspect of the present application, a method for detecting anomalies of electric power metering equipment based on a knowledge graph is provided, comprising: Obtaining power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; Preprocessing the power status data; According to the abnormal state nodes and their attributes defined in the knowledge graph for abnormal detection of electric power metering equipment, the most similar abnormal state is determined by similarity calculation. The knowledge graph for abnormal detection of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical electric power state data, historical fault records and operation and maintenance logs of electric power metering equipment. The knowledge graph for abnormal detection of electric power metering equipment includes graph nodes and directed relationship edges. According to the node attributes corresponding to the closest abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance on the power metering equipment determined to have abnormalities.
[0006] According to a second aspect of the present application, a knowledge graph-based power metering equipment anomaly detection device is provided, comprising: A data acquisition module is used to acquire power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; A data processing module, used for preprocessing power status data; The abnormality judgment module is used to judge the most similar abnormal state through similarity calculation based on the abnormal state nodes and their attributes defined in the abnormality detection knowledge graph of electric power metering equipment, wherein the abnormality detection knowledge graph of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical power state data, historical fault records and operation and maintenance logs of the electric power metering equipment, and the abnormality detection knowledge graph of electric power metering equipment includes graph nodes and directed relationship edges; The fault location module is used to obtain the associated abnormal fault causes and operation and maintenance operation instructions based on the node attributes corresponding to the closest abnormal state determined, so as to perform abnormal operation and maintenance on the power metering equipment determined to have an abnormality.
[0007] According to a third aspect of the present application, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned knowledge graph-based power metering equipment anomaly detection method are implemented.
[0008] According to a fourth aspect of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned knowledge graph-based power metering equipment anomaly detection method are implemented.
[0009] By means of the above technical scheme, the present invention provides a method, device and equipment for detecting abnormalities of electric power metering equipment based on knowledge graph, which obtains the electric power status data of the electric power metering equipment; pre-processes the electric power status data; determines the closest abnormal state through similarity calculation according to the abnormal state nodes and their attributes defined in the knowledge graph for detecting abnormalities of the electric power metering equipment; obtains the associated abnormal fault causes and operation and maintenance operation instructions according to the node attributes corresponding to the determined closest abnormal state, so as to perform abnormal operation and maintenance on the electric power metering equipment that is determined to have abnormalities. The accuracy and reliability of detection are improved, misjudgment and missed judgment are reduced, and the operation and maintenance personnel are helped to quickly locate the problem and take effective measures by automatically associating the fault causes and operation and maintenance instructions, thereby improving the efficiency of equipment operation and maintenance.
[0010] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application and to implement it in accordance with the contents of the specification, and to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of an application scenario of a method for detecting anomalies of electric power metering equipment based on a knowledge graph provided in an embodiment of the present application is shown; Figure 2 A schematic diagram of a flow chart of a method for detecting anomalies of electric power metering equipment based on a knowledge graph provided in an embodiment of the present application is shown; Figure 3 A flow chart of a method for constructing a knowledge graph for abnormality detection of electric power metering equipment provided in an embodiment of the present application is shown; Figure 4 A schematic diagram of a knowledge graph for abnormality detection of electric power metering equipment provided in an embodiment of the present application is shown; Figure 5 A schematic diagram of a potential relationship reasoning process provided in an embodiment of the present application is shown; Figure 6 Another schematic diagram of a potential relationship reasoning process provided in an embodiment of the present application is shown; Figure 7 A schematic diagram of the structure of an abnormality detection device for electric power metering equipment based on a knowledge graph provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0012] The specific implementation of the present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments. It should be noted that the embodiments and features in the embodiments of the present application can be combined with each other without conflict.
[0013] The present invention provides a method for detecting anomalies in electric power metering equipment based on a knowledge graph, which can be applied to Figure 1In the scenario shown, the data layer collects power status data (voltage, current, power factor and other equipment status information) of multiple power meters, obtains historical power status data, historical fault records and operation and maintenance logs from the operation and maintenance database, and obtains internal document materials and expert experience knowledge from the local knowledge base. Based on the multi-source data of the data layer, a knowledge graph for abnormal detection of power metering equipment is constructed. Through the constructed knowledge graph for abnormal detection of power metering equipment, a method for abnormal detection of power metering equipment based on a knowledge graph provided by an embodiment of the present invention is executed, by obtaining power status data of the power metering equipment, wherein the power status data includes voltage, current, power factor and other equipment status information. state information; preprocess the power state data; according to the abnormal state nodes and their attributes defined in the knowledge graph of abnormal detection of power metering equipment, the closest abnormal state is determined by similarity calculation, wherein the knowledge graph of abnormal detection of power metering equipment is constructed by extracting entities and their attributes, entity relationships from the historical power state data, historical fault records and operation and maintenance logs of power metering equipment, and the knowledge graph of abnormal detection of power metering equipment includes graph nodes and directed relationship edges; according to the node attributes corresponding to the closest abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance treatment on the power metering equipment determined to be abnormal. The system can accurately identify the abnormal state of the equipment, and the similarity calculation method helps to determine the closest abnormal state, improves the accuracy and reliability of abnormal state identification, and reduces the possibility of misjudgment and missed judgment. In addition, after determining that the equipment is abnormal, the system can automatically associate the possible fault causes and corresponding operation and maintenance operation instructions according to the attributes of the abnormal state, so that the operation and maintenance personnel can locate the problem faster and take appropriate disposal measures, thereby improving the operation and maintenance efficiency of the power metering equipment. By preprocessing the status data of power metering equipment and combining it with knowledge graphs, the system realizes automated anomaly detection and operation and maintenance support, without relying on human experience or traditional manual troubleshooting methods. This not only improves the stability of system operation, but also provides a guarantee for the long-term reliable operation of the equipment.
[0014] The present invention is described in detail below through specific embodiments.
[0015] Embodiment 1: like Figure 2 As shown, a method for detecting anomalies of electric power metering equipment based on a knowledge graph is provided in an embodiment of the present invention, comprising: Step 201, obtaining power status data of a power metering device; Among them, power status data includes voltage, current, power factor and other equipment status information.
[0016] Step 202: pre-process the power status data; Wherein, step 202 specifically includes: Step 202-1, removing missing values, duplicate values and abnormal noise values in the power status data; Step 202-2: fill in missing values in the power status data using an interpolation algorithm or a statistical model based on historical data; Step 202-3: normalize the numerical features corresponding to each indicator in the power status data.
[0017] Step 203: According to the abnormal state nodes and their attributes defined in the power metering equipment abnormality detection knowledge graph, the most similar abnormal state is determined by similarity calculation; Among them, the knowledge graph for anomaly detection of power metering equipment is constructed and generated by extracting entities and their attributes, and entity relationships from the historical power status data, historical fault records, and operation and maintenance logs of the power metering equipment. The knowledge graph for anomaly detection of power metering equipment includes graph nodes and directed relationship edges.
[0018] Step 204: According to the node attributes corresponding to the most similar abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance on the power metering equipment determined to have an abnormality.
[0019] The first embodiment of the present invention provides a method for detecting abnormalities in electric power metering equipment based on a knowledge graph, which obtains the electric power status data of the electric power metering equipment; pre-processes the electric power status data; determines the closest abnormal state through similarity calculation according to the abnormal state nodes and their attributes defined in the knowledge graph for detecting abnormalities in electric power metering equipment; obtains the associated abnormal fault causes and operation and maintenance operation instructions according to the node attributes corresponding to the determined closest abnormal state, so as to perform abnormal operation and maintenance on the electric power metering equipment that is determined to have abnormalities. The accuracy and reliability of detection are improved, misjudgment and missed judgment are reduced, and the operation and maintenance personnel are helped to quickly locate the problem and take effective measures by automatically associating the fault causes with the operation and maintenance instructions, thereby improving the efficiency of equipment operation and maintenance.
[0020] Embodiment 2: Before the first embodiment of the present invention, it is necessary to construct a knowledge graph for abnormal detection of power metering equipment. Therefore, before step 203, a knowledge graph for abnormal detection of power metering equipment is constructed. Figure 3 As shown, including: Step 301, obtaining historical data of power metering equipment; Among them, historical data includes historical power status data, historical fault records, operation and maintenance logs, technical documents and expert experience and knowledge.
[0021] Step 302: Based on the entity and its attributes, entity extraction is performed on the historical data through the BERT-BiLSTM-CRF entity recognition model to obtain an entity extraction result; Among them, the BERT-BiLSTM-CRF entity recognition model includes BERT module, BiLSTM module and CRF module. The BERT-BiLSTM-CRF model is used for named entity recognition (NER). BERT extracts contextual semantic features, BiLSTM processes context information, and CRF optimizes the prediction of label sequences. Combining the bidirectional long short-term memory network (BiLSTM) and conditional random field (CRF), global semantic sharing is achieved, the interpretability of fault analysis is improved, high-precision entity and relationship data is provided, and the quality of knowledge graph construction is ensured.
[0022] Step 303: Based on the relationship type, perform relationship extraction on the historical data to obtain a relationship extraction result.
[0023] Step 304: Entity alignment is performed on the historical data to obtain entity alignment results.
[0024] Step 305: construct a knowledge graph for anomaly detection of power metering equipment based on the entity extraction results, relationship extraction results, and entity alignment results.
[0025] like Figure 4 An example of constructing a knowledge graph for abnormality detection of power metering equipment for the second embodiment of the present invention, the knowledge graph includes device nodes: representing actual power metering equipment (such as device A, device B), attribute nodes: various operating parameters of the equipment (such as voltage, current, etc.), abnormal state nodes: representing abnormal states in equipment operation (such as low voltage, current overload, etc.), fault cause nodes: causes of abnormalities (such as battery failure, excessive load, etc.), and operation and maintenance operation nodes: operations taken in response to abnormalities (such as replacing batteries, reducing loads, etc.).
[0026] Through the method of the first embodiment of the present invention, the complex relationship between entities in the historical data can be accurately identified, which provides rich semantic information for subsequent knowledge reasoning, can help the system better infer the cause of the fault, and provide more accurate anomaly detection and prediction functions. By extracting semantic context through BERT, combined with the long and short-term memory capabilities of BiLSTM and the sequence optimization of CRF, entities in the text (such as equipment, fault mode, cause, etc.) can be efficiently and accurately identified. Through global semantic sharing and context understanding, the interpretability of the fault analysis model is improved, making the decision-making in the anomaly detection process more transparent.
[0027] Embodiment three: In the second embodiment of the present invention, there is a node sparsity problem when constructing and analyzing the knowledge graph. The number of certain types of nodes (such as entity nodes, attribute nodes) is small, or there are few relationships between them and other nodes. This situation will cause some low-frequency or rare nodes in the graph, which cannot be fully connected with other nodes in the graph, thereby affecting the reasoning effect and query efficiency of the graph. For example, in the fault analysis of power metering equipment, certain specific types of faults (such as "current overload" or "temperature sensor fault") may be rare, resulting in relatively few nodes related to them (such as fault type nodes, fault component nodes, etc.) in the knowledge graph. Since these sparse nodes lack sufficient adjacent nodes and edges, their representation may not be sufficient in the graph neural network (GNN), thereby affecting the reasoning and anomaly detection of fault modes. Therefore, after constructing the knowledge graph for anomaly detection of power metering equipment based on the second embodiment of the present invention, the graph attention network (GAT) is introduced to solve the node sparsity problem caused by specific fault types, reveal complex relationships and potential patterns in the constructed knowledge graph, and supplement the extracted relationships to the constructed knowledge graph to make it more comprehensive and rich. Accordingly, Figure 5 As shown, including: Step 501, using random initialization or pre-training methods to generate embeddings for entities and relationships in the power metering equipment anomaly detection knowledge graph; Wherein, step 501 specifically includes: Step 501-1: Use uniform distribution or normal distribution to detect each entity in the knowledge graph for power metering equipment anomaly detection and relationship Generate initial embedding vector representation. When entities and relationships have text description information, use the BERT model to generate initial embedding vectors. Step 501-2: Map the embedding vector generated by the BERT model to the target dimension of the power metering equipment anomaly detection knowledge graph through a fully connected layer ; Among them, the target dimension The knowledge graph for anomaly detection of power metering equipment is set according to its scale and task complexity; Step 501-3: regularize the embedding vectors of entities and relations to limit the norm of the vectors, where: , .
[0028] Step 502: Use the relational graph convolutional network RGCN to perform convolution operations on the nodes in the power metering equipment anomaly detection knowledge graph to extract local features of the nodes.
[0029] Step 503: Based on the local features extracted by RGCN, the dependency relationship between nodes is modeled using the graph attention network GAT.
[0030] Among them, GAT dynamically adjusts the weights between nodes by introducing an attention mechanism in the graph neural network. When processing sparse nodes, GAT can dynamically assign weights based on the similarity and importance between nodes, increase the importance of adjacent nodes related to sparse nodes, and thus effectively improve the representation learning of sparse nodes.
[0031] Step 504: Calculate the scores of all possible triple combinations in the power metering equipment anomaly detection knowledge graph by using the DistMult model scoring function, and filter out all triples exceeding a preset threshold and add them to the power metering equipment anomaly detection knowledge graph; Among them, the DistMult model scoring function is , d is the vector dimension, h is the head entity vector, r is the relationship vector, t is the tail entity vector, is the component of the head entity vector in the i-th dimension, is the component of the relationship vector in the i-th dimension, is the component of the tail entity vector in the i-th dimension. The DistMult model score function is obtained by training based on the binary cross entropy loss function. The binary cross entropy loss function ,in, is the sigmoid function, is the positive sample set, Negative samples generated for negative sampling.
[0032] In the third embodiment of the present invention, a relational graph convolutional network (RGCN) and a graph attention network (GAT) are introduced. GAT uses the attention mechanism to assign different weights according to the correlation between nodes, so that the model can pay more attention to important nodes and their relationships, dynamically adjust node weights, discover potential associations, and propose a knowledge reasoning model based on graph embedding. RGCN constructs an embedded representation of each node by aggregating the information of neighbor nodes, effectively processes multi-relation data in heterogeneous graphs, evaluates possible triplets through scoring functions (such as the DistMult model), and generates new implicit associations to help mine potential connections between fault modes and causes.
[0033] Embodiment 4: Embodiment 3 of the present invention relies more on deterministic computing processes (such as graph convolution or attention mechanisms), but lacks special processing capabilities for the uncertainty or ambiguity of data. For the processing of uncertain, fuzzy or noisy data, RGCN and GAT may lead to reasoning errors or inaccurate relationship derivation. Therefore, after constructing the knowledge graph for abnormal detection of power metering equipment based on Embodiment 3 of the present invention, a fuzzy logic reasoning mechanism is introduced when processing graph data to effectively capture and represent the uncertainty and ambiguity of the input data. For complex systems such as power metering equipment, many data (such as voltage, load, etc.) are often fuzzy or uncertain. Embodiment 4 of the present invention uses fuzzy rules and membership functions to fuzzify data, which can better represent these uncertain information, thereby providing more flexible reasoning capabilities. In order to supplement the extracted relationships into the constructed knowledge graph, such as Figure 6 The network structure of the model is shown as Figure 6 As shown in the figure, the steps of constructing the knowledge graph for anomaly detection of power metering equipment include: Step 601: Perform fuzzy set mapping on historical data of the power metering equipment to generate fuzzy subsets, and define a Gaussian membership function for each fuzzy subset; Wherein, step 601 specifically includes: Step 601-1, determine the features that need to be fuzzified in the historical data, and divide the fuzzy sets; Step 601-2, determining the boundary value, center value and width parameter of each fuzzy subset; Among them, the central value is the representative value of the fuzzy subset, and the width parameter is the range of the membership function; Step 601-3, calculating the membership degree of each indicator in the historical data in the corresponding fuzzy subset according to the Gaussian membership function; Among them, the Gaussian membership function is , is the membership degree of the fuzzy subset corresponding to the input value x, 𝑐 is the central value of the fuzzy subset; σ is the width of the fuzzy subset.
[0034] Step 602: Calculate the membership function values of the nodes and their neighboring nodes in the power metering equipment anomaly detection knowledge graph under the fuzzy rule k through the t-norm operator to obtain the trigger strength of the fuzzy rule k; Among them, k is greater than or equal to 1 and less than or equal to K, and K is the total number of fuzzy rules.
[0035] Step 603: Calculate the input reasoning output value of rule k according to the trigger strength of fuzzy rule k and the output value of fuzzy rule k, obtain a clear relationship between the node and the adjacent nodes and add it to the power metering equipment anomaly detection knowledge graph.
[0036] The fourth embodiment of the present invention introduces a fuzzy logic reasoning mechanism when processing graph data, which can effectively capture and represent the uncertainty and ambiguity of input data. For complex systems such as power metering equipment, many data (such as voltage, load, etc.) are often fuzzy or uncertain. Fuzzifying data using fuzzy rules and membership functions can better represent these uncertain information, thereby providing more flexible reasoning capabilities. For incomplete or fuzzy input data, fuzzy logic reasoning (such as weighted aggregation of fuzzy rules) is used to reduce the impact of noise and effectively capture potential complex relationships. The fourth embodiment of the present invention can effectively process multimodal data, such as different types of data (such as voltage, current, load status, etc.) that may be included in power metering equipment. These diverse input data (such as numerical, classified data, etc.) are fused together through fuzzy rules, and relationships are established between different modalities. The fourth embodiment of the present invention can not only fuzzify numerical data, but also combine and process multiple types of modal data at the rule layer to provide more comprehensive and comprehensive reasoning results.
[0037] Further, as Figures 2 to 6 The specific implementation of the method, in an embodiment of the present invention, provides a device for detecting abnormalities of electric power metering equipment based on a knowledge graph, such as Figure 7 As shown, the device comprises: The data acquisition module 710 is used to acquire the power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; The data processing module 720 is used to pre-process the power status data; The abnormality judgment module 730 is used to judge the most similar abnormal state through similarity calculation according to the abnormal state nodes and their attributes defined in the abnormality detection knowledge graph of the power metering equipment, wherein the abnormality detection knowledge graph of the power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical power state data, historical fault records and operation and maintenance logs of the power metering equipment, and the abnormality detection knowledge graph of the power metering equipment includes graph nodes and directed relationship edges; The fault location module 740 is used to obtain the associated abnormal fault cause and operation and maintenance operation guidance according to the node attribute corresponding to the closest abnormal state determined, so as to perform abnormal operation and maintenance on the power metering equipment determined to have an abnormality.
[0038] In an embodiment of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of implementing a method for detecting abnormalities in electric power metering equipment based on a knowledge graph include: Obtaining power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; Preprocessing the power status data; According to the abnormal state nodes and their attributes defined in the knowledge graph for abnormal detection of electric power metering equipment, the most similar abnormal state is determined by similarity calculation. The knowledge graph for abnormal detection of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical electric power state data, historical fault records and operation and maintenance logs of electric power metering equipment. The knowledge graph for abnormal detection of electric power metering equipment includes graph nodes and directed relationship edges. According to the node attributes corresponding to the closest abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance on the power metering equipment determined to have abnormalities.
[0039] In an embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: Obtaining power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; Preprocessing the power status data; According to the abnormal state nodes and their attributes defined in the knowledge graph for abnormal detection of electric power metering equipment, the most similar abnormal state is determined by similarity calculation. The knowledge graph for abnormal detection of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical electric power state data, historical fault records and operation and maintenance logs of electric power metering equipment. The knowledge graph for abnormal detection of electric power metering equipment includes graph nodes and directed relationship edges. According to the node attributes corresponding to the closest abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance on the power metering equipment determined to have abnormalities.
[0040] It should be noted that the above embodiments only use smart meters as examples to illustrate the principles and implementation steps of the embodiments of the present invention, and do not specifically limit the actual application scenarios. For example, power meters, power factor meters, harmonic analyzers, relay protection instruments, switch quantity acquisition instruments, power quality analyzers, etc., the technical solution of the present invention can also be applied to metering fault prediction of other power grid-related instruments. For the functions or steps that can be implemented by computer-readable storage media or computer devices, please refer to the aforementioned method embodiments. To avoid repetition, they will not be described one by one here.
[0041] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0042] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0043] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for detecting anomalies in electric power metering equipment based on knowledge graph, characterized in that: include: Acquire power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; Preprocessing the power status data; According to the abnormal state nodes and their attributes defined in the knowledge graph for abnormality detection of electric power metering equipment, the most similar abnormal state is determined by similarity calculation, wherein the knowledge graph for abnormality detection of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from historical electric power state data, historical fault records and operation and maintenance logs of electric power metering equipment, and the knowledge graph for abnormality detection of electric power metering equipment includes graph nodes and directed relationship edges; According to the node attributes corresponding to the closest abnormal state determined, the associated abnormal fault causes and operation and maintenance operation instructions are obtained to perform abnormal operation and maintenance on the power metering equipment determined to have abnormalities.
2. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 1 is characterized in that: The step of preprocessing the power status data comprises: Removing missing values, duplicate values and abnormal noise values in the power status data; Filling missing values in the power status data using an interpolation algorithm or a statistical model based on historical data; The numerical features corresponding to each indicator in the power status data are normalized.
3. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 1 is characterized in that: Before the step of determining the most similar abnormal state by similarity calculation based on the abnormal state nodes and their attributes defined in the abnormal state detection knowledge graph of the power metering equipment, the step of constructing the abnormal state detection knowledge graph of the power metering equipment includes: Acquire historical data of the power metering equipment, wherein the historical data includes historical power status data, historical fault records, operation and maintenance logs, technical documents and expert experience knowledge; Based on the entity and its attributes, entity extraction is performed on the historical data through a BERT-BiLSTM-CRF entity recognition model to obtain an entity extraction result, wherein the BERT-BiLSTM-CRF entity recognition model includes a BERT module, a BiLSTM module and a CRF module; Based on the relationship type, performing relationship extraction on the historical data to obtain a relationship extraction result; Performing entity alignment on the historical data to obtain an entity alignment result; The power metering equipment anomaly detection knowledge graph is constructed according to the entity extraction result, the relationship extraction result and the entity alignment result.
4. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 3 is characterized in that: After the step of constructing the knowledge graph for abnormality detection of electric power metering equipment, the method further comprises: Generate embeddings for entities and relationships in the power metering equipment anomaly detection knowledge graph using random initialization or pre-training methods; The relational graph convolutional network (RGCN) is used to perform convolution operations on the nodes in the knowledge graph for anomaly detection of power metering equipment to extract local features of the nodes. Based on the local features extracted by RGCN, the graph attention network GAT is used to model the dependencies between nodes; The scores of all possible triple combinations in the power metering equipment anomaly detection knowledge graph are calculated by the DistMult model scoring function, and all triples exceeding a preset threshold are screened out and added to the power metering equipment anomaly detection knowledge graph, wherein the DistMult model scoring function is , d is the vector dimension, h is the head entity vector, r is the relationship vector, t is the tail entity vector, is the component of the head entity vector in the i-th dimension, is the component of the relationship vector in the i-th dimension, is the component of the tail entity vector in the i-th dimension. The DistMult model score function is obtained by training based on the binary cross entropy loss function. , is the sigmoid function, is the positive sample set, Negative samples generated for negative sampling.
5. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 4 is characterized in that: The step of generating embeddings for entities and relationships in the power metering equipment anomaly detection knowledge graph using a random initialization or pre-training method comprises: Use uniform distribution or normal distribution to generate a probability distribution for each entity in the knowledge graph. and relationship Generate initial embedding vector representation. When entities and relationships have text description information, use the BERT model to generate initial embedding vectors. The embedding vector generated by the BERT model is mapped to the target dimension of the knowledge graph embedded in the power metering equipment anomaly detection through a fully connected layer. , where the target dimension The knowledge graph for detecting anomalies of electric power metering equipment is set according to the scale and task complexity; Regularization constraints are imposed on the embedding vectors of entities and relations to limit the norm of the vectors, where , .
6. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 3 is characterized in that: After the step of constructing the knowledge graph for abnormality detection of electric power metering equipment, the method further comprises: Performing fuzzy set mapping on the historical data of the power metering device to generate fuzzy subsets, and defining a Gaussian membership function for each fuzzy subset; By using a t-norm operator, the membership function values of the nodes and their neighboring nodes in the power metering equipment anomaly detection knowledge graph under fuzzy rule k are calculated to obtain the trigger strength of fuzzy rule k, where k is greater than or equal to 1 and less than or equal to K, and K is the total number of fuzzy rules; According to the trigger strength of fuzzy rule k and the output value of fuzzy rule k, the input inference output value of rule k is calculated, and a clear relationship between the node and the adjacent nodes is obtained and added to the power metering equipment anomaly detection knowledge graph.
7. The method for detecting anomalies of electric power metering equipment based on knowledge graph according to claim 6 is characterized in that: The steps of performing fuzzy set mapping on the historical data of the power metering device to generate fuzzy subsets and defining a Gaussian membership function for each fuzzy subset include: Determine the features that need to be fuzzified in the historical data and divide the fuzzy sets; Determine the boundary value, center value and width parameter of each fuzzy subset, wherein the center value is the representative value of the fuzzy subset and the width parameter is the range of the membership function; According to the Gaussian membership function, the membership degree of each indicator in the historical data in the corresponding fuzzy subset is calculated, wherein the Gaussian membership function is , is the membership degree of the fuzzy subset corresponding to the input value x, 𝑐 is the central value of the fuzzy subset; σ is the width of the fuzzy subset.
8. A knowledge graph-based power metering equipment anomaly detection device, characterized in that: include: A data acquisition module, used to acquire power status data of the power metering device, wherein the power status data includes voltage, current, power factor and other device status information; A data processing module, used for preprocessing the power status data; An abnormality judgment module, used to judge the most similar abnormal state through similarity calculation according to the abnormal state nodes and their attributes defined in the abnormality detection knowledge graph of electric power metering equipment, wherein the abnormality detection knowledge graph of electric power metering equipment is constructed and generated by extracting entities and their attributes and entity relationships from the historical electric power state data, historical fault records and operation and maintenance logs of the electric power metering equipment, and the abnormality detection knowledge graph of electric power metering equipment includes graph nodes and directed relationship edges; The fault location module is used to obtain the associated abnormal fault causes and operation and maintenance operation instructions based on the node attributes corresponding to the closest abnormal state determined, so as to perform abnormal operation and maintenance on the power metering equipment determined to have an abnormality.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method for detecting abnormalities in electric power metering equipment based on a knowledge graph are implemented as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for detecting abnormalities in electric power metering equipment based on a knowledge graph are implemented.
Citation Information
Cited By
Battery module early abnormity early warning method and system fused with time sequence knowledge graph
CN120142960A
Method and System for Early Abnormality Warning of Battery Modules Incorporating Temporal Knowledge Graphs
CN120142960B
Production abnormity early warning method and system based on knowledge graph
CN120408455A
Electric power data processing method and system based on knowledge graph
CN120541738A
A knowledge graph-based power data processing method and system
CN120541738B