A distributed service call management system and method

Through the distributed service call management system, multi-level call link monitoring and full-link anomaly detection and repair are realized, which solves the complexity of service call anomaly troubleshooting and performance optimization in distributed systems, and improves the efficiency and accuracy of online repair. .

CN117640544BActive Publication Date: 2024-09-24SUZHOU AEROSPACE INFORMATION RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311585920.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-24
Publication Date
2024-09-24
Estimated Expiration
2043-11-24

AI Technical Summary

Technical Problem

In distributed systems, service call exception troubleshooting and performance optimization become complicated. Existing technologies are difficult to achieve intelligent management of full-link service call topology, especially in multi-language, multi-framework and complex business systems, where there is a lack of complete Service call governance systems and methods.

Method used

Designed a distributed service call management system, including agent access module, information fusion analysis module, service call link generation module and call link anomaly detection module, through multi-level call link monitoring, anomaly detection and repair processes , realize automatic repair and process evaluation of service exceptions.

Benefits of technology

It has realized fine-grained monitoring of "service-component-method" multi-level call links, established a full-link anomaly detection and repair process, significantly improved the accuracy and efficiency of online repair of service call anomalies, and changed the traditional unsupervised link. Inefficient management model of tracking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117640544B
    Figure CN117640544B
Patent Text Reader

Abstract

The present invention discloses a distributed service call governance system, including: an agent access module, an information fusion analysis module, a service call link generation module and a call link anomaly detection module. The agent access module realizes the aggregation of "service-component-method" level call information by integrating multi-source agents, the service call link generation module realizes the display of service call information by reconstructing the service call link and the global call topology, and the call link anomaly detection module realizes the positive feedback closed loop of service anomaly discovery, repair and process evaluation by establishing a full-link anomaly detection and repair process based on knowledge base and environmental feedback. The present invention can effectively cope with complex call governance scenarios with large-scale and multi-dependent services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a service operation monitoring technology, and in particular to a distributed service call management system and method thereof. Background Art

[0002] With the rapid development and widespread application of technologies such as microservices and virtualization, modern enterprises and Internet service providers (ISPs) have built more complex and large system architectures. On the one hand, microservice technology makes it easier to expand and upgrade these systems. On the other hand, the use of containerization technologies (such as Docker) and automation tools (such as Kubernetes) enables these systems to run in different environments in a consistent and portable manner, thus having the ability to be quickly deployed and horizontally expanded. However, with the increasing complexity of the system and the rapid iteration of versions, service anomaly troubleshooting and performance optimization have become increasingly difficult. As the dependencies across services become complex, a service call may need to go through multiple services and involve a large amount of network transmission and data operations. Once a system failure or performance bottleneck occurs, it is difficult to accurately locate the root cause service or component. Therefore, it is necessary to provide a reliable service call governance system that can accurately track and record key information such as the call path, time, and status of each service in a distributed environment to achieve rapid troubleshooting and performance optimization. At present, some call tracking systems have emerged in the field of distributed service monitoring, such as Zipkin, Jaeger, OpenTelemetry, and Skywalking. These systems provide service call tracking and performance analysis functions, which can assist operation and maintenance personnel in locating and solving performance bottlenecks in microservice architectures. However, due to the relatively complex configuration and deployment, and the obstacles in multi-language and multi-framework integration, it is difficult to apply them to large distributed platforms or complex business systems. In the field of academic research, researchers have proposed rule-based, machine learning-based, and abnormal pattern mining-based call chain anomaly detection methods. However, most of these methods tend to be theoretical research, and when facing actual application scenarios, they still need to be improved according to system characteristics, data characteristics, and computing resources to adapt to specific business needs. In summary, there is currently a lack of research on a complete service call governance system and its methods in related fields, that is, to provide an integrated solution for intelligent service governance based on the establishment of a full-link service call topology. Summary of the invention

[0003] The purpose of the present invention is to propose a distributed service call governance system and method thereof. This research is funded by Suzhou Frontier Technology Research Project (No: SYG202335).

[0004] The technical solution to achieve the purpose of the present invention is: a distributed service call management system, including: an agent access module, an information fusion analysis module, a service call link generation module, and a call link anomaly detection module, wherein:

[0005] The proxy access module integrates the gateway proxy, access proxy, and log proxy to collect call operation information between distributed services and between service internal components, thereby supporting multi-level and fine-grained service call link monitoring; the distributed collection and persistent storage of call information are realized through the open source Filebeat-Logstash-Elasticsearch components;

[0006] The information fusion analysis module supports the monitoring of the multi-level call chain of "service-component-method" by associating and fusion analyzing the call information from different sources and at different levels, and thus provides effective data support for the visualization of the call chain. It provides software identification alignment and timestamp alignment methods, realizes the alignment processing of call information at different levels of service, component, interface and method, and supports the online analysis and calculation capabilities of service response time, service throughput, service error rate and SLA violation rate at different time granularities.

[0007] The service call link generation module analyzes the single cross-service call information in real time through batch processing tasks, dynamically organizes the service call link and the global call topology based on the link ID and software identifier, and realizes the linkage analysis of local-global service call information. The service call link supports the analysis and dynamic presentation of call indicators at different time granularities; the global call topology supports distinguishing service call status by color, and dynamically presents component call relationships, call method stacks, and call exception information.

[0008] The call link anomaly detection module establishes a full-link anomaly detection and repair process to achieve a positive feedback closed loop of service anomaly repair and process evaluation. It identifies the service call link status through the improved 3sigma method and screens out abnormal call links. It comprehensively evaluates the service anomaly probability through service call anomaly classification and service anomaly propagation behavior analysis to screen out root cause abnormal services. It establishes a full-link anomaly detection and repair process based on the knowledge base and environmental feedback, that is, through "rule matching → rule fusion → rule execution → rule scoring", it achieves a positive feedback closed loop of automatic repair of service anomalies and evaluation of repair rules.

