Search

CN-122018917-A - Distributed system call chain interactive analysis method based on large language model

CN122018917ACN 122018917 ACN122018917 ACN 122018917ACN-122018917-A

Abstract

The invention belongs to the technical field of software engineering, and particularly relates to a distributed system call chain interactive analysis method based on a large language model. The invention builds a model for processing various call chain analysis tasks based on different call chain representation strategies, and comprises two variants, namely a call chain conversion text representation model and a call chain conversion representation model, wherein the call chain is converted into a structured text form based on a set of predefined grammar rules, the call chain is encoded into a vector representation by using a graph neural network, and the two models adopt supervised fine tuning and are jointly trained on a data set of various call chain analysis tasks in a model training stage, so that the model can be simultaneously adapted to different call chain analysis tasks. The invention supports the solution of related tasks of call chain analysis in a natural language interaction mode, can be packaged into services, is integrated into the existing observable tool, and assists operation and maintenance personnel in carrying out system fault root cause positioning, system behavior understanding and the like.

Inventors

  • PENG XIN
  • ZHOU TONG
  • ZHANG CHENXI

Assignees

  • 复旦大学

Dates

Publication Date
20260512
Application Date
20260127

Claims (4)

  1. 1. A distributed system call chain interactive analysis method based on a large language model is characterized in that a unified analysis model oriented to various call chain analysis tasks is built based on call chain data generated in the running process of the distributed system and used for assisting operation and maintenance personnel in carrying out call chain analysis tasks such as fault root cause positioning and system behavior understanding, a reference data set in an instruction-response mode is built by collecting call chain data from a medium-scale open-source reference micro-service system, the data set comprises 38 different call chain analysis tasks and relates to four types of analysis granularity and eight analysis targets, a model based on call chain conversion text representation and a model based on call chain conversion vector representation are subjected to supervised fine adjustment based on the data set, so that the capacity of the large model in the call chain analysis task is enhanced, and the specific steps are as follows: calling chain representation generation; Designing two types of calling chain representation strategies, namely a calling chain-to-text representation strategy and a calling chain-to-chain representation strategy, which are used for converting structured calling chain data into a representation form which can be effectively understood and processed by a large model, wherein the calling chain-to-text representation strategy aims at converting the calling chain into the structured text representation based on a set of predefined grammar rules, and the grammar rules comprise node sequence representation, adjacency list enhanced node sequence representation, edge list enhanced node sequence representation and class code representation; secondly, calling a chain analysis model design, including a model design based on calling a chain transfer text representation and a model design based on calling a chain transfer vector representation; For a model based on transferring text representation by a call chain, a call chain or a pair of call chains and corresponding instructions are given, the model firstly converts the structured call chain into text representation based on a predefined grammar rule, then the generated call chain text and the instructions are spliced and input into a large model together, and finally, the large model outputs analysis results, including a gradual reasoning process and a final answer; For a model based on call chain vector representation, a call chain or a pair of call chains and corresponding instructions are given, the model firstly generates vector representation for the call chain, then further generates vector representation of corresponding text instructions, finally splices the call chain vector representation and the instruction vector representation, and inputs the spliced vectors into a large model to generate a response, wherein the response comprises an reasoning path and a final answer; Thirdly, invoking a chain analysis model for training; The method comprises the steps of carrying out instruction fine tuning training on a plurality of call chain analysis tasks in a reference data set at the same time, specifically, using an inference path and a final answer as supervision signals and executing supervised fine tuning based on cross entropy loss, and measuring differences between the inference path and the final answer predicted by a model and real answers provided in the reference data set for a given call chain or call chain pair and corresponding instructions thereof.
  2. 2. The distributed system call chain multitasking interactive analysis method of claim 1, characterized in that in step (one): (A) For call chaining to text representation policies, a structured call chaining is converted to a text sequence representation by four methods: (1) The node sequence is expressed as a dictionary composed of 'attribute name-attribute value', and a calling chain is expressed as a sequence composed of a plurality of Span dictionaries, based on the expression, a large model rebuilds the calling relation in the calling chain according to spanId and PARENTSPANID information of each Span; (2) The node sequence enhanced by the adjacency list is used for explicitly enumerating the sub Span of each Span, and the call relation inside the call chain is represented in a compact and display mode, so that the call chain is represented as the combination of the node sequence and the adjacency list; (3) The node sequence enhanced by the side table is expressed by explicitly expressing all calling relations in a calling chain through the side table, wherein one calling chain is expressed as a combination of the node sequence and the side table; (4) Class code representation, converting the call chain into a highly structured XML representation; (B) For the calling chain steering amount representation strategy, the calling chain is encoded into a dense vector representation by using a graph neural network, and the method specifically comprises the following steps of: (1) Call chain diagram construction, namely, a call chain t is given, and a corresponding Span attribute diagram is constructed first Wherein, the node is represented by a text character string formed by splicing the attribute name and the attribute value of one Span, and the edge represents the calling relationship between the two spans; (2) Node representation initialization for Firstly, utilizing a word segmentation device of a pre-training large model to encode a corresponding text string into a Token sequence, and mapping the Token into a continuous vector space to obtain a hidden space representation; because the text lengths of different spans are inconsistent, carrying out mean pooling on hidden space representations of all Token in the node, thereby generating a vector representation with a fixed length as an initial representation of the node; (3) Call chain vector generation, initial representation at the acquisition node Calling chain graph After the call and called relationship A, the vector representation of the call chain is calculated according to the following formula : Wherein, the Representing hidden space vector dimensions of the graph neural network; vector representations for each node in the call chain graph are generated; the vector representation of the call chain is obtained by pooling the vector representations of all nodes.
  3. 3. The distributed system call chain multitasking interactive analysis method of claim 2, characterized by constructing a model based on call chain steering vector representation in step (two), comprising the following sub-steps: (1) Call chain processing, namely generating call chain vectors by using the call chain steering amount representation method in the step (one) by a model The vector is then mapped into the vector space of the large model by a projection layer, namely a multi-layer perceptron (MLP), the projected call chain vector representation The method is calculated according to the formula: Wherein, the Representing hidden space vector dimensions of a large model; (2) Instruction processing for each instruction The model uses frozen large model word segmentation device pairs The word segmentation is carried out, and the specific process is as follows: converting instructions into discrete Token sequences in large model word lists These Token are then mapped into a continuous vector space: wherein L represents the length of the Token sequence; representing hidden space vector dimensions of a large model; (3) Call chain and instruction stitching model stitching call chain vector representation And instruction vector representation And inputting the spliced vectors into the large model to generate a response, including an inference path and a final answer.
  4. 4. A distributed system call chain multitasking interactive analysis method as claimed in claim 3 in which the supervised fine tuning penalty in step (iii) is defined as follows: Wherein, the Representing the generated inference path; Representing the generated final answer; Representing an input call chain or call chain pair; Representing an input instruction; representing the number of instruction-pairs in the training dataset; Representation is directed to - Is the number of inferred paths; is a model parameter.

