A performance prediction method and system for micro-service system governance

CN116302318BActive Publication Date: 2026-08-18HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310072469.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-17
Publication Date
2026-08-18
Estimated Expiration
2043-01-17

AI Technical Summary

Technical Problem

首先,类似的一些预测方法未能很好地与微服务治理手段相结合,忽略了在微服务系统运行过程中,治理手段给微服务系统带来的变化;其次基于数学建模的方法需要对微服务本身具有一定的了解,与真实情况下微服务系统的运行实际并不相符,且无法保护服务提供者的隐私,影响服务提供者提供相应信息的积极性,也对微服务的效能预测带来了困扰

Benefits of technology

[0030] As can be seen from the above, this application provides a performance prediction method and system for microservice system governance. It supports various microservice governance methods and combinations thereof. By learning from historical data of the microservice system and collecting operational data over a period of time under different governance methods, it ultimately predicts the response results of various performance indicators of the microservice system under certain combinations of governance methods. This helps microservice system governance personnel adjust governance plans in a timely manner, saving time and costs in actual deployment. It is applicable to a long-running microservice system that supports version iteration, guiding the governance of the current microservice system. Compared with existing technologies, this application has the following advantages:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116302318B_ABST
    Figure CN116302318B_ABST
Patent Text Reader

Abstract

The application discloses a performance prediction method and system for micro-service system governance, and belongs to the technical field of computer services. The method first acquires micro-service information, constructs a micro-service system model according to the micro-service information, obtains a system directed graph, then obtains a performance prediction value for a single micro-service instance, and finally obtains a performance prediction model to predict the overall micro-service system performance through the performance prediction model. The performance prediction method and system can support various micro-service governance methods and combinations of the governance methods, learn from historical micro-service system data, collect operation data in the past period of time facing different governance methods, and finally predict the response results of various performance indicators of the micro-service system under certain combinations of the governance methods, so as to help micro-service system governance personnel to timely adjust the governance scheme and save the actual deployment time and cost. The application is suitable for guiding the governance of the micro-service system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to a performance prediction method and system for microservice system governance, belonging to the field of computer service technology. Background Technology

[0002] In recent years, microservice architecture has gradually replaced traditional monolithic and SOA architectures, becoming the mainstream design pattern for software systems. Microservice architecture is based on small functional modules focused on a single responsibility and function, using a modular approach to combine complex, large applications. These modules are highly decoupled, allowing for independent development, testing, deployment, and scaling without affecting other modules. The use of microservice technology allows service systems to be adjusted reasonably for specific services based on user needs without affecting the normal operation of other services, reducing the complexity of service system adjustments. Containers are application-level virtualization, allowing multiple independent user-space instances on a single kernel. They provide a standard method for packaging application code, runtime, system tools, system libraries, and configuration into a single entity. Compared to traditional virtual machine technology, containers are very lightweight; can start quickly; are highly elastic, can more effectively utilize server resources; and have higher performance. The application of container technology enables services to start quickly and run stably in various heterogeneous server environments, further reducing the complexity of service system adjustments. Kubernetes (K8S) is a portable container orchestration and management tool designed for container services. When paired with microservices, it provides excellent solutions for microservice governance, including service deployment, service monitoring, application scaling, and fault handling.

[0003] While Kubernetes (K8S) provides a set of microservice system governance solutions, most of them focus on container management, neglecting the business attributes of microservices running within containers. To cope with more complex governance scenarios, governance personnel have to develop more personalized microservice system governance solutions, deploy and run them to observe governance effects, and thus quickly adjust governance solutions before deployment, saving time and resources. However, most existing microservice performance prediction methods are based on traditional mathematical methods, using mathematical modeling to calculate mathematical formulas to obtain corresponding performance (QoS) prediction results. However, existing methods have several drawbacks. First, some prediction methods fail to integrate well with microservice governance measures, ignoring the changes brought to the microservice system by governance measures during operation. Second, mathematical modeling methods require a certain understanding of the microservices themselves, which does not match the actual operation of microservice systems in real-world scenarios, and cannot protect the privacy of service providers, affecting their willingness to provide relevant information, further complicating microservice performance prediction. Summary of the Invention

[0004] The purpose of this application is to provide a performance prediction method and system for microservice system governance, which can support a variety of microservice governance methods and combinations thereof. By learning from the historical data of the microservice system, it can ultimately predict the response results of various performance indicators of the microservice system under certain combinations of governance methods, thereby helping microservice system governance personnel to adjust governance plans in a timely manner.

