A multi-dimensional microservice splitting method and system for power grid business

Through multi-dimensional analysis and multi-channel graph neural network processing, the maintenance complexity and performance bottleneck problems of traditional single-unit application systems are solved, and efficient splitting and flexibility of the power grid business system are achieved.

CN120234566BActive Publication Date: 2025-08-26STATE GRID ANHUI ELECTRIC POWER CO LTD +2
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510703847.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-08-26
Estimated Expiration
2045-05-29

AI Technical Summary

Technical Problem

Traditional single-unit application systems have complex maintenance, slow upgrades and serious performance bottlenecks in power grid business. The granularity division in existing microservice transformation is unreasonable, resulting in increased system complexity and maintenance difficulty.

Method used

Multi-dimensional analysis method is adopted to construct multi-attribute graphs and use multi-channel graph neural networks for microservice splitting, including graph convolutional coding, feature fusion and node clustering, and precise splitting is performed in combination with business, function and pressure dimensions.

Benefits of technology

It improves the accuracy and rationality of microservice splitting, reduces manual errors, improves the flexibility and scalability of the system, and reduces maintenance costs and response delays.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120234566B_ABST
    Figure CN120234566B_ABST
Patent Text Reader

Abstract

The present invention provides a multi-dimensional microservice splitting method and system for power grid business, which relates to the field of power grid information technology. Starting from the perspective of multi-dimensional data, the present invention introduces three dimensions of business, function and pressure, and conducts a comprehensive analysis of each business module in the power grid business monomer program. The present invention designs a multi-channel graph neural network to process the multi-attribute graph to achieve splitting, wherein trainable weights are introduced in the graph convolution coding part to improve the quality of graph convolution feature extraction, a gating mechanism and a cross-channel residual connection are used in the feature fusion part to obtain a high-quality comprehensive feature representation, and trainable weights are introduced in the node clustering part to improve the clustering effect. Compared with the traditional method that relies only on functional analysis, the present invention can more accurately identify the intrinsic connections and potential dependencies between modules, improve the splitting accuracy and rationality, and avoid errors caused by manual experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of power grid information technology, and more specifically to: 1. a multi-dimensional microservice splitting method for power grid business; 2. a multi-dimensional microservice splitting system for power grid business. Background Art

[0002] In today's rapidly developing digital age, the business scale of power grid companies continues to expand, and the types of business are becoming increasingly complex. This places higher demands on the efficient and stable operation of power grid systems. However, traditional single application systems are difficult to adapt to this change and have the following shortcomings:

[0003] 1. Maintenance of traditional monolithic application systems is becoming increasingly complex. With the continuous addition of business functions, the amount of code increases dramatically, the internal structure of the system becomes intricate, and the coupling between different modules is extremely high. This makes it difficult for developers to maintain the system. A small modification can trigger a series of unforeseen problems, greatly increasing maintenance costs and risks. For example, when upgrading a functional module, due to its close dependencies with multiple other modules, comprehensive testing and adjustments of the entire system may be required. This not only consumes a lot of time and manpower, but can also cause system instability during maintenance, affecting normal business operations.

[0004] 2. Monolithic application system upgrades are also very slow. Due to the limitations of its overall architecture, the introduction of new features or technologies requires large-scale changes to the entire system. This process involves multiple steps, such as in-depth modification of existing code, retesting, and compatibility debugging with other modules. Each step requires a significant amount of time and effort, resulting in a prolonged launch cycle for new features and an inability to meet the needs of business development in a timely manner. Amid increasingly competitive market conditions, this slow upgrade pace makes it difficult for power grid companies to cope with new business challenges and customer demands, potentially missing out on development opportunities.

[0005] 3. Performance bottlenecks are also becoming increasingly prominent. With the explosive growth of business data and the continuous increase in concurrent user access, traditional monolithic application systems are struggling to handle large-scale data and high-concurrency requests. The system's response speed is gradually slowing, and even experiencing freezes and crashes, seriously affecting the user experience and the normal operation of the business. For example, during peak electricity consumption periods, when a large number of users are simultaneously performing operations such as electricity bill inquiries and payments, the system may experience long response delays, preventing users from obtaining the required information in a timely manner, causing great inconvenience to users and affecting the service image of the power grid company.