Description

Distributed system call chain interactive analysis method based on large language model Technical Field The invention belongs to the technical field of software engineering, and particularly relates to a distributed system call chain interactive analysis method based on a large language model. Background In recent years, distributed tracking technology has become a key component in industrial microservice system infrastructure. The call chain generated in the system operation process records the complete execution flow of a service request among a plurality of service instances, and records the rich attribute information related to each service call, such as response status codes, execution time delay, HTTP methods and the like. Therefore, the call chain is widely applied to key tasks such as operation behavior understanding, abnormality detection, fault root cause positioning and the like of the micro-service system. Visual analysis is one of the mainstream methods of invoking chain analysis in current microservice systems. Such methods typically first automatically perform one or more predefined call chain analysis tasks, such as end-to-end response time calculation, service call path identification, and call chain aggregation analysis, and then display the analysis results in a visual form such as a dashboard, thereby assisting the operation and maintenance personnel in performing downstream tasks such as anomaly detection and fault root cause location in combination with practical experience. Disclosure of Invention The invention aims to provide an interactive call chain analysis method which is friendly to users and supports various distributed system call chain analysis tasks so as to assist operation and maintenance personnel to carry out operation and maintenance work. The invention provides a large language model-based distributed system call chain interactive analysis method, which is used for constructing a unified analysis model oriented to various call chain analysis tasks based on call chain data generated in the running process of a distributed system and used for assisting operation and maintenance personnel in carrying out call chain analysis tasks such as fault root cause positioning, system behavior understanding and the like, and constructing a reference data set in an instruction-response form by collecting call chain data from a medium-scale open-source reference micro-service system, wherein the data set comprises 38 different call chain analysis tasks and relates to various analysis granularity and analysis targets (see table 1), and the capability of the large model in the call chain analysis tasks is enhanced by carrying out supervision fine adjustment on a model based on call chain-to-text representation and a model based on call chain transfer vector representation based on the data set. The method mainly comprises three parts, namely calling chain representation generation, calling chain analysis model design and calling chain analysis model training. The method comprises the following specific steps: Call chain representation generation Two call chain representation strategies, namely a call chain-to-text representation strategy and a call chain-to-turn representation strategy, are designed for converting structured call chain data into a representation form which can be effectively understood and processed by a large model, wherein the call chain-to-text representation strategy aims at converting the call chain into the structured text representation based on a set of predefined grammar rules, the grammar rules comprise node sequence representation, adjacency list enhanced node sequence representation, edge list enhanced node sequence representation and class code representation, and the call chain-to-turn representation strategy aims at encoding the call chain into a dense vector representation by using a graph neural network. The method specifically comprises the following substeps: (A) For call chaining to text representation policies, a structured call chaining is converted to a text sequence representation by the following four methods: (1) The node sequence represents that each Span is represented as a dictionary consisting of 'attribute name-attribute value', and one call chain is represented as a sequence consisting of a plurality of Span dictionaries. Based on this representation, the large model needs to reconstruct the call relationships in the call chain from the spanId and PARENTSPANID information for each Span. (2) The adjacency list enhanced node sequence represents that the sub Span of each Span is explicitly enumerated with the adjacency list, the call relationships inside the call chain are represented in a compact and displayed manner, and the method represents the call chain as a combination of the node sequence and the adjacency list. (3) The node sequence enhanced by the edge table shows that the method explicitly shows all calling relations in a calling