[0009] Furthermore, the proxy access module includes a call proxy integration deployment module and a call information aggregation storage module, wherein:

[0010] The call proxy integrated deployment module includes a gateway proxy, an access proxy, and a log proxy. The gateway proxy is a component used to manage and control service access in a distributed system. It acts as an intermediary between service providers and service consumers, and is responsible for processing requests, routing traffic, monitoring, and collecting data. By analyzing the gateway proxy log, the request call information at the service level is extracted and analyzed. The format is agreed to be [call time][caller ID][callee ID][response time][status code]; the access proxy is a component used to manage and coordinate communications between services. It acts as a service access intermediary in a distributed architecture and is a non-invasive runtime call capture technology. Through the access proxy, the analysis interface is extracted and analyzed. The request call information of the level is in the format of [call time][caller identifier][callee identifier][link ID][interface name][response time][status code]; the log agent is a component for processing and outputting application log information, acting as an intermediary for the log stream, recording the database and cache of application operations, and the key log information of the call method stack. Through the log agent, component-level and method-level operation information is extracted and analyzed, and the format is [operation time][thread name][log level][operator identifier][operated identifier][interface name][method name][code line number][business type][operating user][target subject address][operation result][abnormal information];

[0011] The call information aggregation and storage module deploys Filebeat components on the server nodes where the service and gateway are located, and realizes the correct collection of log data by agreeing on the log storage path and log file naming method; the collected logs are aggregated from Filebeat to Logstash through the https communication protocol, and query services are provided through Elasticsearch; log data is batch queried and processed from Elasticsearch through scheduled tasks to make it a key log of service calls that meets the agreed format. The key logs are centrally persisted in a relational database to support subsequent further processing.

[0012] Furthermore, the information fusion analysis module includes a multi-source call information alignment processing module and a service call information aggregation and index calculation module, wherein:

[0013] The multi-source call information alignment processing module aligns the request call information from different sources through the service identification alignment and timestamp alignment methods. The service identification is agreed to be a dotted three-segment format: business type. business ID. service type, where the business ID is the unique identifier of the service; the service identification alignment method processes the caller or operator into a unified format, and processes the callee or operator into a unified format, classifies and aggregates the call information with the same service identifier, and then supports the centralized processing of subsequent same service call information; the timestamp alignment method standardizes the call time format to yyyy-MM-ddHH:mm:ss.SSS, that is, "year-month-day hour: minute: second. millisecond", where except for the year which is 4 digits and the millisecond which is 3 digits, the others are 2 digits. In addition, the call information within the agreed time threshold δ has time association;

[0014] The service call information aggregation and indicator calculation module supports the aggregation analysis of service call information of different time granularities, and groups the service call information from different agents based on the time granularity τ. For gateway agents, the grouping is based on the call path of "service→service"; for access agents, the grouping is based on the link ID and STSID; for log agents, the grouping is based on the call path of "service→component"; the following indicators are calculated for each group:

[0015] Response time, that is, the time interval between service calls, in milliseconds, including Average, P95, and P99, which represent the average response time, 95-line response time, and 99-line response time, respectively;

[0016] Throughput, that is, the number of calls per unit time; error rate, that is, the ratio of failed calls to the total number of calls;

[0017] SLA violation rate, which is the ratio of total violation time to total response time, defines the response time exceeding the threshold is a violation, then the violation time is expressed as

[0018] According to the service ID and timestamp aggregation group indicators, the same indicators of the same group from different agents are averaged. At the same time, different groups are associated by service ID to further calculate the service indicators. For response time and SLA violation rate, they are represented by taking the maximum value of the corresponding indicators of each group; for throughput, it is represented by taking the sum of the throughput indicators of each group.

[0019] Furthermore, the service call link generation module includes a service call analysis and topology construction module and a global call analysis and topology construction module, wherein:

[0020] The service call analysis and topology construction module records the call links generated by service calls. The call links are the cross-service and cross-component communication paths that complete the specific request call process. Based on the service call links, it supports link indicator analysis and dynamic presentation at different time granularities, including minutes, hours, days and months. The link indicators include link response time, link throughput, link access error rate and link SLA violation rate.

[0021] The global call analysis and topology construction module records the global call topology between all services and components in the distributed system. The global call topology is constructed by cross-correlating the call links through service identifiers. Based on the global call topology, it supports distinguishing the service call status by color, where red, yellow, green, and black respectively indicate that four types of alarms, namely fatal, serious, general, and prompt, occur during service operation. The call status of the global service can be grasped in real time. The global call topology also supports the dynamic display of component call relationships, call method stacks, and call exception information.

[0022] Furthermore, the link anomaly detection module is called to include a link anomaly discovery module, a root cause anomaly tracing module, and a heuristic strategy repair module, wherein:

[0023] The link anomaly discovery module uses the 3sigma method to identify the service call link status and screen out abnormal service call links. It is assumed that the time series data of the link indicators conform to the standard Gaussian distribution. Since the probability of a data point falling within μ±3σ in the Gaussian distribution is 99.73%, the link indicator data outside μ±3σ is defined as an abnormal point, where μ is the mean of the time series data and σ is the variance. The link indicators include link response time, link throughput, link access error rate, and link SLA violation rate.

[0024] The root cause anomaly tracing module comprehensively evaluates the probability of service anomalies through service call indicator analysis, service anomaly log analysis, and service anomaly propagation behavior analysis, and screens out abnormal services. The process is as follows:

[0025] ① Traverse the abnormal call link according to the call direction and obtain the call indicators of the current service;

[0026] ② Parse the service operation log and identify the service exception category. The service exception categories include: runtime exceptions, database exceptions, computing resource exceptions, network access exceptions, third-party call exceptions, and other exceptions; if the first three types of exceptions occur, the current service is determined to be an abnormal service. Add the abnormal service to the abnormal service queue and go to step ④. If the fourth or fifth type of exception occurs, it is determined that the exception occurred in the called service, obtain the called service node, and go to step ④; if the current service does not have a service operation log or other exceptions occur, go to step ③;