[0005] To achieve the above objectives, the first aspect of this application provides a performance prediction method for microservice system governance. The microservice system includes a server cluster, where each server deploys several microservice instances. The performance prediction method includes:

[0006] Obtain microservice information, wherein the microservice information includes microservice system information, governance method information, and user request information;

[0007] A microservice system model is constructed based on the microservice information, and a directed graph of the system is obtained;

[0008] Based on the directed graph of the system and the microservice information, the performance of each microservice instance is predicted, and the performance prediction value for a single microservice instance is obtained respectively.

[0009] A performance prediction model is obtained by training a graph neural network, combining the performance prediction values, the directed graph of the system, and the microservice information. The performance prediction model is then used to predict the overall performance of the microservice system.

[0010] In one implementation, the microservice system information includes performance metrics of the microservice system, the governance measures information includes governance measures related to service deployment and request forwarding of each microservice instance, and the user request information includes the number of user requests input into the microservice system, the size of the request data, and user-specific attributes.

[0011] In one implementation, the microservice system model includes: a server model, a microservice model, a microservice instance model, a governance mechanism model, and a user request model.

[0012] In one implementation, constructing a microservice system model based on the microservice information includes:

[0013] The server model and the microservice model are constructed based on the microservice system information. The server model is used to describe the physical location of each server, all resources of each server, and the microservice instances deployed on each server. The microservice model is used to describe all interfaces contained in each microservice instance, the corresponding request paths, the amount of data passed in and out of the interfaces, the functional descriptions provided by the interfaces, and the resources required for the normal operation of each microservice instance.

[0014] The microservice instance model is constructed based on the microservice system information and the user request information, which is used to describe the user requests related to each microservice instance, the resource allocation on each server, and the performance indicators of a single microservice instance.

[0015] The governance method model is constructed based on the governance method information to describe the governance methods related to the service deployment and request forwarding of each microservice instance.

[0016] The user request model is constructed based on the user request information to describe the number of user requests, the size of the request data, and the user-specific attributes input into the microservice system.

[0017] In one implementation, obtaining the directed graph of the system includes:

[0018] Based on the microservice system model, the request dependencies between microservice instances and the request invocation relationships between servers corresponding to each microservice instance are determined. The system directed graph is constructed based on the request dependencies and the request invocation relationships. In the system directed graph, each node represents each server, the attributes on each node represent the microservice instances deployed on each server, and the directed edges represent the request dependencies between the microservice instances deployed on each server.

[0019] In one implementation, the performance prediction of each microservice instance based on the system directed graph and the microservice information includes:

[0020] The number of users for each interface included in each microservice instance and the server's resource allocation to the corresponding microservice instance are used as input features. Based on the performance index of the single microservice instance, machine learning methods are used to characterize the multidimensional input features of the single microservice instance into the performance index, thereby obtaining the performance prediction value for each single microservice instance.

[0021] In one implementation, obtaining the performance prediction model by training a graph neural network and combining the performance prediction values, the system directed graph, and the microservice information includes:

[0022] The performance prediction values ​​for each individual microservice instance are embedded as features into each node of the system's directed graph. Then, the system's directed graph is used as input, and the performance metrics of the microservice system are used as output. The graph neural network is then used for training to obtain the performance prediction model.

[0023] The second aspect of this application provides a performance prediction system for microservice system governance, including:

[0024] The microservice system monitoring module is used to obtain microservice information, which includes microservice system information, governance method information, and user request information.

[0025] The microservice system modeling module is used to construct a microservice system model based on the microservice information and obtain a directed graph of the system.

[0026] A single microservice prediction module is used to predict the performance of each microservice instance based on the system directed graph and the microservice information, and obtain the performance prediction value for each single microservice instance.

[0027] The overall microservice prediction module is used to obtain a performance prediction model by training a graph neural network, combining the performance prediction values, the directed graph of the system, and the microservice information, and then using the performance prediction model to predict the overall microservice system performance.

[0028] A third aspect of this application provides a performance prediction apparatus for microservice system governance, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the first aspect or any embodiment of the first aspect.

[0029] The fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the first aspect or any embodiment of the first aspect.