[0006] Microservices architecture has become a mainstream approach for migrating business applications to the cloud due to its advantages such as high availability, scalability, and flexible deployment. Microservices architecture breaks down a large, monolithic application into multiple small, independent services, each of which can be independently developed, deployed, and maintained. This significantly improves system flexibility and scalability. However, in actual power grid business systems, microservices transformation still faces many challenges.

[0007] For example, the existing Chinese invention patent with patent number 202210559572.8 discloses a method and system for splitting a single program using multi-channel attention graph neural network clustering. The solution is as follows: when the Java program is running, graph analysis is called to obtain multi-attribute information between classes, a multi-attribute graph structure is constructed, and a multi-channel graph convolutional neural network model is designed to learn feature embedding representations of the multi-attribute graph; then, with the goal of optimizing the embedding representation, the attention mechanism is used to fuse the multi-channel convolutional network embedding representation to form a new feature embedding representation; then, through joint training with clustering information, spectral clustering is used for clustering to obtain the microservice splitting results. However, after testing, it was found that the granularity division of the splitting method using this patent is still unreasonable - specifically: 1. Some microservices cannot withstand the load during high-traffic periods, resulting in performance bottlenecks; 2. Some microservices have too high a degree of coupling, which increases the complexity of the system and the difficulty of maintenance. Summary of the Invention

[0008] Based on this, it is necessary to provide a multi-dimensional microservice splitting method and system for power grid business to address the problem of unreasonable granularity division of existing patents.

[0009] The present invention is achieved by adopting the following technical solutions:

[0010] In a first aspect, the present invention discloses a multi-dimensional microservice splitting method for power grid business, comprising:

[0011] S1, extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X ;

[0012] Construct a business channel adjacency matrix based on the power grid business monomer program A 1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G ; G ={( A 1, X )、( A 2, X )、( A 3,X )}.

[0013] S2, will G Input into a multi-channel graph neural network for processing.

[0014] Among them, the multi-channel graph neural network includes: graph convolution encoding unit, feature fusion unit, node clustering unit, and graph convolution decoding unit.

[0015] The graph convolutional encoding unit is used to combine trainable weights through 3 graph convolutional encoders w ij Respectively ( A 1, X )、( A 2, X )、( A 3, X ) is encoded to obtain three feature embedding representations Z 1~ Z 3.

[0016] The feature fusion part is used to: combine the features of Z 1. Z 2. Z 3 Fusion into comprehensive feature representation .

[0017] Node clustering is used to: combine w ij right Perform spectral clustering to obtain clustering results and construct clustering loss L clus .

[0018] The graph convolution decoding unit is used to: respectively decode the Z 1. Z 2. Z 3 performs decoding processing to obtain 3 corresponding reconstructed feature matrices , and then reconstruct the 3 reconstruction channel adjacency matrices , and construct the reconstruction loss L sa .

[0019] S3, based on L clus 、 L sa Construct the total loss function Loss , and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

[0020] This multi-dimensional microservice splitting method for power grid business implements the method or process according to the embodiment of the present disclosure.

[0021] In a second aspect, the present invention discloses a multi-dimensional microservice splitting system for power grid business, which uses the multi-dimensional microservice splitting method for power grid business disclosed in the first aspect.

[0022] The multi-dimensional microservice splitting system for power grid business includes: multi-attribute graph construction module, neural network processing module, and neural network iteration module.

[0023] The multi-attribute graph construction module is used to extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X , based on the power grid business monomer program to build a business channel adjacency matrix A 1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G .

[0024] The neural network processing module is used to: G Input into a multi-channel graph neural network for processing.

[0025] The neural network iteration module is used to: L clus 、 L sa Construct the total loss function Loss , and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

[0026] This multi-dimensional microservice splitting system for power grid business implements the method or process according to the embodiment of the present disclosure.

[0027] In a third aspect, the present invention discloses a computer program product, including a computer program. When executed by a processor, the computer program implements the steps of the multi-dimensional microservice decomposition method for power grid services disclosed in the first aspect.

[0028] Compared with the prior art, the present invention has the following beneficial effects:

[0029] 1. This invention, based on multidimensional data, introduces the three dimensions of business, function, and pressure to comprehensively analyze each business module in a single power grid business program. Compared to traditional methods that rely solely on functional analysis, this invention can more accurately identify the inherent connections and potential dependencies between modules, improve the accuracy and rationality of the split, and avoid errors caused by human experience.