[0027] ③ Obtain the global call topology associated with the current service, simulate the service exception propagation behavior based on the PageRank algorithm to comprehensively evaluate the service exception probability, and filter out the exception services;

[0028] Assume that: a) Exceptions propagate to the calling party with probability d (0 < d < 1), and randomly appear in any service with probability 1 - d; b) The higher the number of calls to a service, the higher the exception probability of the service; c) The higher the exception probability of a service, the higher the exception probability of the services it calls. Then, for any service s i The probability Pr(s i ) of an exception occurring is expressed as Equation (5);

[0029]

[0030] where N represents the total number of services in the global call topology model, M(s i ) represents the set of services that call s i , and L(s j ) represents the number of services that call s j ;

[0031] In addition, define the initial probability P i of an exception occurring for any service s 0 (s i ) as Equation (6);

[0032] Pr 0 (s i ) = N1 / N2 (6)

[0033] where N1 represents the number of violations of the service request response time, and N2 represents the total number of service requests;

[0034] Use Equation (6) to initialize the exception probability of service nodes, and use Equation (5) to iteratively calculate the new service exception probability after exception propagation. The iteration end condition is that the exception probability converges or reaches the iteration count limit. If the service exception probability exceeds the threshold γ, it is determined that the service is abnormal and added to the abnormal service queue;

[0035] ④ Determine whether the current exception link has been traversed. If it has, stop and wait for the timing task to analyze the next exception call link. Otherwise, obtain the next service calling party node and go to step ①.

[0036] The heuristic strategy repair module, by establishing a heuristic exception repair process based on the knowledge base and environmental feedback, that is, realizing the positive feedback closed loop of service exception repair and process evaluation through "rule matching → rule fusion → rule execution → rule scoring", the process is as follows:

[0037] ① Obtain the abnormal call link, and sequentially obtain the abnormal services in the current abnormal call link from the abnormal service queue in the reverse direction of the link, and then obtain the service abnormality information based on the service ID, including service identification, service response time, service throughput, service access error rate, SLA violation rate, and service abnormality category;

[0038] ② If the service exception category exists, match the exception repair rule according to the service exception category and go to step ⑤, otherwise go to step ③; the exception repair rules are predefined and stored in the rule knowledge base, including resource upgrade, configuration update, service upgrade, service migration, service restart, service expansion and traffic restriction. The predefined rules implement a standardized rule development interface and support mounting in the exception repair process in a pluggable manner. The rule development interface supports users to develop rules twice;

[0039] The predefined rules establish matching relationships with exception categories in the knowledge base. Under initial conditions, runtime exceptions match service upgrade rules, computing resource exceptions match resource upgrade rules, database exceptions match service restart rules, network access exceptions match service migration rules and traffic restriction rules, third-party call exceptions match configuration update rules, and other exceptions support custom matching relationships;

[0040] ③ Retrieve the repair rule set with the same service anomaly category as the current service anomaly from the rule knowledge base, and filter out the anomaly repair rule with the highest priority. If an anomaly repair rule exists, go to step ⑤, otherwise go to step ④;

[0041] ④ Calculate and obtain the repair rule of the abnormal service with the highest similarity (Pearson coefficient) to the current abnormal service indicator. If the rule acquisition fails, the "service restart" rule is selected by default;

[0042] ⑤According to the service ID, obtain the service control method, including deployment IP, port, configuration method, start and stop method, etc., and then use the repair rules to perform abnormal repair on the current service;

[0043] ⑥ Check whether the call link is repaired normally within the timeout period. If it is normal, go to step ⑧. Otherwise, continue to determine whether the traversal of the service nodes in the call link is completed. If it is completed, go to step ⑦. Otherwise, go to step ①.

[0044] ⑦Execute link alarm and request manual intervention for repair;

[0045] ⑧ Comprehensively evaluate all the rules for link repair based on link status and link repair time, update the rule knowledge base, and end the current link repair process; specifically, the rule knowledge is defined as a triple<S,R,P> , where S represents the environment state of the abnormal service, which is composed of (service identifier, link ID, service indicator, abnormal category); R represents the abnormal repair rule; P represents the priority of the abnormal repair process, and the priority is calculated using formula (7);

[0046]

[0047] Wherein, t represents the total time consumed for successful abnormal repair, T represents the time threshold, α represents the indicator function, α=1 represents successful abnormal repair, α=0 represents failed abnormal repair, μ and ε represent the basic priorities of successful and failed abnormal repair respectively, and μ>ε.

[0048] A distributed service call management method is provided, which realizes distributed service call management based on the distributed service call management system.

[0049] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, distributed service call management is implemented based on the distributed service call management system.

[0050] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, distributed service call management is implemented based on the distributed service call management system.

[0051] Compared with the prior art, the present invention has the following significant advantages: 1) By integrating multiple proxy call information, fine-grained monitoring of the multi-level call link of "service-component-method" is achieved. 2) A full-link anomaly detection and repair process based on knowledge base and environmental feedback is established, which realizes the positive feedback closed loop of service anomaly repair and process evaluation, and changes the inefficient management mode of traditional unsupervised link tracking. In particular, a heuristic anomaly repair method is proposed, which significantly improves the accuracy and efficiency of online repair of service call anomalies. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1 It is an overall structural diagram of a distributed service call management system of the present invention.

[0053] Figure 2 This is the structure diagram of the proxy access module.

[0054] Figure 3 It is the structural diagram of the information fusion analysis module.

[0055] Figure 4 It is the information fusion analysis flow chart.

[0056] Figure 5 It is a structural diagram of the service call link generation module.

[0057] Figure 6 This is the structure diagram of the call link anomaly detection module.

[0058] Figure 7 This is a flowchart for link anomaly identification and root cause tracing.