[0030] As can be seen from the above, this application provides a performance prediction method and system for microservice system governance. It supports various microservice governance methods and combinations thereof. By learning from historical data of the microservice system and collecting operational data over a period of time under different governance methods, it ultimately predicts the response results of various performance indicators of the microservice system under certain combinations of governance methods. This helps microservice system governance personnel adjust governance plans in a timely manner, saving time and costs in actual deployment. It is applicable to a long-running microservice system that supports version iteration, guiding the governance of the current microservice system. Compared with existing technologies, this application has the following advantages:

[0031] 1. This application can support the joint modeling of microservice systems and governance methods, thereby predicting the performance changes of microservice systems under different governance methods. Furthermore, this application can flexibly accommodate most existing governance methods, supporting governance personnel in developing more personalized microservice system governance solutions in real-world situations, and allowing for observation of prediction and governance effects without going live.

[0032] 2. This application proposes a novel method for performance prediction of a single microservice instance. Compared with existing methods, it takes into account the effects of various governance measures on a single microservice instance, and more comprehensively adapts to the performance prediction needs of microservices in microservice governance scenarios.

[0033] 3. This application proposes a novel method for performance prediction of microservice systems based on graph neural networks. Compared with traditional mathematical modeling methods, the method provided in this application does not require prior knowledge of the details of microservices, treating microservices as black boxes and protecting the privacy of developers.

[0034] 4. The performance prediction system for microservice system governance proposed in this application can robustly adapt to various changing circumstances while maintaining its original predictive capabilities. These changing circumstances include, but are not limited to, microservice updates and upgrades, changes in the microservice set, updates to governance methods, and the addition or removal of servers. Furthermore, the system can gradually learn and continuously update its prediction capabilities during the long-term operation of the microservice system and governance system. Attached Figure Description

[0035] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0036] Figure 1 A flowchart illustrating a performance prediction method for microservice system governance provided in this application embodiment;

[0037] Figure 2 A schematic diagram of a microservice system model provided in an embodiment of this application;

[0038] Figure 3 A diagram illustrating the construction process of a microservice system model provided in this application embodiment;

[0039] Figure 4 This is a schematic diagram of the structure of a performance prediction system for microservice system governance provided in an embodiment of this application. Detailed Implementation

[0040] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of this application with unnecessary detail.

[0041] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0042] It should also be understood that the terminology used in this application specification is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this application specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0043] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0044] Many specific details are set forth in the following description in order to provide a full understanding of this application. However, this application may also be implemented in other ways different from those described herein. Those skilled in the art can make similar extensions without departing from the spirit of this application. Therefore, this application is not limited to the specific embodiments disclosed below.

[0045] Example 1

[0046] This application provides a performance prediction method for microservice system governance, wherein the microservice system includes a server cluster, and each server deploys several microservice instances, such as... Figure 1 As shown, the performance prediction method includes:

[0047] Step 11: Obtain microservice information, wherein the microservice information includes microservice system information, governance method information, and user request information;

[0048] Optionally, the microservice system information includes performance metrics of the microservice system, including various performance-related information such as the performance metrics of each interface of the microservice instance from receiving a request to returning a response, including but not limited to response time and energy consumption. Furthermore, the overall performance metrics of the microservice system can be calculated from the aforementioned performance-related information, providing a data foundation for building the performance prediction model in subsequent step 14.

[0049] The governance measures information includes governance measures related to the service deployment and request forwarding of each microservice instance. Among them, the governance measures related to service deployment include the server where the microservice instance is located, resource (CPU and MEM) allocation, number of instances, etc., and the governance measures related to request forwarding include routing, load balancing and traffic control strategies, etc.

[0050] The user request information includes the number of user requests input to the microservice system within time T, the size of the request data, and user-specific attributes. Further, it may include the timestamps of the microservice instance receiving the request and the timestamps of the microservice instance issuing the request. In addition, the above microservice information also includes other basic information needed for subsequent performance prediction, which is not limited here.

[0051] Step 12: Construct a microservice system model based on the microservice information and obtain a directed graph of the system;

[0052] Optional, such as Figure 2 As shown, the microservice system model includes: a server model, a microservice model, a microservice instance model, a governance mechanism model, and a user request model.

[0053] Optionally, constructing a microservice system model based on the microservice information includes:

[0054] The server model and the microservice model are constructed based on the microservice system information. The server model is used to describe the physical location of each server, all resources of each server, and the microservice instances deployed on each server. The microservice model is used to describe all interfaces contained in each microservice instance, the corresponding request paths, the amount of data passed in and out of the interfaces, the functional descriptions provided by the interfaces, and the resources required for the normal operation of each microservice instance.