[0030] 2. On the one hand, the present invention constructs an initial feature matrix that characterizes all modules of the power grid business monomer program based on static information, dynamic information, and business information. On the other hand, it constructs three adjacency matrices corresponding to the three dimensions of business, function, and pressure, thereby forming a multi-attribute graph that more comprehensively characterizes the relationship between all modules, providing richer and more comprehensive information for microservice splitting.

[0031] 3. The present invention designs a multi-channel graph neural network to process multi-attribute graphs to achieve splitting; wherein, the graph convolutional coding unit introduces trainable weights when encoding w ij , which can improve the quality of graph convolution feature extraction; the feature fusion unit dynamically adjusts the contribution ratio of each modal feature in the node fusion representation through the gating mechanism to highlight key information and suppress irrelevant noise. On the other hand, through cross-channel residual connection, it retains the fine-grained information of the original features of each modality, enhances the integrity and stability of the fusion feature, and thus fully integrates multi-dimensional key information, while improving the expression ability and discrimination performance of the node feature representation, avoiding the problem of feature information loss and insufficient adaptability in the traditional single weighted fusion method; the node clustering unit also introduces trainable weights when clustering w ij , which can dynamically adjust the actual similarity between node pairs to optimize the clustering effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0033] Figure 1 Flowchart of the multi-dimensional microservice splitting method for power grid business provided in Example 1 of the present invention;

[0034] Figure 2 This is a structural diagram of the multi-channel graph neural network provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0035] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0036] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component. When a component is considered to be "fixed to" another component, it may be directly fixed to the other component or there may be a central component.

[0037] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this invention pertains. The terms used herein in the specification of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The term "or / and" as used herein includes any and all combinations of one or more of the associated listed items.

[0038] First, we must clarify that an analysis of the existing patent (patent number 202210559572.8) revealed that it only considered the functional dimension during the extraction process. However, in reality, business traffic pressure has a significant impact on power grid business systems: electricity demand varies significantly across time periods, and business traffic fluctuates significantly. Component coupling is also crucial in power grid business systems—it reflects the dependencies between microservices. Therefore, we can conclude that the existing patent ignores these factors and lacks a comprehensive assessment of multiple dimensions, including functional dimensions, business traffic pressure, and component coupling, resulting in an unreasonable granularity of microservices.

[0039] Based on this conclusion, the present invention considers the three dimensions of business, function and pressure from the perspective of multi-dimensional data, and conducts a comprehensive analysis of each business module in the power grid business monomer program.

[0040] Example 1

[0041] refer to Figure 1 , shows a flowchart of the multi-dimensional microservice splitting method for power grid business provided by this embodiment 1. In order to facilitate subsequent explanations, it is assumed that the power grid business monomer program includes N modules (also considered N Class or N nodes).

[0042] like Figure 1 Said method comprises the following steps:

[0043] S1, extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X ;

[0044] Construct a business channel adjacency matrix based on the power grid business monomer program A1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G .

[0045] For S1, there are two main tasks: one is to construct the initial feature matrix X , the other is to construct 3 adjacency matrices A 1~ A 3. Finally, build G .

[0046] 101. For X Generally speaking, its composition methods include:

[0047] For each module in the power grid business monomer program, extract and construct its static information feature vector, dynamic information feature vector, and business information feature vector;

[0048] The power grid business unit program N The static information feature vector, dynamic information feature vector, and business information feature vector of each module are stacked row by row to obtain X .

[0049] Specifically:

[0050] ① The static information feature vector represents the static information of the power grid business monomer program. Its data source can be: extracting various types of names, definitions, inheritance structures, implementation interfaces, method lists, comments, etc. from the code, and at the same time counting quantitative indicators such as the number of code lines, cyclomatic complexity, and the number of interface calls.

[0051] Generally, the static information feature vector adopts a five-dimensional design, which is expressed as:

[0052] ;

[0053] Where, Indicates the i The static information feature vector of each class; LOC i Indicates the i Number of lines of code per class; FUNC i Indicates the i The number of methods defined in a class; VAR i Indicates the i The number of variables defined in a class; DEP i Indicates the i The number of times a class depends on other classes; INHERIT iIndicates the i The number of comment lines per class.

[0054] ② The dynamic information feature vector represents the dynamic information of the power grid business unit program. Its data source can be: based on the runtime data collection information (such as response time, number of concurrent calls, etc.) to record the load characteristics of each module.