[0059] Figure 8 It is a heuristic exception repair flowchart. DETAILED DESCRIPTION

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

[0061] The present invention realizes the management process of the full call link of multi-source services in a distributed environment by integrating multi-source call information fusion technology, distributed call link tracking technology, call anomaly detection and fault recovery technology, etc. The overall system structure is as follows: Figure 1 shown.

[0062] A distributed service call management system and method thereof, comprising an agent access module, an information fusion analysis module, a call link model generation module, and a call link anomaly detection module. The process of implementing the call link management for distributed services of the present invention includes:

[0063] a. The proxy access module maximizes the collection of call information between distributed services and internal components of services by integrating multiple proxy tools, thereby supporting fine-grained service call link monitoring. Among them, the gateway proxy realizes the collection of service-level call information, the call proxy realizes the collection of interface-level call information, and the log proxy realizes the collection of component-level and method-level call information. The collected call information is transmitted through the open source Filebeat component, aggregated and queried through Logstash and Elasticsearch, and uniformly stored through a standardized storage structure.

[0064] b. Information fusion analysis module, by aligning call information from different sources and different levels, establishes the association between multi-level call information and analyzes call indicators. The module provides methods such as software identification alignment and timestamp alignment, and realizes the alignment of call information at different levels such as services, components, interfaces, and methods. At the same time, it supports the online analysis and calculation capabilities of indicators such as service response time, service throughput, service error rate, and SLA violation rate at different time granularities.

[0065] c. The service call link generation module analyzes the single cross-service call information in real time through batch processing tasks, dynamically organizes the service call link and the global call topology based on the link ID and software identifier, and realizes the linkage analysis of local-global service call information. Among them, the service call link supports the analysis and dynamic display of call indicators at different time granularities; the global call topology supports distinguishing service call status by color, dynamically displaying component call relationships, call method stacks, and call exception information.

[0066] d. The call link anomaly detection module realizes the positive feedback closed loop of service anomaly repair and process evaluation by establishing a full-link anomaly detection and repair process. First, the service call link status is identified by improving the 3sigma method to screen out abnormal call links. Then, the service anomaly probability is comprehensively evaluated through the classification of service call anomalies and the analysis of service anomaly propagation behavior to screen out root cause abnormal services; finally, by establishing a full-link anomaly detection and repair process based on knowledge base and environmental feedback, that is, through "rule matching → rule fusion → rule execution → rule scoring", the automatic repair of service anomalies and the positive feedback closed loop of repair rule evaluation are realized.

[0067] The following is combined with Figure 2-8 The composition and function of each module are described in detail.

[0068] The proxy access module is used to maximize the collection of call information between distributed services and service internal components, and to uniformly access and manage multi-source service call information by designing a standardized storage structure, thereby supporting a multi-level, fine-grained service call governance process. Figure 2 The structure diagram of the proxy access module shown in the figure, the specific implementation steps are as follows:

[0069] (1) Calling agent integrated deployment

[0070] Reference Figure 2 ,The calling agent includes gateway agent, access agent, and log agent.

[0071] The gateway proxy is a component used to manage and control service access in a distributed system, such as Nginx. It acts as an intermediary between service providers and service consumers, responsible for processing requests, routing traffic, monitoring and collecting data, etc. By analyzing the gateway proxy log, the service-level request call information is extracted, and the format is agreed to be [call time][caller ID][callee ID][response time][status code].

[0072] The access proxy is a component used to manage and coordinate communication between services, such as JVM Sandbox, which acts as a service access intermediary in a distributed architecture and is a non-invasive runtime call capture technology. Through the access proxy, the request call information at the interface level is extracted and analyzed, and the format is agreed to be [call time][caller ID][callee ID][link ID][interface name][response time][status code].

[0073] The log agent is a component for processing and outputting application log information. It acts as an intermediary for the log stream and records the key log information of the call method stack of the application operating other components (such as databases, caches, etc.). Through the log agent, component-level and method-level operation information is extracted and analyzed, and the format is agreed to be [operation time][thread name][log level][operator identifier][operated party identifier][interface name][method name][code line number][business type][operating user][target subject address][operation result][abnormal information].

[0074] In actual application scenarios, a system is usually composed of many services with different architectures, different operation protocols and specifications developed by multiple teams, so it is difficult to reach a unified service call proxy method. Services need to choose one or more of the integrated gateway proxy, access proxy, and log proxy according to their own situation.

[0075] (2) Calling information aggregation and storage

[0076] Reference Figure 2 ,This system uses the open source Filebeat-Logstash-Elasticsearch components to implement the transmission, aggregation, query and persistent storage of service call information. The specific implementation steps are as follows:

[0077] ① Deploy Filebeat components on the server nodes where the service and gateway are located, and use the agreed log storage path and log file naming method to achieve correct collection of log data.

[0078] ② Aggregate the collected logs from Filebeat to Logstash through the lightweight https communication protocol, and provide query services through Elasticsearch.

[0079] ③Batch query and process log data from Elasticsearch through scheduled tasks to make it a key log of service calls that meets the agreed format. The key logs are centrally persisted in a relational database to support subsequent processing.

[0080] The information fusion analysis module is used to associate and fuse call information from different sources and at different levels, thereby supporting fine-grained monitoring of the multi-level call link of "service-component-method". Figure 3 , 4 , the specific implementation steps are as follows:

[0081] (1) Alignment of multi-source call information

[0082] Reference Figure 3 The module aligns the request call information from different sources by using methods such as service identification alignment and timestamp alignment. The service identification is agreed to be a dotted three-segment format: business type. business ID. service type, where the business ID is the unique identifier of the service. The service identification alignment method is to process the identifier of the (called) party into a consistent format to achieve classification and aggregation of call information with the same service identifier, thereby supporting subsequent centralized processing of the same service call information.

