Power micro-service configuration method and device

By estimating the coupling and cohesion between power microservices, and comprehensively analyzing multiple candidate configuration solutions, the problem of insufficient accuracy in the power microservice configuration process is solved, the computing speed and parallel computing capabilities are improved, and efficient power is achieved Microservice configuration.

CN119311307AActive Publication Date: 2025-01-14SOUTHERN POWER GRID DIGITAL GRID RESEARCH INSTITUTE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411306287.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2025-01-14
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

The existing power microservice configuration process is difficult to ensure accuracy, resulting in low computing speed and limited parallel computing.

Method used

By estimating the degree of coupling, cohesion and functional components between power microservices, multiple candidate configuration plans are comprehensively analyzed, thereby selecting the target configuration plans and improving the accuracy of microservice configuration.

Benefits of technology

It realizes more efficient power microservice configuration, improves computing speed and parallel computing capabilities, and ensures configuration accuracy and effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119311307A_ABST
    Figure CN119311307A_ABST
Patent Text Reader

Abstract

The invention relates to a power micro-service configuration method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps of determining a plurality of different candidate configuration schemes based on a plurality of power function components corresponding to a power business set and a target number of to-be-configured power micro-services; for each candidate configuration scheme, according to the corresponding first information flow set, obtaining a corresponding coupling value through at least one power function component contained in each candidate power micro-service in the candidate configuration scheme; according to the corresponding second information flow, determining a corresponding cohesion value through the at least one power function component and the power business set; determining a corresponding fusion value according to the component information of the at least one electric power functional component; and based on the respective coupling value, cohesion value and fusion value of each candidate configuration scheme, the target configuration scheme is selected from the plurality of candidate configuration schemes, so that the micro-service configuration accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electric power technology, and in particular to an electric power microservice configuration method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] With the rapid development of the power Internet of Things, the power industry is gradually moving towards intelligence and efficiency. At the same time, the power terminal information system has emerged, which has become a bridge and link connecting all aspects of power production, transmission, distribution and consumption. Among them, a monolithic architecture is usually used to construct the application of the power terminal information system. All the functions required for business applications under the monolithic architecture are packaged as an application and deployed on the computing node for execution. Then, the power terminal information system based on the monolithic architecture is developed, tested and other tasks. However, this monolithic architecture limits parallel computing, resulting in low computing speed.

[0003] In related technologies, in order to increase computing speed, multiple microservices are configured first, and a microservice architecture is built based on multiple microservices. Based on the microservice architecture, the power business application is constructed into a series of small-scale, well-defined, distributed and autonomous functional modules that can support independent deployment and independent evolution. However, the current microservice configuration process is relatively simple, and it is difficult to ensure the accuracy of 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 power microservice configuration method, comprising:

[0006] Determine a plurality of different candidate configuration schemes based on a plurality of power function 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 function component;

[0007] For each candidate configuration scheme, according to the corresponding first information flow set, the coupling degree between the power microservices is estimated through at least one power function 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 degree within the power microservice is estimated through at least one power function component included in each candidate power microservice in the candidate configuration scheme and the power business set, and the corresponding cohesion value is determined;

[0009] According to the component information of at least one power function component included in each candidate power microservice in the candidate configuration scheme, an estimation is made of the fusion degree of the power function components in the power microservice, and a corresponding fusion value is determined;

[0010] 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.

[0011] In a second aspect, the present application also provides a power microservice configuration device, including:

[0012] A determination module, configured to determine a plurality of different candidate configuration schemes based on a plurality of power function 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 function component;

[0013] A first estimation module is used for estimating the coupling degree between power microservices for each candidate configuration scheme according to the corresponding first information flow set and through at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value;

[0014] A second estimation module is used to estimate the cohesion degree within the power microservice according to the corresponding second information flow, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the power business set, and determine the corresponding cohesion value;

[0015] A third estimation module, configured to estimate the degree of integration of the power function components in the power microservice according to the component information of at least one power function 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 further provides a computer device, including 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, and when the computer program is executed by a processor, the steps of the above-mentioned power microservice configuration method are implemented.