[0055] Generally, the dynamic information feature vector adopts a four-dimensional design, which is expressed as:

[0056] ;

[0057] Where, Indicates the i Dynamic information feature vector of each class; QPS i Indicates the i The average number of calls per class per unit time; CALL_OUT i Indicates the i The number of outbound calls initiated by a class; CALL_IN i Indicates the i The number of times a class is called by other classes; Indicates the i Whether the class is a business entry class.

[0058] ③ The business information feature vector represents the business information of the power grid business monomer program. Its data source can be: using unstructured information such as interface description documents and annotation text to extract business keywords and encode the text (using methods such as TF-IDF and Word2Vec) into vector form.

[0059] The dimension of the business information feature vector is not fixed and depends on the specific class. i The business information feature vector of a class can be expressed as .

[0060] In addition, it should be noted that when constructing the above feature vectors, the collected relevant data can be cleaned and standardized, and numerical data can be normalized. If necessary, principal component analysis (PCA) can be used to reduce the data dimension to reduce noise and redundancy, thereby providing high-quality data for subsequent steps.

[0061] Then we have: ; N Indicates the total number of modules in the power grid business monomer program, d Represents the feature dimension.

[0062] 102. For A 1~ A3. It reflects the impact of the three dimensions of business, function and pressure on power grid business applications.

[0063] ① A The data source of 1 can come from the call chain log during dynamic runtime, or from business process documents or statistical analysis reports.

[0064] If two modules appear together multiple times in the same business scenario, such as participating in the same call chain or executing the same business use case, they have a high degree of coupling in the "business" dimension.

[0065] so, A The expression for 1 can be written as:

[0066] ;

[0067] Where, A 1( i , j )express A 1st i Row, No. j The value of the column; freq ij Indicates the i Module, j The number of times a module appears in the same link at the same time; T biz Indicates the service correlation threshold.

[0068] ② A The data source of 2 can rely on static code analysis or abstract syntax tree (AST) extraction results, or it can integrate code-level dependencies, interface calls, inheritance relationships and other information.

[0069] If there is a direct or indirect functional relationship between two modules (such as function call, inheritance relationship, interface reference), they are highly coupled in the "functional" dimension.

[0070] so, A The expression for 2 can be written as:

[0071] ;

[0072] Where, A 2( i , j )express A 2nd i Row, No. j The value of the column; coupleFreq ij Indicates the i Module, j The number of functional relationships that exist between modules;T func Represents the functional coupling threshold.

[0073] ③ A The data source for 3 can be from the runtime monitoring platform or historical load logs, such as concurrent requests, response time, CPU / memory usage, etc.

[0074] If two modules show strong operational correlation (e.g., synchronization peaks, coupling resource occupancy) in a high concurrency or high load environment, they can be considered to have a high coupling in the "pressure" dimension.

[0075] so, A The expression for 3 can be written as:

[0076] ;

[0077] Where, A 3( i , j )express A 3rd i Row, No. j The value of the column; sim ij Indicates the i Module, j The similarity of modules; T press Indicates the pressure correlation threshold.

[0078] It should be noted that T biz 、 T func 、 T press It can be selected based on empirical values, or it can be adjusted according to subsequent clustering results to achieve good results.

[0079] 103. Based on X 、 A 1~ A 3 constructed G It can be expressed as: G ={( A 1, X )、( A 2, X )、( A 3, X )}.

[0080] That is to say, G It consists of three parts—the three parts have the same feature matrix and different adjacency matrices.

[0081] S2, will GInput into a multi-channel graph neural network for processing.

[0082] because G The three dimensions of information (equivalent to three modalities) contain no significant difference in importance, and the network design of the existing patent cannot be used. Therefore, this case redesigned the network structure and principles, resulting in the multi-channel graph neural network used in this case.

[0083] See Figure 2 ,The multi-channel graph neural network includes: graph convolution encoding part, feature fusion part, node clustering part, and graph convolution decoding part.

[0084] 201. The graph convolutional encoding unit is used to combine trainable weights through 3 graph convolutional encoders w ij Respectively ( A 1, X )、( A 2, X )、( A 3, X ) is encoded to obtain three feature embedding representations Z 1~ Z 3.