[0083] Furthermore, the timestamp alignment method is to unify the time format of multi-source call information into yyyy-MM-dd HH:mm:ss.SSS (ie "year-month-day hour: minute: second. millisecond") to achieve time association between these call information. Except for the year which is 4 digits and the millisecond which is 3 digits, the others are 2 digits, for example: 2022-01-1409:51:16.604. In addition, since there may be time differences when the same call process is transmitted between different access agents, in order to ensure time association, this system stipulates that only when the time difference between the call information is less than or equal to the threshold δ (unit: milliseconds), it is considered to have time association.

[0084] (2) Service call information aggregation and indicator calculation

[0085] Reference Figure 4 ,This system supports aggregate analysis of service call information at different time granularities. First, the service call information from different agents is grouped using the time granularity τ (unit: milliseconds). Specifically, for the call information from the gateway agent, it is grouped according to the call path of "service→service (STS)". Figure 3STS represents a directed calling relationship across services (e.g. A→B). STS is uniquely identified by “<caller service ID, callee service ID> (STSID)”; the calling information from the access agent is grouped according to the link ID and STSID; the calling information from the log agent is grouped according to the calling path of “service→component (STC)”.

[0086] Furthermore, the following indicators are calculated for each group: ① Response Time (RT), which is the time interval between cross-service calls (unit: milliseconds). RT specifically includes Average, P95, and P99, which represent the average response time, 95-line response time, and 99-line response time, respectively; ② Throughput (TH), which is the number of calls per unit time; Error Rate (ER), which is the ratio of the number of failed calls to the total number of calls; SLA violation rate, which is the ratio of the total violation time to the total response time, defines the average response time exceeding the threshold. That is, violation, and the violation time is expressed as

[0087] Furthermore, the group indicators are aggregated according to the service ID, timestamp, and time threshold δ, and the same indicators of the same group from different agents are averaged. At the same time, different groups are associated by service ID to further calculate service indicators. For response time and SLA violation rate, the maximum value of the corresponding indicators of each group is obtained; for throughput, the sum of the throughput indicators of each group is obtained.

[0088] The call link model generation module is used to construct the service call link and the global call topology and display the call statistical analysis indicators, including link status, link indicators, service status, service indicators, method call stack, and call statistical analysis information such as exception category. Figure 5 , the specific implementation steps are as follows:

[0089] (1) Service call analysis and topology construction

[0090] The service call link refers to the cross-service and cross-component communication path (i.e., the call topology of a specific request) that completes the specific request call process in a distributed system. By displaying the service call link and presenting various statistical analysis indicators on the link, you can understand the call status of the call link in real time. Figure 5 , Taking “Link 1” as an example, the service call link is displayed in the form of nodes (small circles) and edges (directed arrows), where the arrows indicate the direction of data flow.

[0091] In this system, for services that integrate access agents, call information is associated through link IDs to build service call links. The link ID uniquely identifies the call communication path of the entire link. For services that do not integrate call agents but integrate one or all of gateway agents and log agents, call links are built by associating the operational relationships between services and between services and components through service identifiers and timestamps.

[0092] Furthermore, based on the service call link, the call link indicators are displayed at different time granularities. The time granularities include minute, hour, day, and month. The call link indicators include link response time (LRT), link throughput (LTH), link error rate (LER), and link SLA violation rate (LSLA), which are calculated by formulas (1) to (4).

[0093]

[0094]

[0095]

[0096]

[0097] Among them, RT(i), TH(i), ER(i), SLA(i) respectively represent the call index of the i-th STS on the link access path, and Min and Max respectively represent the minimum and maximum values ​​of the index.

[0098] (2) Global call analysis and topology construction

[0099] The global call topology refers to the call relationship between all services and components in a distributed system. By displaying the call relationship of global services and presenting various statistical analysis indicators on service nodes, the call status of global services can be grasped in real time. Figure 5 ,The global call topology uses nodes (small circles, small squares, etc.) and edges (directed arrows) to show the ,call relationships between services and between services and components.

[0100] Reference Figure 5The global call topology is constructed by associating service call links with service identifiers. Specifically, nodes with the same service identifier in the service call link are the same service node, and different call links are cross-associated together through the same service node, thus forming a "service call relationship network". In the global call topology, the call status of the service is distinguished by color, where red, yellow, green, and black respectively indicate that the service call has four types of alarms: fatal, serious, general, and prompt. The global call topology also supports the dynamic display of call relationships between components, call method stacks, and call exception information.

[0101] The call link anomaly detection module is used to discover service call anomalies, trace the root cause and repair faults. The module implements a positive feedback closed loop of service anomaly repair and process evaluation by establishing a full-link anomaly detection and repair process based on the knowledge base and environmental feedback. Figure 6-8 , the specific implementation steps are as follows:

[0102] (1) Link abnormality detection

[0103] The service call link status is identified by improving the 3sigma method, and then the abnormal call link is screened out. Assuming that the time series data of the link indicator conforms to the standard Gaussian distribution, since the probability of a data point falling within μ±3σ in the Gaussian distribution is 99.73%, the link indicator data outside μ±3σ can be defined as an abnormal point, where μ is the mean of the time series data and σ is the variance. The link indicators include LRT, LTH, LER, and LSLA. If an abnormal call link occurs in one of the indicators, it is judged as abnormal.

[0104] (2) Root cause tracing

[0105] Reference Figure 6 , 7 , through service call indicator analysis, service anomaly log analysis, and service anomaly propagation behavior analysis, comprehensively evaluate the service anomaly probability and locate abnormal services. The specific implementation steps are as follows:

[0106] ① Traverse the abnormal call link according to the call direction and obtain the call indicators of the current service.

[0107] ② Parse the service operation log and identify the service exception category. The service exception categories include: runtime exception, database exception, computing resource exception, network access exception, third-party call exception, and other exceptions; if the first three types of exceptions occur, the current service is determined to be an abnormal service. Add the abnormal service to the abnormal service queue and go to step ④. If the fourth or fifth type of exception occurs, it is determined that the exception occurs in the called service, obtain the called service node, and go to step ④; if the current service does not have an operation log or other exceptions occur, go to step ③.