[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-mentioned power microservice configuration method, device, computer equipment, computer-readable storage medium and computer program product can pre-randomly combine multiple different candidate configuration schemes by corresponding multiple power function components 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 function component. For each candidate configuration scheme, according to the corresponding first information flow set, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, the coupling degree between the power microservices is estimated to obtain the corresponding coupling value. That is, the degree of association between the power microservices caused by the candidate configuration scheme is evaluated from the coupling index. According to the corresponding second information flow, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the power business set, the cohesion degree within the power microservice is estimated to determine the corresponding cohesion value. That is, the degree of association between the power functional components in the power microservice caused by the candidate configuration scheme is evaluated from the cohesion index. According to 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 in the power microservice is estimated, and the corresponding integration value is determined. That is, the degree of focus of the power microservice on power business processing caused by the candidate configuration scheme is evaluated from the integration index. Based on the coupling value, cohesion value, and fusion 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 from the coupling index, cohesion index, and fusion 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 drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. 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 creative work.

[0022] FIG1 is an application environment diagram of a power microservice configuration method in one embodiment;

[0023] Figure 2 It is a flowchart 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 A schematic diagram of the coupling between power microservices in one embodiment;

[0026] Figure 5 A schematic diagram of a coupling degree estimation step in one embodiment;

[0027] Figure 6 A schematic diagram of the cohesion within a 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] Fig. 9 It is a structural block diagram of a power microservice configuration device in one embodiment;

[0031] Fig.10 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0033] The power microservice configuration method provided in the embodiment of the present application can be applied in the application environment shown in Figure 1. 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 separately by the terminal 102 or the server 104, or it can be executed collaboratively by the terminal 102 and the server 104. 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 service set, a target number of power microservices to be configured, and decomposes each power service in the power service set to determine the corresponding at least one power functional component.

[0035] The server 104 determines a plurality of different candidate configuration schemes based on a plurality of power function components corresponding to the power business set and a 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 function component; for each candidate configuration scheme, the server 104 estimates the coupling degree between the power microservices according to the corresponding first information flow set and through at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value; the server 104 estimates the cohesion degree within the power microservice according to the corresponding second information flow and through at least one power function component included in each candidate power microservice in the candidate configuration scheme and the power business set to determine a corresponding cohesion value; the server 104 estimates the fusion degree of the power function components within the power microservice according to the component information of at least one power function component included in each candidate power microservice in the candidate configuration scheme to determine a corresponding fusion value; the server 104 selects a target configuration scheme from the plurality of candidate configuration schemes based on the coupling value, cohesion value, and fusion value of each candidate configuration scheme. In this way, the server 104 can perform microservice configuration according to the microservices involved in the target configuration scheme. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.

[0036] In an exemplary embodiment, Figure 2 As shown, a power microservice configuration method is provided, which is described by taking the method applied to a computer device (which may be the terminal 102 of FIG. 1 or the server 104 of FIG. 1 ) as an example, and includes the following steps S202 to S210. Among them:

[0037] Step S202, based on multiple power functional components corresponding to the power business set and the target number of power microservices to be configured, determine multiple different candidate configuration schemes, each candidate configuration scheme includes a target number of candidate power microservices, and each candidate power microservice includes at least one power functional component.

[0038] The power service set is the set required for the current microservice configuration, and the power service set includes at least one power service. The power service refers to the process of providing electric energy to end users through power generation, transmission, distribution and sales. The power microservice refers to the microservice related to power.

[0039] The candidate configuration scheme can be understood as a scheme for configuring the power microservice. For each candidate configuration scheme, how each candidate power microservice is configured is specified, such as specifying the power functional components that should be included in each candidate power microservice.

[0040] The power function component refers to a component that implements the corresponding power function. For example, the power function component can be regarded as a code that completes the corresponding power function. For example, the power function component is a sampling component, and for another example, the power function component is a Fourier analysis component. Each power function component implements different functions.

[0041] Optionally, after obtaining the power microservice configuration request, the computer device parses the power microservice configuration request to obtain the target number of power microservices to be configured and the power business set involved. The computer device determines multiple power function components corresponding to the power business set, and freely combines and randomly generates multiple different candidate configuration schemes based on the multiple power function components and the target number.

[0042] Exemplarily, after 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 FIG. 1 is a schematic diagram of power business splitting in one 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 be presented in various forms. Split examples:

[0045] Considering the power business as an object, the elements of the object can be protection, demand response, power quality, energy management, etc. Continuing to split the power quality category, the next layer of elements appears, that is, the composition of the power quality business elements: reactive power compensation, node parameters, harmonics, power factor, etc. Among them, the composition of the harmonic elements: sampling, Fourier analysis, instruction upshift, instruction downshift, etc. In this way, the multiple power function components obtained by disassembly include power function components using sampling, Fourier analysis, instruction upshift, and instruction downshift.