[0085] like Figure 2 As shown, for G The three convolutional encoders perform encoding processing one by one for the three modes. L layer.

[0086] It should be noted that the graph convolutional coding unit introduces a learnable edge weight mechanism in the convolution operation - in the original adjacency matrix A 1~ A 3, for each edge ( i , j ) is assigned a trainable weight w ij Therefore, the m The first graph convolutional encoder l The output of layer +1 is:

[0087] ;

[0088] Where, m ∈[1,2,3]; A m ( i , j )for A m No. i Row, No. j The value of the column; expressA m The i The set of neighbor nodes of a node; Indicates the m The first graph convolutional encoder l The weight matrix of the layer; Indicates the m The first graph convolutional encoder l The output of the layer; σ (.) represents a nonlinear activation function (generally used Relu activation function).

[0089] It should be noted that ; .

[0090] 202. Feature fusion unit is used to: combine Z 1. Z 2. Z 3 Fusion into comprehensive feature representation .

[0091] While there's no significant difference in importance between the three modalities, their contributions to different node features vary. To fully reflect these contributions, the feature fusion unit introduces a gating mechanism combined with cross-channel residual connections.

[0092] like Figure 2 As shown in the figure, the feature fusion unit includes: 3 gated neural networks, 3 product layers, and 2 residual connection layers.

[0093] Among them, m A gated neural network is used to Z m First, a linear transformation is performed through the linear layer, and then the Sigmoid activation function is processed to obtain the m Gating weights g m ; m ∈[1,2,3];

[0094] No. m The product layer is used to g m 、 Z m Perform multiplication;

[0095] The first residual connection layer is used to add the outputs of the three product layers;

[0096] The second residual connection layer is used to connect the output of the first residual connection layer, Z 1. Z 2. Z3 are added together to obtain .

[0097] The above process can be expressed as:

[0098] ;

[0099] ;

[0100] ;

[0101] Where, Sigmoid (.) represents the Sigmoid activation function; W g Represents the weight matrix of the linear layer; b g Represents the bias term of the linear layer.

[0102] For the feature fusion unit, it controls the information flux of each modal feature during the fusion process by calculating the gating weights, and performs preliminary node adjustment and fusion through the gating mechanism, which can suppress irrelevant modal noise information, highlight key information features, and improve the expression ability and discrimination performance of the fused features. It then introduces residual connections to superimpose the original feature embedding representations of each modality to avoid information loss and enhance the expression ability of the fused features.

[0103] 203. Node clustering is used to: combine w ij right Perform spectral clustering to obtain clustering results and construct clustering loss L clus .

[0104] It should be noted that the node clustering department is When performing spectral clustering, w ij , to optimize the clustering effect.

[0105] Specifically, node clustering is combined with w ij right Methods for performing spectral clustering include:

[0106] S201, construct affine matrix S .

[0107] in, ; S ij express S No. i Row, No. j The value of the column; Ω represents the scale parameter; express The i Node, j The Euclidean distance of the nodes.

[0108] In this way, through w ij To dynamically adjust the actual similarity between node pairs to provide the most accurate clustering basis.

[0109] S202, based on S Perform spectral clustering to obtain K The clusters are taken as the clustering results.

[0110] Specifically, S202 includes:

[0111] First S Normalize and calculate the Laplace matrix, then solve its eigenvector, and then use K-means clustering algorithm or other clustering algorithms to cluster the eigenvector to obtain K The clusters are taken as the clustering results.

[0112] After obtaining the clustering results, we can construct L clus , whose expression is:

[0113] ;

[0114] Where, express The i Node, j Manhattan distance of nodes; C ( i ) indicates that The i The set of nodes that are in the same cluster.

[0115] 204. The graph convolution decoding unit is used to respectively decode the Z 1. Z 2. Z 3 performs decoding processing to obtain 3 corresponding reconstructed feature matrices , and then reconstruct the 3 reconstruction channel adjacency matrices , and construct the reconstruction loss L sa .

[0116] Similar to the graph convolutional coding part, for G For the three modes, three graph convolution decoders perform decoding processing one by one.

[0117] like Figure 2As shown in the figure, the graph convolution decoding unit includes: 3 graph convolution decoders and 3 reconstruction layers.

[0118] The three deconvolution encoders are L layer, then the m The first graph convolutional decoder l The output of the layer is:

[0119] ;

