Transformer subgraph partitioning method, system, device and medium based on dynamic radius
The transformer subgraph partitioning method with dynamic radius adjustment solves the problems of unbalanced transformer subgraph partitioning and insufficient coverage of key areas in the existing technology, achieving 100% node coverage and physical field continuity, and improving the prediction accuracy and stability of the model.
Patent Information
- Application Number
- CN202511099488.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-07
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2045-08-07
AI Technical Summary
Existing transformer subgraph partitioning methods are insufficient in terms of flexibility, continuity, and ability to model key regions, resulting in poor model prediction performance.
A transformer subgraph partitioning method based on dynamic radius is adopted. By dynamically adjusting the radius of the circular region, a subgraph with a balanced number of nodes and allowing subgraph overlap is generated, ensuring the coverage of key areas such as copper conductor areas and preserving the physical field information of the boundary areas.
It improves the stability and prediction accuracy of graph neural network training, enhances the ability to model the global physical field of transformers, ensures 100% node coverage, and improves the prediction accuracy and continuity of the model.
Smart Images

Figure CN120597574B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multiphysics modeling technology for power equipment, specifically relating to a transformer subgraph partitioning method, system, equipment, and medium based on dynamic radius. Background Technology
[0002] In power systems, transformers are crucial devices used for voltage leveling and are widely applied in transmission and distribution. During operation, transformers are affected by various factors such as current, voltage, and ambient temperature, leading to complex internal physical changes, including temperature distribution, pressure variations, and oil flow velocity. These changes in physical fields not only affect the equipment's operating efficiency but also directly impact the transformer's safety and lifespan. Therefore, accurately modeling and predicting the internal temperature and pressure fields of transformers has become a key technical challenge in the field of intelligent monitoring and fault early warning for power equipment. In recent years, with the development of artificial intelligence technology, Graph Neural Networks (GNNs) have gained widespread attention as a novel tool for modeling the multi-physics fields of transformers due to their ability to process complex data structures.
[0003] Existing GNN modeling methods typically require dividing the overall transformer structure into multiple smaller "subgraphs" to reduce computational complexity and improve training efficiency. Common subgraph partitioning methods mainly include clustering-based algorithms (such as K-means) and graph-based partitioning algorithms (such as PyMETIS). However, K-means clustering relies on setting a fixed number of clusters, and the partitioning results are prone to problems such as insufficient node density and inadequate coverage in sparsely populated regions, affecting the accuracy of the model. PyMETIS, on the other hand, focuses more on graph connectivity and ignores the spatial location of nodes, which may lead to geometrically dispersed subgraphs, making it unfavorable for modeling spatially continuous temperature or pressure fields. In addition, some methods use a fixed radius to generate subgraphs, which cannot adapt to the differences in node distribution in different regions, resulting in unbalanced subgraph sizes and affecting training performance. More seriously, traditional partitioning methods usually prohibit overlapping regions between subgraphs. Although this reduces computational redundancy, it loses important information at the subgraph boundaries, causing discontinuities in the prediction results at the boundaries. Finally, critical components inside the transformer, such as the copper conductor region, are crucial for heat and pressure conduction. Existing methods fail to prioritize the segmentation of these regions, resulting in limited predictive ability of the model in these critical areas. In summary, existing subgraph segmentation methods have significant shortcomings in terms of flexibility, continuity, and ability to model critical regions. Summary of the Invention
[0004] To address the aforementioned shortcomings of existing technologies, this invention provides a method, system, device, and medium for transformer subgraph partitioning based on dynamic radius, in order to solve the aforementioned technical problems.
[0005] In a first aspect, the present invention provides a transformer subgraph partitioning method based on dynamic radius, comprising:
[0006] Load transformer diagram data and initialize the set of unassigned nodes;
[0007] Determine if the current set of unassigned nodes is empty. If it is not empty, randomly select a node from the set of unassigned nodes as the center node. Using the center node as the point, generate a circular region with an initial radius. Extract the subgraph nodes within the circular region to obtain the subgraph candidate node set.
[0008] Based on the candidate node set of the subgraph and the preset node number threshold, the radius of the circular region is dynamically adjusted. Based on the radius of the dynamically adjusted circular region, the official node set of the subgraph is determined from the candidate node set, and all nodes in the official node set of the subgraph are deleted from the unassigned node set.
[0009] When the set of unassigned nodes is empty, save all subgraph data and complete the subgraph partitioning process.
[0010] In one optional implementation, the loaded transformer diagram data includes:
[0011] Obtain the geometric physical data of the transformer, which includes node data, edge data, and multi-condition label data.
[0012] In an optional implementation, a node is randomly selected from the unassigned node set as the center node. A circular region is generated with the center node as the center point and an initial radius. Subgraph nodes are extracted within the circular region to obtain a candidate subgraph node set, including:
[0013] Randomly select a node from the unassigned node set as the center node, obtain the spatial coordinates of the random center point, and set the initial radius with the spatial coordinates of the random center point as the center;
[0014] Based on the initial radius and center, select nodes that meet the preset conditions from the set of unassigned nodes to form a set of candidate nodes for the subgraph. Connect the nodes that meet the preset conditions to obtain the candidate topology of the subgraph.
[0015] In an optional implementation, based on the initial radius and the center of the circle, nodes that meet preset conditions are selected from the set of unassigned nodes to form a candidate node set for the subgraph, including:
[0016] Set the coordinates of the i-th node in the set of unassigned nodes as follows: Set the coordinates of the center of the circle to ;
[0017] Calculate the Euclidean distance from each node in the set of unassigned nodes to the center of the circle:
[0018]
[0019] in, It is the i-th node To the center The distance;
[0020] Select nodes whose distance is less than or equal to the initial radius to form a candidate node set for the subgraph.
[0021] In an optional implementation, the radius of the circular region is dynamically adjusted based on the subgraph candidate node set and a preset node number threshold, including:
[0022] If the number of nodes in the candidate node set of the subgraph is less than the preset first node number threshold, the radius of the circular region is gradually increased by a preset unit length until the number of nodes in the candidate node set of the subgraph reaches the preset first node number threshold or the radius of the circular region reaches the preset first radius threshold.
[0023] If the number of nodes in the candidate node set of the subgraph is greater than the preset second node number threshold, the radius of the circular region is gradually reduced by a preset unit length until the number of nodes in the candidate node set of the subgraph does not exceed the preset second node number threshold or the radius of the circular region reaches the preset second radius threshold.
[0024] In one optional implementation, the formal set of subgraph nodes is determined from the candidate subgraph node set based on the radius of the dynamically adjusted circular region, including:
[0025] Based on the dynamically adjusted radius of the circular region, the subgraph nodes within the circular region are obtained;
[0026] Calculate the Euclidean distance from each subgraph node within the circular region to the center node;
[0027] Select nodes that meet the preset conditions to form the formal node set S of the subgraph:
[0028]
[0029] Where r is the adjusted radius and N is the set of candidate nodes in the subgraph.
[0030] In an optional implementation, the method further includes: a step of handling overlapping subgraph nodes, comprising:
[0031] Record the set of all formal nodes in the subgraph, and calculate the number of overlapping nodes and the overlap rate:
[0032] Number of overlapping nodes = Total number of nodes in all subgraphs - Total number of nodes in the initial graph;
[0033] .
[0034] Secondly, the present invention provides a transformer subgraph partitioning system based on dynamic radius, comprising:
[0035] The data loading module is used to load transformer diagram data and initialize the set of unassigned nodes.
[0036] The candidate node partitioning module is used to determine whether the current unassigned node set is empty. If it is not empty, a node is randomly selected from the unassigned node set as the center node. A circular region is generated with the center node as the point and an initial radius. Subgraph nodes within the circular region are extracted to obtain the subgraph candidate node set.
[0037] The formal node determination module is used to dynamically adjust the radius of the circular region based on the candidate node set of the subgraph and a preset node number threshold. Based on the radius of the dynamically adjusted circular region, it determines the formal node set of the subgraph from the candidate node set and deletes all nodes in the formal node set of the subgraph from the unassigned node set.
[0038] The data storage module is used to save all subgraph data when the set of unassigned nodes is empty, thus completing the subgraph partitioning process.
[0039] Thirdly, an electronic device is provided, comprising:
[0040] Memory for storing transformer subgraph partitioning programs based on dynamic radius;
[0041] A processor is configured to implement the steps of the transformer subgraph partitioning method based on dynamic radius as provided in the first aspect when executing the transformer subgraph partitioning procedure based on dynamic radius.
[0042] Fourthly, a computer-readable storage medium is provided, on which a transformer subgraph partitioning program based on dynamic radius is stored, wherein when the transformer subgraph partitioning program based on dynamic radius is executed by a processor, the steps of the transformer subgraph partitioning method based on dynamic radius provided in the first aspect are implemented.
[0043] The beneficial effects of this invention are as follows: The transformer subgraph partitioning method, system, device, and medium based on dynamic radius provided by this invention control the number of subgraph nodes within a preset range through dynamic radius adjustment, avoiding the uneven node number problem caused by clustering algorithms such as K-means, and improving the stability of subsequent GNN training; allowing subgraph overlap, preserving the physical field information (such as temperature and pressure gradients) of the boundary region, and significantly improving prediction accuracy; partitioning the subgraph based on circular regions avoids the geometric dispersion problem generated by algorithms such as PyMetis, which is suitable for modeling the local physical field of transformers; dynamic radius adjustment ensures that sparse region nodes are fully collected, with a node coverage rate of 100%, enhancing the model's ability to model the global physical field.
[0044] Furthermore, the design principle of this invention is reliable, the structure is simple, and it has a very wide range of application prospects. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic flowchart of a method according to an embodiment of the present invention.
[0047] Figure 2 This is a schematic block diagram of a system according to an embodiment of the present invention.
[0048] Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0049] To enable those skilled in the art to better understand the technical solutions of this invention, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this invention.
[0050] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0051] The transformer subgraph partitioning method based on dynamic radius provided in this embodiment of the invention is executed by a computer device, and correspondingly, the transformer subgraph partitioning system based on dynamic radius runs in the computer device.
[0052] Figure 1 This is a schematic flowchart illustrating a method according to an embodiment of the present invention. Wherein, Figure 1 The executing entity can be a transformer subgraph partitioning system based on dynamic radius. Depending on different requirements, the order of steps in this flowchart can be changed, and some can be omitted.
[0053] like Figure 1 As shown, the method includes:
[0054] S1. Load transformer diagram data and initialize the set of unassigned nodes.
[0055] S2. Determine if the current set of unassigned nodes is empty. If it is not empty, randomly select a node from the set of unassigned nodes as the center node. Using the center node as the center point, generate a circular region with an initial radius. Extract the subgraph nodes within the circular region to obtain the subgraph candidate node set.
[0056] S3. Based on the candidate node set of the subgraph and the preset node number threshold, dynamically adjust the radius of the circular region. Based on the radius of the dynamically adjusted circular region, determine the official node set of the subgraph from the candidate node set, and delete all nodes in the official node set of the subgraph from the unassigned node set.
[0057] S4. When the set of unassigned nodes is empty, save all subgraph data and complete the subgraph partitioning process.
[0058] In one embodiment of the present invention, based on step S1, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0059] Obtain the geometric physical data of the transformer, which includes node data, edge data, and multi-condition label data.
[0060] Specifically, the node data includes the node's spatial coordinates (x-axis and y-axis), material properties (such as thermal conductivity k, specific heat capacity cp, density rho, viscosity mu), material identifiers (0=oil, 1=insulating paper, 2=mesh-side copper, 3=pressure regulating copper, 4=valve-side copper), and initial physical quantities (such as temperature, pressure, and velocity components), totaling 15 dimensions. This information is loaded through a dedicated node data file, covering approximately 920,000 nodes.
[0061] Edge data includes edge connectivity (node pairs u, v) and edge features (such as edge length, boundary type, etc.), totaling 11 dimensions. For example, it records the connections between nodes (such as which nodes are connected by edges) and the physical properties of the edges (such as edge length, boundary type, e.g., copper-oil interface or paper-oil interface). The edge data is loaded through an edge file and an adjacency matrix file, containing approximately 2.7 million edges.
[0062] Multi-condition label data includes labels for different operating conditions (such as temperature T, pressure P, velocity Vx, Vy) and global variables (such as grid-side power, valve-side power, and ambient temperature). Data is stored in nodes.txt (node data), edges.txt (edge data), and sparse_adjacency.txt (adjacency matrix). Each operating condition corresponds to a label file, with the filename containing power and temperature information; for example, "1000_5000_298.txt" represents a grid-side power of 1000W, a valve-side power of 5000W, and an ambient temperature of 25℃. After loading, an operating condition information table is generated, recording the operating condition number and operating parameters.
[0063] In one embodiment of the present invention, based on step S2, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0064] Randomly select a node from the unassigned node set as the center node. Using the center node as the radii, generate a circular region with an initial radius. Extract the subgraph nodes within this circular region to obtain a candidate subgraph node set, including:
[0065] A node is randomly selected from the unassigned node set as the center node. The spatial coordinates of the random center point are obtained, and an initial radius is set with the spatial coordinates of the random center point as the center. Based on the initial radius and the center, nodes that meet preset conditions are selected from the unassigned node set to form a candidate node set for the subgraph. The nodes that meet the preset conditions are connected to obtain the candidate topology structure of the subgraph.
[0066] Based on the initial radius and center, nodes that meet preset conditions are selected from the unassigned node set to form a candidate node set for the subgraph, including:
[0067] Set the coordinates of the i-th node in the set of unassigned nodes as follows: Set the coordinates of the center of the circle to ;Calculate the Euclidean distance from each node in the set of unassigned nodes to the center of the circle:
[0068]
[0069] in, It is the i-th node To the center The distance.
[0070] Select nodes whose distance is less than or equal to the initial radius to form a candidate node set for the subgraph.
[0071] In one embodiment of the present invention, based on step S3, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0072] Based on the candidate node set of the subgraph and a preset node number threshold, the radius of the circular region is dynamically adjusted, including:
[0073] If the number of nodes in the candidate node set of the subgraph is less than a preset first node number threshold, the radius of the circular region is gradually increased by a preset unit length until the number of nodes in the candidate node set of the subgraph reaches the preset first node number threshold or the radius of the circular region reaches the preset first radius threshold. If the number of nodes in the candidate node set of the subgraph is greater than a preset second node number threshold, the radius of the circular region is gradually decreased by a preset unit length until the number of nodes in the candidate node set of the subgraph does not exceed the preset second node number threshold or the radius of the circular region reaches the preset second radius threshold.
[0074] Specifically, the radius of the circular region is adaptively adjusted based on the number of nodes in the candidate node set of the subgraph to ensure that the number of nodes contained in the subgraph is within a preset range (minimum 1400 nodes, maximum 1500 nodes). The specific method is as follows:
[0075] If the number of nodes is less than 1400, the radius is gradually increased in increments of 0.002 units until the number of nodes reaches 1400 or the radius reaches its maximum value of 0.2 units.
[0076] If the number of nodes is greater than 1500, the radius is gradually reduced in increments of 0.002 units until the number of nodes does not exceed 1500 or the radius reaches the minimum value of 0.01 units.
[0077] The adjusted set of subgraph nodes is redefined in the following way:
[0078] Based on the adjusted radius, calculate the distance from each node to the center point:
[0079]
[0080] in, From the i-th node to the center point distance, Let be the coordinates of the i-th node.
[0081] Based on the dynamically adjusted radius of the circular region, the final set of nodes for the subgraph is determined from the candidate subgraph node set, including:
[0082] Based on the dynamically adjusted radius of the circular region, the subgraph nodes within the circular region are obtained; the Euclidean distance from each subgraph node within the circular region to the center node is calculated.
[0083] Select nodes that meet the preset conditions to form the formal node set S of the subgraph:
[0084]
[0085] Where r is the adjusted radius, and N is the set of candidate nodes in the subgraph (initially all nodes or a specific subset, such as copper nodes).
[0086] Specifically, this dynamic adjustment mechanism ensures a balanced subgraph size, which is particularly suitable for regions with uneven node density in transformer geometry (such as dense at the center and sparse at the edges), thereby improving the stability and accuracy of subsequent graph neural network training.
[0087] In one embodiment of the present invention, based on step S4, the following will provide a possible embodiment and describe its specific implementation in a non-limiting manner.
[0088] For each subgraph, save the following data:
[0089] Node features: Extract features of subgraph nodes from global node features, such as coordinates, material properties, initial temperature and pressure.
[0090] Edge features: Extract global edge features (such as edge length and boundary type) corresponding to the edges of the subgraph.
[0091] Edge connection: Based on the renumbering of subgraph nodes, record edge connection relationships and generate the edge index of the subgraph.
[0092] Global Index: Records the original index of the subgraph node in the global graph. Records the original number of the subgraph node in the global transformer graph for easy subsequent splicing and analysis.
[0093] Subgraph data is saved as separate files (approximately 3200 subgraphs, each with approximately 1400 nodes), and a topology information file is generated, recording global edge connections and subgraph indices. The storage format uses an efficient binary format (such as PyTorch's .pt files) to facilitate graph neural network training.
[0094] In one embodiment of the present invention, the method further includes: a step of dividing multi-condition data.
[0095] Based on the multi-condition labels, the condition IDs are randomly divided into training, validation, and test sets. Symbolic links are generated for each condition and subgraph, pointing to the corresponding subgraph file.
[0096] In one embodiment of the present invention, the method further includes: a step of subgraph node overlap processing, comprising:
[0097] Record the set of all formal nodes in the subgraph, and calculate the number of overlapping nodes and the overlap rate:
[0098] Number of overlapping nodes = Total number of nodes in all subgraphs - Total number of nodes in the initial graph
[0099] .
[0100] Specifically, overlapping subgraphs preserve the continuity of physical fields (such as temperature and pressure fields) in the boundary region, avoiding information loss caused by traditional mutually exclusive partitioning.
[0101] In one embodiment of the present invention, the method further includes: a step of copper node enhancement partitioning.
[0102] For copper nodes (material identifiers 2, 3, and 4, corresponding to mesh-side copper, voltage regulating copper, and valve-side copper, respectively), multiple reinforcement divisions are performed (default reinforcement count is 3):
[0103] Randomly select the center node from the copper nodes and perform the circular region division in steps S2 and S3.
[0104] Ensure that each subgraph contains at least one copper node to enhance coverage of critical areas.
[0105] Save the enhanced subgraph and record the copper node coverage.
[0106] Specifically, based on the work condition information table, all work conditions are randomly divided into a training set (75%), a validation set (15%), and a test set (10%). A data reference file is generated for each work condition and subplot, pointing to the corresponding subplot file via symbolic links. For example, for work condition number 1... Figure 1 This generates a reference named "cond_1_1" that points to the actual subgraph data file. The partitioning results are saved as an allocation information file, recording the case numbers of the training, validation, and test sets.
[0107] Through the above steps, a subgraph dataset suitable for training graph neural networks is generated. It has a balanced number of nodes, compact geometry, moderate overlap, and sufficient copper node coverage, supporting prediction of physical fields under multiple operating conditions.
[0108] As shown in Table 1, the method proposed in this application outperforms existing technologies in several key metrics. First, regarding subgraph connectivity, both the method in this application and Pymetis maintain complete connectivity, while the clustering partitioning method has a large number of disconnected subgraphs, which is not conducive to preserving graph structure information. Second, the method in this application exhibits "high" node clustering, ensuring the geometric compactness of the subgraph space, while the Pymetis method, which only focuses on topological connectivity, results in nodes being spatially dispersed. Furthermore, the method in this application does not require pre-specifying the number of subgraphs and can flexibly set the upper and lower limits of the number of nodes in each subgraph, providing greater freedom for modeling tasks of different scales, which the other two methods cannot achieve. Finally, the method in this application allows node overlap between subgraphs, which is beneficial for preserving the physical information of boundary regions and improving the continuity of physical field modeling, while Pymetis and clustering partitioning only allow a small amount of node overlap, which is difficult to meet the continuity requirements.
[0109] Table 1. Performance metrics comparison of different subgraph partitioning algorithms
[0110]
[0111] As shown in Table 2, the method proposed in this application significantly outperforms existing partitioning methods in several core performance metrics. First, the subgraphs generated by the method in this application have an average of 1435 nodes and a standard deviation of only 38.99, indicating a very balanced distribution of subgraph sizes. In contrast, the standard deviation of the number of nodes in the cluster partition is as high as 361.34, showing a significant difference in subgraph size, which is detrimental to the stability of model training. Second, all subgraphs generated by the method in this application are connected graphs (the number of disconnected subgraphs is 0), while the cluster partition has as many as 339 disconnected subgraphs, severely damaging the integrity of the graph structure.
[0112] Furthermore, the node overlap rate of the method in this application reaches 44.27%, which is much higher than that of Pymetis partitioning (12.81%) and clustering partitioning (3.66%). This helps to preserve the continuity of the physical field in the boundary region, thereby improving prediction accuracy. Most importantly, the method in this application can achieve complete coverage of all nodes (0 unassigned nodes), while the clustering method still leaves 27,931 nodes (accounting for 3.03% of the total) unassigned, which may result in the loss of physical information.
[0113] Table 2. Quantitative results of performance indicators for different subgraph partitioning methods
[0114]
[0115] In some embodiments, the transformer subgraph partitioning system based on dynamic radius may include multiple functional modules composed of computer program segments. The computer programs for each program segment in the transformer subgraph partitioning system based on dynamic radius may be stored in the memory of a computer device and executed by at least one processor to perform (see details). Figure 1 (Description) Functionality of transformer subgraph partitioning based on dynamic radius.
[0116] In this embodiment, the transformer subgraph partitioning system based on dynamic radius can be divided into multiple functional modules according to its functions, such as... Figure 2 As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and is stored in memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0117] The data loading module is used to load transformer diagram data and initialize the set of unassigned nodes.
[0118] The candidate node partitioning module is used to determine whether the current unassigned node set is empty. If it is not empty, a node is randomly selected from the unassigned node set as the center node. A circular region is generated with the center node as the point and an initial radius. Subgraph nodes within the circular region are extracted to obtain the subgraph candidate node set.
[0119] The formal node determination module is used to dynamically adjust the radius of the circular region based on the candidate node set of the subgraph and a preset node number threshold. Based on the radius of the dynamically adjusted circular region, it determines the formal node set of the subgraph from the candidate node set and deletes all nodes in the formal node set of the subgraph from the unassigned node set.
[0120] The data storage module is used to save all subgraph data when the set of unassigned nodes is empty, thus completing the subgraph partitioning process.
[0121] Figure 3The transformer subgraph partitioning method based on dynamic radius provided in this application embodiment can be applied to devices. Those skilled in the art will understand that the device structures involved in the embodiments of this invention do not constitute a limitation on the device. A device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. In the embodiments of this invention, the device includes, but is not limited to, laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown in this application, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the embodiments described and / or claimed in this application.
[0122] The device 300 may include a processor 310, a memory 320, and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will understand that the server structure shown in the figure does not constitute a limitation of the present invention. It may be a bus topology or a star topology, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0123] The memory 320 can be used to store execution instructions of the processor 310. The memory 320 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the device 300 is able to perform some or all of the steps in the above method embodiments.
[0124] The processor 310 serves as the control center of the storage device, connecting various parts of the electronic device via various interfaces and lines. It executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic device and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 310 may consist only of a central processing unit (CPU). In this embodiment of the invention, the CPU may have a single processing core or include multiple processing cores.
[0125] The communication unit 330 is used to establish a communication channel, enabling the storage device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.
[0126] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps provided in the embodiments of the present invention. The storage medium may be a magnetic disk, an optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0127] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or any other medium capable of storing program code. It includes several instructions to cause a computer device (which may be a personal computer, a server, or a second device, network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0128] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0129] In the embodiments provided by this invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between systems or modules may be electrical, mechanical, or other forms.
[0130] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0131] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0132] Although the present invention has been described in detail with reference to the accompanying drawings and preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made to the embodiments of the present invention by those skilled in the art without departing from the spirit and essence of the invention, and such modifications or substitutions should all be within the scope of the present invention. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should also be covered within the protection scope of the present invention.
Claims
1. A transformer subgraph partitioning method based on dynamic radius, characterized in that, include: Load transformer diagram data and initialize the set of unassigned nodes; Determine if the current set of unassigned nodes is empty. If it is not empty, randomly select a node from the set of unassigned nodes as the center node. Using the center node as the point, generate a circular region with an initial radius. Extract the subgraph nodes within the circular region to obtain the subgraph candidate node set. Based on the candidate node set of the subgraph and the preset node number threshold, the radius of the circular region is dynamically adjusted. Based on the radius of the dynamically adjusted circular region, the official node set of the subgraph is determined from the candidate node set, and all nodes in the official node set of the subgraph are deleted from the unassigned node set. When the set of unassigned nodes is empty, save all subgraph data and complete the subgraph partitioning process; The transformer diagram data includes: Obtain the geometric physical data of the transformer, which includes node data, edge data, and multi-condition label data; Randomly select a node from the unassigned node set as the center node. Using the center node as the radii, generate a circular region with an initial radius. Extract the subgraph nodes within this circular region to obtain a candidate subgraph node set, including: Randomly select a node from the unassigned node set as the center node, obtain the spatial coordinates of the random center point, and set the initial radius with the spatial coordinates of the random center point as the center; Based on the initial radius and the center of the circle, select nodes that meet the preset conditions from the set of unassigned nodes to form a set of candidate nodes for the subgraph. Connect the nodes that meet the preset conditions to obtain the candidate topology of the subgraph. Node data includes the node's spatial coordinates, material properties, material identifier, and initial physical quantities, which are loaded through a dedicated node data file; Edge data includes edge connection relationships and edge features, recording the connections between nodes and the physical attributes of edges. Edge data is loaded through edge files and adjacency matrix files. Multi-condition label data includes labels for different conditions and global variables. The data is stored in node data, edge data, and adjacency matrix. Each condition corresponds to a label file. The file name contains power and temperature information. After loading, a condition information table is generated, which records the condition number and operating parameters.
2. The method according to claim 1, characterized in that, Based on the initial radius and center, nodes that meet preset conditions are selected from the unassigned node set to form a candidate node set for the subgraph, including: Set the coordinates of the i-th node in the set of unassigned nodes as follows: Set the coordinates of the center of the circle to ; Calculate the Euclidean distance from each node in the set of unassigned nodes to the center of the circle: in, It is the i-th node To the center The distance; Select nodes whose distance is less than or equal to the initial radius to form a candidate node set for the subgraph.
3. The method according to claim 2, characterized in that, Based on the candidate node set of the subgraph and a preset node number threshold, the radius of the circular region is dynamically adjusted, including: If the number of nodes in the candidate node set of the subgraph is less than the preset first node number threshold, the radius of the circular region is gradually increased by a preset unit length until the number of nodes in the candidate node set of the subgraph reaches the preset first node number threshold or the radius of the circular region reaches the preset first radius threshold. If the number of nodes in the candidate node set of the subgraph is greater than the preset second node number threshold, the radius of the circular region is gradually reduced by a preset unit length until the number of nodes in the candidate node set of the subgraph does not exceed the preset second node number threshold or the radius of the circular region reaches the preset second radius threshold.
4. The method according to claim 3, characterized in that, Based on the dynamically adjusted radius of the circular region, the final set of nodes for the subgraph is determined from the candidate subgraph node set, including: Based on the dynamically adjusted radius of the circular region, the subgraph nodes within the circular region are obtained; Calculate the Euclidean distance from each subgraph node within the circular region to the center node; Select nodes that meet the preset conditions to form the formal node set S of the subgraph: Where r is the adjusted radius and N is the set of candidate nodes in the subgraph.
5. The method according to claim 1, characterized in that, Also includes: The steps for handling overlapping subgraph nodes include: Record the set of all formal nodes in the subgraph, and calculate the number of overlapping nodes and the overlap rate: Number of overlapping nodes = Total number of nodes in all subgraphs - Total number of nodes in the initial graph; 。 6. A transformer subgraph partitioning system based on dynamic radius, characterized in that, include: The data loading module is used to load transformer diagram data and initialize the set of unassigned nodes; The candidate node partitioning module is used to determine whether the current unassigned node set is empty. If it is not empty, a node is randomly selected from the unassigned node set as the center node. A circular region is generated with the center node as the point and an initial radius. Subgraph nodes within the circular region are extracted to obtain the subgraph candidate node set. The formal node determination module is used to dynamically adjust the radius of the circular region based on the candidate node set of the subgraph and a preset node number threshold. Based on the radius of the dynamically adjusted circular region, it determines the formal node set of the subgraph from the candidate node set and deletes all nodes in the formal node set of the subgraph from the unassigned node set. The data storage module is used to save all subgraph data when the set of unassigned nodes is empty, thus completing the subgraph partitioning process. The transformer diagram data includes: Obtain the geometric physical data of the transformer, which includes node data, edge data, and multi-condition label data; Randomly select a node from the unassigned node set as the center node. Using the center node as the radii, generate a circular region with an initial radius. Extract the subgraph nodes within this circular region to obtain a candidate subgraph node set, including: Randomly select a node from the unassigned node set as the center node, obtain the spatial coordinates of the random center point, and set the initial radius with the spatial coordinates of the random center point as the center; Based on the initial radius and the center of the circle, select nodes that meet the preset conditions from the set of unassigned nodes to form a set of candidate nodes for the subgraph. Connect the nodes that meet the preset conditions to obtain the candidate topology of the subgraph. Node data includes the node's spatial coordinates, material properties, material identifier, and initial physical quantities, which are loaded through a dedicated node data file; Edge data includes edge connection relationships and edge features, recording the connections between nodes and the physical attributes of edges. Edge data is loaded through edge files and adjacency matrix files. Multi-condition label data includes labels for different conditions and global variables. The data is stored in node data, edge data, and adjacency matrix. Each condition corresponds to a label file. The file name contains power and temperature information. After loading, a condition information table is generated, which records the condition number and operating parameters.
7. An electronic device, characterized in that, include: Memory for storing transformer subgraph partitioning programs based on dynamic radius; A processor is configured to implement the steps of the transformer subgraph partitioning method based on dynamic radius as described in any one of claims 1-5 when executing the transformer subgraph partitioning program based on dynamic radius.
8. A computer-readable storage medium storing a computer program, characterized in that, The readable storage medium stores a transformer subgraph partitioning program based on dynamic radius, which, when executed by a processor, implements the steps of the transformer subgraph partitioning method based on dynamic radius as described in any one of claims 1-5.
Citation Information
Patent Citations
Distance-based closed-loop detection method and device, electronic equipment and storage medium
CN112102400A
Mechanical arm path planning method and system based on environmental parameter self-adaptive adjustment
CN120326643A