Micro-service fault determination method and device, electronic equipment and storage medium
The method and device establish association relationships and monitoring indicators to enhance fault detection in large-scale microservice architectures, addressing inefficiencies and inaccuracies in existing systems by enabling efficient and accurate fault localization.
Patent Information
- Application Number
- CN202411022991.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-29
- Publication Date
- 2024-12-20
AI Technical Summary
Existing monitoring systems for large-scale 'Center + Middle Platform + Microservice' architectures face challenges in decentralized data sharing, manual dependency on operation and maintenance personnel, and lack of comprehensive fault localization due to complex calling relationships, leading to inefficient and inaccurate fault detection.
A method and device for determining microservice failures by establishing association relationships between services based on preset correspondences, monitoring indicators, and setting predetermined conditions to accurately detect service failures, including horizontal and vertical correspondences for comprehensive monitoring.
Improves the efficiency and accuracy of fault detection by ordering services, enabling quick and precise localization of failures through comprehensive monitoring and intelligent fault analysis.
Smart Images

Figure CN119166452A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for determining a microservice failure. Background Art
[0002] "Center + Middle Platform + Microservice" is the fundamental route for the digital transformation of modern large enterprises. In recent years, following the development path of digital transformation of "Middle Platform + Microservice", the cloud platform + microservice system architecture has been deeply promoted, and a number of large-scale digital systems with flexible deployment and agile iteration have been established, such as Marketing 2.0. With the continuous improvement of management requirements, the defects and shortcomings of the existing information monitoring and management model are increasingly reflected, mainly in two aspects: First, the information monitoring of multiple systems is decentralized, data sharing is insufficient, and it is impossible to accurately and comprehensively analyze and locate monitoring anomalies. Second, data monitoring and risk monitoring are too dependent on manual labor, and early warning analysis is overly dependent on the experience of operation and maintenance personnel, which cannot achieve the purpose of timely early warning and risk avoidance. The traditional manual operation and maintenance method is difficult to trace the source of faults, and the complex calling relationship of microservices has aggravated the workload and difficulty of operation and maintenance. There are few operation monitoring platforms for large-scale "Middle Platform + Microservice" architecture systems, so there is a problem of difficulty in locating faults. Summary of the invention
[0003] In view of this, the purpose of the present application is to propose a method, device, electronic device and storage medium for determining microservice failures to overcome all or part of the deficiencies in the prior art.
[0004] Based on the above purpose, the present application provides a method for determining a microservice failure, including: obtaining multiple services and monitoring indicators corresponding to each service; establishing an association relationship between multiple services based on a preset correspondence relationship; monitoring the monitoring indicators corresponding to the services with an association relationship to obtain monitoring data; in response to determining that the monitoring data does not meet a predetermined condition, determining that a service failure has occurred.
[0005] Optionally, the preset correspondence includes a preset horizontal correspondence and a preset vertical correspondence; establishing an association relationship between multiple services based on the preset correspondence includes: establishing an association relationship between the execution orders corresponding to multiple services based on the preset horizontal correspondence; establishing an association relationship between the execution actions corresponding to multiple services based on the preset vertical correspondence.
[0006] Optionally, the monitoring data includes front monitoring data, middle monitoring data and post monitoring data; the monitoring of monitoring indicators corresponding to the services with associated relationships to obtain monitoring data includes: before the services are run, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the front monitoring data; during the service operation, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the middle monitoring data; after the services are run, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the post monitoring data.
[0007] Optionally, the method for setting the predetermined condition includes: setting the predetermined condition based on preset design conditions and multiple monitoring indicators.
[0008] Optionally, after determining that a service failure occurs, the method includes: determining a failure level corresponding to the failure based on the failure; generating warning information corresponding to the failure level based on the failure level, and pushing the warning information to a predetermined user.
[0009] Optionally, after establishing association relationships among the multiple services based on the preset corresponding relationships, the method includes: displaying the association relationships among the multiple services.
[0010] Optionally, the method further includes: in response to receiving a modification instruction for the association relationship, modifying the association relationship based on the modification instruction.
[0011] Based on the same inventive concept, the present application also provides a device for determining a microservice failure, including: an acquisition module, configured to acquire multiple services and monitoring indicators corresponding to each service; an establishment module, configured to establish an association relationship between multiple services based on a preset correspondence; a monitoring module, configured to monitor the monitoring indicators corresponding to the services with an association relationship to obtain monitoring data; a determination module, configured to determine that a service failure has occurred in response to determining that the monitoring data does not meet a predetermined condition.
[0012] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable by the processor, wherein the processor implements the method as described above when executing the computer program.
[0013] Based on the same inventive concept, the present application also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable a computer to execute the method as described above.
[0014] As can be seen from the above, the present application provides a method, device, electronic device and storage medium for determining a microservice failure, and the method includes obtaining multiple services and monitoring indicators corresponding to each service. Based on a preset corresponding relationship, an association relationship is established between multiple services, so that disordered services are ordered, thereby improving the efficiency of finding services. The monitoring indicators corresponding to the services with associated relationships are monitored to obtain monitoring data, thereby achieving the purpose of accurately and comprehensively monitoring the services. In response to determining that the monitoring data does not meet the predetermined conditions, it is determined that a service failure has occurred, which improves the accuracy of determining the service failure and achieves the purpose of quickly locating the service failure. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions in the present application or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 A flowchart of a method for determining a microservice failure according to an embodiment of the present application;
[0017] Figure 2 A schematic diagram of the association relationship between services in an embodiment of the present application;
[0018] Figure 3 This is a schematic diagram of the structure of a device for determining a microservice failure according to an embodiment of the present application;
[0019] Figure 4 This is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0020] In order to make the objectives, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0021] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should be the usual meanings understood by people with ordinary skills in the field to which the present application belongs. The "first", "second" and similar words used in the embodiments of the present application do not represent any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing in front of the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0022] As described in the background technology section, State Grid Corporation of China, as a large-scale livelihood enterprise, provides power supply services to 26 provincial companies across the country. Each professional business is complex, the number of users is huge, and there are many large-scale information systems. At present, provincial power companies have built core business systems of large companies such as Marketing 2.0, Use and Procurement 2.0, Power Grid Resource Business Middle Platform, and Project Middle Platform. Marketing 2.0, which has been built in 27 provincial grid companies, has deployed more than 300 microservices and more than 20 data services, with about 16,000 microservice interfaces and about 4,000 data service interfaces. The service call relationship is complicated, and there is no operation monitoring system suitable for this architecture. At present, monitoring systems based on I6000, Zabbix, etc. are mainly for structured data, and unstructured data mainly relies on business data in log files and interfaces. The monitoring content is scattered, and there is a lack of operation monitoring platform for large-scale "middle platform + microservice" architecture systems. It is urgent to establish a monitoring system for the relationship between business and system, data, and resources to fully support the operation monitoring platform of the marketing 2.0 system. However, the monitoring tools currently used are numerous and scattered, making it difficult to troubleshoot when a fault occurs; monitoring data is deployed in a scattered manner and stored independently, making it difficult to view the system problem discovery links and impact range from a top-level perspective. An operation monitoring system suitable for this architecture has not yet been established, making it difficult to support the development of operation and maintenance monitoring in the direction of lean, active, and intelligent, and to improve the operation and maintenance monitoring service capabilities.
[0023] At present, there is a monitoring platform based on power grid business. The system content includes service layer call link construction module, service on / off analysis module, service centralized alarm module, service error analysis module, full-link detection indicator system module, full information service management module, etc., to realize the monitoring of power grid business middle platform. However, it only monitors the important components of a large system, and does not realize the comprehensive monitoring of the power grid business application system. In addition, the monitoring method vertically runs through the system's collection layer, data layer, service layer and presentation layer, but does not monitor from a business perspective, making it difficult to trace the impact scope and display and problem analysis of the links when tracking problems. For large-scale information systems built with the "center + middle platform + microservices" architecture, there is a lack of a complete operation monitoring platform to realize multi-dimensional monitoring capabilities.
[0024] It should be noted that the capability center is a component of the customer service business platform, which is a business capability pool based on domain model decomposition, consisting of basic business capabilities and combined business capabilities. The interface is a reference type that defines the agreement. The interface specifies the members that must be provided by the class or other interfaces that implement it. The service interface is a formal description of a specific function, defining the parameters and return results required to implement the function.
[0025] In view of this, the present application embodiment proposes a method for determining a microservice failure, referring to Figure 1 , including the following steps:
[0026] Step 101, obtain multiple services and monitoring indicators corresponding to each service.
[0027] In this step, with the development of enterprise digitalization, more and more large-scale platforms are used by enterprises, and there is a lack of operation monitoring platforms to monitor the above-mentioned large-scale platforms. In order to solve the above problems, this application must first obtain multiple services to be monitored in the above-mentioned large platforms, where multiple services include microservices and / or businesses. Microservices refer to a single application that contains many loosely coupled and independently deployable small components or services, and businesses are the businesses that need to be processed in the middle platform. It is also necessary to obtain the monitoring indicators corresponding to each service to reflect the monitoring content of each service.
[0028] Step 102: establishing association relationships among multiple services based on preset corresponding relationships.
[0029] In this step, if there are relatively many services to be monitored, if the association relationship between multiple services is not established, the efficiency of service search will be low, resulting in a lack of orderly monitoring of services in the future. Therefore, based on the preset corresponding relationship, the association relationship between multiple services is established, and the disordered services are ordered through the association relationship established between the services, thereby improving the efficiency of service search.
[0030] Step 103: monitor the monitoring indicators corresponding to the associated services to obtain monitoring data.
[0031] In this step, the monitoring data is the data obtained by monitoring the associated services. In the case of a service failure, the monitoring data corresponding to the monitoring indicators of the above service may be reflected as normal data. However, due to the failure of the above service, the monitoring data corresponding to the monitoring indicators of the service associated with the above service may be reflected as abnormal data. Therefore, the monitoring indicators corresponding to the associated services are monitored to obtain monitoring data, thereby achieving the purpose of accurately and comprehensively monitoring the services.
[0032] Step 104: In response to determining that the monitoring data does not satisfy a predetermined condition, determining that a service failure occurs.
[0033] In this step, if the monitoring data does not meet the predetermined conditions, it indicates that the service has failed. By comparing the monitoring data with the predetermined conditions, the accuracy of determining the service failure is improved, thereby achieving the purpose of quickly locating the service failure.
[0034] Through the above scheme, multiple services and the monitoring indicators corresponding to each service are obtained. Based on the preset corresponding relationship, the association relationship between multiple services is established, so that the disordered services are ordered, thereby improving the efficiency of service search. The monitoring indicators corresponding to the services with associated relationships are monitored to obtain monitoring data, thereby achieving the purpose of accurately and comprehensively monitoring the services. In response to determining that the monitoring data does not meet the predetermined conditions, it is determined that a service failure has occurred, which improves the accuracy of determining the service failure and achieves the purpose of quickly locating the service failure.
[0035] In some embodiments, the preset correspondence includes a preset horizontal correspondence and a preset vertical correspondence; establishing an association relationship between multiple services based on the preset correspondence includes: establishing an association relationship between the execution orders corresponding to multiple services based on the preset horizontal correspondence; establishing an association relationship between the execution actions corresponding to multiple services based on the preset vertical correspondence.
[0036] In this embodiment, when there are relatively many services to be monitored, it is necessary to accurately establish the association relationship between the services in order to achieve the purpose of searching for the services. Figure 2As shown, this embodiment adopts the design idea of "horizontally full link, vertically full association", and establishes the association relationship between multiple services from the preset horizontal correspondence and the preset vertical correspondence. According to the business item partition, the monitoring indicators are designed with the business scenario as the unit, and the indicator system based on the interaction between system levels is improved. There is an execution order between services. According to the preset horizontal correspondence, the association relationship between the execution order of multiple services can be established. The preset horizontal correspondence is to build a full-link business monitoring method based on the business module division method of horizontal partition. Taking the business module as the partition unit and the business scenario as the design unit, the monitoring business nodes and business monitoring indicators are set according to the execution rules of the business process and the correspondence between the system applications, and the connection relationship between the business nodes and the mutual influence and association of the business indicators are clarified. In the actual design, consider the application analysis in the typical scenario, the application microservice API interface information in the typical scenario, establish the key path monitoring topic construction of the typical scenario, and provide support for the construction of each business monitoring.
[0037] It should be noted that the preset horizontal correspondence includes the association relationship of the full-link monitoring of the business, including: business node health status display, establishment of association relationship between business and application (interface), business scenario drill-down, business indicator drill-down, and full-link display of the business link. The business node health status display function is to analyze the health status of the business node and display it in real time. The function of establishing the association relationship between business and application (interface) is to solve the problem that the association between application and business cannot be mapped. The business scenario drill-down function is to click on the business scenario to drill down to view the operating status of the sub-scenario / detailed scenario under the scenario, and confirm the abnormal business indicator status through the alarm status of the business alarm. The business indicator drill-down function is to drill down on the business indicator to view the status of the background service corresponding to the current business indicator. The full-link display function of the business link is to visualize the full-link operation status of the core business process.
[0038] There are execution actions between services. According to the preset vertical correspondence, the association between the execution actions of multiple services can be established. The preset vertical correspondence is based on the vertical hierarchical structure division method, taking microservices as units, and building microservice full-link monitoring. Through the monitoring of the entire link, real-time monitoring of data transmission links between systems, between systems and data middle platforms, and between business middle platforms and data middle platforms can be achieved.
[0039] It should be noted that the preset vertical correspondence includes the following associations for business full-link monitoring: front-end page monitoring, business link platform monitoring, service connection platform monitoring, front-end microservice monitoring, middle-end microservice monitoring, background task scheduling monitoring, application dependency monitoring, and data status monitoring. Front-end page monitoring refers to the front-end page deployed on the Nginx server, which is parsed and displayed on the user's browser. By calling the front-end service function interface, the page content is dynamically loaded and displayed. Business connection platform monitoring uses APM tools, log analysis, and other methods to monitor the interface operation of the business connection platform, the call status of microservices through the business connection platform, traffic, and other conditions. Service connection platform monitoring uses APM tools, log analysis, and other methods to monitor the operation of the APIs opened to the external network by the business middle-end and data middle-end in the service connection platform, the front-end calls the front-end service routing, blacklist filtering, authentication, and other conditions. Front-end microservice monitoring includes two aspects. One is to monitor the running status of front-end microservices through APM tools, dialing tests, etc., including service availability, service response time, service call times, call failure rate, etc.; the other is to monitor the running status of the middleware that the front-end service depends on through the component monitoring function, including the number of MQ calls, the number of redis calls, and the MQ running status. The middle-end microservice monitoring includes two aspects. One is to monitor the running status of the middle-end microservices through APM tools, dialing tests, etc., including service availability, service response time, service call times, call failure rate, etc.; the second is to monitor the running status of the middleware that the middle-end service depends on through the component monitoring function, including the number of MQ calls, the number of redis calls, and the MQ running status. The background task scheduling monitoring includes two aspects. One is to support the formulation of background running task monitoring rule configuration, and the second is to support the monitoring of cyclically executed programs and scripts. The third is to issue a warning message when it is not executed as expected. Application dependency monitoring includes three aspects: the first is the application indicator drill-down analysis, which drills down based on application response time, number of requests, error rate and other indicators, and views them in multiple dimensions by application, transaction, and database; the second is the application dependency drill-down, which drills down based on microservice ledger information, configuration information and other data to analyze the middleware, database, server and other information that the application depends on, and can display the operation status of related dependent components; the third is the full-link performance analysis, which analyzes link bottlenecks, locates link problem nodes and supports application failure analysis based on full-link indicators.
[0040] In some embodiments, the monitoring data includes front monitoring data, middle monitoring data and post monitoring data; the monitoring of monitoring indicators corresponding to services with associated relationships to obtain monitoring data includes: before the service is run, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the front monitoring data; during the service operation, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the middle monitoring data; after the service is run, monitoring the monitoring indicators corresponding to the services with associated relationships to obtain the post monitoring data.
[0041] In this embodiment, the fault prediction and analysis function focuses on several points before, during, and after the service runs. By analyzing the pre-monitoring data, the mid-monitoring data, and the post-monitoring data, it is possible to determine whether a service failure has occurred. Before a service failure occurs, create an indicator system, upstream and downstream dependency rules, analysis rules, etc., to prepare for the analysis of the accident. After a service failure occurs, the platform can promptly discover, respond to, and locate the failure. In addition, after a service failure occurs, the platform can also analyze the impact of the failure on the availability and stability of the entire link, automatically generate a system operation problem report, and match the corresponding solution.
[0042] The preparation work before a service failure occurs mainly includes: analysis and judgment rule construction and dependency management. The analysis and judgment rule construction is based on the network-wide business perception analysis indicator system to build a perception model for the operation of all businesses in the system, and to analyze the operating status of all businesses in the system; on the other hand, it is based on the indicator chain provided by the network-wide business perception analysis indicator system to perform physical examination calculation methods for business operations in the system, and provide perception analysis and judgment capabilities based on critical security scenarios, high-frequency business scenarios, and long-process business scenarios. Dependency management is to build a dependency analysis data model, which includes model information such as the degree of impact, scope of impact, and time of impact between businesses, applications, and systems.
[0043] After a service failure occurs, the work includes: fault discovery and response, fault location, etc. There are three ways to discover faults: one is to monitor application log information to find abnormal information in time; the second is to monitor the microservice link to find service associations and call abnormal points; the third is to judge abnormal information points according to the judgment rules. Fault location is to locate the scope of the fault based on the existing basic information and provide timely feedback to relevant personnel.
[0044] After a service failure occurs, the work also includes: fault analysis and generation of a fault assessment report. Fault impact analysis is conducted from two perspectives: one is business impact analysis. Through the business full-link model, the upstream and downstream dependencies of the business are analyzed. When business changes, business downtime, business failures, etc. occur, the degree of impact, scope of impact, and time of impact of the lower-level business on the upper layer are analyzed. The second is application impact analysis. Through the application full-link model, the upstream and downstream dependencies of the application are analyzed. When application changes, application downtime, application failures, etc. occur, the degree of impact, scope of impact, and time of impact of the lower-level application on the upper layer are analyzed. The formation of the fault assessment report is based on the status assessment and assessment analysis. The system can automatically compile an assessment and analysis report on the entire fault handling situation for reference by operation and maintenance personnel.
[0045] In some embodiments, the method for setting the predetermined condition includes: setting the predetermined condition based on preset design conditions and multiple monitoring indicators.
[0046] In this embodiment, the preset design conditions include: hierarchical design of monitoring indicators, weight threshold design of monitoring indicators, and baseline design of monitoring indicators. The hierarchical design of monitoring indicators includes: first, constructing hierarchical attributes of monitoring indicators, using professional lines for stratification, and dividing multiple layers such as "infrastructure layer indicators", "host server layer indicators", "network service layer indicators" and "application service layer indicators"; second, constructing classification attributes of monitoring indicators, and constructing classification attributes corresponding to the hierarchical attributes according to the hierarchical attributes of monitoring indicators. For example, infrastructure layer indicators can be divided into multiple categories such as "virtualization", "network equipment", "storage equipment", and "server host".
[0047] The design of weight thresholds for monitoring indicators includes: first, the construction of indicator threshold grading, which is usually divided into three levels: "notification", "warning" and "alarm", which is used to express the timeliness of monitoring event processing; second, the construction of an indicator threshold upgrade mechanism, which is used to express that when a warning is not processed for a long time, there needs to be an escalation mechanism to convert it into an alarm, so as to supervise the relevant personnel to immediately complete the processing of the monitoring event.
[0048] The baseline design of monitoring indicators includes: First, custom baseline indicators, which help to understand the normal "stable state" of application or server performance. Second, the construction of an indicator baseline self-learning mechanism, which is used to learn the system operation status at a specified time interval granularity. The longer the learning time, the more accurate the baseline. Third, the construction of baseline indicator combinations. Sometimes it is necessary to combine multiple indicators together to more accurately determine whether it is a monitoring event. Fourth, indicator performance optimization. When the combination types of baselines are relatively rich, a large amount of computing resources are required. A reasonable computing solution must be selected. The use of a distributed database combined with a cache solution can greatly improve performance. Fifth, the construction of a baseline manual adjustment mechanism. When the historical baseline cannot reflect whether the indicator is reasonable, it is necessary to manually adjust the indicator baseline. By manually redrawing the baseline, the accuracy of the indicator baseline can be improved. Summary of monitoring indicators.
[0049] In some embodiments, after determining that a service failure has occurred, the method includes: determining a failure level corresponding to the failure based on the failure; generating warning information corresponding to the failure level based on the failure level, and pushing the warning information to a predetermined user.
[0050] In this embodiment, after determining that a service failure has occurred, the fault level corresponding to the fault is determined according to the fault. For example, the fault level can be divided into three levels: "notification", "warning" and "alarm". Based on the fault level, warning information corresponding to the fault level is generated, and the warning information is pushed to the predetermined user, so that the predetermined user can know the severity of the fault and take corresponding remedial measures in time.
[0051] It should be noted that, from a business perspective, a monitoring indicator system is established with business items as the area division, and a monitoring indicator link topology is formed according to the business process, so as to realize panoramic monitoring of large-scale data systems and tracking of the scope of fault impact from the business level. The layered approach is based on the system architecture, and designs the monitoring indicator system from the data layer, application layer, etc., and constructs the microservice link topology diagram and data transmission topology for inter-layer interaction to realize the root cause diagnosis and tracking displayed at the alarm or fault location. This design method helps to promote the intelligent improvement of operation and maintenance means such as full-link monitoring of microservices and fault analysis of large systems.
[0052] In some embodiments, after establishing association relationships among multiple services based on preset correspondence relationships, the method includes: displaying the association relationships among the multiple services.
[0053] In this embodiment, the association relationship between multiple services is displayed, so that users can be informed of the association relationship between services in a timely manner, which is convenient for users to query existing problems and realize a comprehensive display of faults and the operation and call status of each node. It should be noted that this embodiment establishes full-link monitoring of microservices and data topology links to support automatic alarms and panoramic display, which is convenient for fault location and root cause diagnosis tracking during operation and maintenance. It can also visualize the running status, access logs, call information between system operations, operation log information, abnormal alarms, and Oracle database running status of Nginx in the time dimension, realize the front-end running status, service access running status, operation logs, alarm information processing, Oracle database running status monitoring, and visualize the software running status. It can also display the main indicators of load balancing SLB, the main performance indicators of scheduled task management Schedulerx, the main performance indicators of message queue MQ, the main performance indicators of cloud server ECS, the main performance of container service K8s, cloud database RDS, cloud distributed database DRDS, the main performance indicators of table storage OTS, cache Redis status, the main performance indicators of search analysis engine ES, the main performance indicators of data transmission service DTS, the main indicators of distributed object storage OSS, link operation status, etc., with time as the dimension, to complete the visualization of the operation status of basic components. And with the time dimension, through the interface display of microservice reliability indicators, service operation resource occupation indicators, service access data, service startup information, etc., to complete the monitoring of microservice operation status.
[0054] In some embodiments, the method further includes: in response to receiving a modification instruction for the association relationship, modifying the association relationship based on the modification instruction.
[0055] In this embodiment, the association relationship is not static and may change. When a modification instruction corresponding to the association relationship is received, the association relationship is modified according to the modification instruction so that the association relationship can satisfy the modification instruction, thereby ensuring flexibility in modifying the association relationship.
[0056] It should be noted that the method of the embodiment of the present application can be performed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present application, and the multiple devices will interact with each other to complete the described method.
[0057] It should be noted that the above describes some embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0058] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a device for determining a microservice failure.
[0059] refer to Figure 3 , the device for determining a microservice failure comprises:
[0060] The acquisition module 10 is configured to acquire multiple services and monitoring indicators corresponding to each service.
[0061] The establishing module 20 is configured to establish association relationships between multiple services based on preset corresponding relationships.
[0062] The monitoring module 30 is configured to monitor monitoring indicators corresponding to the associated services to obtain monitoring data.
[0063] The determination module 40 is configured to determine that a service failure occurs in response to determining that the monitoring data does not satisfy a predetermined condition.
[0064] Through the above device, multiple services and the monitoring indicators corresponding to each service are obtained. Based on the preset corresponding relationship, the association relationship between multiple services is established, so that the disordered services are ordered, thereby improving the efficiency of service search. The monitoring indicators corresponding to the services with the association relationship are monitored to obtain monitoring data, thereby achieving the purpose of accurately and comprehensively monitoring the services. In response to determining that the monitoring data does not meet the predetermined conditions, it is determined that a service failure has occurred, which improves the accuracy of determining the service failure and achieves the purpose of quickly locating the service failure.
[0065] In some embodiments, the establishment module 20 is also configured so that the preset correspondence includes a preset horizontal correspondence and a preset vertical correspondence; based on the preset horizontal correspondence, an association relationship is established between the execution orders corresponding to multiple services; based on the preset vertical correspondence, an association relationship is established between the execution actions corresponding to multiple services.
[0066] In some embodiments, the monitoring module 30 is also configured so that the monitoring data includes front monitoring data, middle monitoring data and post monitoring data; before the service is run, the monitoring indicators corresponding to the services with an associated relationship are monitored to obtain the front monitoring data; during the service operation, the monitoring indicators corresponding to the services with an associated relationship are monitored to obtain the middle monitoring data; after the service is run, the monitoring indicators corresponding to the services with an associated relationship are monitored to obtain the post monitoring data.
[0067] In some embodiments, a setting module is further included, and the setting module is configured to set the predetermined condition based on preset design conditions and multiple monitoring indicators.
[0068] In some embodiments, a push module is also included. The push module is configured to determine a fault level corresponding to the fault based on the fault after determining that a service fault has occurred; generate warning information corresponding to the fault level based on the fault level, and push the warning information to a predetermined user.
[0069] In some embodiments, a display module is further included, and the display module is configured to display the association relationship between the multiple services after the association relationship between the multiple services is established based on the preset correspondence relationship.
[0070] In some embodiments, a modification module is further included, wherein the modification module is configured to modify the association relationship based on the modification instruction in response to receiving the modification instruction for the association relationship.
[0071] For the convenience of description, the above device is described in terms of functions divided into various modules. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0072] The device of the above embodiment is used to implement the corresponding microservice fault determination method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0073] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for determining a microservice failure as described in any of the above embodiments is implemented.
[0074] Figure 4A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0075] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0076] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0077] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0078] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0079] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0080] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0081] The electronic device of the above embodiment is used to implement the corresponding microservice fault determination method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0082] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present application also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method for determining a microservice failure as described in any of the above embodiments.
[0083] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0084] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the method for determining a microservice failure as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0085] Based on the same concept, corresponding to any of the above-mentioned embodiments, the present application also provides a computer program product, including computer program instructions. When the computer program instructions are run on a computer, the computer executes the method for determining microservice failures as described in any of the above embodiments, which has the beneficial effects of the corresponding method embodiments and will not be repeated here.
[0086] It should be noted that the embodiments of the present application can be further described in the following manner:
[0087] It is understandable that before using the technical solutions of each embodiment of the present disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.
[0088] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly remind the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0089] As an optional but non-limiting implementation, in response to receiving the user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0090] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0091] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present application (including the claims) is limited to these examples. In line with the concept of the present application, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of simplicity.
[0092] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present application difficult to understand, the known power supply / ground connection with the integrated circuit (IC) chip and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform to be implemented in the embodiments of the present application (that is, these details should be fully within the scope of understanding of those skilled in the art). In the case of elaborating specific details (e.g., circuits) to describe exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or when these specific details are changed. Therefore, these descriptions should be considered to be illustrative rather than restrictive.
[0093] Although the present application has been described in conjunction with specific embodiments of the present application, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0094] The embodiments of the present application are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the scope of protection of the present application.
Claims
1. A method for determining microservice failures, It is characterized in that include: Get multiple services and the monitoring indicators corresponding to each service; Based on the preset correspondence, establish association relationships between multiple services; Monitor the monitoring indicators corresponding to the associated services to obtain monitoring data; In response to determining that the monitoring data does not satisfy a predetermined condition, it is determined that a service failure occurs.
2. The method according to claim 1, It is characterized in that The preset corresponding relationship includes a preset horizontal corresponding relationship and a preset vertical corresponding relationship; The establishing of association relationships among multiple services based on the preset corresponding relationships includes: Based on the preset horizontal correspondence, establishing an association relationship between the execution orders corresponding to the multiple services; Based on the preset vertical correspondence, an association relationship between execution actions corresponding to multiple services is established.
3. The method according to claim 1, It is characterized in that The monitoring data includes front monitoring data, middle monitoring data and rear monitoring data; The monitoring indicators corresponding to the associated services are monitored to obtain monitoring data, including: Before the service is run, monitoring indicators corresponding to the associated services are monitored to obtain the pre-monitoring data; During the service operation, monitoring indicators corresponding to the associated services are monitored to obtain the monitoring data; After the service is running, the monitoring indicators corresponding to the associated services are monitored to obtain the post-monitoring data.
4. The method according to claim 1, It is characterized in that The method for setting the predetermined condition includes: The predetermined condition is set based on preset design conditions and multiple monitoring indicators.
5. The method according to claim 1, It is characterized in that After determining that a service failure occurs, the method includes: Based on the fault, determining a fault level corresponding to the fault; Based on the fault level, early warning information corresponding to the fault level is generated, and the early warning information is pushed to a predetermined user.
6. The method according to claim 1, It is characterized in that After establishing association relationships among multiple services based on the preset corresponding relationships, the method includes: Displays the relationship between multiple services.
7. The method according to claim 1, It is characterized in that Also includes: In response to receiving a modification instruction for the association relationship, the association relationship is modified based on the modification instruction.
8. A device for determining a microservice failure, It is characterized in that include: An acquisition module is configured to acquire multiple services and monitoring indicators corresponding to each service; An establishing module, configured to establish an association relationship between multiple services based on a preset corresponding relationship; A monitoring module is configured to monitor monitoring indicators corresponding to services with associated relationships to obtain monitoring data; The determination module is configured to determine that a service failure occurs in response to determining that the monitoring data does not satisfy a predetermined condition.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the program, the method according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium storing computer instructions, It is characterized in that The computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.
Citation Information
Cited By
Monitoring and early warning method, monitoring and early warning device and computer readable storage medium
CN120811930A