[0120] Where, m ∈[1,2,3]; Represents the normalized A m ; Indicates the m The first graph convolutional decoder l -1 layer weight matrix; Indicates the m The first graph convolutional decoder l -1 layer output; σ (.) represents a nonlinear activation function.

[0121] It should be noted that ; .

[0122] No. m The reconstruction layer is used to transform Refactoring .therefore, The expression can be written as:

[0123] .

[0124] In addition, in getting 、 After that, you can build L sa , whose expression is:

[0125] ;

[0126] Where, λ Indicates balance L sa Hyperparameters of represents the Frobenius norm.

[0127] S3, based on L clus 、 L sa Construct the total loss function Loss, and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

[0128] It should be noted that Loss The expression is:

[0129] ;

[0130] Where, γ Display Control L clus Contributed hyperparameters.

[0131] At this point, the microservice splitting results of the power grid business monomer program have been obtained.

[0132] Example 2

[0133] This embodiment 2 provides a multi-dimensional microservice splitting system for power grid services, which uses the multi-dimensional microservice splitting method for power grid services provided in embodiment 1.

[0134] The multi-dimensional microservice splitting system for power grid business includes: multi-attribute graph construction module, neural network processing module, and neural network iteration module.

[0135] The multi-attribute graph construction module is used to extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X , based on the power grid business monomer program to build a business channel adjacency matrix A 1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G .

[0136] The neural network processing module is used to: G Input into a multi-channel graph neural network for processing.

[0137] The neural network iteration module is used to: L clus 、 L sa Construct the total loss function Loss , and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

[0138] Since this system uses the multi-dimensional microservice splitting method for power grid business in Example 1, it also has the same effect and will not be repeated here.

[0139] Example 3

[0140] This embodiment 3 discloses a computer device including a memory and a processor. The memory stores a computer program. When the processor executes the computer program, it implements the steps of the multi-dimensional microservice splitting method for power grid business disclosed in embodiment 1.

[0141] Computer devices can be either mobile or fixed terminals. Examples of the former include mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals). Examples of the latter include digital TVs and desktop computers.

[0142] This embodiment 3 also discloses a readable storage medium, which stores computer program instructions. When the computer program instructions are read and executed by a processor, the steps of the multi-dimensional microservice splitting method for power grid business disclosed in embodiment 1 are executed.

[0143] Among them, the readable storage medium may include, but is not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0144] This embodiment 3 further discloses a computer program product, including a computer program. When the computer program is executed by a processor, the computer program implements the steps of the multi-dimensional microservice decomposition method for power grid services disclosed in embodiment 1.

[0145] It should be noted that the computer program for executing the above-mentioned instructions can be written in one or more programming languages, or a combination thereof. These programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar programming languages. The above-mentioned computer program can be executed entirely on the user's computer, partially on the user's computer, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN). The above-described embodiments represent only a few implementations of the present invention, and while their descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art will be able to make numerous variations and modifications without departing from the spirit of the present invention, and these variations and modifications fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A multi-dimensional microservice splitting method for power grid business, characterized in that: It includes: S1, extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X ; Construct a business channel adjacency matrix based on the power grid business monomer program A 1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G ; G ={( A 1, X )、( A 2, X )、( A 3, X )}; S2, will G Input into the multi-channel graph neural network for processing; Among them, the multi-channel graph neural network includes: The graph convolutional encoding unit is used to combine trainable weights through three graph convolutional encoders. w ij Respectively ( A 1, X )、( A 2, X )、( A 3, X ) is encoded to obtain three feature embedding representations Z 1~ Z 3. Feature fusion unit, which is used to: combine the features of Z 1. Z 2. Z 3 Fusion into comprehensive feature representation The feature fusion unit includes: 3 gated neural networks, 3 product layers, and 2 residual connection layers; No. m A gated neural network is used to Z m First, a linear transformation is performed through the linear layer, and then the Sigmoid activation function is processed to obtain the m Gating weights g m ; m ∈[1,2,3]; No. m The product layer is used to g m 、 Z m Perform multiplication; The first residual connection layer is used to add the outputs of the three product layers; The second residual connection layer is used to connect the output of the first residual connection layer, Z 1. Z 2. Z 3 are added together to obtain ; Node clustering unit, which is used to: combine w ij right Perform spectral clustering to obtain clustering results and construct clustering loss L clus ; as well as The graph convolution decoding unit is used to respectively decode the Z 1. Z 2. Z 3 performs decoding processing to obtain 3 corresponding reconstructed feature matrices , and then reconstruct the 3 reconstruction channel adjacency matrices , and construct the reconstruction loss L sa ; S3, based on L clus 、 L sa Construct the total loss function Loss , and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

2. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: X The composition methods include: For each module in the power grid business monomer program, extract and construct its static information feature vector, dynamic information feature vector, and business information feature vector; The power grid business unit program N The static information feature vector, dynamic information feature vector, and business information feature vector of each module are stacked row by row to obtain X ; in, ; N Indicates the total number of modules in the power grid business monomer program; d Represents the feature dimension.

3. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: A The expression for 1 is: ; Where, A 1( i , j )express A 1st i Row, No. j The value of the column; freq ij Indicates the i Module, j The number of times a module appears in the same link at the same time; T biz Indicates the service association threshold; A The expression for 2 is: ; Where, A 2( i , j )express A 2nd i Row, No. j The value of the column; coupleFreq ij Indicates the i Module, j The number of functional relationships that exist between modules; T func represents the functional coupling threshold; A The expression for 3 is: ; Where, A 3( i , j )express A 3rd i Row, No. j The value of the column; sim ij Indicates the i Module, j The similarity of modules; T press Indicates the pressure correlation threshold.

4. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: In the graph convolutional coding unit, the three graph convolutional encoders are L layer; Among them, m The first graph convolutional encoder l The output of layer +1 is: ; Where, m ∈[1,2,3]; A m ( i , j )for A m No. i Row, No. j The value of the column; express A m The i The set of neighbor nodes of a node; Indicates the m The first graph convolutional encoder l The weight matrix of the layer; Indicates the m The first graph convolutional encoder l The output of the layer; σ (.) represents a nonlinear activation function; where ; .

5. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: Node clustering partial combination w ij right Methods for performing spectral clustering include: S201, construct affine matrix S ;in, ; S ij express S No. i Row, No. j The value of the column; Ω represents the scale parameter; express The i Node, j The Euclidean distance of the nodes; S202, based on S Perform spectral clustering to obtain K The clusters are taken as the clustering results.

6. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: The graph convolution decoding unit includes: 3 graph convolution decoders and 3 reconstruction layers; All three graph convolution decoders are L layer; Among them, m The first graph convolutional decoder l The output of the layer is: ; Where, m ∈[1,2,3]; Represents the normalized A m ; Indicates the m The first graph convolutional decoder l -1 layer weight matrix; Indicates the m The first graph convolutional decoder l -1 layer output; σ (.) represents a nonlinear activation function; where ; ; No. m The reconstruction layer is used to transform Refactoring ; .

7. The multi-dimensional microservice splitting method for power grid business according to claim 1 is characterized in that: L clus 、 L sa 、 Loss The expression is: ; Where, Display Control L clus Contributed hyperparameters; Indicates balance L sa Hyperparameters of represents the Frobenius norm; express The i Node, j Manhattan distance of nodes; C ( i ) indicates that The i The set of nodes that are in the same cluster.

8. A multi-dimensional microservice splitting system for power grid business, characterized by: It uses the multi-dimensional microservice splitting method for power grid business as described in any one of claims 1 to 7; The multi-dimensional microservice splitting system for power grid business includes: Multi-attribute graph construction module, which is used to extract static information, dynamic information, and business information from the power grid business monomer program to form the initial feature matrix X , based on the power grid business monomer program to build a business channel adjacency matrix A 1. Functional channel adjacency matrix A 2. Pressure channel adjacency matrix A 3, and with X Composing multi-attribute graphs G ; Neural network processing module, which is used to: G Input into the multi-channel graph neural network for processing; as well as Neural network iteration module, which is used to: L clus 、 L sa Construct the total loss function Loss , and backpropagation is performed to adjust the parameters of the multi-channel graph neural network until the network converges, and the clustering results obtained at this time are used as the microservice splitting results.

9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the multi-dimensional microservice splitting method for power grid services according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • A Single-Unit Program Decomposition Method and System for Multi-Channel Attention Graph Neural Network Clustering

    CN114647465B

  • Single program splitting method and system for multi-channel attention map neural network clustering

    CN114647465A

  • Micro-service splitting method based on depth map reconstruction

    CN116974523A