Power data analysis method, analysis system, power system, terminal equipment, and storage medium
By combining the power knowledge graph and the reinforcement learning model, a power data analysis system is constructed, which solves the deficiencies in power data analysis efficiency and adaptability of traditional methods and achieves more efficient and accurate power data analysis and prediction.
Patent Information
- Application Number
- CN202410486361.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-22
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-04-22
AI Technical Summary
Traditional power data analysis methods are inefficient, error-prone, and difficult to adapt to complex changes. In particular, they lack comprehensive analysis capabilities in multi-source and multi-dimensional data environments.
The combination of electric power knowledge graph and reinforcement learning model is used to construct multiple electric power knowledge graphs and reinforcement learning models to perform data preprocessing, feature extraction and reasoning, and dynamically adjust the analysis strategy to adapt to changes in the power system.
It improves the accuracy and efficiency of power data analysis, reduces labor costs and error rates, can handle multiple data types and formats, captures complex relationships and non-linear mapping, and adapts to data changes and abnormal situations.
Smart Images

Figure CN118396162B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of power systems, and specifically to a power data analysis method, analysis system, power system, terminal equipment, and storage medium. Background Art
[0002] The power system is one of the indispensable infrastructures in modern society. Its operating status and efficiency are directly related to people's production and life and the development of the country. At present, the power system data has the characteristics of large magnitude, complex types, and multiple scales. In view of the above characteristics, the power system data is divided into different types according to business fields, time dimensions, and data structures. Figure 1 As shown in the figure, the power system data is roughly divided into four types according to the business field: system operation, enterprise operation management, non-electric energy, and non-energy data. Among them, system operation includes power production data of new energy and system power generation resources, power grid and distributed resource operation status monitoring data, equipment life cycle data, load data, flexible load, and electric vehicle (EV) status data. Enterprise operation management data summarizes various aspects of enterprise power data, including enterprise sales power, user power consumption data, resource planning, material management, and power market price data. The non-electric energy field also contains certain power data, such as natural gas system supply data, natural gas load data, thermal system supply data, cold and hot load data, and energy coupling and conversion equipment data. Non-electric energy data includes primary and secondary energy data such as natural gas. Since coupling between energies has a positive effect, data between each other needs to be shared. Non-energy includes data such as policies, environment and meteorology, and carbon levels. Non-energy supports accurate load forecasting, reasonable planning and scheduling of power systems. Power system data is divided into historical data, online measurement data, simulation deduction data, and forecast data according to the time dimension. As the amount of data increases, the time dimension of power system data becomes increasingly complex and is divided into structured data, unstructured data, and semi-structured data based on the data structure.
[0003] As the scale and complexity of power systems continue to expand, power data analysis has become an important issue in power system management and operation. Power data analysis refers to the processing and analysis of various data in the power system to extract useful information and insights.
[0004] Traditional power data analysis mainly relies on manual experience and rules. Even if artificial intelligence technology is used, most of them are models based on statistical learning. These methods have the following disadvantages: (1) Rule writing requires a lot of manual experience and professional knowledge, and it is difficult to adapt to data changes and abnormal situations; (2) Statistical learning models require a large amount of labeled data and feature engineering, and it is difficult to capture the complex relationships and nonlinear mappings between data; (3) These methods usually only analyze or verify data of a single type or a single dimension, and lack the ability to comprehensively analyze multi-source and multi-dimensional data. In other words, traditional power data analysis methods have the problems of low efficiency, prone to errors, and difficulty in adapting to complex changes. Therefore, how to improve the accuracy and efficiency of power data analysis has become a current research hotspot. Summary of the invention
[0005] In order to solve one of the above-mentioned technical defects, an embodiment of the present application provides a power data analysis method, a analysis system and a power system, a terminal device, and a storage medium.
[0006] According to a first aspect of an embodiment of the present application, a power data parsing method is provided, comprising:
[0007] Collect structured power data, semi-structured power data and unstructured power data in the power system, and construct multiple power knowledge graphs corresponding to different power data types; construct a reinforcement learning model, in which: the model environment is the power knowledge graph, the model agent is the power data parsing algorithm, the model state is the result of power data change, the model action is the power data change value, and the model reward is the parsing effect value; in response to the user's parsing request, trigger the reinforcement learning model to perform a specified number of rounds of prediction and parsing on the target power data; after the parsing is completed, organize the output results of each round of the reinforcement learning model to form a corresponding relationship diagram between the reward value and the number of iterations of the power parsing data; finally, output the corresponding relationship diagram and the corresponding power data prediction and parsing results to the user, so that the user can make reasonable predictions on the target power data.
[0008] Preferably, the method collects structured power data, semi-structured power data and unstructured power data in the power system, and constructs multiple power knowledge graphs corresponding to different power data types, specifically including: using corresponding data acquisition means to acquire power-related data from multiple sources, and the power-related data includes structured power data, semi-structured power data and unstructured power data; wherein: structured power data is mainly composed of power text data, semi-structured power data is mainly composed of a combination of power text data and power picture data, and unstructured power data is mainly composed of power picture data; using regular expressions, word segmentation, part-of-speech tagging, named entity recognition One or more means are used to clean the power text data, and one or more means of image enhancement, denoising, and segmentation are used to clean the power picture data; concepts, entities, attributes, and relationships in the power field are identified from the cleaned power data, and converted into power knowledge representations in a standard format; power knowledge from different sources and types is integrated, and multiple unified and consistent power knowledge graphs are formed according to the classification of power data types; each power knowledge graph is stored in a structure suitable for query and analysis, and corresponding interfaces and services are provided; implicit power knowledge and laws are mined from the power knowledge graph, and the inference results are added to the corresponding power knowledge graph.
[0009] Preferably, the method of identifying concepts, entities, attributes and relationships in the power field from the cleaned power data and converting them into a standard format of power knowledge representation specifically includes: for structured power data and semi-structured power data, performing the following steps: preprocessing the cleaned power text data by one or more means of word segmentation and stop word removal, and preprocessing the cleaned power picture data by one or more means of image preprocessing and annotation; converting the preprocessed power text data into a dense vector representation by word embedding, extracting image features from the preprocessed power picture data using a convolutional neural network, and then forming a corresponding training set with the converted dense vector representation and the extracted image features; selecting a suitable model to train the power data in the training set, and finally extracting concepts, entities, attributes and relationships; for unstructured power data, performing the following steps: detecting objects of interest from the picture using target detection means, These objects are set as entities; the images are classified by image classification means to identify the attributes in the images, which include themes and scenes; text information for describing the image content is generated by image description generation means, and finally concepts, entities, attributes and relationships are extracted; after the extraction of concepts, entities, attributes and relationships is completed, the following steps are performed: using a pre-trained model, the embedding amount and vector of the extracted entity are matched with the embedding amount and vector of the entity in the knowledge base for similarity, and the extracted entity with the highest matching degree is linked to the knowledge base entity, and the knowledge base is mainly composed of all power knowledge graphs; each extracted entity is used as the input of the pre-trained model, and the model outputs the probability distribution map of the relationship between entities, and finally the relationship with the highest probability is selected as the classification result between entities; after completing the entity linking and relationship classification, the following steps are performed: the concepts, entities, attributes and relationships identified from the power data are converted into a standard format of power knowledge representation.
[0010] Preferably, in the process of integrating power knowledge from different sources and types, the power knowledge includes: new power knowledge text data in a standard format formed during this round of parsing, and power knowledge graph data that has been formed before this round of parsing; the integration of power knowledge from different sources and types, according to the classification of power data types, forms multiple unified and consistent power knowledge graphs, specifically including: pre-processing the new power knowledge text data by one or more means of cleaning, word segmentation, and part-of-speech tagging, and converting the power knowledge graphs from different sources into a unified format; using a means based on vector representation, embedding the pre-processed entities with the same name in each power knowledge data from different data sources into the same vector space, and calculating the similarity between the entities. degree, and judge whether they point to the same concept according to the calculation results, and disambiguate these entities with the same name according to the judgment results; use vector-based representation methods to embed synonymous or similar relationships in different power knowledge graphs into the same vector space, so that the embedding model can learn the representation of the relationship, and then calculate the similarity between the relationships in different power knowledge graphs, and align these relationships according to the calculation results; use ontology matching and mapping methods to compare the ontology structure and semantic information in different power knowledge graphs, find similar parts, and merge them; use logical reasoning methods to check the consistency of each power knowledge graph and resolve conflicts; finally, classify the integrated power knowledge according to the power data type to form multiple unified and consistent power knowledge graphs.
[0011] Preferably, the mining of implicit power knowledge and rules from the power knowledge graph and adding the inference results to the corresponding power knowledge graph specifically includes: preprocessing the power knowledge graph data by one or more means of cleaning, deduplication, and format standardization, and converting it into a format suitable for reasoning, and then: executing the following steps: using an inference engine to recursively execute multiple predefined inference rules, match the relationships between entities, gradually derive new power knowledge and rules, and finally evaluate the inference results, and adjust the priority of each inference rule according to the evaluation results to tune the reasoning process; the inference rules are defined by a rule language to describe the relationships and constraints between entities in the power knowledge graph; or executing the following steps: representing the power knowledge graph in the form of a graph, using a graph computing model to learn the features in the graph structure, and inferring the implicit power knowledge and rules in the graph structure through iterative optimization, and finally evaluating the inference results, adjusting the parameters of the graph computing model according to the evaluation results to tune the reasoning process; converting the new power knowledge obtained by reasoning into a standard format and integrating it into the original power knowledge graph, and updating the relationships between existing entities to form an updated power knowledge graph.
[0012] According to the second aspect of the embodiment of the present application, a power data parsing system is provided, including: a power knowledge graph construction unit: used to collect structured power data, semi-structured power data and unstructured power data in the power system, and construct multiple power knowledge graphs corresponding to different power data types; a reinforcement learning model construction unit: used to construct a reinforcement learning model, wherein: the model environment is the power knowledge graph, the model agent is the power data parsing algorithm, the model state is the result of the power data change, the model action is the power data change value, and the model reward is the parsing effect value; a power data parsing unit: used to respond to the user's parsing request, trigger the reinforcement learning model to perform a specified number of rounds of prediction and parsing on the target power data; a correspondence graph generation unit: used to organize the output results of each round of the reinforcement learning model after the parsing is completed, and form a correspondence graph of the reward value-iteration number of the power parsing data; a prediction and parsing result output unit: used to output the correspondence graph and the corresponding power data prediction and parsing results to the user, so that the user can make a reasonable prediction of the target power data.
[0013] Preferably, the electric power knowledge graph construction unit includes: a data acquisition module: used to acquire electric power-related data from multiple sources by adopting corresponding data acquisition means, and the electric power-related data includes structured electric power data, semi-structured electric power data and unstructured electric power data; wherein: structured electric power data is mainly composed of electric power text data, semi-structured electric power data is mainly composed of a combination of electric power text data and electric power picture data, and unstructured electric power data is mainly composed of electric power picture data; a data cleaning module: used to clean the electric power text data by adopting one or more means of regular expression, word segmentation, part-of-speech tagging, named entity recognition, and adopting image enhancement, denoising, segmentation, etc. The power image data is cleaned by one or more means; the knowledge extraction module is used to identify the concepts, entities, attributes and relationships in the power field from the cleaned power data, and convert them into power knowledge representation in a standard format; the knowledge fusion module is used to integrate power knowledge from different sources and types, and form multiple unified and consistent power knowledge graphs according to the classification of power data types; the knowledge storage module is used to store each power knowledge graph in a structure suitable for query and analysis, and provide corresponding interfaces and services; the knowledge reasoning module is used to mine implicit power knowledge and laws from the power knowledge graph, and add the reasoning results to the corresponding power knowledge graph.
[0014] According to a third aspect of an embodiment of the present application, there is provided a power system, comprising: the power data parsing system as described above.
[0015] According to the fourth aspect of an embodiment of the present application, a terminal device is provided, characterized in that it includes: a memory; a processor; and a computer program; wherein the computer program is stored in the memory and is configured to be executed by the processor to implement the power data parsing method as described above.
[0016] According to a fifth aspect of an embodiment of the present application, a computer-readable storage medium is provided, characterized in that a computer program is stored thereon; the computer program is executed by a processor to implement the power data parsing method as described above.
[0017] In order to solve the specific technical problem of power data prediction and analysis, the embodiment of the present application specifically integrates knowledge graph and reinforcement learning to form a new, feasible and reliable data analysis method and system dedicated to power systems. The power knowledge graph in the embodiment of the present application can model various entities and relationships in the power system in the form of a graph, helping the power data analysis system to understand the topological structure, equipment characteristics and operating laws of the power system; and the reinforcement learning model in the embodiment of the present application can model the power system as a reinforcement learning environment through the knowledge graph, regard the data analysis algorithm as an intelligent agent, and learn how to parse power data through interaction with the environment. During the analysis process, the analysis strategy can be dynamically adjusted according to the real-time status and feedback information of the power system to adapt to the changes and needs of the power system. This application innovatively combines the two in a specific way. By utilizing the structured representation and reasoning capabilities of the knowledge graph, it better integrates and utilizes information from different data sources. At the same time, it conducts autonomous learning and optimization based on the real-time situation of the power system, thereby providing a more flexible and intelligent data analysis strategy. Therefore, this solution has the following advantages: (1) There is no need to manually write rules or annotate data, which reduces labor costs and error rates; (2) There is no need to perform feature engineering, and effective features can be directly extracted from the original data, and data of various types and formats can be processed; (3) It can capture complex relationships and nonlinear mappings between data, and can comprehensively consider multiple objectives and constraints; (4) It can adapt to data changes and abnormal situations, and can update strategies in real time. Overall, this solution effectively improves the accuracy and efficiency of power data analysis, and its application can help power system operators and managers better understand and manage power systems, and improve the safety, stability and efficiency of power systems.
[0018] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the contents pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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:
[0020] Figure 1 A summary diagram of power system data types provided in an embodiment of the present application;
[0021] Figure 2 A technical framework diagram of power data parsing provided in an embodiment of the present application;
[0022] Figure 3 A schematic diagram of the structure of a power data analysis system provided by an embodiment of the present application;
[0023] Figure 4 A schematic diagram of the structure of a power data analysis system provided by another embodiment of the present application;
[0024] In the figure: 10 is an electric power knowledge graph construction unit, 20 is a reinforcement learning model construction unit, 30 is an electric power data analysis unit, 40 is a correspondence graph generation unit, 50 is a prediction analysis result output unit, 101 is a data acquisition module, 102 is a data cleaning module, 103 is a knowledge extraction module, 104 is a knowledge fusion module, 105 is a knowledge storage module, 106 is a knowledge reasoning module, and 107 is a knowledge update module. DETAILED DESCRIPTION
[0025] In order to make the technical solutions and advantages in the embodiments of the present application more clearly understood, the exemplary embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than an exhaustive list of all the embodiments. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0026] In view of the technical problems mentioned in the background technology, an embodiment of the present application provides a method for analyzing power data, which may include:
[0027] Collect structured power data, semi-structured power data and unstructured power data in the power system, and build multiple power knowledge graphs corresponding to different power data types.
[0028] Construct a reinforcement learning model, in which: the model environment is the power knowledge graph, the model agent is the power data parsing algorithm, the model state is the result of power data change, the model action is the power data change value, and the model reward is the parsing effect value.
[0029] In response to the user's analysis request, the reinforcement learning model is triggered to perform a specified number of rounds of prediction and analysis on the target power data.
[0030] After the analysis is completed, the output results of each round of the reinforcement learning model are sorted out to form a corresponding relationship diagram between the reward value and the number of iterations of the power analysis data.
[0031] Finally, the corresponding relationship diagram and the corresponding power data prediction analysis results are output to the user so that the user can make a reasonable prediction of the target power data.
[0032] As a preferred example, the collecting of structured power data, semi-structured power data and unstructured power data in the power system and constructing multiple power knowledge graphs corresponding to different power data types may specifically include:
[0033] Corresponding data acquisition means are used to acquire power-related data from a variety of sources (such as the power Internet of Things, enterprise information systems, public documents, etc.), such as acquiring data from the power business system in the form of a database, wherein the power-related data includes structured power data, semi-structured power data and unstructured power data; wherein: structured power data is mainly composed of power text data, semi-structured power data is mainly composed of a combination of power text data and power picture data, and unstructured power data is mainly composed of power picture data; in this step, in order to facilitate the subsequent extraction of more concepts, entities and attribute information, for unstructured power data such as pictures, videos, and voices, OCR technology can be used to extract some corresponding power text information.
[0034] The collected power data is cleaned to remove useless or erroneous data, unify data format and encoding, and improve the quality of power data. The power text data is cleaned by one or more means of regular expressions, word segmentation, part-of-speech tagging, and named entity recognition, which belong to natural language processing technology. The power picture data is cleaned by one or more means of image enhancement, denoising, and segmentation, which belong to image processing technology.
[0035] By using natural language processing, image recognition and other technologies, concepts, entities, attributes and relationships in the power field are identified from the cleaned power data and converted into power knowledge representation in a standard format.
[0036] Integrate power knowledge from different sources and types, solve problems such as entity disambiguation, relationship alignment, knowledge conflict, and form multiple unified and consistent power knowledge graphs according to the classification of power data types.
[0037] Utilize graph databases or other storage systems to store various power knowledge graphs in a structure suitable for query and analysis, and provide corresponding interfaces and services; for example, graph databases such as Neo4j and OrientDB or standard formats such as RDF and OWL can be used to store knowledge graphs, and query languages such as Cypher and SPARQL and service interfaces such as RESTful API can be provided.
[0038] Using graph computing or other reasoning technologies, implicit power knowledge and rules (such as causality, anomaly detection, similarity calculation, etc.) are mined from the power knowledge graph, and the reasoning results are added to the corresponding power knowledge graph.
[0039] In the specific implementation, as the power business data changes and increases, the construction of the power knowledge graph, in addition to the above steps, can also include:
[0040] Timely update the concept layer and data layer in the power knowledge graph to keep the power knowledge graph fresh and effective. Specifically, the concept layer and data layer in the power knowledge graph can be updated using incremental update or full update methods, such as using timestamps, version control and other technologies to record power data changes, and choose to add, delete or modify the corresponding power knowledge according to the changes.
[0041] As a preferred example, the identification of concepts, entities, attributes and relationships in the power field from the cleaned power data and conversion of the concepts, entities, attributes and relationships into a standard format of power knowledge representation may specifically include:
[0042] For structured power data and semi-structured power data, the following steps can be performed:
[0043] The cleaned power text data is preprocessed by one or more means of word segmentation and stop word removal, and the cleaned power picture data is preprocessed by one or more means of image preprocessing and labeling to improve the cleanliness, effectiveness, adaptability and other performance of the power data.
[0044] The preprocessed power text data is converted into dense vector representation by word embedding methods (such as Word2Vec, GloVe, etc.), and the image features of the preprocessed power picture data are extracted using convolutional neural networks (such as CNN, etc.). Then, the converted dense vector representation and the extracted image features form the corresponding training set.
[0045] Select a suitable model to train the power data in the training set, and finally extract concepts, entities, attributes and relationships; in the specific implementation, commonly used models include those based on logistic regression, support vector machine (SVM), deep learning, etc.
[0046] For unstructured power data, the following steps can be performed:
[0047] Use target detection methods (such as YOLO, Faster R-CNN, etc.) to detect objects of interest from the image and set these objects as entities.
[0048] Image classification is used to classify images and identify the attributes in the images, including themes and scenes.
[0049] Through image description generation, text information is generated to describe the image content, and finally concepts, entities, attributes and relationships are extracted.
[0050] After extracting concepts, entities, attributes, and relationships, you can perform the following steps:
[0051] Using a pre-trained model (such as BERT), the embeddings and vectors of the extracted entities are matched with the embeddings and vectors of the entities in the knowledge base, and the extracted entities and knowledge base entities with the highest matching degree are linked. The knowledge base is mainly composed of all power knowledge graphs.
[0052] The extracted entities are used as the input of the pre-trained model, and the model outputs the probability distribution map of the relationship between entities. Finally, the relationship with the highest probability is selected as the classification result between the entities.
[0053] After completing entity linking and relationship classification, the following steps can be performed:
[0054] The concepts, entities, attributes and relationships identified from power data are converted into power knowledge representation in a standard format.
[0055] The above steps can be adjusted and combined according to specific tasks and data characteristics to achieve accurate extraction of concepts, entities, attributes and relationships.
[0056] The standard format of the power knowledge representation in the embodiment of the present application can be a triple format or other standard formats. Assuming that there is a cleaned power data: "The power consumption in a certain area in May 2019 is 5000 MWh", then this power data can be parsed into the following triples of power knowledge representation: Subject: a certain area in May 2019, Predicate: Power consumption, Object: 5000 MWh. Such a triple represents the power consumption of a specific time and region. At the same time, concepts, entities, attributes and relationships can also be extracted from it, concepts: power consumption, entities: a certain area in May 2019, attributes: time (May 2019), region (a certain area), relationship: the relationship between power consumption and time and region. This information can be used to construct a knowledge graph in the power field, help understand and analyze power data, and then support various applications, such as optimizing power supply, energy saving and emission reduction, etc.
[0057] As a preferred example, in the process of integrating power knowledge from different sources and types, the power knowledge may include: new power knowledge text data in a standard format formed during this round of parsing, and power knowledge graph data that has been formed before this round of parsing.
[0058] The integration of power knowledge from different sources and types, according to the classification of power data types, forms multiple unified and consistent power knowledge graphs, which may specifically include:
[0059] The new power knowledge text data is preprocessed by one or more means of cleaning, word segmentation, and part-of-speech tagging, and the power knowledge graphs from different sources are converted into a unified format, for example, the power knowledge graph in RDF format is converted into a unified triple representation.
[0060] Using vector-based representation methods (such as TransE, TransR, etc.), the pre-processed entities with the same name in the power knowledge data from different data sources are embedded into the same vector space, and the similarity between the entities is calculated. According to the calculation results, it is judged whether they point to the same concept, and these entities with the same name are disambiguated according to the judgment results. In the specific implementation, in addition to using vector-based representation methods to disambiguate entities, symbolic logic methods can also be used to disambiguate by mining the attribute characteristics and context information of the entities.
[0061] Using vector-based representation methods (such as TransE), synonymous or similar relationships in different power knowledge graphs are embedded into the same vector space so that the embedding model can learn the representation of the relationships. Then, the similarities between the relationships in different power knowledge graphs are calculated, and these relationships are aligned according to the calculation results to ensure that they can be correctly understood and applied in the fused power knowledge graph.
[0062] By using ontology matching and mapping methods, the ontology structures and semantic information in different power knowledge graphs are compared to find similar parts and merge them.
[0063] By using logical reasoning, the consistency of each power knowledge graph is checked and the conflict problem is resolved.
[0064] Finally, the integrated power knowledge is classified according to the power data type to form multiple unified and consistent power knowledge graphs.
[0065] Through the above steps, the integration of power knowledge from different sources and types can be achieved to form a unified and consistent power knowledge graph, providing support for subsequent power knowledge reasoning and application.
[0066] As a preferred example, mining implicit power knowledge and rules from the power knowledge graph and adding the inference results to the corresponding power knowledge graph may specifically include:
[0067] Preprocess the power knowledge graph data by one or more methods including cleaning, deduplication, and format standardization to ensure the integrity and consistency of the power knowledge graph data, and convert it into a format suitable for reasoning, and then:
[0068] The following steps are performed: using the inference engine to recursively execute multiple predefined inference rules, matching the relationships between entities, gradually deriving new power knowledge and laws (such as causal relationships, similarities, etc.), and finally evaluating the inference results to check their accuracy and effectiveness, and adjusting the priority of each inference rule according to the evaluation results to tune the inference process; the inference rules are defined by rule languages (such as Prolog, SWRL, etc.) to describe the relationships and constraints between entities in the power knowledge graph;
[0069] Or perform the following steps: represent the power knowledge graph in the form of a graph, use graph computing models (such as graph neural network (GNN), graph attention network (GAT), graph convolutional network (GCN), etc.) to learn the features in the graph structure, and infer the power knowledge and rules implicit in the graph structure through iterative optimization, and finally evaluate the inference results to check their accuracy and effectiveness, and adjust the parameters of the graph computing model according to the evaluation results to tune the inference process; for example, use the GNN model to learn the node representation in the graph structure, and then use these representations to perform tasks such as similarity calculation and anomaly detection. It should be noted that in the above-mentioned reasoning based on machine learning, graph computing models such as graph neural network (GNN), graph attention network (GAT), and graph convolutional network (GCN) are all effective tools, but they have their own characteristics and are suitable for different scenarios and tasks. Therefore, in practical applications, it is necessary to select a suitable model based on specific problems and data characteristics.
[0070] The new power knowledge obtained by reasoning is converted into a standard format (such as triple format) and integrated into the original power knowledge graph, and the relationship between existing entities is updated to form an updated power knowledge graph.
[0071] Through the above process, it is possible to mine implicit knowledge and rules from the power knowledge graph, including causal relationships, anomaly detection, similarity calculation, etc., and add the reasoning results to the power knowledge graph, thereby enriching and improving the content of the power knowledge graph.
[0072] It should be noted that:
[0073] 1. In the rule reasoning process of this embodiment, the defined reasoning rules are a set of logical conditions and operations used to derive new power knowledge from known facts. Each reasoning rule describes a specific reasoning process. When the conditions in the rule are met, the operations defined in the rule can be executed to generate new reasoning knowledge or update existing reasoning knowledge. More specifically, the rule reasoning process in this embodiment includes:
[0074] Rule definition: First, define a set of rules, each of which consists of two parts: conditions and operations. The condition part describes the premise of the rule, that is, under what circumstances the rule can be executed; the operation part describes the operation to be performed when the rule is executed, that is, the process of deriving new power knowledge or updating existing power knowledge.
[0075] Rule matching: During the reasoning process, known facts are matched with rules to find the rules that meet the conditions. This process involves checking whether the condition part of the rule matches the known facts one by one. If the match is successful, the action defined in the rule can be executed.
[0076] Rule execution: When the conditional part of a rule matches known facts, the action defined in the rule can be executed. This may include generating new knowledge, updating the state of existing knowledge, or performing other actions to meet the requirements of reasoning.
[0077] Recursive application of rules: In the reasoning process, multiple rules are involved in recursive application. That is, the new power knowledge generated by executing one rule may become the condition of the next rule, thereby triggering the next round of rule matching and execution. This recursive process can continue until no new power knowledge is generated.
[0078] Knowledge update: During the reasoning process, the new knowledge generated may affect the existing knowledge base. Therefore, the information in the knowledge base needs to be updated in a timely manner to reflect the new knowledge generated during the reasoning process.
[0079] In general, rule-based reasoning is a reasoning method based on logical conditions and operations. By defining a set of rules and recursively applying the rules, new knowledge can be derived from known facts. Each rule corresponds to a specific derivation process. When the rule conditions are met, the rule operation can be executed to generate new knowledge.
[0080] 2. In the machine learning method of this embodiment, especially in the process of training using the graph neural network model, there is usually an objective function or loss function to measure the difference between the model prediction result and the true label, and minimize this difference by adjusting the model parameters, so as to realize the mining of hidden knowledge and rules. In the training process of the graph neural network, the process of optimizing the objective function is generally achieved by gradient descent or its variants. Specifically, the process includes the following steps:
[0081] Define the objective function: First, define an objective function or loss function to measure the difference between the model prediction result and the true label. This function is usually task-dependent, which can be the cross entropy loss function in classification tasks, the mean square error loss function in regression tasks, etc.
[0082] Calculate loss: In each round of training, graph data is input to the model, the model's prediction results are calculated through forward propagation, and then the prediction results are compared with the true labels to calculate the loss value.
[0083] Back propagation: Based on the loss value, the back propagation algorithm is used to calculate the gradient of the model parameters to the loss function. This step is the key to optimizing the objective function, which tells the model in which direction to move in the parameter space to reduce the loss.
[0084] Parameter update: According to the calculated gradient, the model parameters are updated through gradient descent or other optimization algorithms so that the value of the loss function gradually decreases.
[0085] Iterative optimization: Repeat the above steps until a pre-set stopping condition is reached, such as reaching a certain number of training rounds or the loss function converges to a certain threshold.
[0086] This iterative optimization process can be seen as a process of searching for the optimal solution in the model parameter space, with the goal of making the model's prediction results on the training data as close to the true label as possible. Through continuous iterative optimization, the model can learn the knowledge and rules hidden in the data and gradually improve its generalization ability on unseen data.
[0087] 3. The evaluation and tuning inference process of this embodiment includes the following steps:
[0088] Evaluation metric selection: First, select evaluation metrics that are suitable for the task and reasoning goal. These evaluation metrics can include accuracy, precision, recall, F1 score, etc. The specific choice depends on the nature and requirements of the reasoning task.
[0089] Reasoning result evaluation: Use the selected evaluation indicators to evaluate the reasoning results. By comparing with the true labels or the judgment of domain experts, the accuracy, completeness and effectiveness of the reasoning results are evaluated.
[0090] Tuning strategy selection: Based on the evaluation results, select an appropriate tuning strategy. This may include adjusting the priority of rules, adjusting parameters, adding or deleting rules, optimizing inference strategies, etc.
[0091] Optimization goal setting: Set optimization goals according to task requirements and actual conditions. The optimization goals can be to improve the accuracy of reasoning results, reduce the complexity of the reasoning process, improve reasoning efficiency, etc.
[0092] Tuning process: Tune the inference process according to the set optimization goal. This may involve multiple experiments and iterations to improve the inference results by adjusting different parameters and strategies.
[0093] Evaluate the tuning effect: Re-evaluate the inference results after tuning to check the effect and improvement of the tuning strategy. If the tuning effect is not ideal, you may need to reselect the strategy or adjust the optimization goal.
[0094] Iterative optimization: If necessary, the inference process and results can be continuously improved through multiple iterative optimization processes to achieve better results.
[0095] During the entire tuning process, the key is to select appropriate evaluation indicators and optimization targets according to task requirements, and adopt effective tuning strategies to improve the reasoning process and results, thereby improving the performance and effectiveness of the reasoning system.
[0096] As a preferred example, in the reinforcement learning model in the embodiment of the present application, a deep neural network is used as its policy function or value function, so that the optimal or suboptimal analysis and verification strategy can be automatically learned from a large amount of historical data and applied online or offline to new data.
[0097] In specific implementation, this application actually models the power data parsing problem as a Markov decision process (MDP), where the state represents the current data segment to be processed, the action represents a certain parsing or verification operation on the data segment, and the reward represents the data quality evaluation index obtained after the operation. Figure 2 A technical framework for power data parsing provided for an embodiment of the present application, in which the result of power data change is taken as a state, and the change of power data will also change the evaluation of power data. The better the change effect, the higher the evaluation; the amount of power data change is taken as an action, and different amounts of change cause different effects; the parsing effect value is taken as a reward. It should be noted that the policy function (PolicyFunction) and the value function (Value Function) are two core concepts of the reinforcement learning model in this application. 1. The policy function is a function that determines which action should be taken in a given state; in this embodiment, the policy function can be a function that directly maps a state to an action, or it can be a probability distribution for selecting an action in a given state. A deep neural network can be used to approximate this policy function by learning the characteristics of the state and outputting an action or an action probability. 2. The value function is used to evaluate the goodness of taking an action in a given state, or to predict the expected value of the cumulative reward that can be obtained in a given state; the value function is divided into a state value function (State Value Function) and an action value function (Action Value Function); the state value function (also known as the state value function) represents the expected return value in a specific state; the action value function (also known as the action-state value function or Q function) represents the expected return value of taking a specific action in a specific state; a deep neural network can be used to approximate the value function, and output an estimate of the state value or action value by learning the characteristics of the state and action. These functions play a key role in the deep reinforcement learning of this embodiment. Their learning and optimization can help the intelligent agent learn the optimal behavior strategy in the environment and make correct decisions when facing new situations; through a large amount of historical data, the deep neural network can automatically learn the approximate values of these functions and apply them online or offline on new data, thereby realizing the continuous learning and adaptability of the intelligent agent.
[0098] Accordingly, the present application also provides a power data analysis system, such as Figure 3 As shown, the analysis system may include:
[0099] The power knowledge graph construction unit 10 is used to collect structured power data, semi-structured power data and unstructured power data in the power system, and construct multiple power knowledge graphs corresponding to different power data types.
[0100] Reinforcement learning model construction unit 20: used to construct a reinforcement learning model, wherein: the model environment is the power knowledge graph, the model agent is the power data parsing algorithm, the model state is the result of the power data change, the model action is the power data change value, and the model reward is the parsing effect value.
[0101] The power data parsing unit 30 is used to trigger the reinforcement learning model to perform a specified number of rounds of prediction and analysis on the target power data in response to the user's parsing request.
[0102] The corresponding relationship diagram generating unit 40 is used to sort out the output results of each round of the reinforcement learning model after the analysis is completed, so as to form a corresponding relationship diagram between the reward value and the number of iterations of the power analysis data.
[0103] The prediction and analysis result output unit 50 is used to output the corresponding relationship diagram and the corresponding power data prediction and analysis result to the user, so that the user can make a reasonable prediction on the target power data.
[0104] As a preferred example, Figure 4 As shown, the power knowledge graph construction unit 10 may include:
[0105] Data acquisition module 101: used to acquire power-related data from multiple sources using corresponding data acquisition means, wherein the power-related data includes structured power data, semi-structured power data and unstructured power data; wherein: structured power data is mainly composed of power text data, semi-structured power data is mainly composed of a combination of power text data and power picture data, and unstructured power data is mainly composed of power picture data;
[0106] Data cleaning module 102: used to clean the power text data by using one or more means of regular expression, word segmentation, part-of-speech tagging, and named entity recognition, and clean the power picture data by using one or more means of image enhancement, denoising, and segmentation;
[0107] Knowledge extraction module 103: used to identify concepts, entities, attributes and relationships in the power field from the cleaned power data, and convert them into power knowledge representation in a standard format;
[0108] Knowledge fusion module 104: used to integrate power knowledge from different sources and types, and form multiple unified and consistent power knowledge graphs according to the classification of power data types;
[0109] Knowledge storage module 105: used to store various power knowledge graphs in a structure suitable for query and analysis, and provide corresponding interfaces and services;
[0110] Knowledge reasoning module 106: used to mine implicit power knowledge and rules from the power knowledge graph and add the reasoning results to the corresponding power knowledge graph.
[0111] In a specific implementation, the power knowledge graph construction unit 10 may further include:
[0112] Knowledge update module 107: used to update the concept layer and data layer in the power knowledge graph using incremental update or full update methods.
[0113] Accordingly, an embodiment of the present application further provides a power system, which may include: the power data analysis system as described above.
[0114] Accordingly, an embodiment of the present application further provides a terminal device, which may include:
[0115] Memory;
[0116] Processor; and
[0117] Computer programs;
[0118] The computer program is stored in the memory and is configured to be executed by the processor to implement the power data parsing method as described above.
[0119] Accordingly, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored; the computer program is executed by a processor to implement the power data parsing method as described above.
[0120] In actual applications, when the user needs to know the predicted value of a certain data in the future, he can send a data prediction and analysis request to the power data analysis system in this embodiment and specify the number of training rounds of the reinforcement learning model. The system obtains the power knowledge graph data related to the pre-analysis data from the knowledge base, and performs the specified number of rounds of analysis. After the analysis is completed, the system outputs a reward value-iteration number correspondence diagram and the corresponding power data prediction and analysis results to the user. The corresponding relationship diagram shows the reward value and its trend curve corresponding to each round of analysis. After seeing the corresponding relationship diagram, the user can intuitively obtain the analysis round with the highest reward value. The higher the reward value, the closer the prediction and analysis result is to the actual effect. Therefore, after the user obtains the prediction and analysis result with the highest reward value, the result can be used as a reliable reference value to set, adjust and control the corresponding data in the future.
[0121] In order to solve the specific technical problem of power data prediction and analysis, the embodiment of the present application specifically integrates knowledge graph and reinforcement learning to form a new, feasible and reliable data analysis method and system dedicated to power systems. The power knowledge graph in the embodiment of the present application can model various entities and relationships in the power system in the form of a graph, helping the power data analysis system to understand the topological structure, equipment characteristics and operating laws of the power system; and the reinforcement learning model in the embodiment of the present application can model the power system as a reinforcement learning environment through the knowledge graph, regard the data analysis algorithm as an intelligent agent, and learn how to parse power data through interaction with the environment. During the analysis process, the analysis strategy can be dynamically adjusted according to the real-time status and feedback information of the power system to adapt to the changes and needs of the power system. This application innovatively combines the two in a specific way. By utilizing the structured representation and reasoning capabilities of the knowledge graph, it better integrates and utilizes information from different data sources. At the same time, it conducts autonomous learning and optimization based on the real-time situation of the power system, thereby providing a more flexible and intelligent data analysis strategy. Therefore, this solution has the following advantages: (1) There is no need to manually write rules or annotate data, which reduces labor costs and error rates; (2) There is no need to perform feature engineering, and effective features can be directly extracted from the original data, and data of various types and formats can be processed; (3) It can capture complex relationships and nonlinear mappings between data, and can comprehensively consider multiple objectives and constraints; (4) It can adapt to data changes and abnormal situations, and can update strategies in real time. Overall, this solution effectively improves the accuracy and efficiency of power data analysis, and its application can help power system operators and managers better understand and manage power systems, and improve the safety, stability and efficiency of power systems.
[0122] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The schemes in the embodiments of the present application may be implemented in various computer languages, such as C language, VHDL language, Verilog language, object-oriented programming language Java, and interpreted scripting language JavaScript, etc. These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device, which is implemented in a box Figure 1These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide the functions specified in the box. Figure 1 In addition, in the description of the present application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically limited.
[0123] Although the preferred embodiments of the present application have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0124] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for analyzing power data, Features: include: Collect structured power data, semi-structured power data, and unstructured power data in the power system, and build multiple power knowledge graphs corresponding to different power data types; Construct a reinforcement learning model, where: the model environment is the power knowledge graph, the model agent is the power data parsing algorithm, the model state is the result of power data change, the model action is the power data change value, and the model reward is the parsing effect value; In response to the user's analysis request, the reinforcement learning model is triggered to perform a specified number of rounds of prediction and analysis on the target power data; After the analysis is completed, the output results of each round of the reinforcement learning model are sorted out to form a corresponding relationship diagram between the reward value and the number of iterations of the power analysis data; Finally, the corresponding relationship diagram and the corresponding power data prediction analysis results are output to the user so that the user can make a reasonable prediction of the target power data; The collecting of structured power data, semi-structured power data and unstructured power data in the power system and constructing multiple power knowledge graphs corresponding to different power data types specifically include: Acquire power-related data from multiple sources using corresponding data acquisition means, wherein the power-related data includes structured power data, semi-structured power data and unstructured power data; wherein: structured power data is composed of power text data, semi-structured power data is composed of a combination of power text data and power picture data, and unstructured power data is composed of power picture data; Use one or more of regular expressions, word segmentation, part-of-speech tagging, and named entity recognition to clean the power text data, and use one or more of image enhancement, denoising, and segmentation to clean the power picture data; Identify concepts, entities, attributes and relationships in the power domain from the cleaned power data and convert them into power knowledge representation in a standard format; Integrate power knowledge from different sources and types, and form multiple unified and consistent power knowledge graphs according to the classification of power data types; Store each power knowledge graph in a structure suitable for query and analysis, and provide corresponding interfaces and services; Implicit power knowledge and rules are mined from the power knowledge graph, and the reasoning results are added to the corresponding power knowledge graph.
2. The power data analysis method according to claim 1, Features: The method of identifying the concepts, entities, attributes and relationships in the power field from the cleaned power data and converting them into a standard format of power knowledge representation specifically includes: For structured power data and semi-structured power data, perform the following steps: Preprocess the cleaned electric power text data by using one or more means of word segmentation and stop word removal, and preprocess the cleaned electric power picture data by using one or more means of image preprocessing and labeling; The preprocessed power text data is converted into dense vector representation by word embedding, and the image features of the preprocessed power picture data are extracted using a convolutional neural network. Then, the converted dense vector representation and the extracted image features form a corresponding training set. Train the power data in the training set and finally extract concepts, entities, attributes and relationships; For unstructured power data, perform the following steps: Use object detection to detect objects of interest from the image and set them as entities; Use image classification to classify images and identify attributes in the images, including themes and scenes; By generating image descriptions, text information is generated to describe the image content, and finally concepts, entities, attributes and relationships are extracted; After the extraction of concepts, entities, attributes, and relationships is completed, perform the following steps: Using the pre-trained model, the embedding amount and vector of the extracted entity are matched with the embedding amount and vector of the entity in the knowledge base, and the extracted entity with the highest matching degree is linked to the knowledge base entity, where the knowledge base is composed of all power knowledge graphs; The extracted entities are used as the input of the pre-trained model, and the model outputs the probability distribution map of the relationship between entities. Finally, the relationship with the highest probability is selected as the classification result between entities. After completing entity linking and relation classification, perform the following steps: The concepts, entities, attributes and relationships identified from power data are converted into power knowledge representation in a standard format.
3. The power data analysis method according to claim 1, Features: In the process of integrating power knowledge of different sources and types, the power knowledge includes: new power knowledge text data in a standard format formed in this round of parsing, and power knowledge graph data that has been formed before this round of parsing; The integration of power knowledge from different sources and types is carried out to form multiple unified and consistent power knowledge graphs according to the classification of power data types, including: Preprocess the new power knowledge text data by one or more methods including cleaning, word segmentation, and part-of-speech tagging, and convert the power knowledge graphs from different sources into a unified format; Using vector representation, the pre-processed entities with the same name in the power knowledge data from different data sources are embedded into the same vector space, and the similarity between the entities is calculated. Based on the calculation results, it is determined whether they point to the same concept, and these entities with the same name are disambiguated according to the judgment results. Using vector-based representation methods, synonymous or similar relationships in different power knowledge graphs are embedded into the same vector space, so that the embedding model can learn the representation of the relationship. Then, the similarity between the relationships in different power knowledge graphs is calculated, and these relationships are aligned according to the calculation results. By using ontology matching and mapping methods, the ontology structures and semantic information in different power knowledge graphs are compared to find similar parts and merge them; By using logical reasoning, we check the consistency of each power knowledge graph and solve the conflict problem; Finally, the integrated power knowledge is classified according to the power data type to form multiple unified and consistent power knowledge graphs.
4. The power data analysis method according to claim 1, Features: The aforementioned mining of implicit power knowledge and rules from the power knowledge graph and adding the inference results to the corresponding power knowledge graph specifically includes: Use one or more of the following methods: cleaning, deduplication, and format standardization to preprocess the power knowledge graph data and convert it into a format suitable for reasoning. Then: The following steps are performed: using the inference engine to recursively execute multiple predefined inference rules, matching the relationships between entities, gradually deriving new power knowledge and laws, and finally evaluating the inference results, adjusting the priority of each inference rule according to the evaluation results to tune the inference process; the inference rules are defined by the rule language to describe the relationships and constraints between entities in the power knowledge graph; Or perform the following steps: represent the power knowledge graph in the form of a graph, use the graph computing model to learn the features in the graph structure, and infer the power knowledge and rules implicit in the graph structure through iterative optimization, and finally evaluate the inference results, and adjust the parameters of the graph computing model according to the evaluation results to optimize the inference process; The new power knowledge obtained by reasoning is converted into a standard format and integrated into the original power knowledge graph, and the relationships between existing entities are updated to form an updated power knowledge graph.
5. A power data analysis system, Features: include: An electric power knowledge graph construction unit (10): used to collect structured electric power data, semi-structured electric power data and unstructured electric power data in the electric power system, and to construct multiple electric power knowledge graphs corresponding to different electric power data types; A reinforcement learning model construction unit (20): used to construct a reinforcement learning model, wherein: the model environment is an electric power knowledge graph, the model agent is an electric power data parsing algorithm, the model state is a result of electric power data change, the model action is a value of electric power data change, and the model reward is a parsing effect value; A power data analysis unit (30): configured to respond to a user's analysis request and trigger a reinforcement learning model to perform a specified number of rounds of prediction analysis on target power data; A corresponding relationship graph generating unit (40) is used to organize the output results of each round of the reinforcement learning model after the analysis is completed, so as to form a corresponding relationship graph between the reward value and the number of iterations of the power analysis data; A prediction and analysis result output unit (50): used to output the corresponding relationship diagram and the corresponding power data prediction and analysis result to a user, so that the user can make a reasonable prediction of the target power data; The electric power knowledge graph construction unit (10) comprises: A data acquisition module (101): used to acquire power-related data from multiple sources using corresponding data acquisition means, wherein the power-related data includes structured power data, semi-structured power data and unstructured power data; wherein: the structured power data is composed of power text data, the semi-structured power data is composed of a combination of power text data and power picture data, and the unstructured power data is composed of power picture data; Data cleaning module (102): used to clean the power text data by using one or more means of regular expression, word segmentation, part-of-speech tagging, and named entity recognition, and to clean the power picture data by using one or more means of image enhancement, denoising, and segmentation; Knowledge extraction module (103): used to identify concepts, entities, attributes and relationships in the power field from the cleaned power data, and convert them into power knowledge representation in a standard format; Knowledge fusion module (104): used to integrate power knowledge from different sources and types, and form multiple unified and consistent power knowledge graphs according to the classification of power data types; Knowledge storage module (105): used to store each power knowledge graph in a structure suitable for query and analysis, and provide corresponding interfaces and services; Knowledge reasoning module (106): used to mine implicit power knowledge and rules from the power knowledge graph and add the reasoning results to the corresponding power knowledge graph.
6. An electric power system, It is characterized in that include: The power data analysis system as claimed in claim 5.
7. A terminal device, It is characterized in that include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and is configured to be executed by the processor to implement the power data parsing method according to any one of claims 1 to 4.
8. A computer-readable storage medium, It is characterized in that A computer program is stored thereon; the computer program is executed by a processor to implement the power data analysis method as described in any one of claims 1 to 4.