[0055] The microservice instance model is constructed based on the microservice system information and the user request information, which is used to describe the user requests related to each microservice instance, the resource allocation on each server, and the performance indicators of a single microservice instance.

[0056] The governance method model is constructed based on the governance method information. It is used to describe the governance methods related to the service deployment and request forwarding of each microservice instance. It can also be used to describe some governance methods related to user requests, such as the timestamp of a microservice instance receiving or sending a request.

[0057] The user request model is constructed based on the user request information to describe the number of user requests, the size of the request data, and the user-specific attributes input into the microservice system.

[0058] Optionally, the various types of data in the microservice system model described above can be expressed in mathematical form.

[0059] Optionally, the original microservice system includes a collection of microservices, a server cluster, and a governance system for managing the microservice system. The advantage of microservice architecture lies in breaking down complex business processes into multiple business processes, which naturally have chained dependencies, making them suitable for representing the microservice system using a graph structure. By combining independent microservice instances into chained dependencies, these chained dependencies can be combined into a directed graph encompassing all microservice instances. Therefore, as... Figure 3 As shown in the embodiments of this application, obtaining the system directed graph includes: determining the request dependency relationships between each microservice instance and the request call relationships between each server corresponding to each microservice instance based on the microservice system model; constructing the system directed graph based on the request dependency relationships and the request call relationships; wherein, in the system directed graph, each node represents each server, the attributes on each node represent the microservice instances deployed on each server, and the directed edges represent the request dependency relationships between the microservice instances deployed on each server.

[0060] Specifically, firstly, the request dependencies (data transfer) between microservice instances are extracted based on performance metrics. Combined with appropriate governance measures, this yields the request call relationships between the servers hosting the microservice instances. The request dependencies of a single link are constructed as a tree, and multiple links are constructed as a directed graph. Then, the user request information of the entire microservice system is transformed into attributes of nodes in the directed graph based on the corresponding microservice instance. Finally, based on the request links between microservice instances and the number of user requests originating from the microservice instance, user requests are propagated along the request links to other microservice instances, thus obtaining the directed graph of the system.

[0061] The embodiments of this application can support the joint modeling of microservice systems and governance methods, thereby predicting the performance changes of microservice systems under different governance methods. Furthermore, the embodiments of this application are flexibly compatible with most existing governance methods, supporting governance personnel in developing more personalized microservice system governance solutions in real-world situations, allowing for the observation of governance effects without requiring deployment.

[0062] Step 13: Based on the directed graph of the system and the microservice information, perform performance prediction on each microservice instance to obtain the performance prediction value for a single microservice instance.

[0063] Optionally, based on the directed graph of the system obtained in step 12, performance prediction is first performed for a single microservice instance. Specifically, the performance prediction for each microservice instance based on the directed graph of the system and the microservice information includes:

[0064] The number of users for each interface within each microservice instance and the server's resource allocation to the corresponding microservice instance are used as input features. Based on the performance indicators of a single microservice instance under the combined effect of user requests and corresponding governance measures, machine learning methods are used to characterize the multidimensional input features of a single microservice instance into the performance indicators, obtaining the performance prediction values ​​for each single microservice instance, which are then provided for the next step of predicting the overall microservice system performance. Specifically, the number of users for each interface within each microservice instance, the server's resource allocation to the corresponding microservice instance, and the performance indicators of a single microservice instance can be obtained based on microservice information and / or the microservice system model.

[0065] This application proposes a novel method for performance prediction of a single microservice instance. Compared to existing methods, it considers the effects of various governance measures on a single microservice instance, thus more comprehensively adapting to the performance prediction needs of microservices in microservice governance scenarios. By predicting the performance of a single microservice instance, it simplifies features, acts as a mapping mechanism, reduces the dimensionality of feature data, minimizes the influence of irrelevant features, and improves prediction accuracy. Simultaneously, it reduces the computational load in subsequent steps, thereby supporting performance prediction for large-scale microservice systems.

[0066] Step 14: By training a graph neural network, a performance prediction model is obtained by combining the performance prediction values, the directed graph of the system, and the microservice information. The performance prediction model is then used to predict the overall performance of the microservice system.

[0067] Optionally, the step of obtaining the performance prediction model by training a graph neural network and combining the performance prediction values, the directed graph of the system, and the microservice information includes:

[0068] The performance prediction values ​​for each individual microservice instance are embedded as features into each node of the system's directed graph. Then, the system's directed graph is used as input, and the overall performance index of the microservice system is used as output. The graph neural network is then used for training to obtain the performance prediction model.