[0046] Step S204: for each candidate configuration scheme, according to the corresponding first information flow set, the coupling degree between the power microservices is estimated through at least one power functional component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value.

[0047] Among them, 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 the information flow is also regarded as a data flow. The first information flow set is pre-set based on the candidate configuration scheme, and can be obtained based on experiments or set based on experience, without specific limitation. The first information flow set contains the first sub-information flow set corresponding to each candidate microservice in the candidate configuration scheme, and 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 mutual dependence between power microservices and other power microservices. It should be noted that the processing flow of power business is realized by calling power microservices according to the processor of its control flow. Therefore, the input of one power microservice comes from the output of another power microservice, and there is coupling between power microservices. The call to the power microservice is realized through the information flow sent to the power microservice.

[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 when processing the first information flow.

[0050] The following is an explanation of the degree of coupling (coupling characteristics) between power microservices. Figure 4 As shown, it is a schematic diagram of the coupling between power microservices in an embodiment. Power microservices can be regarded as a collection of power functional components with a series of interactive relationships. Assume that a new energy distribution network scenario is composed of 4 power microservices, namely 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, and component type 1, component type 3, and component type 4 are all different. Power microservice 3 has power function components of component type 1, component type 2, component type 3, and component type 4.

[0052] The association between power microservices 1, 2, and 4 shows that there is a close connection between the power functional components within different power microservices. A very complex dependency relationship is formed between power microservice 2 and power microservices 1 and 4, and the power microservices are tightly coupled. Power microservice 3 is not directly associated with the elements within power microservices 2 and 4, but is associated through 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 loosely coupled state.

[0054] It should be noted that the coupling value between power microservices reflects the degree of coupling between power microservices. The lower the coupling value between power microservices, the lower the degree of coupling. The lower the coupling degree, the better. The lower the degree of coupling, the lower the transmission cost between power microservices. Therefore, loose coupling is the basic 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 first information flow set, and determines the coupling value between the candidate power microservice and other candidate power microservices in the candidate configuration scheme based on the at least one information flow. The computer device integrates the coupling values ​​between the candidate power microservice and other candidate power microservices in the candidate configuration scheme to obtain the coupling value corresponding to the candidate power microservice.

[0056] The computer device integrates the coupling values ​​corresponding to each candidate power microservice 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, which indicates that the coupling of the candidate configuration scheme is good.

[0057] In some embodiments, Figure 5 As shown, it is a schematic diagram of the coupling degree estimation step in one embodiment. According to the corresponding first information flow set, the coupling degree between the power microservices is estimated through 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 according to 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.

[0059] Among them, the first candidate power microservice serves as the sender of the first information flow, and the second candidate power microservice serves as the receiver of the first information flow.

[0060] Exemplarily, based on multiple candidate power microservices in the candidate configuration scheme, multiple 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 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.

[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 is used to reflect the relative complexity of the processing when the first power functional component set processes the first sub-information flow set. Exemplarily, the first complexity 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 functional component in the first power functional component set, the computer device determines a first sub-complexity level (the relative complexity of the first power functional component when processing the first information flow) corresponding to the first power functional component for 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 and the information flow, the power function component that processes the information flow, the first candidate power microservice, the second candidate power microservice, and the power function component when the information flow is transmitted from the first candidate power microservice to the second candidate power microservice. Based on the first mapping relationship, the computer device queries the first complexity corresponding to the first power function component for the first information flow.

[0068] Step S510: determining a coupling value of a candidate configuration scheme based on a first complexity level of each candidate power microservice combination.

[0069] Exemplarily, the first complexity levels of each candidate power microservice combination 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 l from candidate power microservice k, 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 number of power function components in the first power function component set corresponding to the candidate power microservice combination kl), It refers to the relative complexity of the power functional 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, based on multiple candidate power microservices in the candidate configuration scheme, any two of them are combined to obtain a candidate power microservice combination. Then, the coupling between the microservices corresponding to the candidate power microservice combination is counted through the first sub-information flow, thereby accurately estimating the coupling of the candidate configuration scheme as a whole, providing a reference at the coupling level for subsequent microservice configuration, so as to ensure the effectiveness and accuracy of the microservice configuration.

[0074] Step S206, according to the corresponding second information flow, the cohesion degree within the power microservice is estimated through 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.

[0075] The second information flow is an information flow used to estimate the degree of cohesion, and the second information flow can be any first information flow in the first information flow set, or can be other information flows that do not belong to the first information flow set, without specific limitation. The second information flow is pre-set based on the candidate configuration scheme, and can be obtained based on experiments, or can be 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 the business process. 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 intensity of interaction between power functional components of 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, Figure 7 The figure is a schematic diagram of a step of determining a cohesion value in an embodiment. According to the corresponding second information flow, the cohesion degree within the power microservice is estimated through 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: Determine 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 included 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 a power business, or at least two power function components corresponding to power business components, or at least three power function components corresponding to power business, etc. For example, the candidate power microservice k includes power function components 1 to 10, wherein 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. If the power business combination includes power business 1 and power business 2, the corresponding second power function component set is: power function components 1 to 6.

[0084] If each power business in the power business portfolio 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 divided into 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 set of second power function components belonging to the first power service in the power service combination, or a set of second power function components belonging to the second power service, is obtained from at least one power function component included 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 set of second 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 solutions 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 of (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 yes, 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 (the second sub-complexity corresponding to the second power functional component) of processing the second information flow by the power functional component u when the second information flow is transported from the power service i to j, 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 types of power services executed by the candidate power microservice k, that is, the number of types of power services in the candidate power microservice k.

[0101] In this embodiment, based on multiple power services in the power service set, any two of them are combined to obtain a power service combination. Then, the overall cohesion of the candidate configuration scheme can be accurately estimated through the second information flow, the power service combination, and the power function component, providing a cohesion-level reference for subsequent microservice configuration to ensure 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, estimate the integration degree of the power functional components in the power microservice and determine the corresponding integration value.

[0103] The component information of the power function component includes at least the component type of the power function component and the processed power service (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 the perspective of information interaction, the power business process is also a process of configuring power business functions within the life cycle. Therefore, having a high degree of functional integration means that the power business functional components are divided into microservices for execution, and each power microservice is determined to execute 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 "algorithm analysis" in the operation of the power business process. Exemplarily, a high degree of integration of power functional components should meet the following requirements: 1) A power microservice focuses on the component type processing of as few power functional components as possible; 2) It is more inclined to divide the power business that processes the same component type into the same power microservice.

[0106] In one embodiment, Figure 8The figure is a schematic diagram of a fusion value determination step in an embodiment. According to 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 in 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 services processed by each of them, count a first set of component types involved when the candidate power microservice processes each power service in sequence, and determine a first number of component types in the first set.

[0108] Exemplarily, the first set may be .in, It 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 involving 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 microservices and the power services processed by each of them, a second set of candidate power microservices to which the power functional components of each power service belong is statistically processed, and a second number of candidate power microservices in the second set is determined.

[0111] Exemplarily, the second set may be ,in, It 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] Exemplarily, the first quantity is The second quantity is Wherein, N is used to calculate the number of set elements in the first set or the second set. 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] Exemplarily, the first mean is , the second mean is .

