Power microservice configuration method and device
By evaluating the degree of coupling, cohesion and integration between power microservices and selecting the target configuration scheme, the accuracy problem in the power microservice configuration process is solved, and the computing speed and efficiency are improved.
Patent Information
- Application Number
- CN202411306287.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2044-09-19
AI Technical Summary
The existing power microservice configuration process is difficult to ensure accuracy, resulting in low computing speed.
By estimating the degree of coupling, cohesion, and integration among power microservices, a comprehensive analysis of multiple candidate configuration schemes is conducted, and the target configuration scheme is selected to improve configuration accuracy.
Improves the accuracy of power microservice configuration and ensures computing speed and efficiency.
Smart Images

Figure CN119311307B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of power technology, and in particular to a method, apparatus, computer equipment, computer-readable storage medium, and computer program product for configuring power microservices. Background Art
[0002] With the rapid development of the power Internet of Things (IoT), the power industry is gradually moving towards intelligence and efficiency. This has spawned the emergence of power terminal information systems, which serve as a bridge and link connecting all aspects of power production, transmission, distribution, and consumption. Applications for power terminal information systems are typically constructed using a monolithic architecture. In this monolithic architecture, all required business functions are packaged into a single application and deployed on computing nodes for execution. Development, testing, and other tasks are then performed on this monolithic power terminal information system. However, this monolithic architecture limits parallel computing, resulting in slow computation speeds.
[0003] In related technologies, to increase computing speed, multiple microservices are configured first, and then a microservices architecture is built based on these multiple microservices. This microservices architecture structures power business applications into a series of smaller, well-defined, distributed, and autonomous functional modules that support independent deployment and evolution. However, the current microservices configuration process is relatively simple, making it difficult to ensure accurate microservice configuration. Summary of the Invention
[0004] Based on this, it is necessary to provide a power microservice configuration method, device, computer equipment, computer-readable storage medium and computer program product that can improve the accuracy of power microservice configuration in response to the above technical problems.
[0005] In a first aspect, the present application provides a method for configuring power microservices, including:
[0006] Determining, based on a plurality of power functional components corresponding to the power business set and a target number of power microservices to be configured, a plurality of different candidate configuration schemes, each candidate configuration scheme including a target number of candidate power microservices, each candidate power microservice including at least one power functional component;
[0007] For each candidate configuration scheme, based on the corresponding first information flow set, the coupling degree between the power microservices is estimated by using at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value;
[0008] According to the corresponding second information flow, the cohesion level within the power microservice is estimated by using at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set, and a corresponding cohesion value is determined;
[0009] According to the component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, an estimation is made of the degree of integration of the power functional components within the power microservice, and a corresponding integration value is determined;
[0010] A target configuration solution is selected from the plurality of candidate configuration solutions based on the coupling value, cohesion value, and fusion value of each candidate configuration solution.
[0011] In a second aspect, the present application also provides a power microservice configuration device, comprising:
[0012] a determination module configured to determine, based on a plurality of power functional components corresponding to the power business set and a target number of power microservices to be configured, a plurality of different candidate configuration schemes, each candidate configuration scheme including a target number of candidate power microservices, each candidate power microservice including at least one power functional component;
[0013] a first estimation module configured to estimate, for each candidate configuration scheme, a coupling degree between power microservices based on the corresponding first information flow set and using at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value;
[0014] a second estimation module, configured to estimate the degree of cohesion within the power microservice based on the corresponding second information flow, using at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set, and determine a corresponding cohesion value;
[0015] a third estimation module, configured to estimate the degree of integration of the power functional components within the power microservice based on component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, and determine a corresponding integration value;
[0016] The selection module is used to select a target configuration scheme from multiple candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme.
[0017] In a third aspect, the present application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above-mentioned power microservice configuration method when executing the computer program.
[0018] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned power microservice configuration method when executed by a processor.
[0019] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned power microservice configuration method when executed by a processor.
[0020] The above-described power microservice configuration method, apparatus, computer device, computer-readable storage medium, and computer program product can pre-randomly generate multiple different candidate configuration schemes by using multiple power functional components corresponding to the power business set and the target number of power microservices to be configured. Each candidate configuration scheme includes the target number of candidate power microservices, each of which includes at least one power functional component. For each candidate configuration scheme, based on the corresponding first information flow set, the degree of coupling between power microservices is estimated using the at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value. In other words, the degree of association between power microservices resulting from the candidate configuration scheme is evaluated using the coupling index. Based on the corresponding second information flow, the degree of cohesion within the power microservice is estimated using the at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set to determine a corresponding cohesion value. That is, the degree of association between the power functional components within the power microservice resulting from the candidate configuration scheme is evaluated based on the cohesion index. Based on the component information of at least one power functional component contained in each candidate power microservice in the candidate configuration scheme, the degree of integration of the power functional components within the power microservice is estimated to determine the corresponding integration value. That is, the degree of focus of the power microservice in performing power business processing resulting from the candidate configuration scheme is evaluated based on the integration index. Based on the coupling value, cohesion value, and integration value of each candidate configuration scheme, a target configuration scheme is selected from multiple candidate configuration schemes. That is, a multi-dimensional comprehensive analysis is performed based on the coupling index, cohesion index, and integration index to accurately select the target configuration scheme, thereby improving the accuracy of the power microservice configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.
[0022] Figure 1 This is an application environment diagram of a power microservice configuration method in one embodiment;
[0023] Figure 2 Schematic diagram of a flow chart of a method for configuring a power microservice in one embodiment;
[0024] Figure 3 A schematic diagram of power business splitting in one embodiment;
[0025] Figure 4 Schematic diagram of the coupling between power microservices in one embodiment;
[0026] Figure 5 Schematic diagram of a coupling degree estimation step in one embodiment;
[0027] Figure 6 Schematic diagram of the cohesion within the power microservice in one embodiment;
[0028] Figure 7 A schematic diagram of a step of determining a cohesion value in one embodiment;
[0029] Figure 8 A schematic diagram of a fusion value determination step in one embodiment;
[0030] Figure 9 This is a structural block diagram of a power microservice configuration device in one embodiment;
[0031] Figure 10 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0033] The power microservice configuration method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. In some embodiments, the power microservice configuration method can be executed by the terminal 102 or the server 104 alone, or it can be executed by the terminal 102 and the server 104 in collaboration. The following is an example of collaborative execution of the power microservice configuration method:
[0034] In some embodiments, the terminal 102 sends a microservice configuration request to the server 104, the server parses the microservice configuration request, obtains a power business set, a target number of power microservices to be configured, and decomposes each power business in the power business set to determine the corresponding at least one power functional component.
[0035] The server 104 determines multiple different candidate configuration schemes based on multiple power functional components corresponding to the power business set and the target number of power microservices to be configured. Each candidate configuration scheme includes a target number of candidate power microservices, and each candidate power microservice includes at least one power functional component. For each candidate configuration scheme, the server 104 estimates the degree of coupling between the power microservices based on the corresponding first information flow set and the at least one power functional component included in each candidate power microservice in the candidate configuration scheme, and obtains a corresponding coupling value. The server 104 estimates the degree of cohesion within the power microservice based on the corresponding second information flow and the at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set, and determines a corresponding cohesion value. The server 104 estimates the degree of fusion of the power functional components within the power microservice based on the component information of the at least one power functional component included in each candidate power microservice in the candidate configuration scheme, and determines a corresponding fusion value. The server 104 selects a target configuration scheme from the multiple candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme. In this way, server 104 can configure microservices according to the microservices involved in the target configuration plan. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, etc. Server 104 can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services.
[0036] In an exemplary embodiment, Figure 2 As shown, a power microservice configuration method is provided, which is applied to computer equipment (which can be Figure 1 Terminal 102, or Figure 1 The server 104) is used as an example to illustrate the method, which includes the following steps S202 to S210.
[0037] Step S202: Based on the plurality of power functional components corresponding to the power business set and the target number of power microservices to be configured, a plurality of different candidate configuration schemes are determined, each candidate configuration scheme including the target number of candidate power microservices, and each candidate power microservice including at least one power functional component.
[0038] The power service set is the set required for microservice configuration and includes at least one power service. Power services refer to the process of providing electrical energy to end users through power generation, transmission, distribution, and sales. Power microservices refer to power-related microservices.
[0039] A candidate configuration scheme can be understood as a configuration scheme for the power microservice. Each candidate configuration scheme specifies how each candidate power microservice should be configured, such as the power functional components that should be included in each candidate power microservice.
[0040] A power function component is a component that implements a corresponding power function. For example, a power function component can be considered code that implements the corresponding power function. For example, a power function component may be a sampling component, or a Fourier analysis component. Each power function component implements different specific functions.
[0041] Optionally, after receiving the power microservice configuration request, the computer device parses the request to obtain a target number of power microservices to be configured and the power service set involved. The computer device then determines multiple power functional components corresponding to the power service set and randomly generates multiple different candidate configuration solutions based on the multiple power functional components and the target number.
[0042] For example, when the power functional components C1, C2, and C3 are determined and the target number is 2, three candidate configuration schemes are freely combined: Candidate configuration scheme 1: candidate power microservice 11 (including C1), candidate power microservice 12 (including C2 and C3); Candidate configuration scheme 2: candidate power microservice 21 (including C1 and C2), candidate power microservice 22 (including C3); Candidate configuration scheme 3: candidate power microservice 31 (including C2), candidate power microservice 22 (including C1 and C3).
[0043] Exemplarily, for each power service in the power service set, the computer device splits the power service into at least one power function component corresponding to the power service according to the organizational process of the power service and the functional characteristics of the service.
[0044] For example, Figure 3 FIG2 is a schematic diagram of the splitting of power business in an embodiment. Figure 3 , using the concepts of objects and elements, objects refer to the target of analysis and design. Objects are the source of elements, and elements are decomposed from objects. Among them, objects can appear in various forms. Splitting example:
[0045] Considering the power business as an object, its elements can be classified into protection, demand response, power quality, energy management, and so on. Further decomposition based on the power quality category reveals the next layer of elements, revealing the components of the power quality business: reactive power compensation, node parameters, harmonics, power factor, and so on. Harmonic elements, in particular, include sampling, Fourier analysis, command upshifting, and command downshifting. This decomposition yields multiple power functional components, including those employing sampling, Fourier analysis, command upshifting, and command downshifting.
[0046] Step S204 : For each candidate configuration scheme, based on the corresponding first information flow set, the coupling degree between the power microservices is estimated by using at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value.
[0047] The first information flow set is a set of information flows used to estimate the degree of coupling. The first information flow set includes multiple first information flows, and information flows are also considered data flows. The first information flow set is pre-set based on the candidate configuration scheme. It can be obtained based on experiments or set based on experience, and there is no specific limitation. The first information flow set includes the first sub-information flow set corresponding to each candidate microservice in the candidate configuration scheme. The first information flow in the first sub-information flow set is used to count the coupling value corresponding to the candidate microservice.
[0048] The degree of coupling between power microservices refers to the degree of association or interdependence between power microservices and other power microservices. It's important to note that the power business process is implemented by calling power microservices based on the processors that control the process. Therefore, the input of one power microservice is derived from the output of another power microservice. Power microservices are coupled to each other, and calls to power microservices are implemented through information flows sent to them.
[0049] The degree of coupling depends on at least one of the size and relative complexity of the first information flow, wherein the relative complexity refers to the processing complexity of the first information flow.
[0050] The following describes the degree of coupling (coupling characteristics) between power microservices. Figure 4 The figure below is a schematic diagram illustrating the coupling between power microservices in one embodiment. Power microservices can be viewed as a collection of interacting power functional components. Consider a new energy distribution network scenario consisting of four power microservices: Power Microservice 1, Power Microservice 2, Power Microservice 3, and Power Microservice 4.
[0051] The power function components in Power Microservice 1 have the same component type, such as component type 1. The power function components in Power Microservice 3 have the same component type, such as component type 3. The power function components in Power Microservice 4 have the same component type, such as component type 4. Component types 1, 3, and 4 are all different. Power Microservice 3 has power function components of type 1, 2, 3, and 4.
[0052] The connections between Power Microservices 1, 2, and 4 demonstrate the close links between the power functional components within these different power microservices. Power Microservice 2 forms a highly complex dependency with Power Microservices 1 and 4, creating a tight coupling between these services. Power Microservice 3 isn't directly linked to the elements within Power Microservices 2 and 4, but rather is connected via a unified interface.
[0053] Although there is a connection between Power Microservice 4 and other Power Microservices (Power Microservices 2 and 3), it is not a complex dependency. This relationship formed by a single or small number of connections is a loose coupling state.
[0054] It's important to note that the coupling value between power microservices reflects the degree of coupling between them. The lower the coupling value, the lower the degree of coupling, and the lower the coupling, the better. The lower the coupling, the lower the transmission cost between power microservices. Therefore, loose coupling is a fundamental design principle for data transmission between power microservices.
[0055] Optionally, for each candidate power microservice in each candidate configuration scheme, the computer device obtains at least one first information flow corresponding to the candidate power microservice from the set of first information flows, and based on the at least one information flow, determines a coupling value between the candidate power microservice and each of the other candidate power microservices in the candidate configuration scheme. The computer device then integrates the coupling values between the candidate power microservice and each of the other candidate power microservices in the candidate configuration scheme to obtain a coupling value corresponding to the candidate power microservice.
[0056] The computer device integrates the coupling values corresponding to the candidate power microservices to obtain the coupling value corresponding to the candidate configuration scheme. It should be noted that the lower the coupling value corresponding to each candidate power microservice in the candidate configuration scheme, the lower the coupling value corresponding to the candidate configuration scheme, indicating that the candidate configuration scheme has good coupling.
[0057] In some embodiments, as Figure 5 The figure shows a schematic diagram of the coupling degree estimation step in one embodiment. Based on the corresponding first information flow set, the coupling degree between the power microservices is estimated by using at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain the corresponding coupling value, including:
[0058] Step S502 : determining a plurality of different candidate power microservice combinations based on a plurality of candidate power microservices in the candidate configuration scheme, where each candidate power microservice combination includes a first candidate power microservice and a second candidate power microservice.
[0059] The first candidate power microservice serves as a sender of the first information flow, and the second candidate power microservice serves as a receiver of the first information flow.
[0060] Exemplarily, based on a plurality of candidate power microservices in the candidate configuration scheme, a plurality of different candidate power microservice combinations are obtained by random combination.
[0061] Step S504 : For each candidate power microservice combination, a corresponding first sub-information flow set is obtained from the first information flow set, where the first sub-information flow set includes a plurality of first information flows.
[0062] Step S506 : Determine a first set of power functional components corresponding to the candidate power microservice combination from at least one power functional component included in each candidate power microservice in the candidate configuration scheme.
[0063] Step S508 : In the process of transmitting the first sub-information flow set from the first candidate power microservice to the second candidate power microservice, counting a first complexity level when the first power functional component set processes the first sub-information flow set.
[0064] The first complexity level is used to reflect the relative complexity of the processing process when the first power functional component set processes the first sub-information flow set. Exemplarily, the first complexity level can be a proportional value, a decimal value, or an integer value, which is not specifically limited.
[0065] Exemplarily, for each first information flow in the first sub-information flow set, in the process of transmitting the first information flow from the first candidate power microservice to the second candidate power microservice, for each first power function component in the first power function component set, the computer device determines a first sub-complexity level corresponding to the first power function component for the first information flow (the relative complexity of the first power function component when processing the first information flow).
[0066] The computer device integrates the first sub-complexity corresponding to each first power functional component to obtain the first sub-complexity corresponding to the first information flow, and superimposes the first sub-complexity corresponding to each first information flow to obtain the first complexity when the first power functional component set processes the first sub-information flow set, that is, the first complexity of the candidate power microservice combination.
[0067] Exemplarily, the computer device obtains a first mapping relationship, which reflects the correspondence between the complexity level of an information flow transmitted from a first candidate power microservice to a second candidate power microservice and the information flow, the power functional component that processes the information flow, the first candidate power microservice, the second candidate power microservice, and the power functional component. Based on the first mapping relationship, the computer device queries for a first complexity level corresponding to the first power functional component for the first information flow.
[0068] Step S510 : determining a coupling value of a candidate configuration solution based on a first complexity level of each candidate power microservice combination.
[0069] Exemplarily, the first complexity levels of the candidate power microservice combinations are superimposed, and the superimposed result is used as the coupling value of the candidate configuration solution.
[0070] In some embodiments, the coupling value of the candidate configuration scheme can be determined using the following formula (1): :
[0071] (1)
[0072] Among them, s is the total number of candidate power microservices, that is, the target number. It refers to the total number of first information flows when sending candidate power microservice k to candidate power microservice l, that is, the number of first sub-information flows in the first sub-information flow set corresponding to the candidate power microservice combination kl (the first candidate power microservice is candidate power microservice k, and the second candidate power microservice is candidate power microservice l); refers to the total number of power function components in the first information flow t sent from the candidate power microservice k to the candidate power microservice l (the candidate power microservice combination kl corresponds to the number of power function components in the first power function component set), It refers to the relative complexity of the power function component u processing the information flow t when the candidate power microservice k is sent to the candidate power microservice l.
[0073] In this embodiment, multiple candidate power microservices in the candidate configuration scheme are randomly combined to form a candidate power microservice combination. The coupling between the microservices corresponding to the candidate power microservice combination is then calculated using the first sub-information flow. This allows for an accurate estimation of the overall coupling of the candidate configuration scheme, providing a coupling-level reference for subsequent microservice configuration, ensuring the effectiveness and accuracy of the microservice configuration.
[0074] Step S206 , based on the corresponding second information flow, the cohesion level within the power microservice is estimated by using at least one power functional component and a power business set included in each candidate power microservice in the candidate configuration scheme to determine a corresponding cohesion value.
[0075] The second information flow is used to estimate the degree of cohesion. The second information flow can be any first information flow in the set of first information flows, or another information flow not in the set of first information flows, without specific limitation. The second information flow is pre-set based on the candidate configuration scheme and can be obtained through experimentation or set based on experience, without specific limitation.
[0076] The degree of cohesion within the power microservice refers to the degree of correlation between the power functional components that run within the power microservice to implement business processes. Figure 6 , which is a schematic diagram of the cohesion within the power microservice in one embodiment. Figure 6 The ideal degree of cohesion is illustrated in the figure, that is, the component types of the power functional components in each power microservice are the same, that is, each power microservice can independently complete the work of a power business field, and the relationship between the internal elements of each power microservice is close. All the elements in each power microservice exist to achieve the same goal, which is a high-cohesion microservice. Therefore, the degree of cohesion depends on two factors: the number of power business types in the power microservice and the interaction intensity of the power functional components between different types of power businesses. The maximum cohesion can be regarded as the expectation for a power business of the same type. Normalize the cohesion of microservices with only one power business type to 1. The degree of cohesion drops to 1 / ,in, represents the number of power business types executed by the power microservice k. Secondly, the information flow across power business types is used to reflect the functional correlation between them.
[0077] In some embodiments, as Figure 7 The figure shows a schematic diagram of the cohesion value determination step in one embodiment. Based on the corresponding second information flow, the cohesion level within the power microservice is estimated using at least one power function component and a power business set included in each candidate power microservice in the candidate configuration scheme, and the corresponding cohesion value is determined, including:
[0078] Step S702 : determining a plurality of different power service combinations according to a plurality of power services in the power service set, each power service combination including a first power service and a second power service.
[0079] The first power service is a sender of the second information flow, and the second power service is a receiver of the second information flow.
[0080] Exemplarily, based on multiple power services in the power service set, multiple different power service combinations are obtained by random combination.
[0081] Step S704: For each candidate power microservice and each power business combination in the candidate configuration scheme, if each power business in the power business combination is divided into the candidate power microservice, then determine a second power function component set corresponding to the power business combination from at least one power function component contained in each candidate power microservice in the candidate configuration scheme.
[0082] The division of the power business into a candidate power microservice means that at least one power functional component corresponding to the power business belongs to the candidate power microservice.
[0083] Each candidate power microservice may contain one power function component corresponding to the power business, at least two power function components corresponding to the power business components, at least three power function components corresponding to the power business, and so on. For example, if candidate power microservice k includes power function components 1 to 10, where power function components 1 to 3 belong to power business 1, power function components 4 to 6 belong to power business 2, and power function components 7 to 10 belong to power business 3, and if the power business combination includes power business 1 and power business 2, then the corresponding second power function component set is: power function components 1 to 6.
[0084] If each power business in the power business combination is classified into a candidate power microservice, it means that the candidate power microservice has at least two power functional components corresponding to the power business.
[0085] Exemplarily, if at least one electric power service in the electric power service combination is not included in the candidate electric power micro-service, the second complexity of the electric power service combination is determined to be a value of 0.
[0086] The fact that the power business is not included in the candidate power microservice means that each power functional component corresponding to the power business is not included in the candidate power microservice.
[0087] Exemplarily, for each candidate power microservice in the candidate configuration scheme, a second power function component set belonging to the first power business in the power business combination, or a second power function component set belonging to the second power business, is obtained from at least one power function component contained in the candidate power microservice.
[0088] Step S706 : in the process of transmitting the second information flow from the first power service to the second power service, determining a second complexity level when the second power functional component set processes the second information flow.
[0089] Exemplarily, in the process of transmitting the second information flow from the first power service to the second power service, for each second power functional component in the second set of power functional components, the computer device determines a second sub-complexity level corresponding to the second power functional component.
[0090] The computer device integrates the second sub-complexity levels corresponding to each second power functional component to obtain the second complexity level of the power service combination.
[0091] Exemplarily, the computer device obtains a second mapping relationship, which reflects the correspondence between the complexity and the power functional components that process the information flow, the first power business, and the second power business when the second information flow is transmitted from the first power business to the second power business within the power microservice.
[0092] Step S708 : determining the cohesion value of the candidate configuration solution based on the second complexity level of each power service combination.
[0093] Optionally, the computer device superimposes the second complexity corresponding to each power service combination to obtain a target complexity, and acquires a reference complexity corresponding to the power service set and the candidate configuration scheme.
[0094] Based on the target complexity and the reference complexity, the cohesion function is called to obtain the cohesion value of the candidate configuration solution.
[0095] For example, for each candidate configuration solution, the corresponding target complexity (Total complexity of the second information flow within power microservice k) and reference complexity The calculation formula for (the expected value of the total complexity of the second information flow within the power microservice k) refers to formula (2):
[0096] (2)
[0097] Where M is the number of power services in the power service set, 、 Indicates whether power business i, j is classified as power microservice k. If so, it is 1, otherwise, it is 0; represents the total number of power function components flowing from power business i to j, represents the relative complexity of the power function component u in processing the second information flow when the second information flow is transported from power service i to j (the second sub-complexity level corresponding to the second power function component), It represents the expected value of the relative complexity of the power function component u in processing the second information flow when the second information flow is transported from the power service i to j.
[0098] The expression of the cohesion function refers to the following formula (3). Based on the target complexity and reference complexity corresponding to the candidate configuration scheme, the following formula (3) is called to obtain the cohesion value of the candidate configuration scheme :
[0099] (3)
[0100] in, is a coefficient used to control the impact of information flow on the cohesion of power microservices. represents the number of power business types executed by the candidate power microservice k, that is, the number of power business types in the candidate power microservice k.
[0101] In this embodiment, multiple power services in the power service set are randomly combined to form a power service combination. The second information flow, the power service combination, and the power function component are then used to accurately estimate the overall cohesion of the candidate configuration solution. This provides a cohesive reference for subsequent microservice configuration, ensuring the effectiveness and accuracy of the microservice configuration.
[0102] Step S208 : Based on the component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, the degree of integration of the power functional components within the power microservice is estimated, and a corresponding integration value is determined.
[0103] The component information of the power function component includes at least the component type of the power function component and the power service processed (the power service to which it belongs).
[0104] The degree of integration of power functional components within power microservices refers to the degree to which power microservices focus on processing specific power business.
[0105] From an information-interaction-centric perspective, the power business process is also a process that includes the configuration of power business functions within its lifecycle. Therefore, a high degree of functional convergence means that power business functional components are divided into microservices for execution, with each power microservice identified as executing power functional components that process the same component type. For example, the two power functional components "Genetic Algorithm Analysis" and "Neural Network Algorithm Analysis" should be divided into the same power microservice because they belong to the "algorithm analysis" part of the operational power business process. For example, a high degree of power functional component convergence should meet the following requirements: 1) A power microservice focuses on processing the component types of as few power functional components as possible; 2) It is preferred to divide power businesses that process the same component type into the same power microservice.
[0106] In one embodiment, Figure 8The figure shows a schematic diagram of the fusion value determination step in one embodiment. Based on the component information of at least one power function component included in each candidate power microservice in the candidate configuration scheme, the fusion degree of the power function components within the power microservice is estimated and the corresponding fusion value is determined, including:
[0107] Step S802: For each candidate power microservice, based on the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, a first set of component types involved when the candidate power microservice processes each power business in sequence is counted, and a first number of component types in the first set is determined.
[0108] Exemplarily, the first set may be .in, Refers to the set of power function components of the same type in power microservice k that processes power business i. For example, power microservice k processes power business i and involves power function components of types 1 to 3. Includes component types 1 to 3. U stands for union processing.
[0109] That is, for each power microservice and each power business, a first subset of component types involved in the power microservice processing the power business is counted, and each first subset involved in the first microservice is unioned to obtain a first set.
[0110] Step S804: For each power functional component, based on the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, a second set of candidate power microservices to which the power functional components of each power business belong is statistically processed, and a second number of candidate power microservices in the second set is determined.
[0111] For example, the second set may be ,in, Refers to the candidate power microservice set to which the power function component l that processes power business j belongs. For example, the power function component l is used to process power business j, and the power function component l exists in candidate power microservice 1 and candidate power microservice 2, then They are candidate power microservice 1 and candidate power microservice 2.
[0112] In this embodiment, i and j both refer to any power service in the power service set and may be the same or different.
[0113] For example, the first quantity is , the second quantity is Wherein, N is the number of elements in the first set or the second set used for calculation. b refers to the number of power functional components.
[0114] Step S806 , performing a mean operation on the first quantities corresponding to each candidate power microservice to obtain a first mean, and performing a mean operation on the second quantities corresponding to each power functional component to obtain a second mean.
[0115] For example, the first mean is , the second mean is .
[0116] Step S808: Fusing the first mean and the second mean to obtain a corresponding fused value.
[0117] For example, the computer device directly superimposes the first mean and the second mean to obtain a corresponding fusion value. The fusion value is calculated by referring to formula (4): : (4)
[0118] Alternatively, the first mean and the second mean are weighted according to their respective weights to obtain a corresponding fusion value.
[0119] In this embodiment, based on the component information of the power function component, a first set of component types involved in the candidate power microservice's sequential processing of each power service can be analyzed, as well as a second set of candidate power microservices to which the power function component processing each power service belongs. This allows the first set to reflect the average number of power services processed by a power microservice, while the second set to reflect the number of candidate power microservices to which a power service is distributed. This accurately reflects the overall integration of the candidate configuration scheme, providing a reference for integration during subsequent microservice configuration, ensuring the effectiveness and accuracy of the microservice configuration.
[0120] Step S210 : selecting a target configuration solution from a plurality of candidate configuration solutions based on the coupling value, cohesion value, and fusion value of each candidate configuration solution.
[0121] For example, for each candidate configuration solution, the computer device scores the solution based on its corresponding coupling value, cohesion value, and fusion value to obtain a configuration score for the power microservice. Based on the configuration scores of each candidate solution, a target solution is selected. The power microservice is configured using this target solution.
[0122] For each candidate configuration, the computer device determines the number a and target number s of component types for the corresponding power function component, calculates the corresponding candidate power microservice granularity s / a, and determines whether the candidate power microservice granularity satisfies granularity constraints. The computer device also determines whether the coupling value satisfies the coupling constraint, whether the cohesion value satisfies the cohesion constraint, and whether the fusion value satisfies the fusion constraint.
[0123] From the candidate configuration schemes, select the candidate configuration schemes that simultaneously meet the granularity constraint conditions, coupling constraint conditions, cohesion constraint conditions and fusion constraint conditions.
[0124] Each candidate configuration solution is scored based on its coupling, cohesion, and fusion values to obtain a configuration score for the power microservice. Based on the scores of each candidate configuration solution, a target configuration solution is selected. This target configuration solution is used to configure the power microservice.
[0125] Among them, the granularity constraints, coupling constraints, cohesion constraints and fusion constraints are as follows: Granularity constraints: ; Coupling constraints: ; Cohesion constraints: ; Fusion constraints: .
[0126] in, and are the minimum and maximum values of the particle size, respectively. is the coupling threshold. is the cohesion threshold. is the fusion threshold.
[0127] In some embodiments, a target configuration scheme is selected from multiple candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme, including: for each candidate configuration scheme, based on the corresponding coupling value, cohesion value, and fusion value, obtaining an evaluation score corresponding to the candidate configuration scheme; and from multiple candidate configuration schemes, selecting the candidate configuration scheme corresponding to the highest evaluation score as the target configuration scheme.
[0128] Exemplarily, after screening out candidate configuration schemes that simultaneously satisfy granularity constraints, coupling constraints, cohesion constraints, and fusion constraints from multiple candidate configuration schemes, for each screened candidate configuration scheme, an evaluation score corresponding to the candidate configuration scheme is obtained based on the corresponding coupling value, cohesion value, and fusion value; from the multiple candidate configuration schemes, the candidate configuration scheme corresponding to the highest evaluation score is selected as the target configuration scheme.
[0129] In this embodiment, a multi-dimensional comprehensive analysis is performed based on coupling indicators, cohesion indicators, and fusion indicators to accurately select the target configuration scheme, thereby improving the accuracy of power microservice configuration.
[0130] In some embodiments, based on the corresponding coupling values, cohesion values, and fusion values, an evaluation score corresponding to the candidate configuration scheme is obtained, including: obtaining the weights corresponding to the coupling values, cohesion values, and fusion values respectively; for each candidate configuration scheme, weighting the coupling values, cohesion values, and fusion values corresponding to the candidate configuration schemes according to the weights corresponding to the coupling values, cohesion values, and fusion values respectively, to obtain the evaluation score corresponding to the candidate configuration scheme.
[0131] For example, let the weights corresponding to the coupling value, cohesion value, and fusion value be 、 、 For each candidate configuration scheme, the coupling value, cohesion value, and fusion value are normalized respectively to obtain the normalized coupling value, cohesion value, and fusion value, namely 、 、 .in, 、 、 are the maximum values of coupling value, cohesion value and fusion value respectively.
[0132] The evaluation score is calculated using the following formula (5): :
[0133] (5)
[0134] Among them, the target configuration scheme has the highest evaluation score, namely .
[0135] In this embodiment, by weighted summation, the corresponding target configuration scheme can be flexibly selected according to actual needs, thereby improving the flexibility of microservice configuration.
[0136] In the above-mentioned power microservice configuration method, multiple power functional components corresponding to the power business set and the target number of power microservices to be configured can be pre-randomly combined to generate multiple different candidate configuration schemes. Each candidate configuration scheme includes the target number of candidate power microservices, and each candidate power microservice includes at least one power functional component. For each candidate configuration scheme, based on the corresponding first information flow set, the degree of coupling between power microservices is estimated using the at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value. In other words, the degree of association between power microservices resulting from the candidate configuration scheme is evaluated based on the coupling index. Based on the corresponding second information flow, the degree of cohesion within the power microservice is estimated using the at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set to determine the corresponding cohesion value. That is, the degree of association between the power functional components within the power microservice resulting from the candidate configuration scheme is evaluated based on the cohesion index. Based on the component information of at least one power functional component contained in each candidate power microservice in the candidate configuration scheme, the degree of integration of the power functional components within the power microservice is estimated to determine the corresponding integration value. That is, the degree of focus of the power microservice in performing power business processing resulting from the candidate configuration scheme is evaluated based on the integration index. Based on the coupling value, cohesion value, and integration value of each candidate configuration scheme, a target configuration scheme is selected from multiple candidate configuration schemes. That is, a multi-dimensional comprehensive analysis is performed based on the coupling index, cohesion index, and integration index to accurately select the target configuration scheme, thereby improving the accuracy of the power microservice configuration.
[0137] In a specific embodiment, the power microservice configuration process is as follows:
[0138] The computer device determines multiple different candidate configuration schemes based on multiple power functional components corresponding to the power business set and the target number of power microservices to be configured, each candidate configuration scheme includes a target number of candidate power microservices, and each candidate power microservice includes at least one power functional component.
[0139] For each candidate configuration scheme, the computer device determines multiple different candidate power microservice combinations based on multiple candidate power microservices in the candidate configuration scheme, each candidate power microservice combination includes a first candidate power microservice and a second candidate power microservice; for each candidate power microservice combination, a corresponding first sub-information flow set is obtained from the first information flow set, and the first sub-information flow set includes multiple first information flows; from at least one power function component included in each candidate power microservice in the candidate configuration scheme, a first power function component set corresponding to the candidate power microservice combination is determined; in the process of transmitting the first sub-information flow set from the first candidate power microservice to the second candidate power microservice, the first complexity of the first power function component set when processing the first sub-information flow set is counted; based on the first complexity of each candidate power microservice combination, the coupling value of the candidate configuration scheme is determined.
[0140] Based on multiple power services in the power service set, multiple different power service combinations are determined, each power service combination includes a first power service and a second power service; for each candidate power microservice and each power service combination in the candidate configuration scheme, if each power service in the power service combination is divided into the candidate power microservice, then from at least one power function component contained in each candidate power microservice in the candidate configuration scheme, a second power function component set corresponding to the power service combination is determined; in the process of transmitting the second information flow from the first power service to the second power service, a second complexity level of the second power function component set when processing the second information flow is determined; based on the second complexity level of each power service combination, the cohesion value of the candidate configuration scheme is determined.
[0141] For each candidate power microservice, based on the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, a first set of component types involved when the candidate power microservice processes each power business in sequence is counted, and a first number of component types in the first set is determined; for each power functional component, based on the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, a second set of candidate power microservices to which the power functional components that process each power business belong is counted, and a second number of candidate power microservices in the second set is determined; a mean operation is performed on the first quantities corresponding to each candidate power microservice to obtain a first mean, and a mean operation is performed on the second quantities corresponding to each power functional component to obtain a second mean; the first mean and the second mean are fused to obtain a corresponding fusion value.
[0142] After screening out candidate configuration schemes that simultaneously meet the granularity constraints, coupling constraints, cohesion constraints, and fusion constraints from multiple candidate configuration schemes, for each screened candidate configuration scheme, the coupling value, cohesion value, and fusion value corresponding to each candidate configuration scheme are weighted according to the weights corresponding to the coupling value, cohesion value, and fusion value respectively, to obtain the evaluation score corresponding to the candidate configuration scheme.
[0143] From the selected candidate configuration schemes, the candidate configuration scheme corresponding to the highest evaluation score is selected as the target configuration scheme.
[0144] In this embodiment, by specifying multiple power function components corresponding to the power business set and the target number of power microservices to be configured, a plurality of different candidate configuration schemes can be pre-randomly combined. Each candidate configuration scheme includes a target number of candidate power microservices, and each candidate power microservice includes at least one power function component. For each candidate configuration scheme, based on the corresponding first information flow set, the degree of coupling between the power microservices is estimated using the at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value. In other words, the degree of association between the power microservices resulting from the candidate configuration scheme is evaluated based on the coupling index. Based on the corresponding second information flow, the degree of cohesion within the power microservice is estimated using the at least one power function component included in each candidate power microservice in the candidate configuration scheme and the power business set to determine the corresponding cohesion value. That is, the degree of association between the power functional components within the power microservice resulting from the candidate configuration scheme is evaluated based on the cohesion index. Based on the component information of at least one power functional component contained in each candidate power microservice in the candidate configuration scheme, the degree of integration of the power functional components within the power microservice is estimated to determine the corresponding integration value. That is, the degree of focus of the power microservice in performing power business processing resulting from the candidate configuration scheme is evaluated based on the integration index. Based on the coupling value, cohesion value, and integration value of each candidate configuration scheme, a target configuration scheme is selected from multiple candidate configuration schemes. That is, a multi-dimensional comprehensive analysis is performed based on the coupling index, cohesion index, and integration index to accurately select the target configuration scheme, thereby improving the accuracy of the power microservice configuration.
[0145] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0146] Based on the same inventive concept, the present application also provides an electric microservice configuration device for implementing the above-mentioned electric microservice configuration method. The solution provided by this device is similar to the solution described in the above-mentioned method. Therefore, the specific limitations of one or more embodiments of the electric microservice configuration device provided below can be found in the above-mentioned limitations of the electric microservice configuration method and will not be repeated here.
[0147] In an exemplary embodiment, Figure 9 As shown, a power microservice configuration device 900 is provided, including: a determination module 902, a first estimation module 904, a second estimation module 906, a third estimation module 908 and a selection module 910, wherein:
[0148] A determination module 902 is configured to determine a plurality of different candidate configuration schemes based on a plurality of power functional components corresponding to the power business set and a target number of power microservices to be configured, each candidate configuration scheme including a target number of candidate power microservices, each candidate power microservice including at least one power functional component;
[0149] A first estimation module 904 is configured to estimate the degree of coupling between power microservices for each candidate configuration scheme based on the corresponding first information flow set and by using at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value;
[0150] A second estimation module 906 is configured to estimate the degree of cohesion within the power microservice based on the corresponding second information flow and the at least one power functional component and the power business set included in each candidate power microservice in the candidate configuration scheme, and determine a corresponding cohesion value;
[0151] A third estimation module 908 is configured to estimate the degree of integration of the power functional components within the power microservice based on the component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, and determine a corresponding integration value;
[0152] The selection module 910 is configured to select a target configuration solution from a plurality of candidate configuration solutions based on the coupling value, cohesion value, and fusion value of each candidate configuration solution.
[0153] In some embodiments, the first estimation module 904 is used to determine multiple different candidate power microservice combinations based on multiple candidate power microservices in the candidate configuration scheme, each candidate power microservice combination includes a first candidate power microservice and a second candidate power microservice; for each candidate power microservice combination, obtain the corresponding first sub-information flow set from the first information flow set, and the first sub-information flow set includes multiple first information flows; determine the first power function component set corresponding to the candidate power microservice combination from at least one power function component contained in each candidate power microservice in the candidate configuration scheme; in the process of transmitting the first sub-information flow set from the first candidate power microservice to the second candidate power microservice, count the first complexity of the first power function component set when processing the first sub-information flow set; based on the first complexity of each candidate power microservice combination, determine the coupling value of the candidate configuration scheme.
[0154] In some embodiments, the second estimation module 906 is used to determine multiple different power business combinations based on multiple power businesses in the power business set, each power business combination includes a first power business and a second power business; for each candidate power microservice and each power business combination in the candidate configuration scheme, if each power business in the power business combination is divided into the candidate power microservice, then determine the second power function component set corresponding to the power business combination from at least one power function component contained in each candidate power microservice in the candidate configuration scheme; in the process of transmitting the second information flow from the first power business to the second power business, determine the second complexity of the second power function component set when processing the second information flow; based on the second complexity of each power business combination, determine the cohesion value of the candidate configuration scheme.
[0155] In some embodiments, the component information of each power functional component includes at least the component type of the power functional component and the power business processed; the third estimation module 908 is used to, for each candidate power microservice, count a first set of component types involved when the candidate power microservice processes each power business in sequence according to the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, and determine a first number of component types in the first set; for each power functional component, count a second set of candidate power microservices to which the power functional components of each power business belong according to the component type of at least one power functional component included in the candidate power microservice and the power business processed by each, and determine a second number of candidate power microservices in the second set; perform a mean operation on the first quantity corresponding to each candidate power microservice to obtain a first mean, and perform a mean operation on the second quantity corresponding to each power functional component to obtain a second mean; and fuse the first mean and the second mean to obtain a corresponding fusion value.
[0156] In some embodiments, the selection module 910 is used to obtain an evaluation score corresponding to each candidate configuration scheme based on the corresponding coupling value, cohesion value, and fusion value; and select the candidate configuration scheme corresponding to the highest evaluation score from multiple candidate configuration schemes as the target configuration scheme.
[0157] In some embodiments, the selection module 910 is used to obtain the weights corresponding to the coupling value, cohesion value, and fusion value respectively; for each candidate configuration scheme, the coupling value, cohesion value, and fusion value corresponding to each candidate configuration scheme are weighted according to the weights corresponding to the coupling value, cohesion value, and fusion value respectively, to obtain the evaluation score corresponding to the candidate configuration scheme.
[0158] Each module in the above-mentioned power microservice configuration device can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in hardware form, or can be stored in a computer device memory in software form, so that the processor can call and execute the corresponding operations of each module.
[0159] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O) and a communication interface. The processor, memory and input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for configuring power microservices is implemented.
[0160] Those skilled in the art will understand that Figure 10 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0161] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.
[0162] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0163] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.
[0164] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0165] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.
[0166] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0167] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A power microservice configuration method, characterized in that: The method comprises: Determining, based on a plurality of power functional components corresponding to the power business set and a target number of power microservices to be configured, a plurality of different candidate configuration schemes, each candidate configuration scheme including a target number of candidate power microservices, each candidate power microservice including at least one power functional component; For each candidate configuration scheme, determining a plurality of different candidate power microservice combinations based on a plurality of candidate power microservices in the candidate configuration scheme, each candidate power microservice combination including a first candidate power microservice and a second candidate power microservice; For each candidate power microservice combination, obtaining a corresponding first sub-information flow set from the first information flow set, where the first sub-information flow set includes multiple first information flows; Determining a first set of power function components corresponding to the candidate power microservice combination from at least one power function component included in each candidate power microservice in the candidate configuration scheme; In the process of transmitting the first sub-information flow set from the first candidate power microservice to the second candidate power microservice, counting a first complexity level when the first power functional component set processes the first sub-information flow set; Determining a coupling value of the candidate configuration scheme based on a first complexity level of each candidate power microservice combination; According to the corresponding second information flow, the cohesion level within the power microservice is estimated by using at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set, and a corresponding cohesion value is determined; According to the component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, an estimation is made of the degree of integration of the power functional components within the power microservice, and a corresponding integration value is determined; A target configuration solution is selected from the plurality of candidate configuration solutions based on the coupling value, cohesion value, and fusion value of each candidate configuration solution.
2. The method according to claim 1, characterized in that The estimating the degree of cohesion within the power microservice based on the corresponding second information flow and using at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set to determine the corresponding cohesion value includes: Determining a plurality of different power service combinations according to a plurality of power services in the power service set, each power service combination including a first power service and a second power service; For each candidate power microservice and each power business combination in the candidate configuration scheme, if each power business in the power business combination is classified into the candidate power microservice, determine a second power function component set corresponding to the power business combination from at least one power function component included in each candidate power microservice in the candidate configuration scheme; In the process of transmitting the second information flow from the first power service to the second power service, determining a second complexity level when the second power functional component set processes the second information flow; Based on the second complexity level of each power service combination, a cohesion value of the candidate configuration solution is determined.
3. The method according to claim 1, characterized in that The component information of each power functional component includes at least the component type of the power functional component and the power business processed by the power functional component; the estimation of the degree of integration of the power functional components within the power microservice based on the component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the determination of the corresponding integration value include: For each candidate power microservice, based on the component type of at least one power functional component included in the candidate power microservice and the power services processed by each power microservice, counting a first set of component types involved when the candidate power microservice sequentially processes each power service, and determining a first number of component types in the first set; For each power functional component, based on the component type of at least one power functional component included in the candidate power microservices and the power services processed by each power functional component, statistically processing a second set of candidate power microservices to which the power functional component of each power service belongs, and determining a second number of candidate power microservices in the second set; Performing a mean operation on the first quantities corresponding to each candidate power microservice to obtain a first mean, and performing a mean operation on the second quantities corresponding to each power functional component to obtain a second mean; The first mean value and the second mean value are fused to obtain a corresponding fused value.
4. The method according to claim 1, wherein The selecting a target configuration scheme from a plurality of candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme includes: For each candidate configuration solution, obtaining an evaluation score corresponding to the candidate configuration solution based on the corresponding coupling value, cohesion value, and fusion value; From multiple candidate configuration schemes, the candidate configuration scheme corresponding to the highest evaluation score is selected as the target configuration scheme.
5. The method according to claim 4, characterized in that Obtaining an evaluation score corresponding to the candidate configuration scheme based on the corresponding coupling value, cohesion value, and fusion value includes: Get the weights corresponding to the coupling value, cohesion value, and fusion value respectively; For each candidate configuration scheme, the coupling value, cohesion value, and fusion value corresponding to each candidate configuration scheme are weighted according to the weights corresponding to the coupling value, cohesion value, and fusion value respectively, to obtain the evaluation score corresponding to the candidate configuration scheme.
6. A power microservice configuration device, characterized in that: The device comprises: a determination module configured to determine, based on a plurality of power functional components corresponding to the power business set and a target number of power microservices to be configured, a plurality of different candidate configuration schemes, each candidate configuration scheme including a target number of candidate power microservices, each candidate power microservice including at least one power functional component; A first estimation module is configured to determine, for each candidate configuration scheme, a plurality of different candidate power microservice combinations based on a plurality of candidate power microservices in the candidate configuration scheme, each candidate power microservice combination including a first candidate power microservice and a second candidate power microservice; for each candidate power microservice combination, obtain a corresponding first sub-information flow set from a first information flow set, the first sub-information flow set including a plurality of first information flows; determine a first power function component set corresponding to the candidate power microservice combination from at least one power function component included in each candidate power microservice in the candidate configuration scheme; during the process of transmitting the first sub-information flow set from the first candidate power microservice to the second candidate power microservice, calculate a first complexity level of the first power function component set when processing the first sub-information flow set; and determine a coupling value of the candidate configuration scheme based on the first complexity level of each candidate power microservice combination; a second estimation module, configured to estimate the degree of cohesion within the power microservice based on the corresponding second information flow, using at least one power functional component included in each candidate power microservice in the candidate configuration scheme and the power business set, and determine a corresponding cohesion value; a third estimation module, configured to estimate the degree of integration of the power functional components within the power microservice based on component information of at least one power functional component included in each candidate power microservice in the candidate configuration scheme, and determine a corresponding integration value; The selection module is used to select a target configuration scheme from multiple candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme.
7. The device according to claim 6, characterized in that The second estimation module is configured to determine a plurality of different power service combinations based on a plurality of power services in the power service set, each power service combination including a first power service and a second power service; For each candidate power microservice and each power business combination in the candidate configuration scheme, if each power business in the power business combination is classified into the candidate power microservice, determine a second power function component set corresponding to the power business combination from at least one power function component included in each candidate power microservice in the candidate configuration scheme; In the process of transmitting the second information flow from the first power service to the second power service, determining a second complexity level when the second power functional component set processes the second information flow; Based on the second complexity level of each power service combination, a cohesion value of the candidate configuration solution is determined.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Micro-service division method and device, computer equipment and readable storage medium
CN112540749A
Multi-dimensional fusion new energy power parallel prediction method and device
CN114493050A