Microgrid network topology flexible configuration method based on matrix topology
By constructing heterogeneous database and graph neural network models, combining heterogeneous hardware scheduling models, and using intelligent algorithms for multi-objective optimization, the problem of poor robustness of microgrid network topology optimization is solved, and a more stable and economical microgrid operation is achieved.
Patent Information
- Application Number
- CN202510061591.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-01-15
AI Technical Summary
The existing microgrid network topology optimization methods are poorly robust and it is difficult to effectively deal with the complex situations of supply and demand fluctuations and equipment heterogeneity in microgrid environments.
The flexible configuration method of microgrid network topology based on matrix topology is adopted, and by constructing heterogeneous databases, graph neural network models and heterogeneous hardware scheduling models, intelligent algorithms are used to solve multi-objective optimization functions to realize the flexible optimization configuration of microgrid topology structure.
It improves the robustness of the microgrid topology solution, and can optimize the operating performance of the microgrid and improve the stability and economics of the system while meeting the multivariate heterogeneous constraints.
Smart Images

Figure CN119651751A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of microgrids, and in particular to a flexible configuration method for microgrid network topology based on matrix topology. Background Art
[0002] With the rapid development of new energy, distributed power sources and intelligent power equipment, microgrids have become an important part of the future power system. By integrating distributed energy, energy storage devices and controllable loads, microgrids can achieve local balance and self-sufficiency of electricity, and improve the reliability and economy of power supply. However, the environment in which microgrids are located is complex and changeable, with large fluctuations in supply and demand and strong heterogeneity of equipment, which poses severe challenges to the planning and operation of microgrids. As the basic architecture connecting various power equipment, the optimized configuration of microgrid network topology is crucial for the safe, stable and economical operation of microgrids. However, there is a complex nonlinear relationship between microgrid topology and equipment parameters and operating status. The traditional method uses a simplified linear model, which is difficult to accurately characterize this correlation characteristic, resulting in large modeling deviations. Summary of the invention
[0003] In response to the problem of poor robustness of microgrid network topology optimization methods in the prior art, the present application provides a flexible configuration method for microgrid network topology based on matrix topology. By collecting data from the microgrid network and building a heterogeneous database, mapping the microgrid into a graph structure and building a graph neural network and a heterogeneous hardware scheduling model, and using intelligent algorithms to solve multi-objective optimization functions, flexible optimization configuration of the microgrid topology structure can be achieved, and the robustness of the topology solution can be improved while satisfying multiple heterogeneous constraints.
[0004] The purpose of this application is achieved through the following technical solutions.
[0005] The present application provides a microgrid network topology flexible configuration method based on matrix topology, including: collecting data of the microgrid network and preprocessing the collected data; wherein the data of the microgrid network includes network topology structure, device parameters, operation parameters, and heterogeneous characteristics of different heterogeneous hardware units; the heterogeneous hardware units represent hardware devices with different computing capabilities and communication delays in the microgrid network; based on the preprocessed data, a heterogeneous database of the microgrid network and the device is constructed, and the heterogeneous database includes structured data, semi-structured data and unstructured data; based on the data in the heterogeneous database, the microgrid network and the device are mapped into a graph structure to construct a graph neural network model; based on the Based on the heterogeneous characteristics, different mapping strategies for heterogeneous hardware units are set, and a reinforcement learning algorithm is used to build a scheduling model for heterogeneous hardware units. The preprocessed data is input into the graph neural network model to obtain the correlation between the microgrid network topology and the device parameters as a constraint condition. The preprocessed data is input into the scheduling model to obtain the scheduling strategy of the heterogeneous hardware units as the optimization target. According to the constraint conditions and optimization targets, a multi-objective function for microgrid network topology optimization is constructed. An intelligent algorithm is used to solve the multi-objective function for microgrid network topology optimization and generate a microgrid network topology solution. The topology solution includes the microgrid network topology, device connection relationship and the scheduling strategy of heterogeneous hardware units.
[0006] Furthermore, mapping relationships are established within heterogeneous databases, including: establishing a mapping relationship between a node table and a device document collection to associate device parameters with a network topology; establishing a mapping relationship between a node table, a branch table, and an operating parameter measurement point table to associate operating parameters with a network topology; establishing a mapping relationship between a node table and a hardware feature table to associate heterogeneous hardware features with a network topology.
[0007] Furthermore, according to the data in the heterogeneous database, the microgrid network and the equipment are mapped into a graph structure, and a graph neural network model is constructed, including: according to the microgrid heterogeneous database, the data in the node table, branch table and device document collection are extracted, the microgrid network nodes are mapped into nodes of the graph structure, and the microgrid network branches are mapped into edges of the graph structure to obtain a microgrid network topology diagram; according to the mapping relationship between the node table and the device document collection, the device parameters are added to the corresponding microgrid network nodes as attributes of the graph structure nodes; according to the mapping relationship between the node table, branch table and operating parameter measurement point table, the operating parameters are added to the corresponding microgrid network nodes and branches as attributes of the graph structure nodes and edges; according to the mapping relationship between the node table and the hardware feature table, the heterogeneous hardware features are added to the corresponding microgrid network nodes as attributes of the graph structure nodes; according to the microgrid network topology diagram, as well as the attributes of the nodes and edges, a graph neural network model of the microgrid is constructed.
[0008] Furthermore, according to the microgrid network topology diagram, as well as the attributes of nodes and edges, a graph neural network model of the microgrid is constructed, including: mapping the microgrid network nodes to the input layer nodes of the graph neural network, and mapping the microgrid network branches to the edges of the graph neural network; initializing the feature vectors of the input layer nodes of the graph neural network according to the node attribute information; the node attribute information includes device parameters, operating parameters and heterogeneous hardware features; setting the hidden layer and aggregation function of the graph neural network, and updating the feature vector of the node through feature aggregation; setting the output layer of the graph neural network, and generating the association relationship between the microgrid network topology structure and the device parameters according to the feature vector of the node;
[0009] Furthermore, according to the heterogeneous characteristics of different heterogeneous hardware units, different mapping strategies for heterogeneous hardware units are set, and a reinforcement learning algorithm is used to construct a scheduling model for heterogeneous hardware units, including: extracting the computing power and communication delay data of different heterogeneous hardware units according to the established hardware feature table; setting the mapping strategy of the heterogeneous hardware units according to the extracted data: mapping heterogeneous hardware units with computing power greater than a preset computing power threshold and communication delay less than a preset communication delay threshold as hidden layer nodes in the graph neural network model, for performing feature aggregation and updating of the graph neural network; mapping heterogeneous hardware units with computing power less than or equal to the preset computing power threshold and communication delay greater than or equal to the preset communication delay threshold as input layer nodes of the graph neural network, for providing an initial feature vector; according to the mapping strategy, Initialize the reinforcement learning environment: define the state space to represent the working state of the heterogeneous hardware units and the operating state of the microgrid system; define the action space to represent the scheduling decision of the heterogeneous hardware units, which includes the task allocation and node mapping of the heterogeneous hardware units; define the reward function to represent the performance evaluation of the scheduling decision of the heterogeneous hardware units, which includes the computing power and communication delay of the microgrid system; use the reinforcement learning algorithm to learn the optimal scheduling strategy of the heterogeneous hardware units through the interaction between the intelligent agent and the environment; use the optimal scheduling strategy of the heterogeneous hardware units as the output of the reinforcement learning algorithm to construct the scheduling model of the heterogeneous hardware units; the scheduling model of the heterogeneous hardware units takes the operating state of the microgrid and the working state of the heterogeneous hardware as input to generate the corresponding hardware scheduling strategy, which includes task allocation and node mapping.
[0010] Furthermore, a reinforcement learning algorithm is used to learn the optimal scheduling strategy of heterogeneous hardware units through the interaction between the intelligent agent and the environment, including: taking the network topology, device parameters, operating parameters in the heterogeneous database, and the computing power and communication delay in the hardware feature table as the state input of the reinforcement learning environment; wherein the network topology, device parameters and operating parameters represent the operating state of the microgrid, and the computing power and communication delay represent the working state of the heterogeneous hardware units; defining the scheduling decision of the heterogeneous hardware units as the action of the reinforcement learning algorithm, and the scheduling decision includes mapping the heterogeneous hardware units to the nodes of the graph neural network model, and allocating computing and communication tasks to the heterogeneous hardware units; using the output of the graph neural network model as an evaluation indicator, constructing the reward function of the reinforcement learning algorithm, and the reward function represents the performance evaluation of the scheduling decision of the heterogeneous hardware units, and the performance evaluation includes the computing power and communication delay of the microgrid system; initializing the Q value table of the reinforcement learning algorithm, discretizing the state space and the action space, and using the Q-Learning algorithm to train the Q value table to obtain the optimal scheduling strategy for the heterogeneous hardware units; the optimal scheduling strategy is a set of heterogeneous hardware unit task allocation and node mapping combinations that maximize the reward function.
[0011] Furthermore, according to the constraints and optimization objectives, a multi-objective function for microgrid network topology optimization is constructed, including: taking the output of the graph neural network model as a constraint condition and constructing a constraint condition set C: C = {c1, c2, ..., c m}, where c i represents the i-th association constraint, i = 1, 2, ..., m; m represents the number of constraints; c i is a logical expression that takes the value True or False. If and only if the microgrid network topology meets the device parameter requirements, c i True; the output of the heterogeneous hardware unit scheduling model is used as the optimization target to construct the optimization target set O: O = {o1, o2, o3}, where o1 represents minimizing the energy consumption of the microgrid system; o2 represents maximizing the computing power of the heterogeneous hardware unit; o3 represents minimizing the communication delay; according to the constraint set C and the optimization target set O, a multi-objective function for microgrid network topology optimization is constructed:
[0012] minF(x)=[f1(x),f2(x),f3(x)]. Constraints: x∈X,c i(x)=True,i=1,2,......,m; where x represents the decision variables of the microgrid network topology and the scheduling strategy of heterogeneous hardware units, x=[topo,sche]; topo represents the microgrid network topology, sche represents the scheduling strategy of heterogeneous hardware units; X represents the feasible domain of the decision variable x, which is determined by the physical connection of the microgrid network, device parameters, hardware constraints and other conditions;
[0013] f1(x) represents the energy consumption of the microgrid system, which is obtained according to the operating parameter measurement point table in the heterogeneous database;
[0014] Among them, P i (x) represents the active power of the i-th node under the topology and scheduling strategy x; N represents the node set of the microgrid; f2(x) represents the computing power of the heterogeneous hardware unit, Among them, a j represents the computing power of the jth heterogeneous hardware unit, M represents the set of heterogeneous hardware units, and u j (x) is a 0-1 variable, indicating the scheduling state of heterogeneous hardware unit j under decision x, u j (x) = 1 indicates scheduling, u j (x) = 0 means no scheduling; f3(x) means communication delay,
[0015] Among them, t l (x) represents the end-to-end delay of the communication link l under the topology structure and scheduling strategy x, and L represents the set of all communication links in the microgrid network; [f1(x), f2(x), f3(x)] represents a multi-objective function, which consists of three sub-objectives: energy consumption, computing power, and communication delay, requiring that the energy consumption and communication delay be minimized and the computing power be maximized.
[0016] Furthermore, an intelligent algorithm is used to solve the multi-objective function of microgrid network topology optimization and generate a microgrid network topology solution, including: randomly generating an initial population P, which consists of a group of individuals with microgrid network topology structures and heterogeneous hardware unit scheduling strategies, each individual corresponds to a decision variable x, and the population size is N; performing non-dominated sorting on the population P, and calculating the non-dominated level and congestion distance of each individual in the population based on the three optimization goals of energy consumption, computing power, and communication delay; using a binary tournament selection operator to select N individuals from the population P to generate a parent population P parent ; For the parent population P parent Perform crossover and mutation operations to generate the offspring population P offspring ; The parent population P parent and the offspring population P offspring Merge to obtain a merged population P of size 2Ncombine ; For the combined population P combine Repeat the selection, crossover and mutation operations until the preset termination condition is met, perform non-dominated sorting on the last generation of population, and obtain non-dominated solutions as the Pareto optimal solution set for the microgrid network topology optimization problem; cluster the solutions in the Pareto optimal solution set, and according to the clustering results, use the TOPSIS method to select an optimal solution from each class to form a set of candidate topology solutions; including: performing maximum and minimum normalization on the Pareto optimal solution set, mapping the three target values of energy consumption, computing power and communication delay of each solution to the interval [0, 1]; calculating the density distribution of the Pareto optimal solution set, and the density Among them, x i represents the i-th solution, K represents the size of the Pareto optimal solution set, ||x i -x j || represents the solution x i and x j Euclidean distance in normalized target space; select the point x with the largest density max As the first cluster center, let Ω1={x max}; Repeat the following steps until k cluster centers are obtained: Calculate each solution x i Minimum distance to the current cluster center: Select d i The largest solution x i * as the new cluster center, Ω t+1 =Ω t ∪{x i *}, t'=t+1; According to the Euclidean distance, each solution is divided into the class corresponding to the cluster center closest to it; For each class, calculate the center of all solutions in the class As the new cluster center of this class; repeat until the clustering results converge and get k cluster classes; use the TOPSIS method to calculate the relative closeness C of the solution in each cluster class to the ideal point i : in, Represents the solution x i The optimal point The Euclidean distance of the optimal ideal point takes the minimum, maximum and minimum values of all solutions respectively; Represents the solution x i The worst ideal point The energy consumption, computing power and communication delay of the worst ideal point are the maximum, minimum and maximum values of all solutions respectively; select the closeness C from each cluster iThe largest solution constitutes a set of candidate topology solutions; based on the set of candidate topology solutions and combined with the operation requirements of the microgrid, the optimal topology solution is selected; the individuals corresponding to the optimal topology solution are decoded to obtain the microgrid network topology structure, device connection relationship and heterogeneous hardware unit scheduling strategy as the result output of the microgrid network topology optimization, and generate a microgrid network topology solution.
[0017] Compared with the prior art, the advantages of this application are:
[0018] Traditional microgrid topology optimization is usually based on homogeneous data and is difficult to handle the growing heterogeneous data. This solution uses image recognition, NLP and other technologies to collect multi-source heterogeneous data, build a unified heterogeneous database, map unstructured data with structured data, and realize the association management of microgrid data, reducing data redundancy and access overhead. Most existing methods use simplified electrical models, which are difficult to accurately characterize the complex relationship between microgrid topology and device parameters. This solution innovatively maps the microgrid into a graph structure, uses the relational reasoning ability of the graph neural network, establishes an association mapping between devices and topology, and improves the representation ability and generalization performance of the topological model.
[0019] Differences in heterogeneous hardware can significantly affect the performance of microgrid topology, while traditional methods usually do not consider hardware heterogeneity. Aiming at the heterogeneous characteristics of hardware, this solution designs a hardware mapping strategy based on computing power and communication latency, and uses reinforcement learning to dynamically optimize hardware scheduling, so that heterogeneous hardware capabilities match microgrid requirements, ensuring the robust operation and efficient computing of microgrids in heterogeneous environments. In the past, topology optimization mostly used a single-objective model, which made it difficult to comprehensively weigh multiple performance indicators. This solution uses the output of the graph neural network as a constraint set and the output of reinforcement learning as an optimization target, constructs a multi-objective function, and uses a non-dominated sorting genetic algorithm to search for the Pareto optimal solution set, while taking into account energy consumption, robustness, computing efficiency and other targets. The TOPSIS method is combined to select the optimal topology solution that meets actual needs, realizing the flexible optimization configuration of microgrids under multi-heterogeneous constraints. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is a flow chart of a microgrid network topology flexible configuration method based on matrix topology of the present application;
[0021] Figure 2 is an exemplary flow chart of obtaining preprocessed data of the present application;
[0022] Figure 3 is an exemplary flow chart of constructing a heterogeneous database of the present application;
[0023] Figure 4 It is an exemplary flow chart of the optimal scheduling strategy for generating heterogeneous hardware units of the present application. DETAILED DESCRIPTION
[0024] The method and system provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0025] like Figure 1 and Figure 2 As shown in the figure, in order to fully characterize the real state of the microgrid, it is necessary to collect multi-source heterogeneous data and preprocess them. First, the topological structure, equipment parameters, operating parameters of the microgrid network and the heterogeneous feature data of heterogeneous hardware units are collected. Among them, the heterogeneous hardware unit represents the hardware devices with different computing capabilities and communication delays in the microgrid, such as intelligent controllers, edge servers, etc. The image recognition technology is used to automatically extract the microgrid topological structure data. Specifically, using topological images such as electrical CAD drawings or single-line diagrams, through image segmentation and feature extraction algorithms, the nodes (such as busbars, switches, transformers, etc.) and branches (such as transmission lines, transformers, etc.) in the diagram are identified, and their location, connection relationship and other attribute information are extracted to form a complete network topological structure data. This automated image recognition method can reduce the errors and labor intensity of manual annotation and improve the accuracy and efficiency of topological data. Natural language processing (NLP) technology is used to parse the unstructured parameters of microgrid equipment. Microgrid equipment (such as wind turbines, photovoltaics, energy storage, etc.) usually comes with unstructured text data such as nameplates and instructions, including key parameters such as equipment model, capacity, material, and life. By using NLP text mining and information extraction methods, such as regular expressions and named entity recognition, key parameter information in equipment nameplates and manuals can be automatically extracted and converted into structured equipment parameter data. This method can process unstructured texts in different formats and languages, has a high degree of automation, and reduces the risk of manual input errors.
[0026] The operating parameters of the microgrid are collected in real time through data acquisition equipment. The voltage, current, active / reactive power and other electrical quantity parameters of each node and branch of the microgrid are sampled at a certain frequency using IoT sensor devices such as smart meters and micro MUs. At the same time, through data quality detection and exception processing, the missing values and abnormal values in the collected data are cleaned and corrected to improve the integrity and reliability of the operating parameter data. The high-quality operating data collected in real time can reflect the dynamic operating status of the microgrid and provide decision support for subsequent topology optimization. The data fusion algorithm is used to associate the performance parameters of heterogeneous hardware. Communication and computing hardware of different manufacturers and models are deployed in the microgrid. Their technical manuals and test reports contain key features that reflect the heterogeneity of the hardware, such as CPU frequency, memory capacity, cache size, communication bandwidth, latency, etc. Data fusion algorithms, such as similarity matching and entity alignment, are used to associate hardware data from different sources and formats, and extract heterogeneous feature indicators such as hardware computing power and communication latency. The fused heterogeneous feature data can quantify the hardware performance differences and guide the topology optimization of heterogeneous-aware microgrids.
[0027] like Figure 3As shown in the figure, based on the preprocessed multi-source heterogeneous data, different database technologies are used to construct a heterogeneous database of the microgrid to adapt to the structured degree and access characteristics of the data. The heterogeneous database contains structured data, semi-structured data and unstructured data, and the association management of various types of data is realized through data mapping, including: using a relational database to store microgrid topology data. The microgrid topology consists of nodes and branches, which have a fixed attribute structure and are suitable for structured storage using a two-dimensional table. The node table (Node) and branch table (Branch) are designed to store the attribute information of nodes and branches respectively. The node table contains the following fields: node ID as the primary key, which uniquely identifies each node; name represents the name of the node, such as "substation A"; type represents the category of the node, such as "busbar", "switch", etc.; region represents the geographical area where the node is located. Through the node table, each node and its attributes in the microgrid topology can be fully described. The branch table contains the following fields: the branch ID is used as the primary key to uniquely identify each branch; the start node and the end node are the starting point and the end point of the branch, respectively, and they form a foreign key association with the node ID of the node table; the line type indicates the type of wire of the branch, such as "overhead line" and "cable"; the length indicates the physical length of the branch. Through the branch table, the connection relationship between nodes and the line attributes can be described. The relational database provides a powerful SQL query language, which can easily query and modify the topological data. SQL statements can be used to query all nodes in a certain area, all adjacent branches of a certain node, etc. At the same time, the index and constraint mechanism of the relational database can ensure the consistency and integrity of the data and avoid data redundancy and anomalies. In addition, since the relational database naturally supports the storage and query of graph data, the graph theory algorithm can be directly applied in the database for network topology analysis. The depth-first search and shortest path calculation algorithms are implemented through SQL statements to analyze the connectivity and path optimization of microgrids.
[0028] Use document-based database to store microgrid equipment parameter data. Different from the topological structure, the attribute structure of equipment parameters is relatively flexible and changeable. The parameter names and quantities of different types of equipment may be different, which is suitable for storage in semi-structured documents. A device document collection is designed, each document represents a device and contains various parameter information of the device. The fields in the document are: device ID as the unique identifier of the document; model represents the model specification of the device; capacity represents the rated capacity of the device; rated parameters represent other rated indicators of the device, such as voltage, current, etc. Since the document is a loose data structure, different parameter fields can be flexibly added to different devices without modifying the schema of the entire collection. The document database provides a powerful query language that supports structured and unstructured queries on document content. You can use query statements to match a certain model of equipment, count the number of equipment of different capacity levels, and so on. The schemaless feature of the document database makes it easy to cope with the scalability and diversity of equipment parameters, and adding parameters for new equipment types does not require reconstructing the database.
[0029] Object storage systems are used to store unstructured data such as nameplates and manuals of microgrid equipment. These data usually exist in the form of large object files such as images and PDFs, without fixed structures and patterns, and are not suitable for storage in relational or document databases. Object storage is an object-oriented data storage architecture that stores data in the form of objects in a flat address space. Each object consists of a data ontology and metadata. The data ontology is the actual content of the object, such as binary data of images and PDF files; metadata is a key-value pair that describes the properties of the object, such as file name, type, size, creation time, etc. Through object storage, the unstructured data of the equipment can be directly stored as objects without paying attention to their internal structure and organization. Object storage provides a highly scalable and low-cost storage solution. It adopts a distributed architecture, which can easily expand storage capacity and throughput to meet the storage needs of massive unstructured data. At the same time, object storage provides low data redundancy and storage costs through optimized data replication and fault tolerance mechanisms. This makes it possible to store large-scale equipment nameplate and manual data cost-effectively. Object storage also provides flexible metadata management capabilities. Custom metadata tags can be attached to each object, such as device ID, nameplate type, upload time, etc., to facilitate subsequent data retrieval and management. Metadata can be stored and accessed independently of objects, making it possible to quickly query and filter objects with specific attributes without obtaining the entire content of the object. In addition, object storage supports version control functions, which can retain multiple historical versions of objects. This is particularly useful in scenarios where device nameplates and manuals are frequently updated, as it can track the change history of data and restore to previous versions when necessary. Version control ensures data traceability and recovery capabilities and improves system reliability. In terms of data access, object storage provides a RESTful API interface based on HTTP / HTTPS, which can easily upload, download and manage objects. Unstructured data of equipment can be accessed and operated through standard HTTP requests, such as PUT, GET, DELETE, etc. Object storage also supports a variety of access control and security mechanisms, such as identity authentication, access control, data encryption, etc., to ensure data security and privacy.
[0030] A time series database is used to store the time series measurement point data of the microgrid operating parameters. The operating parameters such as voltage, current, and power are numerical sequences that change over time. They have the characteristics of large data volume, frequent writing, and multiple aggregate queries. They are suitable for optimized storage and query using a time series database. The time series database is a database system specially optimized for the storage and query of time series data. It uses timestamp as the main dimension of data and supports fast data writing and aggregate query. An operating parameter measurement point table is designed. Each measurement point contains fields such as timestamp, value, and quality stamp, which respectively represent the data collection time, measurement value, and data quality status. The time series database uses column storage and compression technology to efficiently store large-scale time series data. It organizes data of the same time series together, reduces the number of disk I / O times through column storage, and improves writing and query performance. At the same time, the time series database uses specific compression algorithms, such as Delta encoding and run-length encoding, which can significantly reduce the storage space of data and save storage costs. In terms of data writing, the time series database provides batch writing and streaming writing interfaces, which can support high-concurrency data insertion scenarios. Data from multiple measuring points can be written in batches to reduce the number of network interactions; or the streaming writing method can be used to continuously write the measuring point data to the database in real time. The time series database also supports data retention policies, which can automatically delete expired historical data and control the life cycle of data. In terms of data query, the time series database provides a wealth of aggregation functions and query languages, which can facilitate time series data analysis. You can use built-in aggregation functions such as sum, average, maximum and minimum values to summarize and count the measuring point data within a period of time; you can also use SQL-like query languages to perform complex data filtering and calculations based on time ranges, measuring point IDs and other conditions. The time series database also supports technologies such as Down Sampling, which can downsample high-frequency data to speed up query response speed.
[0031] A relational database is used to store the structured feature data of heterogeneous hardware. Heterogeneous hardware includes edge computing nodes, gateways, communication links, etc., which have some inherent performance indicators, such as computing power, communication latency, etc. These indicators have a certain attribute structure and are suitable for standardized storage using a two-dimensional table in a relational database. A hardware feature table (Hardware Feature) is designed to store the performance feature data of different hardware. The table contains the following fields: Hardware ID: As the primary key, it uniquely identifies each hardware device. CPU Frequency: Indicates the computing power of the hardware, such as the processor frequency. Memory Size: Indicates the memory capacity of the hardware. Network Bandwidth: Indicates the network transmission capacity of the hardware. Latency: Indicates the communication latency characteristics of the hardware. Other related fields, such as storage capacity, energy consumption, etc. Through the hardware feature table, the performance indicators of heterogeneous hardware can be stored in a structured manner. This standardized storage method has the following advantages: Easy to query and compare: SQL statements can be used to easily query and compare the performance indicators of different hardware, such as finding hardware with a CPU frequency greater than a certain threshold, or sorting hardware by memory size. Support for indexes and constraints: Relational databases provide index and constraint mechanisms, which can create indexes on key fields such as hardware IDs to speed up data retrieval and screening; at the same time, constraints such as non-null and uniqueness of fields can be set to ensure data integrity and consistency. Easy to count and analyze: SQL aggregation functions such as AVG, MAX, MIN, etc. can be used to perform statistical analysis on hardware feature data, such as calculating the average CPU frequency, finding the hardware with the largest memory, etc. In short, storing the structured feature data of heterogeneous hardware in a relational database provides a standardized storage method, facilitates data query, comparison, and analysis, and provides data support for hardware performance evaluation and selection in heterogeneous environments.
[0032] It is necessary to establish mapping relationships within heterogeneous databases to achieve associations between different databases. Since heterogeneous data is scattered and stored in multiple databases such as relational databases, document databases, and object storage, a mechanism needs to be established to associate these seemingly independent data to form a semantic connection. The specific implementation method of establishing mapping relationships depends on the type of database and data model. For relational databases, you can establish associations between tables by designing foreign keys. Add a device ID field in the node table (Node) and associate it with the device ID field in the device document collection (Device Collection) as a foreign key. In this way, you can associate nodes with device parameters and know the device information corresponding to each node. For document databases and object storage, you can embed associated IDs or references in documents or objects. Add a node ID field in the device document to indicate the node to which the device belongs; add a node ID or device ID in the metadata of the object storage to indicate the node or device corresponding to the object. Through this embedded association method, data in different databases can be associated. In addition to using foreign keys and embedded references, you can also use application layer code to maintain mapping relationships between data. Between the node table and the operating parameter measurement point table, the node and its operating status parameters can be associated at the application layer through the correspondence between the node ID and the measurement point ID. Although this method requires additional code implementation, it provides greater flexibility and customizability. The ultimate goal of establishing a mapping relationship is to achieve cross-database association and query. By associating heterogeneous data, complex joint queries and data analysis can be performed. The device parameters and operating status data of nodes in a certain area can be queried, and the results can be visualized with the network topology; the relationship between the hardware characteristics of the node and the branches and devices connected to it can also be analyzed to optimize the network topology and resource configuration.
[0033] According to the data in the heterogeneous database, the microgrid network and the equipment are mapped into a graph structure to build a graph neural network model; to extract the microgrid topology data and build the network topology graph, it is necessary to extract the topology structure data of the microgrid network from the node table (Node) and branch table (Branch) of the heterogeneous database and map it into a graph structure. First, traverse each row of data in the node table and map each node to a node in the graph structure. The unique identifier (ID) and other attribute information of the node, such as node name, node type, etc., remain unchanged and are directly used as attributes of the graph node. Through this mapping, all nodes in the node table are converted into nodes in the graph structure. Next, traverse each row of data in the branch table and map each branch to an edge of the graph structure. The branch table usually contains fields such as the starting node ID (From Node ID) and the ending node ID (ToNode ID), indicating the two nodes connected by the branch. According to these fields, find the corresponding starting node and ending node in the graph structure, and create an edge between them. The attribute information of the edge, such as branch type, length, capacity, etc., can also be saved in the graph structure as the attributes of the edge. Through the above steps, the data in the node table and branch table are mapped to the graph structure, and an undirected graph representing the topological structure of the microgrid network is obtained. The nodes in the graph represent the nodes of the microgrid, such as busbars, switches, transformers, etc.; the edges in the graph represent the physical connection relationship between nodes, such as lines, cables, etc. This undirected graph fully describes the topological structure of the microgrid network, including the connectivity and adjacency between nodes. Through the graph structure, various topological analyses and algorithm applications can be easily performed, such as connectivity checks, shortest path calculations, key node identification, etc.
[0034] To add device parameters as node attributes, it is necessary to add the device parameters as attributes to the corresponding microgrid network nodes according to the mapping relationship between the node table and the device document collection (DeviceCollection). First, traverse each node in the graph structure. For each node, find the corresponding row in the node table through the node's unique identifier (ID) to obtain the device ID (Device ID) associated with the node. Then, use the obtained device ID to find the corresponding device document in the device document collection. Device documents are usually stored in JSON or BSON format and contain various parameter information of the device, such as device model, capacity, rated parameters, etc. Parse the device document to extract the required device parameter information. Next, add the extracted device parameter information as attributes to the corresponding graph node. This can be achieved by adding new key-value pairs in the attribute dictionary or attribute object of the graph node. You can add "deviceType" to represent the device model, "capacity" to represent the device capacity,
[0035] "ratedVoltage" indicates rated voltage, etc. Through the above steps, the device parameter information is associated with the nodes in the graph structure, enriching the attribute information of the nodes. Now, each graph node contains not only the basic properties of the node, but also the detailed parameter information of the device associated with it. This way of using device parameters as node attributes makes it possible to directly access and utilize device-level information in the graph structure. Nodes can be filtered and sorted based on device capacity, nodes can be grouped and clustered according to device type, and device parameters can be used for power flow calculation and fault analysis, etc.
[0036] To add operating parameters as attributes of nodes and edges, it is necessary to add the operating parameters as attributes to the corresponding microgrid network nodes and branches according to the mapping relationship between the node table, branch table and the operating parameter measurement point table (Measurement Point). First, for each node in the graph structure, find the corresponding row in the node table through the unique identifier (ID) of the node to obtain the list of measurement point IDs associated with the node. A node may be associated with multiple measurement points for collecting different operating parameters of the node. Then, traverse the obtained measurement point ID list, and for each measurement point ID, find the corresponding row in the operation parameter measurement point table to obtain the operating parameter value of the measurement point. The operating parameters may include voltage, current, active power, reactive power, etc., depending on the specific monitoring requirements and data availability. Next, add the obtained operating parameter values as attributes to the corresponding graph nodes. Similar to device parameters, new key-value pairs can be added to the attribute dictionary or attribute object of the graph node, such as "voltage" for voltage value, "current" for current value, "active Power" for active power value, etc. For each edge in the graph structure, the corresponding row is searched in the branch table by the starting node ID and the ending node ID of the edge to obtain the list of measurement point IDs associated with the branch. A branch may be associated with multiple measurement points for collecting different operating parameters of the branch. Traverse the obtained measurement point ID list, and for each measurement point ID, find the corresponding row in the operating parameter measurement point table to obtain the operating parameter value of the measurement point. The operating parameters of the branch may include flow, loss, current, etc., depending on the specific monitoring requirements and data availability. Finally, the obtained operating parameter values are added as attributes to the corresponding graph edge. Similar to node attributes, new key-value pairs can be added to the attribute dictionary or attribute object of the graph edge, such as "flow" for flow value, "loss" for loss value, "current" for current value, etc. Through the above steps, the operating parameters are associated with the nodes and edges in the graph structure, enriching the dynamic information of the microgrid network model. This method of using operating parameters as node and edge attributes makes it possible to directly access and analyze the real-time operating status of the microgrid in the graph structure. The voltage amplitude and phase angle of the node can be calculated to evaluate the voltage quality of the node; the power flow and loss of the branch can be calculated to optimize the power flow distribution of the network; state estimation and fault location can be performed based on the operating parameters of the nodes and edges.
[0037] To add heterogeneous hardware features as node attributes, it is necessary to add the features of heterogeneous hardware as attributes to the corresponding microgrid network nodes according to the mapping relationship between the node table and the hardware feature table (HardwareFeature). First, traverse each node in the graph structure. For each node, find the corresponding row in the node table through the node's unique identifier (ID) to obtain the hardware ID (Hardware ID) associated with the node. Then, use the obtained hardware ID to find the corresponding row in the hardware feature table to obtain the feature information of the hardware device. Hardware features may include CPU frequency, memory size, network bandwidth, latency, etc., depending on the specific hardware type and performance indicators. Next, add the obtained hardware feature information as attributes to the corresponding graph node. Similar to device parameters and operating parameters, new key-value pairs can be added to the attribute dictionary or attribute object of the graph node, such as "CPU Frequency" for CPU frequency, "memory Size" for memory size, "network Bandwidth" for network bandwidth, "latency" for latency, etc. Through the above steps, the feature information of heterogeneous hardware is associated with the nodes in the graph structure, further enriching the attribute information of the nodes. Now, each graph node not only contains the topology, equipment parameters and operating status of the microgrid business level, but also contains the performance characteristic data of the underlying heterogeneous hardware. This method of using heterogeneous hardware characteristics as node attributes allows the business characteristics and hardware performance of the microgrid to be comprehensively considered in the graph structure. The allocation and scheduling of tasks can be optimized based on the computing power and network bandwidth of the node; the data storage and transmission strategies can be reasonably configured based on the memory size and latency of the node; the characteristics of heterogeneous hardware can be used to design adaptive control and optimization algorithms, etc.
[0038] Construct a graph neural network model. Based on the microgrid network topology diagram constructed above, as well as the attribute information of nodes and edges, a graph neural network (GNN) model is constructed to learn and analyze the characteristics of the microgrid. First, the microgrid network nodes are mapped to the input layer nodes of the GNN, and the microgrid network branches are mapped to the edges of the GNN. The feature vectors of the input layer nodes are initialized by the node attribute information, including device parameters, operating parameters, and heterogeneous hardware features. These attribute information are converted into continuous feature vectors through the embedding layer. Then, the hidden layer and aggregation function of the GNN are set. The hidden layer is responsible for learning the feature representation of the node, and the aggregation function is used to summarize the feature information of neighboring nodes. Common aggregation functions include summation, average, maximum pooling, etc. GNN performs feature aggregation and update iteratively, so that the feature vector of each node not only contains its own attribute information, but also integrates the feature information of neighboring nodes, capturing the influence of the network topology. Finally, the output layer of the GNN is set to generate prediction results based on the feature vectors of the nodes. Here, the output layer is designed to predict the association between the microgrid network topology and device parameters. By learning the interactive effects of network structure and device parameters, GNN can discover implicit association patterns, such as the matching degree between device parameters and network topology, and the impact of device parameters on network performance.
[0039] In a specific embodiment of the present application, there is a microgrid network topology diagram including 10 nodes, wherein the nodes are represented as N1, N2, ... N 10 Each node represents a microgrid device, such as a photovoltaic power station, a wind turbine, an energy storage battery, etc. The connection between nodes represents the power line. There are 15 edges, represented by E1, E2, ..., E 15. For each node, the following attribute information is collected: Equipment type: photovoltaic power station (PV), wind turbine (WT), energy storage battery (ES), load (LD); Equipment capacity: in kW, indicating the rated power of the equipment; Rated voltage: in kV, indicating the rated voltage of the equipment; CPU frequency: in GHz, indicating the CPU main frequency of the equipment controller; Memory size: in GB, indicating the memory capacity of the equipment controller. For each edge, the following attribute information is collected: Voltage amplitude: in kV, indicating the real-time voltage amplitude of the line; Current amplitude: in A, indicating the real-time current amplitude of the line; Active power: in kW, indicating the real-time active power of the line; Reactive power: in kVar, indicating the real-time reactive power of the line. First, the attribute information of the node is encoded into a feature vector. For the device type, one-hot encoding is used to convert it into a 4-dimensional binary vector. The photovoltaic power station is encoded as [1, 0, 0, 0], the wind turbine is encoded as [0, 1, 0, 0], the energy storage battery is encoded as [0, 0, 1, 0], and the load is encoded as [0, 0, 0, 1]. For the device capacity, rated voltage, CPU frequency, and memory size, their values are directly used as the elements of the feature vector. Therefore, the dimension of the feature vector of each node is 8.
[0040] Then, set the hidden layer and aggregation function of GNN. Use 2-layer MLP as the hidden layer, with 16 neurons in the first layer and 8 neurons in the second layer. Select the average function as the aggregation function and average the feature vectors of neighboring nodes. The calculation process of GNN is as follows: Initialize the node feature vector and encode the node attributes into an 8-dimensional vector. For each node, average its feature vector and the feature vector of the neighboring node according to the edge weight to obtain the aggregated feature vector. The edge weight can be calculated based on the attribute information of the edge, such as voltage amplitude, current amplitude, etc. The aggregated feature vector is input to the first layer MLP, and a 16-dimensional hidden feature vector is obtained after nonlinear transformation. The hidden feature vector is aggregated again by neighbors to obtain a new aggregated feature vector. The aggregated feature vector is input to the second layer MLP, and an 8-dimensional final feature vector is obtained after nonlinear transformation. Repeat steps 2-5 several times, using the final feature vector obtained in the previous iteration as input in each iteration. Iterate 3 times. Finally, set the output layer of GNN to predict the matching degree between device parameters and network topology. To predict the applicability of the capacity parameters of the energy storage battery under the current network topology, MLP is used as the output layer, and the final feature vector of the energy storage battery node is used as the input. After the fully connected layer and the sigmoid activation function, a matching score between 0 and 1 is output. The closer the matching score is to 1, the more suitable the current capacity parameter is for the current network topology. In the training phase, a batch of training samples are prepared, each of which includes a microgrid network topology diagram, the capacity parameters of the energy storage battery, and the corresponding matching labels (given by experts or statistically from historical data). Using the mean square error as the loss function, the difference between the matching score output by the GNN and the true label is calculated, and the parameters of the GNN are updated through the back propagation algorithm. After multiple rounds of iterative training, the GNN can learn the association pattern between the network topology and the device parameters, and predict the optimal capacity parameters of the energy storage battery in the new microgrid network. At the same time, the node feature vectors learned by the GNN can be analyzed to find the key nodes and branches that have a greater impact on the capacity of the energy storage battery, providing a reference for the planning and construction of the power grid.
[0041] like Figure 4As shown in the figure, according to the heterogeneous characteristics of different heterogeneous hardware units, different mapping strategies for heterogeneous hardware units are set, and the scheduling model of heterogeneous hardware units is constructed by using reinforcement learning algorithm; the computing power and communication delay data of heterogeneous hardware units need to be extracted from the hardware feature table. The hardware feature table is stored in CSV format, each row corresponds to a heterogeneous hardware unit, and the columns include attributes such as hardware type, main frequency, number of cores, number of CUDA cores, video memory bandwidth, communication protocol, and communication delay. Read the hardware feature table CSV file and load the data into a data structure in memory, such as a list or array. Each element corresponds to an attribute tuple of a heterogeneous hardware unit. Traverse the list of heterogeneous hardware units, make branch judgments based on the hardware type attributes, and extract the corresponding computing power indicators: if the hardware type is "CPU", extract the main frequency freq and the number of cores cores attributes, according to the formula: CPU peak FLOPS = freq*cores*16; calculate the peak floating-point computing power of the CPU in FLOPS. Here, 16 floating-point operations can be performed per CPU clock cycle. If the hardware type is "GPU", extract the CUDA core number cuda_cores and memory bandwidth bandwidth attributes according to the formula: GPU peak
[0042] FLOPS = cuda_cores * bandwidth * 2; Calculate the peak floating-point computing power of the GPU in FLOPS. Here, each CUDA core can perform 2 floating-point operations at the same time. If the hardware type is "FPGA" or "ASIC", you need to estimate its peak FLOPS based on the hardware specifications and benchmark test results. For a certain FPGA, its peak FLOPS can be obtained by consulting the data sheet or running a dedicated performance test program. Store the calculated peak FLOPS in the attribute tuple of the corresponding heterogeneous hardware unit, such as hardware_specs[i]['flops'] = flops. Traverse the list of heterogeneous hardware units again and extract the inter-device communication latency attribute: if the communication protocol is "PCIe", set the communication latency to a predefined constant, such as 0.1ms: latency = 0.1; if the communication protocol is "Ethernet", set the communication latency to a predefined constant, such as 1ms: latency = 1.0; if the communication protocol is other types, you need to estimate the communication latency based on the specific network topology and inter-device communication protocol. For InfiniBand-based communication, the latency may be in the order of 0.01ms; for TCP / IP-based communication, the latency may be in the order of 1-10ms. The estimated communication latency is stored in the attribute tuple of the corresponding heterogeneous hardware unit, such as hardware_specs[i]['latency'] = latency. After the above steps, a heterogeneous hardware unit list hardware_specs is obtained, in which each element is an attribute tuple containing key performance indicators such as hardware type, peak FLOPS, and communication latency. These data can be used for the subsequent design of heterogeneous hardware mapping strategies and the construction of reinforcement learning environments.
[0043] Set the corresponding mapping strategy according to the computing power and communication latency data of heterogeneous hardware units. Define the computing power threshold and communication latency threshold, named FLOPS_THRESHOLD and LATENCY_THRESHOLD respectively. Let FLOPS_THRESHOLD be 10 TFLOPS and LATENCY_THRESHOLD be 0.5 ms. Traverse the list of heterogeneous hardware units hardware_specs. For each hardware unit, extract its peak FLOPS and communication latency attributes: flops = hardware_specs[i]['flops']; latency = hardware_specs[i]['latency']; Compare the peak FLOPS with the computing power threshold and the communication latency with the latency threshold: If the conditions are met: flops > FLOPS_THRESHOLD and latency < LATENCY_THRESHOLD, then map this heterogeneous hardware unit to the hidden layer node of the graph neural network model. The mapping result can be stored in a dictionary, with the unique identifier of the hardware unit as the key and "hidden" as the value, indicating the hidden layer node: mapping[hardware_id] = "hidden"; where, hardware_id can be the number or name of the hardware unit, used to uniquely identify a hardware unit. If the above conditions are not met, that is, flops <= FLOPS_THRESHOLD or latency >= LATENCY_THRESHOLD, then map this heterogeneous hardware unit to the input layer node of the graph neural network model.
[0044] Similarly, store the mapping result in a dictionary, with the unique identifier of the hardware unit as the key and "input" as the value, indicating the input layer node: mapping[hardware_id] = "input". After the above steps, a mapping dictionary mapping from heterogeneous hardware units to graph neural network node types is obtained. For the hardware units with the value "hidden" in mapping, assign them to the hidden layer of the graph neural network for performing computationally intensive feature aggregation and update operations. For the mapping result mapping = {"GPU_0": "hidden",
[0045] "ASIC_1": "hidden"}, the two high-performance hardware units GPU_0 and ASIC_1 are used for hidden layer calculations of the graph neural network. For the hardware unit with the value "input" in mapping, it is assigned to the input layer of the graph neural network to provide the initial feature vector, perform data preprocessing and communication tasks. For the case where the mapping result is mapping = {"CPU_0": "input", "FPGA_1": "input"}, the two hardware units CPU0 and FPGA1 are used for input layer calculations and data preparation of the graph neural network. In the subsequent steps, the mapping dictionary mapping will be used to select appropriate heterogeneous hardware units for different levels of the graph neural network and build an efficient computing and communication scheduling scheme. At the same time, mapping also provides an important basis for the design of the state and action space of the reinforcement learning environment.
[0046] According to the mapping strategy of heterogeneous hardware units, the state space, action space and reward function of the reinforcement learning environment are initialized. Initialization of the state space: define the working state vector hardware_state of the heterogeneous hardware unit, including properties such as computing load, memory usage memory_util, power consumption, etc. For N heterogeneous hardware units, hardware state It can be represented as an N*3 matrix:
[0047] Among them, load i 、memory_util i 、power i Represent the computing load, memory usage and power consumption of the i-th hardware unit respectively. Define the microgrid system operation state vector grid state , including network topology, device parameters, real-time operation data runtime and other attributes. For M microgrid devices, grid_state can be represented as an M*3 matrix: Among them, topology i 、parameters i 、runtime i They represent the network topology, equipment parameters and real-time operation data of the i-th microgrid device respectively. state and grid state Concatenate into a (N+M)*3 state matrix state as the observation value of the reinforcement learning agent: Initialization of action space: define task assignment action task allocation, which means that different computing tasks of the graph neural network are assigned to heterogeneous hardware units for execution. There are T computing tasks and N heterogeneous hardware units, task allocation Can be represented as a T-dimensional discrete vector: task allocation =[unit1,unit2,......,unit T ]; among them, unit i Indicates that the i-th computing task is assigned to the unit i It is executed on multiple hardware units, and its value range is [0, N-1].
[0048] Define node mapping action node mapping , which means mapping different nodes of the graph neural network to heterogeneous hardware units for storage and calculation. The graph neural network has V nodes, node mapping Can be represented as a V-dimensional discrete vector: node mapping =[unit1,unit2,......,unit V ]; among them, unit i Indicates mapping the i-th node to the unit i The value range is [0, N-1]. allocation and node mapping spliced into a (T+V)-dimensional discrete action vector action, as the action space of the reinforcement learning agent: action = [task allocation ,node mapping ] Initialization of the reward function: define the computing power evaluation function compute reward , according to the task assignment action task allocation and the peak FLOPS of heterogeneous hardware units, and calculate the execution speed and efficiency of graph neural network computing tasks. reward It is the reciprocal of the task execution time, in TFLOPS / s. Define the communication delay evaluation function latency penalty , according to the node mapping action node mapping The communication delay between heterogeneous hardware units is calculated to calculate the delay overhead of data transmission.
[0049] is the weighted sum of the communication delays between nodes, in milliseconds. Define the reward function as compute reward and latency penalty The weighted combination of α and β is adjusted according to the specific application requirements: reward = α × compute reward -β×latency penalty; Among them, the larger the value of α, the more emphasis is placed on computing power; the larger the value of β, the more emphasis is placed on communication latency.
[0050] The Q-Learning reinforcement learning algorithm is used to learn the optimal scheduling strategy of heterogeneous hardware units through the interaction between the agent and the environment. Discretization of state space: The microgrid operation state grid state and heterogeneous hardware working status state As the state input of the reinforcement learning environment. state and hardware state Appropriate discretization is performed to convert the continuous state space into a discrete state space. For the network topology, it can be discretized into K categories, each category corresponds to a typical topology; for device parameters and runtime parameters, they can be discretized into L levels, each level corresponds to a parameter interval; for computing power flops and communication delay latency, they can be discretized into M levels, each level corresponds to a performance interval. The discretized grid state and hardware state Combined into a state dictionary state dict , as the row index of the Q value table: state_dict = {"topology": topology_category,
[0051] "parameters": parameters_level, "runtime": runtime_level, "flops": flops_level, "latency": latency_level}.
[0052] Discretization of action space: Discretization of scheduling decisions (task assignment) of heterogeneous hardware units allocation and node mapping node mapping ) is defined as the action of the reinforcement learning algorithm. allocation and node mapping Perform appropriate discretization to transform the continuous action space into a discrete action space. allocation , which can be discretized into P typical task allocation schemes; for node mapping node mapping , which can be discretized into Q typical node mapping schemes. The discretized task allocation and node mappingCombine into an action dictionary action_dict, which serves as the column index of the Q-value table: action_dict = {"task_allocation": task_allocation_plan, "node_mapping": node_mapping_plan}. Design of reward function: Use the performance indicators of the graph neural network model (such as computing speed, communication delay, energy consumption, etc.) as evaluation indicators to construct the reward function of the reinforcement learning algorithm. For computing speed, it can be measured by the inverse of the task execution time, in TFLOPS / s; for communication delay, it can be measured by the weighted sum of the data transmission time between nodes, in ms; for energy consumption, it can be measured by the product of the power consumption of the hardware unit and the task execution time, in J. Combine these performance indicators into a weighted sum as the reward function of the reinforcement learning algorithm: reward = w1×compute speed -w2×communication latency -w3×energy consumption ; Among them, w1, w2, w3 are weight coefficients, which are adjusted according to specific application requirements.
[0053] Initialization and update of the Q value table: Initialize a state dictionary state dict and action dictionary action dict The Q value table Q of the Cartesian product size table , and initialize all Q values to 0. In each training iteration, the agent dict , use the ε-greedy strategy to select an action action dict , execute the scheduling decision. After executing the scheduling decision, the agent observes the next state next_state of the environment feedback dict and reward value.
[0054] According to the update formula of the Q-Learning algorithm, update the Q value estimate of the corresponding state-action pair in the Q value table:
[0055] Among them, learning rate is the learning rate, discount factor is the discount factor, max(Q table [next_state dict ]) is the maximum Q value of the next state. Generation of the optimal scheduling strategy: Repeat multiple rounds of training iterations until the Q value table converges or reaches the preset number of training rounds. After the training converges, for any state state dict, find the corresponding row in the Q value table and find the action with the largest Q value dict , which is the optimal scheduling decision under this state. The optimal scheduling decisions under all states are combined into a complete optimal scheduling policy dict , used to guide task allocation and node mapping of heterogeneous hardware units.
[0056] Build a scheduling model for heterogeneous hardware units and use the trained Q value table as the core component of the model. Input of the scheduling model: microgrid operation status grid dict , including network topology, device parameters, runtime parameters, etc. Heterogeneous hardware working status state , including computing power flops, communication delay latency, etc. state and hardware state Combined into a state dictionary state dict , as the input of the scheduling model: state_dict = {"topology": topology_category,
[0057] "parameters": parameters_level, "runtime": runtime_level, "flops": flops_level, "latency": latency_level}; where topology_category, parameters_level, runtime_level, flops_level, and latency_level represent the discretized state values. Output of the scheduling model: optimal scheduling decisions for heterogeneous hardware units, including task allocation task allocation and node mapping node mapping . allocation and node mapping Combined into an action dictionary action_dict as the output of the scheduling model: action_dict = {"task_allocation": task_allocation_plan,
[0058] "node_mapping": node_mapping_plan}; among them, task_allocation_plan and node_mapping_plan respectively represent the discretized scheduling decision values.
[0059] Query of Q value table: Scheduling model based on statedict As input, query the corresponding row in the Q value table Q_table. In this row of the Q value table, find the column with the largest Q value and the corresponding action dict This is the optimal scheduling decision under this state. dict As the output of the scheduling model. Application of the scheduling model: The trained Q value table Q table Save as the core component of the dispatch model, you can use Python's pickle library for serialization and deserialization. Integrate the dispatch model into the microgrid control system to monitor the microgrid operation status in real time. state and heterogeneous hardware working status state When the microgrid control system needs to generate a heterogeneous hardware scheduling solution, the current grid state and hardware state Input into the scheduling model. The scheduling model queries the Q value table and outputs the corresponding optimal scheduling decision action dict , including task allocation
[0060] task_allocation plan and node_mapping plan . The microgrid control system performs corresponding task allocation and node mapping operations according to the output of the scheduling model to realize the intelligent scheduling and control of heterogeneous hardware resources. Example scheduling process: The current microgrid operating state is grid_state = {"topology": "ring", "parameters": "medium", "runtime": "high"}, and the heterogeneous hardware working state is hardware_state = {"flops": "high", "latency": ""low""}. After discretizing grid_state and hardware_state, we get the state dictionary state_dict = {"topology": 2,
[0061] "parameters": 1, "runtime": 3, "flops": 3, "latency": 0}. The scheduling model takes state_dict as input, queries the corresponding row in the Q value table Q_table, finds the column with the largest Q value, and obtains the optimal scheduling decision action_dict = {"task_allocation": 1, "node_mapping": 2}. According to action_dict, the microgrid control system sets the task allocation plan to task_allocation_plan = 1 and the node mapping plan to node_mapping_plan = 2, and performs the corresponding scheduling operation.
[0062] Input the preprocessed data into the graph neural network model to obtain the association between the microgrid network topology and device parameters as a constraint condition; input the preprocessed data into the scheduling model to obtain the scheduling strategy of heterogeneous hardware units as the optimization target; construct a multi-objective function for microgrid network topology optimization based on the constraints and optimization targets; Construction of constraints: input the preprocessed data into the graph neural network model to obtain the association between the microgrid network topology and device parameters. The association relationship is represented as a constraint set C = {c1, c2, ....., c m}, where m represents the number of constraints. Each constraint c i Is a logical expression that indicates the device parameter requirements that the microgrid network topology needs to meet. c1: "The voltage level of node A == the voltage level of node B" indicates that nodes A and B must have the same voltage level; c2: "The capacity of line AB >= the maximum load of node A + the maximum load of node B" indicates that the capacity of the line connecting nodes A and B must be greater than or equal to the sum of the maximum loads of the two nodes. The value of the constraint condition is True or False. The constraint condition is True if and only if the microgrid network topology meets the device parameter requirements.
[0063] In a specific embodiment of the present application, a microgrid includes 4 nodes (A, B, C, D) and 4 connecting lines (AB, BC, CD, DA). By inputting the preprocessed data into the graph neural network model, the following correlation relationship between the microgrid network topology and the device parameters is obtained: the voltage level of node A and node B must be the same; the voltage level of node B and node C must be the same; the voltage level of node C and node D can be different; the capacity of line AB must be greater than or equal to the sum of the maximum loads of node A and node B; the capacity of line BC must be greater than or equal to the sum of the maximum loads of node B and node C; the capacity of line CD must be greater than or equal to the sum of the maximum loads of node C and node D; the capacity of line DA must be greater than or equal to the sum of the maximum loads of node D and node A. Based on these associations, a constraint set C = {c1, c2, c3, c4, c5, c6, c7} can be constructed, where: c1: "The voltage level of node A == the voltage level of node B"; c2: "The voltage level of node B == the voltage level of node C"; c3: "The voltage level of node C ≠ the voltage level of node D" (Note: this is an inequality constraint); c4: "The capacity of line AB > = the maximum load of node A + the maximum load of node B"; c5: "The capacity of line BC > = the maximum load of node B + the maximum load of node C"; c6: "The capacity of line CD > = the maximum load of node C + the maximum load of node D"; c7: "The capacity of line DA > = the maximum load of node D + the maximum load of node A".
[0064] Equipment parameter data: Voltage level of node A: 10kV, maximum load: 50kW; voltage level of node B: 10kV, maximum load: 80kW; voltage level of node C: 10kV, maximum load: 60kW; voltage level of node D: 20kV, maximum load: 100kW; capacity of line AB: 150kW; capacity of line BC: 200kW; capacity of line CD: 250kW; capacity of line DA: 180kW. For a given microgrid network topology and equipment parameters, the values of the constraints can be calculated: c1 = true (the voltage levels of node A and node B are both 10 kV, the same); c2 = true (the voltage levels of node B and node C are both 10 kV, the same); c3 = true (the voltage level of node C is 10 kV, and the voltage level of node D is 20 kV, which are different); c4 = true (the capacity of line AB is 150 kW, which is greater than the sum of the maximum loads of node A and node B, 130 kW); c5 = true (the capacity of line BC is 200 kW, which is greater than the sum of the maximum loads of node B and node C, 140 kW); c6 = true (the capacity of line CD is 250 kW, which is greater than the sum of the maximum loads of node C and node D, 160 kW); c7 = true (the capacity of line DA is 180 kW, which is greater than the sum of the maximum loads of node D and node A, 150 kW).
[0065] Construction of optimization objectives: Input the preprocessed data into the heterogeneous hardware unit scheduling model to obtain the scheduling strategy of the heterogeneous hardware unit. The scheduling strategy is represented as an optimization objective set O = {o1, o2, o3}, which corresponds to the three sub-objectives of minimizing the energy consumption of the microgrid system, maximizing the computing power of the heterogeneous hardware unit, and minimizing the communication delay. The energy consumption target o1 is obtained according to the operating parameter measurement point table in the heterogeneous database, and is represented as the sum of the active power of each node in the microgrid: Among them, P i (x) represents the active power of the ith node under the topology and scheduling strategy x, and N represents the node set of the microgrid. The computing power target o2 is obtained according to the computing power and scheduling status of the heterogeneous hardware units, and is expressed as the weighted sum of the computing power of the heterogeneous hardware units:
[0066] Among them, a j represents the computing power of the jth heterogeneous hardware unit, M represents the set of heterogeneous hardware units, and u j (x) is a 0-1 variable, indicating the scheduling state of heterogeneous hardware unit j under decision x, u j (x) = 1 indicates scheduling, u j (x) = 0 means no scheduling. The communication delay target o3 is obtained according to the end-to-end delay of the communication link in the microgrid network, and is expressed as the maximum value of all communication link delays:
[0067] Among them, t l (x) represents the end-to-end delay of the communication link l under the topology structure and scheduling strategy x, and L represents the set of all communication links in the microgrid network.
[0068] In a specific embodiment of the present application, the microgrid includes 4 nodes (A, B, C, D), and a heterogeneous hardware unit is deployed on each node. By inputting the preprocessed data into the heterogeneous hardware unit scheduling model, the following scheduling strategy is obtained: Heterogeneous hardware unit A: scheduling, computing power is 10GFLOPS; Heterogeneous hardware unit B: scheduling, computing power is 8GFLOPS; Heterogeneous hardware unit C: not scheduling, computing power is 6GFLOPS; Heterogeneous hardware unit D: scheduling, computing power is 12GFLOPS. According to this scheduling strategy, an optimization target set O = {o1, o2, o3} can be constructed, corresponding to the three sub-goals of minimizing the energy consumption of the microgrid system, maximizing the computing power of the heterogeneous hardware units, and minimizing the communication delay.
[0069] Energy consumption target o1: The following data is obtained from the operating parameter measurement point table in the heterogeneous database: Active power of node A: P A (x) = 50kW; Active power of node B: P B (x) = 30kW; Active power of node C: P C (x) = 40kW; Active power of node D: P D (x) = 60kW. Then the energy consumption target o1 can be expressed as:
[0070] Computing capacity target o2: Based on the computing capacity and scheduling status of the heterogeneous hardware units, the computing capacity target o2 can be calculated: Communication delay target o3: Get the following end-to-end delay data of the communication link in the microgrid network: Delay of link AB: t AB (x) = 10ms; delay of link BC: t BC (x) = 15ms; Link CD delay: t CD (x) = 20ms; Link DA delay: t DA (x) = 12ms. Then the communication delay target o3 can be expressed as: In summary, for a given microgrid network topology and heterogeneous hardware unit scheduling strategy x, an optimization target set O = {o1, o2, o3}} is constructed, where: o1 = 180 kW, representing the energy consumption of the microgrid system; o2 = 30 GFLOPS, representing the computing power of the heterogeneous hardware unit; o3 = 20 ms, representing the maximum communication delay in the microgrid network.
[0071] Construction of multi-objective function: According to the constraint set C and the optimization target set O, the multi-objective function of microgrid network topology optimization is constructed: minF(x) = [f1(x), f2(x), f3(x)]; where x represents the decision variable of the microgrid network topology structure and the scheduling strategy of heterogeneous hardware units, and x = [topo, sche]. topo represents the microgrid network topology structure, and sche represents the scheduling strategy of heterogeneous hardware units. X represents the feasible domain of the decision variable x, which is determined by the physical connection of the microgrid network, device parameters, hardware constraints and other conditions. [f1(x), f2(x), f3(x)] represents the multi-objective function, which consists of three sub-goals: energy consumption, computing power and communication delay, requiring the minimum energy consumption and communication delay and the maximum computing power.
[0072] In a specific embodiment of the present application, a multi-objective function for microgrid network topology optimization can be constructed based on the previously constructed constraint set C and optimization target set O. Decision variable x = [topo, sche], where: topo represents the microgrid network topology structure, which is a two-dimensional array, topo[i][j] = 1 means that there is a connection between node i and node j, and topo[i][j] = 0 means that there is no connection between node i and node j. sche represents the scheduling strategy of heterogeneous hardware units, which is a one-dimensional array, sche[i] = 1 means that heterogeneous hardware unit i is scheduled, and sche[i] = 0 means that heterogeneous hardware unit i is not scheduled. The constraint set C contains the following constraints: c1: topo[A][B] == topo[B][A] (the connection between node A and node B is bidirectional); c2: topo[B][C] == topo[C][B] (the connection between node B and node C is bidirectional); c3: topo[C][D] == topo[D][C] (the connection between node C and node D is bidirectional); c4: topo[D][A] == topo[A][D] (the connection between node D and node A is bidirectional); c5: sum(topo[i][j], i!=j)>=2, foralli (each node is connected to at least two other nodes); c6: sche[i] == 0or1, foralli (the scheduling state of heterogeneous hardware units can only be 0 or 1). The optimization target set O contains the following three sub-targets: f1(x): minimize the energy consumption of the microgrid system; f2(x): maximize the computing power of heterogeneous hardware units; f3(x): minimize the communication delay. The feasible domain X of the decision variable x is determined by the following conditions: Microgrid network physical connection: the physical distance between nodes does not exceed a certain range, and the capacity of the transmission line meets the power transmission requirements between nodes. Equipment parameters: the voltage level of the nodes matches, and the computing power and power consumption of the heterogeneous hardware units meet the requirements. Hardware constraints: the number of heterogeneous hardware units is limited, and the scheduling method needs to meet the constraints of the hardware architecture.
[0073] In summary, the multi-objective function of microgrid network topology optimization can be expressed as:
[0074] minF(x)=[f1(x),f2(x),f3(x)]; Constraints: x∈X,c1(x)=true,c2(x)=true,
[0075] c3(x)=true,c4(x)=true,c5(x)=true,c6(x)=true. Among them, f1(x),f2(x),f3(x) are respectively
[0076] for: By solving the multi-objective function, we can obtain the microgrid network topology structure topo and the heterogeneous hardware unit scheduling strategy sche that meet the constraints, so that the energy consumption of the microgrid system is minimized, the computing power of the heterogeneous hardware units is maximized, and the communication delay is minimized.
[0077] An intelligent algorithm is used to solve the multi-objective function of microgrid network topology optimization and generate a microgrid network topology solution; Input: Microgrid node set: N = {N1, N2, N3, N4, N5}, Heterogeneous hardware unit set: M = {M1, M2, M3, M4, M5}, Optimization objectives: Minimize energy consumption f1(x), maximize computing power f2(x), minimize communication delay f3(x), Constraints: C = {c1, c2, c3, c4, c5, c6}, Population size: N = 100, Termination condition: Maximum number of iterations T = 500, Number of clusters: k = 3. Output: Microgrid network topology structure topo best , heterogeneous hardware unit scheduling strategy sche best . Randomly generate the initial population P, each individual x i =[topo i ,sche i ] represents a microgrid network topology and heterogeneous hardware unit scheduling strategy. The size of the population P is N. Input: Microgrid node set: N = {N1, N2, ....., N n}, where n is the number of nodes; heterogeneous hardware unit set: M = {M1, M2, ..., M m}, where m is the number of hardware units; population size: N = 100; maximum number of iterations: T = 500; crossover probability: p c =0.8; mutation probability: p m =0.1. Output: Pareto optimal solution set of microgrid network topology optimization problem: P non_dominated Steps: Randomly generate an initial population P: Population P consists of N individuals, each of which is represented by x i =[topo i ,sche i ], where: topo i Represents the microgrid network topology, which is an n×n adjacency matrix. If there is a connection between node i and node j, then topo i [i][j]=1, otherwise 0; sche i represents the scheduling strategy of heterogeneous hardware units, which is an m-dimensional binary vector. If hardware unit j is scheduled, then sche i [j] = 1, otherwise 0; for each individual x i , randomly generate topo i andsche i, ensuring that the generated topological structure is connected and satisfies the constraints of the problem. Perform non-dominated sorting on the population P: Calculate the number of each individual x i The objective function value: energy consumption f1(x i ), computing power f2(x i ) and communication delay f3(x i ); for any two individuals x i and x j , if x i All objective function values of are better than x j , then x i Dominate x j ; Perform non-dominated sorting on the individuals in the population P and obtain the non-dominated rank of each individual i and crowding distance distance_i ; Non-dominant rank i Represents individual x i rank i The smaller the individual x i The higher the priority, the crowding distance distance_i Represents individual x i The density of individuals in the same non-dominated level is higher. The larger the crowding_distance_i is, the higher the individual x i The higher the priority, the more likely it is to be; using the binary tournament selection operator, select N individuals from the population P to generate the parent population P parent :Initialize the parent population P parent is an empty set. Repeat N times: Randomly select two individuals x from the population P i and x j , if x i The non-dominated rank i Less than x j The non-dominated rank j , then x i Join P parent , if x i and x j The non-dominated level of is the same, but x i Crowding distance distance_i Greater than x j The crowding distance
[0078] crowding distance_j , then x i Join P parent Otherwise, x j Join P parent . For the parent population P parent Perform crossover and mutation operations to generate the offspring population Poffspring : Crossover operation: with probability p c P parent The individuals in are paired in pairs, and each pair of individuals x i =[topo i ,sche i ] and x j =[topo j ,sche j ] Generate two new individuals x as follows k and x l : In topo i and topo j Randomly select an intersection point on the graph, exchange the parts after the intersection point, and get topo k and topo l ; in sche i andsche j Randomly select an intersection point on the graph, exchange the parts after the intersection point, and get the scheme k andsche l ; The generated new individual x k =[topo k ,sche k ] and x l =[topo l ,sche l ]Add the offspring population P offspring . Mutation operation: P offspring For each individual x in i =[topo i ,sche i ], with probability p m Mutation: Topo i For each element in, if the random number is less than p m , then invert it (0 becomes 1, 1 becomes 0); for sche i For each element in, if the random number is less than p m , then negate it (0 becomes 1, 1 becomes 0); add the mutated individuals to the offspring population P offspring , the parent population P parent and the offspring population P offspring Merge to obtain a merged population P of size 2N combine , for the combined population P combine Repeat until the maximum number of iterations T is reached; perform non-dominated sorting on the last generation of population to obtain the non-dominated solution set P non_dominated , as the Pareto optimal solution set for the microgrid network topology optimization problem.
[0079] For the Pareto optimal solution set Pnon_dominated The solution x in i Perform maximum and minimum normalization: For each solution x i , calculate its normalized energy consumption f1'(x i ), computing power f2'(x i ) and communication delay f3'(x i ):
[0080] Get the normalized solution set P norm ={x1',x2',......,x K '}. Calculate the Pareto optimal solution set P norm Density distribution: For each normalized solution x i ', calculate its density ρ(x i '): Calculate x i 'With P norm Other solutions in x j 'Euclidean distance:
[0081] Calculate x i 'Density: Select the point x with the largest density max 'As the first cluster center, let Ω1={x max '}, repeat the following steps until k cluster centers are obtained: Calculate the normalized solution x for each i 'The minimum distance to the current cluster center w': Select d i The largest solution x i * as the new cluster center, Ω t+1 =Ω t ∪{x i *}, t'=t+1, according to the Euclidean distance, each normalized solution x i 'Divided into class C corresponding to the nearest cluster center j In the above example, for each cluster class C j , calculate the center of all solutions in the class as the new cluster center of the class, repeat until the clustering results converge, and get k clusters C1, C2, ..., C k , using the TOPSIS method, for each cluster class C j The solution x in i ', calculate its relative closeness to the ideal point C i :Calculate the optimal ideal point and the worst ideal point For each solution x i ', calculate its difference from the optimal ideal point Euclidean distance and the worst ideal point Euclidean distance Calculate x i ''s relative closeness: From each cluster class C j Select the closeness C i The biggest solution Construct a set of candidate topology solutions
[0082] Select the best topology solution x from the candidate topology solution set S' best' , define the evaluation indicators of microgrid operation requirements: Energy utilization rate: The utilization rate of renewable energy in the microgrid, expressed as E u , Load balance: The degree of load balance of each node in the microgrid, expressed as L b , Power supply reliability: The power supply reliability of the microgrid to important loads, expressed as R s , Operation and maintenance cost: The construction and operation and maintenance cost of the microgrid, expressed as C o For each topology solution x in the candidate topology solution set S' i ', calculate its scores on various evaluation indicators: Energy utilization score: Load balance score: Power supply reliability score: Operation and maintenance cost score: According to the microgrid operation requirements, determine the weight coefficient of each evaluation index: w E ,w L ,w R ,w C , satisfying w E +w L +w R +w C =1, calculate each candidate topology solution x i The comprehensive score F(x i '):
[0083] F(x i ')=w E ×E u (x i ')+w L ×L b (x i ')+w R ×R s (x i ')+w C ×C o (x i'), select the candidate topology solution with the highest comprehensive score F(x_i') as the optimal topology solution x best' . For the optimal topology solution x best' The decoding process is as follows: x best' Denormalize to get the optimal solution x in the original solution space best : Energy consumption: Computing power: Communication delay: From x best Extract the microgrid network topology structure from best and heterogeneous hardware unit scheduling strategy sche best :topo best :x best The first n×n elements of represent the connection relationship between microgrid nodes; best :x best The last m elements of represent the scheduling strategy of heterogeneous hardware units; output the microgrid network topology solution: best ,sche best}.
Claims
1. A microgrid network topology flexible configuration method based on matrix topology, characterized in that: include: Collecting data from the microgrid network and preprocessing the collected data; wherein the data from the microgrid network includes network topology, device parameters, operating parameters, and heterogeneous characteristics of different heterogeneous hardware units; heterogeneous hardware units represent hardware devices with different computing capabilities and communication delays in the microgrid network; Based on the preprocessed data, a heterogeneous database of microgrid networks and devices is constructed. The heterogeneous database contains structured data, semi-structured data, and unstructured data. Based on the data in the heterogeneous database, the microgrid network and devices are mapped into a graph structure to build a graph neural network model; According to the heterogeneous characteristics of different heterogeneous hardware units, different mapping strategies for heterogeneous hardware units are set, and a scheduling model for heterogeneous hardware units is constructed using a reinforcement learning algorithm. The preprocessed data is input into the graph neural network model to obtain the correlation between the microgrid network topology and device parameters as constraints; The preprocessed data is input into the scheduling model to obtain the scheduling strategy of the heterogeneous hardware units as the optimization target; According to the constraints and optimization objectives, a multi-objective function for microgrid network topology optimization is constructed; An intelligent algorithm is used to solve the multi-objective function of microgrid network topology optimization and generate a microgrid network topology solution; the topology solution includes the microgrid network topology structure, device connection relationship and scheduling strategy of heterogeneous hardware units.
2. The microgrid network topology flexible configuration method based on matrix topology according to claim 1 is characterized in that: Collect data from the microgrid network and pre-process the collected data, including: Image recognition is used to identify the topological structure of the microgrid network, and the nodes and branches of the microgrid network are extracted as network topological structure data; Natural language processing is used to parse the unstructured data of microgrid equipment to obtain the model, capacity and parameters of the equipment as equipment parameter data; the unstructured data of microgrid equipment includes nameplates and instructions; Use data acquisition equipment to collect operating parameter data of the microgrid network, including voltage, current and power; A data fusion algorithm is used to associate the technical manuals and test reports of heterogeneous hardware units to obtain heterogeneous feature data reflecting the performance differences of heterogeneous hardware units. The heterogeneous feature data includes computing power and communication delay.
3. The microgrid network topology flexible configuration method based on matrix topology according to claim 2 is characterized in that: Based on the preprocessed data, a heterogeneous database of microgrid networks and devices is constructed, including: According to the network topology data, a relational database is used to store the structured data of microgrid nodes and branches, and a node table and a branch table are established; Based on the equipment parameter data, a document-based database is used to store semi-structured data of equipment models, capacities and parameters, and to establish an equipment document collection; The unstructured data of the microgrid equipment nameplate and manual is stored in an object-based manner; According to the operating parameter data, a time series database is used to store the time series data of the microgrid voltage, current and power, and an operating parameter measurement point table is established; According to the heterogeneous feature data of the heterogeneous hardware units, a relational database is used to store the structured feature data of the computing power and communication delay of the heterogeneous hardware, and a hardware feature table is established; Establish the mapping relationship between heterogeneous databases, and build a heterogeneous database of microgrid networks and devices based on the mapping relationship.
4. The microgrid network topology flexible configuration method based on matrix topology according to claim 3 is characterized in that: Establish mapping relationships between heterogeneous databases, including: Establish a mapping relationship between the node table and the device document collection, and associate the device parameters with the network topology; Establish the mapping relationship between the node table, branch table, and operation parameter measurement point table, and associate the operation parameters with the network topology structure; A mapping relationship between the node table and the hardware feature table is established to associate the heterogeneous hardware features with the network topology.
5. The microgrid network topology flexible configuration method based on matrix topology according to claim 4 is characterized in that: Build a graph neural network model, including: According to the heterogeneous database of microgrid, data in the node table, branch table and device document collection are extracted, the microgrid network nodes are mapped to the nodes of the graph structure, and the microgrid network branches are mapped to the edges of the graph structure to obtain the microgrid network topology graph; According to the mapping relationship between the node table and the device document set, the device parameters are added to the corresponding microgrid network nodes as the attributes of the graph structure nodes; According to the mapping relationship between the node table, branch table and operating parameter measurement point table, the operating parameters are added to the corresponding microgrid network nodes and branches as the attributes of the graph structure nodes and edges respectively; According to the mapping relationship between the node table and the hardware feature table, the heterogeneous hardware features are added to the corresponding microgrid network nodes as the attributes of the graph structure nodes; According to the microgrid network topology diagram and the attributes of nodes and edges, a graph neural network model of the microgrid is constructed.
6. The microgrid network topology flexible configuration method based on matrix topology according to claim 5 is characterized in that: According to the microgrid network topology, as well as the attributes of nodes and edges, a graph neural network model of the microgrid is constructed, including: Map the microgrid network nodes to the input layer nodes of the graph neural network, and map the microgrid network branches to the edges of the graph neural network; Initialize the feature vector of the graph neural network input layer node based on the node attribute information; the node attribute information includes device parameters, operating parameters and heterogeneous hardware characteristics; Set the hidden layer and aggregation function of the graph neural network, and update the feature vector of the node through feature aggregation; The output layer of the graph neural network is set to generate the association between the microgrid network topology and device parameters based on the feature vectors of the nodes.
7. The microgrid network topology flexible configuration method based on matrix topology according to claim 5 is characterized in that: Build a scheduling model for heterogeneous hardware units, including: According to the established hardware feature table, the computing power and communication delay data of different heterogeneous hardware units are extracted; Based on the extracted data, set the mapping strategy for heterogeneous hardware units: Map heterogeneous hardware units whose computing power is greater than a preset computing power threshold and whose communication delay is less than a preset communication delay threshold as hidden layer nodes in the graph neural network model to perform feature aggregation and update of the graph neural network; Mapping heterogeneous hardware units whose computing power is less than or equal to a preset computing power threshold and whose communication delay is greater than or equal to a preset communication delay threshold as input layer nodes of the graph neural network to provide an initial feature vector; Initialize the reinforcement learning environment according to the mapping strategy: Define the state space to represent the working states of heterogeneous hardware units and the operating state of the microgrid system; Define an action space to represent the scheduling decisions of heterogeneous hardware units. The scheduling decisions include task allocation and node mapping of heterogeneous hardware units. Define a reward function to represent the performance evaluation of the scheduling decision of heterogeneous hardware units. The performance evaluation includes the computing power and communication delay of the microgrid system. Adopt reinforcement learning algorithm to learn the optimal scheduling strategy of heterogeneous hardware units through the interaction between the agent and the environment; The optimal scheduling strategy of heterogeneous hardware units is used as the output of the reinforcement learning algorithm to build a scheduling model for heterogeneous hardware units. The scheduling model of heterogeneous hardware units takes the microgrid operating status and the heterogeneous hardware working status as input to generate the corresponding hardware scheduling strategy, which includes task allocation and node mapping.
8. The microgrid network topology flexible configuration method based on matrix topology according to claim 7 is characterized in that: Learn the optimal scheduling strategy for heterogeneous hardware units, including: The network topology, device parameters, operating parameters in the heterogeneous database, and the computing power and communication delay in the hardware feature table are used as the state input of the reinforcement learning environment; the network topology, device parameters and operating parameters represent the operating state of the microgrid, and the computing power and communication delay represent the working state of the heterogeneous hardware unit; The scheduling decision of heterogeneous hardware units is defined as the action of the reinforcement learning algorithm. The scheduling decision includes mapping heterogeneous hardware units to nodes of the graph neural network model and allocating computing and communication tasks to heterogeneous hardware units. The output of the graph neural network model is used as an evaluation indicator to construct a reward function for the reinforcement learning algorithm. The reward function represents the performance evaluation of the scheduling decision of heterogeneous hardware units. The performance evaluation includes the computing power and communication delay of the microgrid system. Initialize the Q-value table of the reinforcement learning algorithm, discretize the state space and action space, and use the Q-Learning algorithm to train the Q-value table to obtain the optimal heterogeneous hardware unit scheduling strategy; the optimal scheduling strategy is a set of heterogeneous hardware unit task allocation and node mapping combinations that maximize the reward function.
9. The microgrid network topology flexible configuration method based on matrix topology according to claim 8, characterized in that: Construct a multi-objective function for microgrid network topology optimization, including: The output of the graph neural network model is used as a constraint condition to construct a constraint condition set C: C = {c1, c2, ..., c m }, where c i represents the i-th association constraint, i = 1, 2, ..., m; m represents the number of constraints; c i Is a logical expression that evaluates to True or False; The output of the heterogeneous hardware unit scheduling model is used as the optimization target to construct the optimization target set O: O = {o1, o2, o3}, where o1 represents minimizing the energy consumption of the microgrid system; o2 represents maximizing the computing power of the heterogeneous hardware unit; and o3 represents minimizing the communication delay. According to the constraint set C and the optimization target set O, a multi-objective function for microgrid network topology optimization is constructed: minF(x) = [f1(x), f2(x), f3(x)], with constraint conditions: x∈X, c i (x)=True,i=1,2,......,m, where x represents the decision variable of the microgrid network topology and the scheduling strategy of heterogeneous hardware units; X represents the feasible domain of the decision variable x; f1(x) represents the energy consumption of the microgrid system; f2(x) represents the computing power of the heterogeneous hardware units; f3(x) represents the communication delay; [f1(x),f2(x),f3(x)] represents the multi-objective function.
10. The microgrid network topology flexible configuration method based on matrix topology according to claim 9, characterized in that: Intelligent algorithms are used to solve the multi-objective functions of microgrid network topology optimization, including: The initial population P is randomly generated. The population P consists of a group of individuals with microgrid network topology and heterogeneous hardware unit scheduling strategies. Each individual corresponds to a decision variable x, and the population size is N. Perform non-dominated sorting on the population P, and calculate the non-dominated level and crowding distance of each individual in the population based on the three optimization objectives of energy consumption, computing power and communication delay; Using the binary tournament selection operator, N individuals are selected from population P to generate the parent population P parent ; For the parent population P parent Perform crossover and mutation operations to generate the offspring population P offspring ; The parent population P parent and the offspring population P offspring Merge to obtain a merged population P of size 2N combine ; For the combined population P combine The selection, crossover and mutation operations are repeatedly performed until the preset termination condition is met, and the last generation of population is non-dominated sorted to obtain the non-dominated solution as the Pareto optimal solution set of the microgrid network topology optimization problem; Cluster the solutions in the Pareto optimal solution set, and based on the clustering results, use the TOPSIS method to select an optimal solution from each cluster to form a set of candidate topological solutions; According to the candidate topology set and the microgrid operation requirements, the optimal topology is selected; The individuals corresponding to the optimal topology solution are decoded to obtain the microgrid network topology structure, device connection relationship and heterogeneous hardware unit scheduling strategy, which are output as the result of microgrid network topology optimization to generate a microgrid network topology solution.
Citation Information
Patent Citations
Regional multi-microgrid dynamic networking method based on graph theory
CN107546773A
Microgrid network topology flexible configuration method based on matrix topology
CN117010130A
HFSP scheduling optimization method based on heterogeneous graph neural network and deep reinforcement learning
CN118295352A
Substation data collaborative identification method, device and equipment and storage medium
CN118820909A
Graph neural network-based power grid dispatching decision-making method and large model
CN119294872A
Cited By
Mutual supply and mutual aid hybrid control method based on honeycomb transverse topological architecture
CN120184981A
A mutual supply and mutual assistance hybrid control method based on a honeycomb-shaped horizontal topological architecture
CN120184981B
Building light storage and charging integrated energy management system
CN120222459A
A building photovoltaic storage and charging integrated energy management system
CN120222459B
Power equipment topological graph generation and query method based on graph neural network
CN120256468A