[0116] Step S808: fuse the first mean value and the second mean value to obtain a corresponding fused value.

[0117] Exemplarily, 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, it is possible to analyze the first set of component types involved in the candidate power microservices processing each power business in sequence, and the second set of candidate power microservices to which the power function components processing each power business belong. In this way, the average number of power businesses processed by a power microservice is reflected based on the first set, and the number of candidate power microservices to which a power business is distributed is reflected based on the second set. Thus, the overall integration of the candidate configuration scheme can be accurately reflected, providing a reference at the integration level for subsequent microservice configuration to ensure the effectiveness and accuracy of the microservice configuration.

[0120] Step S210 , 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.

[0121] Exemplarily, for each candidate configuration scheme, the computer device scores the candidate configuration scheme according to the corresponding coupling value, cohesion value, and fusion value to obtain a configuration score of the power microservice. Based on the configuration scores of each candidate configuration scheme, a target configuration scheme is selected. The power microservice is configured with the target configuration scheme.

[0122] Exemplarily, for each candidate configuration scheme, the computer device determines the number a and the target number s of the component types of the corresponding power functional component, and calculates the corresponding candidate power microservice granularity s / a. It is determined whether the candidate power microservice granularity satisfies the granularity constraint condition. It is determined whether the coupling value satisfies the coupling constraint condition, whether the cohesion value satisfies the cohesion constraint condition, and whether the fusion value satisfies the fusion constraint condition.