[0069] This application proposes a novel method for performance prediction of microservice systems based on graph neural networks. Compared with traditional mathematical modeling methods, the method provided by this application does not require prior knowledge of the details of microservices, treating microservices as black boxes and protecting the privacy of developers.

[0070] As can be seen from the above, research has found that modeling microservice systems and governance methods based on deep learning methods, combined with containers and Kubernetes, can construct a more accurate microservice system performance prediction method that is compatible with multiple governance methods and metrics. This is the performance prediction method for microservice system governance provided in this application. Compared to traditional mathematical modeling methods, this method not only supports multiple microservice governance methods and combinations thereof, but also, by learning from historical data of the microservice system and collecting operational data under different governance methods over a period of time, ultimately predicts the response results of various performance metrics of the microservice system under certain combinations of governance methods. This helps microservice system governance personnel adjust governance plans in a timely manner, saving actual deployment time and costs. Furthermore, it eliminates the need for prior knowledge of the microservice implementation details, treating the microservice as a black box and protecting developer privacy. It is suitable for guiding the governance of a long-running microservice system that supports version iteration.

[0071] Example 2

[0072] This application provides a performance prediction system for microservice system governance, such as... Figure 4 As shown, the performance prediction system includes: a microservice system monitoring module, a microservice system modeling module, and a microservice system performance prediction module. The microservice system performance prediction module includes a single microservice prediction module and an overall microservice prediction module.

[0073] Specifically, the microservice system monitoring module is used to obtain microservice information, which includes microservice system information, governance method information, and user request information. Optionally, the microservice system monitoring module is also used to monitor the running status of the microservice system and follow the entire process of the microservice system in order to collect relevant performance indicators of the microservice system in real time.

[0074] The microservice system modeling module is used to construct a microservice system model based on the microservice information and obtain a directed graph of the system.

[0075] The single microservice prediction module is used to predict the performance of each microservice instance based on the system directed graph and the microservice information, and obtain the performance prediction value for each single microservice instance.

[0076] The overall microservice prediction module is used to obtain a performance prediction model by training a graph neural network, combining the performance prediction values, the directed graph of the system, and the microservice information, and then using the performance prediction model to predict the overall microservice system performance.

[0077] As can be seen from the above, the performance prediction system for microservice system governance provided in this application supports various microservice governance methods and combinations thereof. By learning from historical data of the microservice system and collecting operational data under different governance methods over a period of time, it ultimately predicts the response results of various performance indicators of the microservice system under certain combinations of governance methods. This helps microservice system governance personnel adjust governance plans in a timely manner, saving time and costs in actual deployment. Furthermore, the system can not only robustly adapt to various changing situations but also maintain its original predictive capabilities. These various changing situations include, but are not limited to, microservice updates and upgrades, changes in the microservice set, updates to governance methods, and the addition or removal of servers. In addition, the system can gradually learn and continuously update its prediction capabilities during the long-term operation of the microservice system and governance system. It is suitable for guiding the governance of a long-running microservice system that supports version iteration.

[0078] Example 3

[0079] This application provides a performance prediction device for microservice system governance. The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The memory stores software programs and modules, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory and processor are connected via a bus. Specifically, the processor implements any step in Embodiment 1 by running the computer program stored in the memory.

[0080] It should be understood that, in the embodiments of this application, the processor may be a Central Processing Unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0081] Memory may include read-only memory, flash memory, and random access memory, and provides instructions and data to the processor. Some or all of the memory may also include non-volatile random access memory.

[0082] As can be seen from the above, the performance prediction device for microservice system governance provided in this application supports multiple microservice governance methods and combinations thereof. By learning from historical data of the microservice system and collecting operational data under different governance methods over a period of time, it ultimately predicts the response results of various performance indicators of the microservice system under certain combinations of governance methods. This helps microservice system governance personnel adjust governance plans in a timely manner, saving actual deployment time and costs. It is suitable for guiding the governance of a long-running microservice system that supports version iteration.

[0083] It should be understood that if the integrated modules / units described above are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction.

[0084] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

[0085] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the above device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0086] It should be noted that the methods and detailed examples provided in the above embodiments can be incorporated into the apparatus and devices provided in the embodiments, and can be referred to each other, without further elaboration.