[0108] ③ Obtain the global call topology associated with the current service, simulate the service exception propagation process based on the PageRank algorithm to comprehensively evaluate the service exception probability, and filter out the abnormal services. Assumptions: a) Exceptions propagate to the calling party with probability d (0 < d < 1) and randomly appear in any service with probability 1 - d; b) The higher the number of calls to a service, the higher the exception probability of the service; c) The higher the exception probability of a service, the higher the exception probability of the services it calls. Then, for any service s i The probability Pr(s i ) of an exception occurring can be expressed as Equation (5).

[0109]

[0110] where N represents the total number of services in the global call topology model, M(s i ) represents the set of services that call s i , and L(s j ) represents the number of services that call s j . In addition, define the initial probability P i of any service s 0 having an exception as Equation (6). i ) as Equation (6).

[0111] Pr 0 (s i ) = N1 / N2, #(6)

[0112] where N1 represents the number of violations of the service request response time, and N2 represents the total number of service requests.

[0113] Initialize the exception probability of the service node using Equation (6). Iteratively calculate the new service exception probability after exception propagation using Equation (5). The iteration termination condition is that the exception probability converges or reaches the upper limit of the number of iterations. If the service exception probability exceeds the threshold γ, then determine that the service is abnormal and add it to the abnormal service queue, and go to step ④.

[0114] ④ Determine whether the current abnormal link has been traversed. If it has, stop and wait for the timing task to analyze the next abnormal call link. Otherwise, obtain the next service calling party node and go to step ①.

[0115] (3) Heuristic strategy repair

[0116] Refer to Figure 6 、 8 , this module realizes a positive feedback closed loop of service exception repair and process evaluation by establishing a heuristic exception repair process based on the knowledge base and environmental feedback, that is, through "rule matching → rule fusion → rule execution → rule scoring". The specific implementation steps are as follows:

[0117] ① Obtain the abnormal call link, and sequentially obtain the abnormal services in the current abnormal call link from the abnormal service queue in the reverse direction of the link. Then obtain the service abnormality information based on the service ID, including service identification, service response time, service throughput, service access error rate, SLA violation rate, and service abnormality category.

[0118] ②If the service exception category exists, match the exception repair rule according to the service exception category and go to step ⑤; otherwise go to step ③. Figure 6 , the exception repair rules include predefined rules and custom rules. Among them, the predefined rules include resource upgrade, configuration update, service upgrade, service migration, service restart, service expansion, and traffic restriction. The predefined rules establish a matching relationship with the exception category in the knowledge base. Under initial conditions, runtime exceptions match service upgrade rules; computing resource exceptions match resource upgrade rules; database exceptions match service restart rules; network access exceptions match service migration rules and traffic restriction rules; three-party call exceptions match configuration update rules; other exceptions support custom matching relationships. The predefined rules implement a standardized rule development interface, support mounting in the exception repair process in a pluggable manner, and the rule development interface supports users to secondary develop rules.

[0119] ③ Retrieve the set of repair rules with the same category as the current service anomaly from the rule knowledge base, and filter out the anomaly repair rule with the highest priority (if there are multiple rules, randomly select one). If an anomaly repair rule exists, go to step ⑤; otherwise, go to step ④.

[0120] ④ Calculate and obtain the repair rule of the abnormal service with the highest similarity (Pearson coefficient) to the current abnormal service indicator. If the rule acquisition fails, the "service restart" rule is selected by default.

[0121] ⑤According to the service ID, obtain the service control method, including deployment IP, port, configuration method, start and stop method, etc., and then use the repair rules to perform abnormal repair on the current service.

[0122] ⑥ Check whether the call link is repaired normally within the timeout period. If it is normal, go to step ⑧; otherwise, continue to determine whether the traversal of the service nodes in the call link is completed. If it is completed, go to step ⑦, otherwise go to step ①.

[0123] ⑦Execute link alarm and request manual participation in repair.

[0124] ⑧According to the link status and link repair time, all the rules for executing this link repair are comprehensively evaluated, the rule knowledge base is updated, and the current call link repair process is ended. Specifically, the rule knowledge is defined as the triple<S,R,P> . Wherein, S represents the environment state of the abnormal service, which is composed of (service identifier, link ID, service indicator, abnormal category); R represents the abnormal repair rule; P represents the priority of the abnormal repair rule. The priority is calculated using formula (7).

[0125]

[0126] Where t represents the total time taken to successfully repair the entire link abnormality, and T is the time threshold. a is the indicator function, α=1 represents successful repair of the link abnormality, and α=0 represents failed repair of the link abnormality. μ and ε represent the basic priorities of successful and failed repair of the link abnormality, respectively, and μ>ε.

[0127] In summary, the present invention realizes the monitoring of the multi-level call link of "service-component-method" by integrating multiple proxy call information, realizes the association of "local-global" service call information by dynamically organizing service call links and global call topology, and realizes the positive feedback closed loop of service exception repair and process evaluation by establishing a full-link anomaly detection and repair process based on knowledge base and environmental feedback. The system and its method can effectively cope with complex call monitoring scenarios of large-scale, multi-dependent services.

[0128] The technical features of the above embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

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

Claims