[0123] From the candidate configuration schemes, select the candidate configuration schemes that simultaneously satisfy the granularity constraint conditions, coupling constraint conditions, cohesion constraint conditions, and fusion constraint conditions.

[0124] For each candidate configuration scheme screened out, score the candidate configuration scheme according to the corresponding coupling value, cohesion value and fusion value to obtain the configuration score of the power microservice. Based on the configuration scores of each candidate configuration scheme, select the target configuration scheme. Configure the power microservice with the target configuration scheme.

[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 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 value, cohesion value, and fusion value, an evaluation score corresponding to the candidate configuration scheme is obtained, including: obtaining the weights corresponding to the coupling value, cohesion value, and fusion value respectively; for each candidate configuration scheme, weighting the coupling value, cohesion value, and fusion value corresponding to each candidate configuration scheme 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.

[0131] For example, let the weights corresponding to the coupling value, cohesion value, and fusion value be , , For each candidate configuration, the coupling value, cohesion value, and fusion value are normalized to obtain the normalized coupling value, cohesion value, and fusion value, respectively, that is, , , .in, , , They 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, by corresponding to a plurality of power function components of 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, according to the corresponding first information flow set, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, the coupling degree between the power microservices is estimated to obtain the corresponding coupling value. That is, the degree of association between the power microservices caused by the candidate configuration scheme is evaluated from the coupling index. According to the corresponding second information flow, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the power business set, the cohesion degree within the power microservice is estimated to determine the corresponding cohesion value. That is, the degree of association between the power functional components in the power microservice caused by the candidate configuration scheme is evaluated from the cohesion index. According to 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 in the power microservice is estimated, and the corresponding integration value is determined. That is, the degree of focus of the power microservice on power business processing caused by the candidate configuration scheme is evaluated from the integration index. Based on the coupling value, cohesion value, and fusion 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 from the coupling index, cohesion index, and fusion 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, obtain the corresponding first sub-information flow set from the first information flow set, 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, determine the first power function component set corresponding to the candidate power microservice combination; 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.

[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 a second power function component set corresponding to the power service combination is determined 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, a second complexity level when the second power function component set processes 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 turn 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 fused value.

[0142] After screening out candidate configuration schemes that simultaneously satisfy the granularity constraints, coupling constraints, cohesion constraints, and fusion constraints from multiple candidate configuration schemes, for each screened out 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 screened 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 corresponding to a plurality of power function components of 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, according to the corresponding first information flow set, the coupling degree between the power microservices is estimated through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the corresponding coupling value is obtained. That is, the degree of association between the power microservices caused by the candidate configuration scheme is evaluated from the coupling index. According to the corresponding second information flow, the cohesion degree within the power microservice is estimated through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the power business set, and the corresponding cohesion value is determined. That is, the degree of association between the power functional components in the power microservice caused by the candidate configuration scheme is evaluated from the cohesion index. According to 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 in the power microservice is estimated, and the corresponding integration value is determined. That is, the degree of focus of the power microservice on power business processing caused by the candidate configuration scheme is evaluated from the integration index. Based on the coupling value, cohesion value, and fusion 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 from the coupling index, cohesion index, and fusion 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 above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed 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 part of the steps or stages in other steps.

[0146] Based on the same inventive concept, the embodiment of the present application also provides a power microservice configuration device for implementing the power microservice configuration method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more power microservice configuration device embodiments provided below can refer to the limitations of the power microservice configuration method above, and will not be repeated here.

[0147] In an exemplary embodiment, Fig. 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 used to determine a plurality of different candidate configuration schemes based on a plurality of power function 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 function component;

[0149] A first estimation module 904 is used to estimate the coupling degree between the power microservices for each candidate configuration scheme according to the corresponding first information flow set and through at least one power function 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 used to estimate the cohesion degree within the power microservice according to the corresponding second information flow, through at least one power function component and a power business set included in each candidate power microservice in the candidate configuration scheme, and determine a corresponding cohesion value;

[0151] The third estimation module 908 is used to estimate the integration degree of the power function components in the power microservice according to the component information of at least one power function component included in each candidate power microservice in the candidate configuration scheme, and determine the corresponding integration value;

[0152] The selection module 910 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.

[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 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, 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 included 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 the 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 the first number of component types in the first set; for each power functional component, count the second set of candidate power microservices to which the power functional components that process 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 the second number of candidate power microservices in the second set; perform mean operation on the first quantity corresponding to each candidate power microservice to obtain a first mean, perform mean operation on the second quantity corresponding to each power functional component to obtain a second mean; fuse the first mean and the second mean to obtain the corresponding fusion value.

[0156] In some embodiments, the selection module 910 is used to obtain, for each candidate configuration scheme, an evaluation score corresponding to the 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, a selection module 910 is used to obtain 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 an 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 by software, hardware, or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each of the above modules.

[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: Fig.10As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, 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 the 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 a power microservice is implemented.

[0160] Those skilled in the art will understand that Fig.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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0161] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, 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] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0166] The technical features of the above embodiments may be combined arbitrarily. 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 only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for configuring electric power microservices, characterized in that: The method comprises: Determine a plurality of different candidate configuration schemes based on a plurality of power function 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 function component; For each candidate configuration scheme, according to the corresponding first information flow set, the coupling degree between the power microservices is estimated through at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value; According to the corresponding second information flow, the cohesion degree within the power microservice is estimated through at least one power function component included in each candidate power microservice in the candidate configuration scheme and the power business set, and the corresponding cohesion value is determined; According to the component information of at least one power function component included in each candidate power microservice in the candidate configuration scheme, an estimation is made of the fusion degree of the power function components in the power microservice, and a corresponding fusion value is determined; 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.

2. The method according to claim 1, characterized in that The estimating the coupling degree between the power microservices according to the corresponding first information flow set through at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value includes: Determine a plurality of different candidate power microservice combinations according to the plurality of candidate power microservices in the candidate configuration scheme, each candidate power microservice combination comprising 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, where the first sub-information flow set includes a plurality of first information flows; Determine, 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; 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 function component set processes the first sub-information flow set; Based on the first complexity level of each candidate power microservice combination, a coupling value of the candidate configuration solution is determined.

3. The method according to claim 1, characterized in that The estimating the cohesion degree within the power microservice according to the corresponding second information flow through at least one power function component included in each candidate power microservice in the candidate configuration scheme and the power business set, and determining the corresponding cohesion value includes: Determine 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 divided 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.

4. The method according to claim 1, characterized in that: The component information of each power function component includes at least the component type of the power function component and the power business processed; the estimation of the integration degree of the power function components in the power microservice according to the component information of at least one power function 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, according to the component type of at least one power function component included in the candidate power microservice and the power services processed by each of the power microservices, a first set of component types involved when the candidate power microservice sequentially processes each power service is counted, and a first number of component types in the first set is determined; For each power function component, according to the component type of at least one power function component included in the candidate power microservices and the power services processed by each of the power function components, a second set of candidate power microservices to which the power function component of each power service belongs is statistically processed, and a second number of candidate power microservices in the second set is determined; 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.

5. The method according to claim 1, characterized in that The selecting a target configuration scheme from a plurality of candidate configuration schemes based on the coupling value, the cohesion value, and the fusion value of each candidate configuration scheme includes: For each candidate configuration scheme, based on the corresponding coupling value, cohesion value, and fusion value, obtain an evaluation score corresponding to the candidate configuration scheme; From multiple candidate configuration schemes, the candidate configuration scheme corresponding to the highest evaluation score is selected as the target configuration scheme.

6. The method according to claim 5, characterized in that The obtaining of the evaluation score corresponding to the candidate configuration scheme based on the corresponding coupling value, cohesion value, and fusion value includes: 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 of the candidate configuration schemes are weighted according to the weights corresponding to the coupling value, cohesion value, and fusion value, respectively, to obtain an evaluation score corresponding to the candidate configuration scheme.

7. A power microservice configuration device, characterized in that: The device comprises: A determination module, configured to determine a plurality of different candidate configuration schemes based on a plurality of power function 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 function component; A first estimation module is used for estimating the coupling degree between power microservices for each candidate configuration scheme according to the corresponding first information flow set and through at least one power function component included in each candidate power microservice in the candidate configuration scheme to obtain a corresponding coupling value; A second estimation module is used to estimate the cohesion degree within the power microservice according to the corresponding second information flow, through at least one power function component included in each candidate power microservice in the candidate configuration scheme, and the power business set, and determine the corresponding cohesion value; A third estimation module, configured to estimate the degree of integration of the power function components in the power microservice according to the component information of at least one power function 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.

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 6 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 6 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 6 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

  • Micro-service division method

    CN117459359A