[0087] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0088] In the embodiments provided in this application, it should be understood that the disclosed apparatus / terminal devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of the modules or units described above is merely a logical functional division, and in actual implementation, it can be divided in other ways. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0089] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A performance prediction method for microservice system governance, the microservice system comprising a server cluster, each server deploying a number of microservice instances, characterized in that, The performance prediction method includes: Obtain microservice information, wherein the microservice information includes microservice system information, governance method information, and user request information. The microservice system information includes the performance indicators of the microservice system. The governance method information includes governance methods related to the service deployment and request forwarding of each microservice instance. The user request information includes the number of user requests input to the microservice system, the size of the request data, and user-specific attributes. A microservice system model is constructed based on the microservice information, and a directed graph of the system is obtained. The microservice system model includes: a server model, a microservice model, a microservice instance model, a governance method model, and a user request model. Based on the directed graph of the system and the microservice information, performance prediction is performed on each microservice instance to obtain a performance prediction value for a single microservice instance. The number of users of each interface included in each microservice instance and the server's resource allocation to the corresponding microservice instance are used as input features. Based on the performance index of the single microservice instance, machine learning methods are used to characterize the multidimensional input features of the single microservice instance into the performance index to obtain the performance prediction value for each single microservice instance. A performance prediction model is obtained by training a graph neural network, combining the performance prediction values, the system directed graph, and the microservice information. The performance prediction model is used to predict the overall performance of the microservice system. The performance prediction values ​​for each individual microservice instance are embedded as features into each node of the system directed graph. The system directed graph is then used as input, and the performance indicators of the microservice system are used as output. The graph neural network is then used for training to obtain the performance prediction model.

2. The performance prediction method of claim 1, wherein, The step of constructing a microservice system model based on the microservice information includes: The server model and the microservice model are constructed based on the microservice system information. The server model is used to describe the physical location of each server, all resources of each server, and the microservice instances deployed on each server. The microservice model is used to describe all interfaces contained in each microservice instance, the corresponding request paths, the amount of data passed in and out of the interfaces, the functional descriptions provided by the interfaces, and the resources required for the normal operation of each microservice instance. The microservice instance model is constructed based on the microservice system information and the user request information, which is used to describe the user requests related to each microservice instance, the resource allocation on each server, and the performance indicators of a single microservice instance. The governance method model is constructed based on the governance method information to describe the governance methods related to the service deployment and request forwarding of each microservice instance. The user request model is constructed based on the user request information to describe the number of user requests, the size of the request data, and the user-specific attributes input into the microservice system.

3. The performance prediction method of claim 2, wherein, The resulting directed graph of the system includes: Based on the microservice system model, the request dependencies between microservice instances and the request invocation relationships between servers corresponding to each microservice instance are determined. The system directed graph is constructed based on the request dependencies and the request invocation relationships. In the system directed graph, each node represents each server, the attributes on each node represent the microservice instances deployed on each server, and the directed edges represent the request dependencies between the microservice instances deployed on each server.

4. A performance prediction system for microservice system governance, characterized in that, include: The microservice system monitoring module is used to obtain microservice information, which includes microservice system information, governance method information, and user request information. The microservice system information includes the performance indicators of the microservice system, the governance method information includes the governance methods related to the service deployment and request forwarding of each microservice instance, and the user request information includes the number of user requests input to the microservice system, the size of the request data, and user-specific attributes. The microservice system modeling module is used to construct a microservice system model based on the microservice information and obtain a directed graph of the system. The microservice system model includes: a server model, a microservice model, a microservice instance model, a governance method model, and a user request model. The single microservice prediction module is used to predict the performance of each microservice instance based on the system directed graph and the microservice information, and obtain the performance prediction value for each single microservice instance. The number of users of each interface included in each microservice instance and the server's resource allocation to the corresponding microservice instance are used as input features. Based on the performance index of the single microservice instance, machine learning methods are used to characterize the multidimensional input features of the single microservice instance into the performance index, and obtain the performance prediction value for each single microservice instance. The overall microservice prediction module is used to obtain a performance prediction model by combining the performance prediction values, the system directed graph, and the microservice information through graph neural network training. The performance prediction model is used to predict the overall microservice system performance. The performance prediction values ​​for each individual microservice instance are embedded as features into each node of the system directed graph. Then, the system directed graph is used as input, the performance indicators of the microservice system are used as output, and the graph neural network is used for training to obtain the performance prediction model.

5. An efficiency prediction device for microservice system governance, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor, when executing the computer program, implements the steps of the method as claimed in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 5. When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Micro-service response time prediction method and system based on graph neural network

    CN114020326A