1. A distributed service call management system, characterized in that: include: Proxy access module, information fusion analysis module, service call link generation module and call link anomaly detection module, among which: The proxy access module integrates the gateway proxy, access proxy, and log proxy to collect call operation information between distributed services and between service internal components, thereby supporting multi-level and fine-grained service call link monitoring; the distributed collection and persistent storage of call information are realized through the open source Filebeat-Logstash-Elasticsearch components; The information fusion analysis module supports the monitoring of the multi-level call chain of "service-component-method" by associating and fusion analyzing the call information from different sources and different levels, and thus provides effective data support for the visualization construction of the call chain. It provides software identification alignment and timestamp alignment methods, realizes the alignment processing of services, components, interfaces and methods, and supports the online analysis and calculation capabilities of service response time, service throughput, service error rate and SLA violation rate at different time granularities; The service call link generation module analyzes the single cross-service call information in real time through batch processing tasks, dynamically organizes the service call link and the global call topology based on the link ID and software identifier, and realizes the linkage analysis of local-global service call information. The service call link supports the analysis and dynamic presentation of call indicators at different time granularities; the global call topology supports distinguishing service call status by color, and dynamically presents component call relationships, call method stacks, and call exception information. The call link anomaly detection module establishes a full-link anomaly detection and repair process to achieve a positive feedback closed loop of service anomaly repair and process evaluation. It identifies the service call link status through the improved 3sigma method and screens out abnormal call links. It comprehensively evaluates the service anomaly probability through service call anomaly classification and service anomaly propagation behavior analysis to screen out root cause abnormal services. It establishes a full-link anomaly detection and repair process based on the knowledge base and environmental feedback, that is, through "rule matching → rule fusion → rule execution → rule scoring", it achieves a positive feedback closed loop of automatic repair of service anomalies and evaluation of repair rules.

2. The distributed service call management system according to claim 1, characterized in that: The proxy access module includes a call proxy integration deployment module and a call information aggregation storage module, wherein: The call proxy integrated deployment module includes a gateway proxy, an access proxy and a log proxy. The gateway proxy is a component used to manage and control service access in a distributed system. It acts as an intermediary between service providers and service consumers, and is responsible for processing requests, routing traffic, monitoring and collecting data. By analyzing the gateway proxy log, the request call information at the service level is extracted and analyzed. The format is agreed to be [call time][caller ID][callee ID][response time][status code]; the access proxy is a component used to manage and coordinate communications between services. It acts as a service access intermediary in a distributed architecture and is a non-invasive runtime call capture technology. Through the access proxy, the interface level is extracted and analyzed. Other request call information, the format is agreed to be [call time][caller identifier][callee identifier][link ID][interface name][response time][status code]; the log agent is a component for processing and outputting application log information, acting as an intermediary for the log stream, recording the database and cache of application operations, and key log information of the call method stack. Through the log agent, component-level and method-level operation information is extracted and analyzed, and the format is agreed to be [operation time][thread name][log level][operator identifier][operated party identifier][interface name][method name][code line number][business type][operating user][target subject address][operation result][abnormal information]; The call information aggregation and storage module deploys Filebeat components on the server nodes where the service and gateway are located, and realizes the correct collection of log data by agreeing on the log storage path and log file naming method; the collected logs are aggregated from Filebeat to Logstash through the https communication protocol, and query services are provided through Elasticsearch; log data is batch queried and processed from Elasticsearch through scheduled tasks to make it a key log of service calls that meets the agreed format. The key logs are centrally persisted in a relational database to support subsequent further processing.

3. The distributed service call management system according to claim 1, characterized in that: The information fusion analysis module includes a multi-source call information alignment processing module and a service call information aggregation and index calculation module, where: The multi-source call information alignment processing module aligns the request call information from different sources through the service identification alignment and timestamp alignment methods. The service identification is agreed to be a dotted three-segment format: business type. business ID. service type, where the business ID is the unique identifier of the service; the service identification alignment method processes the caller or operator into a unified format, and processes the callee or operator into a unified format, classifies and aggregates the call information with the same service identifier, and then supports the centralized processing of subsequent same service call information; the timestamp alignment method standardizes the call time format to yyyy-MM-ddHH:mm:ss.SSS, that is, "year-month-day hour:minute:second.millisecond", where except for the year which is 4 digits and the millisecond which is 3 digits, the others are all 2 digits. In addition, the call information within the agreed time threshold δ has time association; The service call information aggregation and indicator calculation module supports the aggregation analysis of service call information of different time granularities, and groups the service call information from different agents based on the time granularity τ. For gateway agents, the grouping is based on the call path of "service→service"; for access agents, the grouping is based on the link ID and STSID; for log agents, the grouping is based on the call path of "service→component"; the following indicators are calculated for each group: Response time, that is, the time interval between service calls, in milliseconds, including Average, P95, and P99, which represent the average response time, 95-line response time, and 99-line response time, respectively; Throughput, that is, the number of calls per unit time; error rate, that is, the ratio of failed calls to the total number of calls; SLA violation rate, which is the ratio of total violation time to total response time, defines the response time exceeding the threshold is a violation, then the violation time is expressed as According to the service ID and timestamp aggregation group indicators, the same indicators of the same group from different agents are averaged. At the same time, different groups are associated by service ID to further calculate the service indicators. For response time and SLA violation rate, they are represented by taking the maximum value of the corresponding indicators of each group; for throughput, it is represented by taking the sum of the throughput indicators of each group.

4. The distributed service call management system according to claim 1, characterized in that: The service call link generation module includes a service call analysis and topology construction module and a global call analysis and topology construction module, wherein: The service call analysis and topology construction module records the call links generated by service calls. The call links are the cross-service and cross-component communication paths that complete the specific request call process. Based on the service call links, it supports link indicator analysis and dynamic presentation at different time granularities, including minutes, hours, days and months. The link indicators include link response time, link throughput, link access error rate and link SLA violation rate. The global call analysis and topology construction module records the global call topology between all services and components in the distributed system. The global call topology is constructed by cross-correlating the call links through service identifiers. Based on the global call topology, it supports distinguishing the service call status by color, where red, yellow, green, and black respectively indicate that the service operation has four types of alarms: fatal, serious, general, and prompt, so as to grasp the call status of the global service in real time. The global call topology also supports the dynamic display of component call relationships, call method stacks, and call exception information.

