Micro-service supervision method and device, equipment and storage medium
By building a unified target supervision platform, the supervision problems of microservice architecture in multi-cloud environments are solved, real-time and efficient supervision and performance optimization are achieved, and the stability and reliability of microservice applications are enhanced.
Patent Information
- Application Number
- CN202510186689.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-20
- Publication Date
- 2025-05-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
It is difficult for the existing technology to achieve real-time and efficient supervision of microservice architectures in multi-cloud environments, especially in the dynamically expanded and shrinking microservice instances, which lack comprehensive monitoring of complex performance indicators and flexible and customized alarm mechanisms.
By building a unified target supervision platform, using standardized interface packaging, resource management methods and data format conversion, unified management of different cloud service platforms can be achieved. The platform includes a registration center, an intelligent analysis engine and a visual management interface, which can monitor microservice instances in real time, analyze operating data, and provide in-depth performance monitoring and failure analysis.
Real-time and efficient supervision of microservice architecture in multi-cloud environments is achieved, manual intervention and operation and maintenance costs are reduced, resource allocation and performance tuning are performed through intelligent analysis engines, and the stability and reliability of microservice applications are enhanced.
Smart Images

Figure CN119996497A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud computing technology, and in particular to a microservice supervision method, device, equipment and storage medium. Background Art
[0002] With the rapid development of cloud computing technology, enterprises and service providers are increasingly relying on cloud platforms to deploy applications and services. Different cloud service providers provide different API interfaces and resource management methods, making it difficult for the regulatory system to achieve unified management. Microservice instances will dynamically expand and shrink according to demand, requiring real-time monitoring and scheduling to ensure the stability of applications. There are complex dependencies between microservice applications, which require in-depth analysis to identify the cause of failures and performance bottlenecks. Many existing resource monitoring tools can only provide basic monitoring functions, such as CPU usage and memory usage, but lack comprehensive monitoring of complex performance indicators, such as network latency and disk I / O response time. Although existing monitoring tools can generate alarms, they often lack flexibility and customization, and cannot set personalized alarm thresholds and notification methods according to the business needs of different users. Cloud platform users usually need to integrate multiple monitoring tools to meet different monitoring needs, which increases the complexity of the system and operation and maintenance costs.
[0003] To sum up, how to monitor the microservice architecture in a multi-cloud environment in real time and efficiently is a technical problem that needs to be solved urgently. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a microservice supervision method, device, equipment and storage medium, which can monitor the microservice architecture in a multi-cloud environment in real time and efficiently. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a microservice supervision method, including:
[0006] Determine a number of cloud service platforms, and build a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms;
[0007] Register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests;
[0008] Using the target supervision platform to monitor the microservice instance to obtain operation data when the microservice instance runs the request;
[0009] The operation data is analyzed by the intelligent analysis engine in the target supervision platform to obtain analysis results, and the analysis results are displayed using the visual management interface of the target supervision platform.
[0010] Optionally, the building of a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms includes:
[0011] Standardize and encapsulate the target interface of each cloud service platform to determine the target interface calling method corresponding to the target supervision platform;
[0012] Determine the target resource management mode corresponding to the target supervision platform according to the resource management mode of each of the cloud service platforms;
[0013] The data formats of each of the cloud service platforms are converted and standardized to obtain the target data format corresponding to the target supervision platform, and the target supervision platform is constructed based on the target interface calling method, the target resource management method and the target data format.
[0014] Optionally, before calling the microservice instance in the registration center to process the corresponding request, the method further includes:
[0015] Perform corresponding routing processing on the request according to a preset load balancing strategy so as to transmit the request to the corresponding microservice instance;
[0016] If it is determined that the state of the microservice instance is a preset fault state, the microservice instance in the registration center is stopped from being called to process the corresponding request.
[0017] Optionally, the using the target supervision platform to monitor the microservice instance to obtain operation data when the microservice instance executes the request includes:
[0018] Based on the preset distributed tracing technology, the target supervision platform is used to monitor the microservice instance to obtain the target call link when the microservice instance runs the request, so as to analyze the target dependency relationship of the microservice instance based on the target call link;
[0019] Based on the preset log collection technology, the target supervision platform is used to monitor the microservice instance to obtain the target operation log when the microservice instance runs the request, so as to perform fault analysis on the microservice instance based on the target operation log;
[0020] The target supervision platform is used to monitor the microservice instance based on the preset indicator collection technology to obtain the target performance indicator when the microservice instance runs the request, so as to monitor the target operating state of the microservice instance based on the target performance indicator.
[0021] Optionally, analyzing the operation data by an intelligent analysis engine in the target supervision platform to obtain an analysis result includes:
[0022] Acquire, through the target supervision platform, historical data of the microservice instance when running the request and a target load of the target microservice application corresponding to the microservice instance;
[0023] Determine the failure to be prevented corresponding to the microservice instance using the operation data, the historical data and the preset alarm threshold based on a preset machine learning algorithm, and process the failure to be prevented based on a preset notification strategy;
[0024] The number of the microservice instances in the target microservice application is adjusted according to the target load.
[0025] Optionally, analyzing the operation data by an intelligent analysis engine in the target supervision platform to obtain an analysis result includes:
[0026] A target behavior model and a target dependency graph corresponding to the target microservice application are constructed, so as to analyze the operation data based on the target behavior model and the target dependency graph to obtain an analysis result.
[0027] Optionally, the microservice supervision method further includes:
[0028] Deploy the microservice instance to a target cloud service platform based on the configuration file corresponding to the microservice instance, and manage the configuration file corresponding to the microservice instance based on a preset operation and maintenance strategy and a preset operation and maintenance process;
[0029] If it is determined that the state of the microservice instance is a preset fault state, the microservice instance is restored based on the preset operation and maintenance strategy and the preset operation and maintenance process, so as to call the restored microservice instance to process the corresponding request.
[0030] In a second aspect, the present application provides a microservice monitoring device, including:
[0031] A target supervision platform construction module is used to determine a number of cloud service platforms and construct a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms;
[0032] A microservice instance calling module, used to register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests;
[0033] A microservice instance monitoring module, used to monitor the microservice instance using the target supervision platform to obtain operation data when the microservice instance runs the request;
[0034] The operation data analysis module is used to analyze the operation data through the intelligent analysis engine in the target supervision platform to obtain analysis results, and display the analysis results using the visual management interface of the target supervision platform.
[0035] In a third aspect, the present application provides an electronic device, including:
[0036] Memory, used to store computer programs;
[0037] A processor is used to execute the computer program to implement the aforementioned microservice supervision method.
[0038] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned microservice supervision method is implemented.
[0039] In this application, first determine a number of cloud service platforms, and build a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms; then register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process the corresponding requests; then use the target supervision platform to monitor the microservice instances to obtain the operation data when the microservice instances run the requests; finally, analyze the operation data through the intelligent analysis engine in the target supervision platform to obtain the analysis results, and use the visual management interface of the target supervision platform to display the analysis results. As can be seen from the above, in this application, a unified monitoring platform is constructed to monitor the operation data of microservice instances in real time, which reduces manual intervention and repetitive work and reduces operation and maintenance costs. At the same time, resource allocation and performance tuning can be better performed through the intelligent analysis engine. And this application can timely discover and deal with potential problems and risks through real-time monitoring and intelligent analysis, and enhance the stability and reliability of microservice applications. At the same time, intuitive data display and operation guidance are provided through the visual management interface to facilitate users to troubleshoot and make decisions. In this way, the present application can monitor the microservice architecture in a multi-cloud environment in real time and efficiently. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0041] Figure 1 A flow chart of a microservice supervision method provided for this application;
[0042] Figure 2 A specific functional diagram of the adaptation layer provided for this application;
[0043] Figure 3 A specific microservice supervision method flow chart provided for this application;
[0044] Figure 4 A specific target regulatory platform functional diagram provided for this application;
[0045] Figure 5 A schematic diagram of the structure of a microservice monitoring device provided for this application;
[0046] Figure 6 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0048] With the rapid development of cloud computing technology, enterprises and service providers are increasingly relying on cloud platforms to deploy applications and services. Different cloud service providers provide different API interfaces and resource management methods, which makes it difficult for the supervision system to achieve unified management. Microservice instances will dynamically expand and shrink according to demand, and real-time monitoring and scheduling are required to ensure the stability of the application. There are complex dependencies between microservice applications, and in-depth analysis is required to identify the cause of failures and performance bottlenecks. Many existing resource monitoring tools can only provide basic monitoring functions, such as CPU usage, memory usage, etc., but lack comprehensive monitoring of complex performance indicators, such as network latency, disk I / O response time, etc. Although existing monitoring tools can generate alarms, they often lack flexibility and customization, and cannot set personalized alarm thresholds and notification methods according to the business needs of different users. Cloud platform users usually need to integrate multiple monitoring tools to meet different monitoring needs, which increases the complexity and operation and maintenance costs of the system. To this end, the present application provides a microservice supervision solution that can monitor the microservice architecture in a multi-cloud environment in real time and efficiently.
[0049] See also Figure 1 As shown, an embodiment of the present invention discloses a microservice supervision method, which may include:
[0050] Step S11: determine a number of cloud service platforms, and build a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms.
[0051] Since different cloud service providers provide different API interfaces and resource management methods, it is difficult to achieve unified management of the supervision system. In this embodiment, in order to ensure that the target supervision platform can seamlessly connect to various cloud resources and services, the above-mentioned construction of the target supervision platform based on the interface information and resource management methods of each cloud service platform may include: standardizing and encapsulating the target interface of each cloud service platform to determine the target interface calling method corresponding to the target supervision platform; determining the target resource management method corresponding to the target supervision platform according to the resource management method of each cloud service platform; standardizing and converting the data format of each cloud service platform to obtain the target data format corresponding to the target supervision platform, and constructing the target supervision platform based on the target interface calling method, the target resource management method and the target data format. For details, see Figure 2 As shown in the figure, a unified adaptation layer is designed and implemented. Through the adaptation layer, unified management of API interfaces and resource management methods of different cloud service providers is achieved, cloud resources, microservice instances, network traffic, performance indicators and other information are collected and integrated, and real-time and comprehensive monitoring data is provided. The target monitoring platform supports custom monitoring items, alarm rules and notification strategies, and can reflect the operating status and performance of microservice applications in real time. The adaptation layer can include the following functions:
[0052] (1) API interface adaptation: Standardize and encapsulate the API interfaces of different cloud service providers and provide a unified interface calling method.
[0053] (2) Resource management adaptation: Based on the resource management methods of different cloud service providers, functions such as automatic creation, deletion, expansion and contraction of resources can be realized.
[0054] (3) Data format adaptation: Standardize and convert the data formats provided by different cloud service providers to ensure data accuracy and consistency.
[0055] Step S12: register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests.
[0056] In this embodiment, before calling the microservice instance in the registration center to process the corresponding request, it may also include: performing corresponding routing processing on the request according to a preset load balancing strategy so as to transmit the request to the corresponding microservice instance; if it is determined that the state of the microservice instance is a preset fault state, then stop calling the microservice instance in the registration center to process the corresponding request. Specifically, automatic discovery and registration of microservice instances can be achieved through a registration center or a configuration center. Combined with service governance mechanisms such as load balancing, circuit breaker degradation, etc., ensure the high availability and stability of microservice applications. Microservice instance management may include the following functions:
[0057] (1) Service discovery: Automatically discover and register microservice instances to ensure the availability of microservice applications.
[0058] (2) Service registration: Register the microservice instance to the registration center to facilitate calls by other microservice applications.
[0059] (3) Service routing: Route requests to different microservice instances based on the load balancing strategy.
[0060] (4) Service circuit breaker: When a microservice instance fails, it automatically disconnects from other microservice applications to prevent the failure from spreading.
[0061] Step S13: Use the target supervision platform to monitor the microservice instance to obtain the operation data of the microservice instance when running the request.
[0062] In this embodiment, the use of the target supervision platform to monitor the microservice instance to obtain the operation data when the microservice instance runs the request may include: using the target supervision platform to monitor the microservice instance based on the preset distributed tracing technology to obtain the target call link when the microservice instance runs the request, so as to analyze the target dependency of the microservice instance based on the target call link; using the target supervision platform to monitor the microservice instance based on the preset log collection technology to obtain the target operation log when the microservice instance runs the request, so as to perform fault analysis on the microservice instance based on the target operation log; using the target supervision platform to monitor the microservice instance based on the preset indicator collection technology to obtain the target performance indicator when the microservice instance runs the request, so as to monitor the target operation status of the microservice instance based on the target performance indicator. Specifically, the target supervision platform can use distributed tracing, log collection, performance indicator collection and other technical means to achieve comprehensive collection of microservice application operation data. Through standardized data formats and transmission protocols, the accuracy and real-time nature of the data are ensured. Monitoring data collection can include the following types of data:
[0063] (1) Distributed tracing data: records the call chain of microservice requests and is used to analyze dependencies and performance bottlenecks between services.
[0064] (2) Log data: records the operation logs of microservice instances for analyzing failure causes and performance issues.
[0065] (3) Performance indicator data: records the CPU, memory, network and other performance indicators of the microservice instance to monitor the operating status of the service.
[0066] Step S14: Analyze the operating data by the intelligent analysis engine in the target supervision platform to obtain analysis results, and display the analysis results using the visual management interface of the target supervision platform.
[0067] In this embodiment, the above-mentioned analysis of the operation data by the intelligent analysis engine in the target supervision platform to obtain the analysis results may include: obtaining the historical data of the microservice instance when running the request and the target load of the target microservice application corresponding to the microservice instance through the target supervision platform; determining the fault to be prevented corresponding to the microservice instance based on the preset machine learning algorithm using the operation data, the historical data and the preset alarm threshold, and processing the fault to be prevented based on the preset notification strategy; adjusting the number of the microservice instances in the target microservice application according to the target load. Specifically, for the operation data monitored by the target supervision platform, a machine learning algorithm can be used for intelligent analysis to identify potential problems and risks. By setting reasonable alarm thresholds and notification strategies, it is ensured that relevant personnel can be notified in time to handle problems when they occur. Intelligent analysis may include the following functions:
[0068] (1) Fault prediction: Based on historical data and real-time data, predict possible failures of microservice applications and take preventive measures in advance.
[0069] (2) Performance optimization: Analyze the performance bottlenecks of microservice applications and make optimization suggestions, such as adjusting service configuration and optimizing code.
[0070] (3) Resource scheduling: Dynamically adjust the allocation of cloud resources based on the load of microservice applications, such as increasing or decreasing the number of microservice instances.
[0071] It is understandable that the analysis of the operation data by the intelligent analysis engine in the target supervision platform to obtain the analysis results may include: constructing a target behavior model and a target dependency graph corresponding to the target microservice application, so as to analyze the operation data based on the target behavior model and the target dependency graph to obtain the analysis results. Specifically, the intelligent analysis engine in the target supervision platform can use advanced technologies such as machine learning and big data processing to conduct in-depth mining and analysis of the operation data. By constructing the target behavior model and target dependency graph of the microservice application, rapid location of faults, accurate identification of performance bottlenecks, and optimization suggestions for resource utilization can be achieved.
[0072] It should be noted that this embodiment provides an intuitive and easy-to-use visual management interface that supports real-time monitoring of microservice applications, historical data query, performance analysis reports, and other functions. By graphically displaying the architecture, operating status, performance indicators, and other information of microservice applications, it helps operation and maintenance personnel quickly understand the overall situation of the application, facilitating problem troubleshooting and decision-making.
[0073] In this embodiment, in order to realize the automated operation and maintenance management of microservice applications, reduce the cost of manual intervention, and improve the efficiency and reliability of operation and maintenance, it can also include: deploying the microservice instance to the target cloud service platform based on the configuration file corresponding to the microservice instance, and managing the configuration file corresponding to the microservice instance based on the preset operation and maintenance strategy and the preset operation and maintenance process; if the state of the microservice instance is determined to be a preset fault state, then restoring the microservice instance based on the preset operation and maintenance strategy and the preset operation and maintenance process, so as to call the restored microservice instance to process the corresponding request. Specifically, in combination with the automated operation and maintenance tool set, the preset operation and maintenance strategy and the preset operation and maintenance process, the automated deployment, configuration management, fault recovery and other operations of the microservice application are realized. The automated operation and maintenance process may include the following functions:
[0074] (1) Automatic deployment: Automatically deploy microservice instances to the specified cloud environment based on the configuration file.
[0075] (2) Configuration management: Automatically manage the configuration information of microservice instances, such as versions, parameters, etc.
[0076] (3) Fault recovery: When a microservice instance fails, fault recovery is automatically performed, such as restarting the instance, switching to a backup instance, etc.
[0077] See also Figure 3 As shown, in a specific implementation, a microservice supervision method may include: multi-cloud environment adaptation, microservice instance management, monitoring data collection, intelligent analysis and alarm, automated operation and maintenance process, intelligent analysis engine, and visual management interface.
[0078] See also Figure 4 As shown, in a specific implementation, the functions of the target supervision platform for microservice supervision include: multi-cloud environment adaptation, monitoring data collection, visual management interface and intelligent analysis engine. The target supervision platform can effectively solve the supervision problem of microservice architecture in a multi-cloud environment, improve the stability, reliability and operation and maintenance efficiency of microservice applications, reduce operation and maintenance costs, and improve user experience, which has important application value.
[0079] As can be seen from the above, in this embodiment, several cloud service platforms are first determined, and a target supervision platform is constructed based on the interface information and resource management methods of each of the cloud service platforms; then the microservice instances corresponding to each of the cloud service platforms are registered to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process the corresponding requests; then the target supervision platform is used to monitor the microservice instances to obtain the operation data when the microservice instances run the requests; finally, the operation data is analyzed by the intelligent analysis engine in the target supervision platform to obtain the analysis results, and the analysis results are displayed using the visual management interface of the target supervision platform. As can be seen from the above, in this embodiment, a unified monitoring platform is constructed to monitor the operation data of microservice instances in real time, which reduces manual intervention and repetitive work and reduces operation and maintenance costs. At the same time, resource allocation and performance tuning can be better performed through the intelligent analysis engine. And in this embodiment, through real-time monitoring and intelligent analysis, potential problems and risks can be discovered and handled in a timely manner, and the stability and reliability of microservice applications can be enhanced. At the same time, intuitive data display and operation guidance are provided through the visual management interface, which is convenient for users to troubleshoot and make decisions. In this way, this embodiment can monitor the microservice architecture in a multi-cloud environment in real time and efficiently.
[0080] Accordingly, see Figure 5 As shown, the embodiment of the present application also provides a microservice monitoring device, which may include:
[0081] The target supervision platform construction module 11 is used to determine a number of cloud service platforms and construct the target supervision platform based on the interface information and resource management methods of each of the cloud service platforms;
[0082] A microservice instance calling module 12 is used to register the microservice instances corresponding to each of the cloud service platforms with the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests;
[0083] A microservice instance monitoring module 13 is used to monitor the microservice instance using the target supervision platform to obtain operation data of the microservice instance when the microservice instance runs the request;
[0084] The operation data analysis module 14 is used to analyze the operation data through the intelligent analysis engine in the target supervision platform to obtain analysis results, and display the analysis results using the visual management interface of the target supervision platform.
[0085] In some specific embodiments, the target supervision platform construction module 11 may include:
[0086] A target interface calling mode determining unit, used for performing standardized encapsulation processing on the target interfaces of each of the cloud service platforms to determine the target interface calling mode corresponding to the target supervision platform;
[0087] A target resource management mode determining unit, used to determine the target resource management mode corresponding to the target supervision platform according to the resource management mode of each of the cloud service platforms;
[0088] The target supervision platform construction unit is used to standardize and convert the data formats of each cloud service platform to obtain the target data format corresponding to the target supervision platform, and to construct the target supervision platform based on the target interface calling method, the target resource management method and the target data format.
[0089] As can be seen from the above, in this application, several cloud service platforms are first determined, and a target supervision platform is constructed based on the interface information and resource management method of each of the cloud service platforms; then the microservice instances corresponding to each of the cloud service platforms are registered to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process the corresponding requests; then the target supervision platform is used to monitor the microservice instances to obtain the operation data when the microservice instances run the requests; finally, the operation data is analyzed by the intelligent analysis engine in the target supervision platform to obtain the analysis results, and the analysis results are displayed using the visual management interface of the target supervision platform. As can be seen from the above, in this application, a unified monitoring platform is constructed to monitor the operation data of microservice instances in real time, which reduces manual intervention and repetitive work and reduces operation and maintenance costs. At the same time, resource allocation and performance tuning can be better performed through the intelligent analysis engine. And this application can timely discover and deal with potential problems and risks through real-time monitoring and intelligent analysis, and enhance the stability and reliability of microservice applications. At the same time, intuitive data display and operation guidance are provided through the visual management interface, which is convenient for users to troubleshoot and make decisions. In this way, the present application can monitor the microservice architecture in a multi-cloud environment in real time and efficiently.
[0090] In some specific implementations, the microservice monitoring device may further include:
[0091] A request transmission module, used to perform corresponding routing processing on the request according to a preset load balancing strategy, so as to transmit the request to the corresponding microservice instance;
[0092] The request processing module is used to stop calling the microservice instance in the registration center to process the corresponding request if it is determined that the state of the microservice instance is a preset fault state.
[0093] In some specific implementations, the microservice instance monitoring module 13 may include:
[0094] A target call link determination unit, configured to monitor the microservice instance using the target supervision platform based on a preset distributed tracing technology to obtain a target call link when the microservice instance runs the request, so as to analyze a target dependency relationship of the microservice instance based on the target call link;
[0095] a target operation log determination unit, configured to monitor the microservice instance using the target supervision platform based on a preset log collection technology to obtain a target operation log when the microservice instance runs the request, so as to perform a fault analysis on the microservice instance based on the target operation log;
[0096] A target performance indicator determination unit is used to monitor the microservice instance using the target supervision platform based on a preset indicator collection technology to obtain the target performance indicator when the microservice instance runs the request, so as to monitor the target operating state of the microservice instance based on the target performance indicator.
[0097] In some specific implementations, the operation data analysis module 14 may include:
[0098] A historical data acquisition unit, used to acquire, through the target supervision platform, historical data of the microservice instance when running the request and a target load of a target microservice application corresponding to the microservice instance;
[0099] A failure to be prevented determining unit, configured to determine the failure to be prevented corresponding to the microservice instance by using the operation data, the historical data and a preset alarm threshold based on a preset machine learning algorithm, and process the failure to be prevented based on a preset notification strategy;
[0100] A quantity adjustment unit is used to adjust the quantity of the microservice instances in the target microservice application according to the target load.
[0101] In some specific implementations, the operation data analysis module 14 may include:
[0102] The analysis result determination unit is used to construct a target behavior model and a target dependency graph corresponding to the target microservice application, so as to analyze the operation data based on the target behavior model and the target dependency graph to obtain the analysis result.
[0103] In some specific implementations, the microservice monitoring device may further include:
[0104] A microservice instance deployment module, used to deploy the microservice instance to a target cloud service platform based on a configuration file corresponding to the microservice instance, and manage the configuration file corresponding to the microservice instance based on a preset operation and maintenance strategy and a preset operation and maintenance process;
[0105] The microservice instance recovery module is used to recover the microservice instance based on the preset operation and maintenance strategy and the preset operation and maintenance process if it is determined that the state of the microservice instance is a preset fault state, so as to call the recovered microservice instance to process the corresponding request.
[0106] Furthermore, the present application also discloses an electronic device. Figure 6 It is a structural diagram of an electronic device 20 shown according to an exemplary embodiment, and the content in the figure cannot be regarded as any limitation on the scope of use of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input and output interface 25 and a communication bus 26. Among them, the memory 22 is used to store a computer program, and the computer program is loaded and executed by the processor 21 to implement the relevant steps in the microservice supervision method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment can specifically be an electronic computer.
[0107] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0108] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0109] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the microservice supervision method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0110] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed microservice supervision method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0111] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0112] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0113] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0114] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0115] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A microservice supervision method, characterized in that: include: Determine a number of cloud service platforms, and build a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms; Register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests; Using the target supervision platform to monitor the microservice instance to obtain operation data when the microservice instance runs the request; The operation data is analyzed by the intelligent analysis engine in the target supervision platform to obtain analysis results, and the analysis results are displayed using the visual management interface of the target supervision platform.
2. The microservice supervision method according to claim 1, characterized in that: The target supervision platform is constructed based on the interface information and resource management method of each cloud service platform, including: Standardize and encapsulate the target interface of each cloud service platform to determine the target interface calling method corresponding to the target supervision platform; Determine the target resource management mode corresponding to the target supervision platform according to the resource management mode of each of the cloud service platforms; The data formats of each of the cloud service platforms are converted and standardized to obtain the target data format corresponding to the target supervision platform, and the target supervision platform is constructed based on the target interface calling method, the target resource management method and the target data format.
3. The microservice supervision method according to claim 1, characterized in that: Before calling the microservice instance in the registration center to process the corresponding request, the method further includes: Perform corresponding routing processing on the request according to a preset load balancing strategy so as to transmit the request to the corresponding microservice instance; If it is determined that the state of the microservice instance is a preset fault state, the microservice instance in the registration center is stopped from being called to process the corresponding request.
4. The microservice supervision method according to claim 1, characterized in that: The using the target supervision platform to monitor the microservice instance to obtain the operation data when the microservice instance runs the request includes: Based on the preset distributed tracing technology, the target supervision platform is used to monitor the microservice instance to obtain the target call link when the microservice instance runs the request, so as to analyze the target dependency relationship of the microservice instance based on the target call link; Based on the preset log collection technology, the target supervision platform is used to monitor the microservice instance to obtain the target operation log when the microservice instance runs the request, so as to perform fault analysis on the microservice instance based on the target operation log; The target supervision platform is used to monitor the microservice instance based on the preset indicator collection technology to obtain the target performance indicator when the microservice instance runs the request, so as to monitor the target operating state of the microservice instance based on the target performance indicator.
5. The microservice supervision method according to claim 1, characterized in that: The step of analyzing the operation data by the intelligent analysis engine in the target supervision platform to obtain the analysis result includes: Acquire, through the target supervision platform, historical data of the microservice instance when running the request and a target load of the target microservice application corresponding to the microservice instance; Determine the failure to be prevented corresponding to the microservice instance using the operation data, the historical data and the preset alarm threshold based on a preset machine learning algorithm, and process the failure to be prevented based on a preset notification strategy; The number of the microservice instances in the target microservice application is adjusted according to the target load.
6. The microservice supervision method according to claim 5, characterized in that: The step of analyzing the operation data by the intelligent analysis engine in the target supervision platform to obtain the analysis result includes: A target behavior model and a target dependency graph corresponding to the target microservice application are constructed, so as to analyze the operation data based on the target behavior model and the target dependency graph to obtain an analysis result.
7. The microservice supervision method according to any one of claims 1 to 6, characterized in that: Also includes: Deploy the microservice instance to a target cloud service platform based on the configuration file corresponding to the microservice instance, and manage the configuration file corresponding to the microservice instance based on a preset operation and maintenance strategy and a preset operation and maintenance process; If it is determined that the state of the microservice instance is a preset fault state, the microservice instance is restored based on the preset operation and maintenance strategy and the preset operation and maintenance process, so as to call the restored microservice instance to process the corresponding request.
8. A microservice monitoring device, characterized in that: include: A target supervision platform construction module is used to determine a number of cloud service platforms and construct a target supervision platform based on the interface information and resource management methods of each of the cloud service platforms; A microservice instance calling module, used to register the microservice instances corresponding to each of the cloud service platforms to the registration center of the target supervision platform, so as to call the microservice instances in the registration center to process corresponding requests; A microservice instance monitoring module, used to monitor the microservice instance using the target supervision platform to obtain operation data when the microservice instance runs the request; The operation data analysis module is used to analyze the operation data through the intelligent analysis engine in the target supervision platform to obtain analysis results, and display the analysis results using the visual management interface of the target supervision platform.
9. An electronic device, characterized in that: The electronic device includes a processor and a memory; wherein the memory is used to store a computer program, and the computer program is loaded and executed by the processor to implement the microservice supervision method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the microservice supervision method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Tactical cloud-oriented micro-service platform
CN111124670A
Micro-service monitoring method and device and computer equipment
CN118656264A
Service operation and maintenance method and system based on cloud service architecture
CN119383115A