5. The distributed service call management system according to claim 2, characterized in that: The link anomaly detection module includes a link anomaly discovery module, a root cause anomaly tracing module, and a heuristic strategy repair module, where: The link anomaly discovery module uses the 3sigma method to identify the service call link status and screen out abnormal service call links. It is assumed that the time series data of the link indicators conform to the standard Gaussian distribution. Since the probability of a data point falling within μ±3σ in the Gaussian distribution is 99.73%, the link indicator data outside μ±3σ is defined as an abnormal point, where μ is the mean of the time series data and σ is the variance. The link indicators include link response time, link throughput, link access error rate, and link SLA violation rate. The root cause anomaly tracing module comprehensively evaluates the probability of service anomalies through service call indicator analysis, service anomaly log analysis, and service anomaly propagation behavior analysis, and screens out abnormal services. The process is as follows: ① Traverse the abnormal call link according to the call direction and obtain the call indicators of the current service; ② Parse the service operation log and identify the service exception category, which includes: runtime exception, database exception, computing resource exception, network access exception, third-party call exception, and other exceptions; if the first three types of exceptions occur, the current service is determined to be an abnormal service, and the abnormal service is added to the abnormal service queue, and the process goes to step ④; if the fourth or fifth type of exception occurs, the exception is determined to occur in the called service, and the called service node is obtained, and the process goes to step ④; if the current service does not have a service operation log or other exceptions occur, go to step ③; ③ Obtain the global call topology associated with the current service, simulate the service anomaly propagation behavior based on the PageRank algorithm to comprehensively evaluate the service anomaly probability, and filter out abnormal services; Hypotheses: a) An exception propagates to the caller with probability d, where 0 < d < 1, and randomly appears in any service with probability 1 - d; b) The higher the number of calls to a service, the higher the probability of an exception in that service; c) The higher the probability of an exception in a service, the higher the probability of an exception in the services it calls. Then, for any service s i The probability Pr(s i ) is expressed as Equation (5); Where N represents the total number of services in the global call topology model, M(s i ) indicates calling s i The service set, L(s j ) indicates calling s j The number of services provided; In addition, define any service s i The probability of abnormal initialization Pr 0 (s i ) is formula (6); Pr 0 (s i )=N1 / N2 (6) Where N1 represents the number of violations of the service request response time, and N2 represents the total number of service requests; Use formula (6) to initialize the service node abnormality probability, and use formula (5) to iteratively obtain the new service abnormality probability after the abnormality propagation. The iteration ends when the abnormality probability converges or reaches the upper limit of the iteration number. If the service abnormality probability exceeds the threshold γ, it is judged as a service abnormality and added to the abnormal service queue; ④ Determine whether the traversal of the current abnormal link has been completed. If it is completed, stop and wait for the scheduled task to analyze the next abnormal call link. Otherwise, obtain the next service caller node and go to step ①; The heuristic strategy repair module establishes a heuristic anomaly repair process based on the knowledge base and environmental feedback, that is, through "rule matching → rule fusion → rule execution → rule scoring", a positive feedback closed loop of service anomaly repair and process evaluation is realized. The process is as follows: ① Obtain the abnormal call link, and sequentially obtain the abnormal services in the current abnormal call link from the abnormal service queue in the reverse direction of the link, and then obtain the service abnormality information according to the service ID, including service identification, service response time, service throughput, service access error rate, SLA violation rate, and service abnormality category; ② If the service exception category exists, match the exception repair rule according to the service exception category and go to step ⑤, otherwise go to step ③; the exception repair rules are predefined and stored in the rule knowledge base, including resource upgrade, configuration update, service upgrade, service migration, service restart, service expansion and traffic restriction. The predefined rules implement a standardized rule development interface and support mounting in the exception repair process in a pluggable manner. The rule development interface supports users to develop rules twice; The predefined rules establish matching relationships with exception categories in the knowledge base. Under initial conditions, runtime exceptions match service upgrade rules, computing resource exceptions match resource upgrade rules, database exceptions match service restart rules, network access exceptions match service migration rules and traffic restriction rules, third-party call exceptions match configuration update rules, and other exceptions support custom matching relationships; ③ Retrieve the repair rule set with the same service anomaly category as the current service anomaly from the rule knowledge base, and filter out the anomaly repair rule with the highest priority. If an anomaly repair rule exists, go to step ⑤, otherwise go to step ④; ④ Calculate and obtain the repair rule of the abnormal service with the highest similarity to the current abnormal service indicator. If the rule acquisition fails, the "service restart" rule is selected by default; ⑤According to the service ID, obtain the service control method, including deployment IP, port, configuration method, and start and stop method, and then use the repair rules to perform abnormal repair on the current service; ⑥ Check whether the call link is repaired normally within the timeout period. If it is normal, go to step ⑧. Otherwise, continue to determine whether the traversal of the service nodes in the call link is completed. If it is completed, go to step ⑦. Otherwise, go to step ①. ⑦Execute link alarm and request repair; ⑧ Comprehensively evaluate all the rules for link repair based on link status and link repair time, update the rule knowledge base, and end the current link repair process; specifically, the rule knowledge is defined as a triple<S,R,P> , where S represents the environment state of the abnormal service, which is composed of (service identifier, link ID, service indicator, abnormal category); R represents the abnormal repair rule; P represents the priority of the abnormal repair process, and the priority is calculated using formula (7); Wherein, t represents the total time consumed for successful abnormal repair, T represents the time threshold, α represents the indicator function, α=1 represents successful abnormal repair, α=0 represents failed abnormal repair, μ and ε represent the basic priorities of successful and failed abnormal repair respectively, and μ>ε.

6. A distributed service call management method, characterized in that: Based on the distributed service call governance system described in any one of claims 1-5, distributed service call governance is implemented.

7. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, distributed service call management is implemented based on the distributed service call management system described in any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, distributed service call management is implemented based on the distributed service call management system described in any one of claims 1-5.