Interface performance optimization method and device combined with large language model, equipment and medium
By combining a microservice gateway with a large language model, the link information of microservice nodes is automatically acquired and analyzed, which solves the problem of low efficiency in interface performance optimization and achieves efficient and accurate performance bottleneck diagnosis and optimization.
Patent Information
- Application Number
- CN202510945869.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-09
- Publication Date
- 2025-10-24
AI Technical Summary
In modern distributed system architectures, interface performance optimization is inefficient, and traditional performance troubleshooting methods are cumbersome and easily limited by human experience, making it difficult to efficiently and accurately locate performance bottlenecks.
The microservice gateway determines data access requests, obtains link service information and structured logs of microservice nodes, integrates the information to determine the interface diagnostic level, and uses a large language model to diagnose performance bottlenecks and generate optimization suggestions.
It enables automatic performance bottleneck diagnosis and optimization suggestion generation, improving the efficiency of interface performance optimization and enhancing the real-time performance and accuracy of location.
Smart Images

Figure CN120834982A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the field of interface performance optimization, and in particular, to an interface performance optimization method, device, equipment and medium suitable for a large language model. BACKGROUND
[0002] In modern distributed system architecture, enterprise-level applications generally use the micro-service mode for system decoupling and service governance. Each business function is encapsulated as an independent service unit, and services communicate and cooperate through specified interfaces or RPC (Remote Procedure Call Protocol).
[0003] In a complex link scenario, the root cause of slow interface response can come from multiple dimensions: long service call link, complex processing logic within a single service, frequent database operations, or unstable downstream services. Traditional performance troubleshooting methods rely on operations or developers searching for logs by keywords, manually comparing relevant data or time-consuming indicators, which is tedious, slow to respond, and easily limited by human experience, making it difficult to form an efficient and accurate positioning loop.
[0004] However, using existing technologies, interface performance optimization is inefficient. SUMMARY
[0005] The embodiments described herein provide an interface performance optimization method, device, equipment and medium using a large language model, which overcomes the above problems.
[0006] In a first aspect, according to the content of the present disclosure, an interface performance optimization method using a large language model is provided, comprising:
[0007] determining the data access process of the data access request by the micro-service gateway, and when the data access process of the data access request determined by the micro-service gateway meets a preset call strategy, calling a link tracking system service interface to obtain link service information, the link service information being used to describe service execution data of each micro-service node in the data access process, the service execution data of the micro-service node corresponding to the service name, interface path, service type, interface time consumption and call time;
[0008] obtaining the structured log of each micro-service node, and determining the corresponding link process information according to the structured log of each micro-service node, the link process information of the micro-service node being used to describe the SQL execution data and execution exception data of the micro-service node corresponding to the data access request;
[0009] fuse the link service information and the link process information corresponding to each of the microservice nodes to obtain calling execution information corresponding to each of the microservice nodes for the data access request;
[0010] Based on the calling execution information corresponding to each of the microservice nodes for the data access request, determine the interface diagnosis level corresponding to each of the microservice nodes, and determine the target service node from all the microservice nodes according to the interface diagnosis level corresponding to each of the microservice nodes.
[0011] Input the calling execution information corresponding to the target service node into a large language model, and determine the interface optimization information corresponding to the target service node based on the output of the large language model.
[0012] In a second aspect, according to the content of the present disclosure, an interface performance optimization device of a joint large language model is provided, comprising:
[0013] The calling module is configured to determine the data access process of the data access request through the microservice gateway, and when the data access process of the data access request determined through the microservice gateway meets a preset calling strategy, call a link tracking system service interface to obtain link service information, wherein the link service information is used to describe service execution data of each microservice node in a data access process, and the service execution data corresponding to the microservice node includes a service name, an interface path, a service type, an interface time consumption, and a calling time.
[0014] The first determination module is configured to obtain the structured log of each of the microservice nodes, and determine the link process information corresponding to each of the microservice nodes according to the structured log of each of the microservice nodes, wherein the link process information corresponding to the microservice node is used to describe SQL execution data and execution exception data corresponding to the data access request of the microservice node.
[0015] The fusion module is configured to fuse the link service information and the link process information corresponding to each of the microservice nodes to obtain calling execution information corresponding to each of the microservice nodes for the data access request.
[0016] The second determination module is configured to determine the interface diagnosis level corresponding to each of the microservice nodes based on the calling execution information corresponding to each of the microservice nodes for the data access request, and determine the target service node from all the microservice nodes according to the interface diagnosis level corresponding to each of the microservice nodes.
[0017] The third determination module is configured to input the calling execution information corresponding to the target service node into a large language model, and determine the interface optimization information corresponding to the target service node based on the output of the large language model.
[0018] In a third aspect, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor implementing the steps of the interface performance optimization method of the joint large language model when executing the computer program.
[0019] In a fourth aspect, a computer readable storage medium is provided, storing a computer program, and the processor implementing the steps of the interface performance optimization method of the joint large language model when executing the computer program.
[0020] The interface performance optimization method of the joint large language model provided by the embodiments of the present application determines the data access process of the data access request through the microservice gateway, and when the data access process of the data access request determined through the microservice gateway meets the preset calling strategy, the link tracking system service interface is called to obtain link service information, the link service information is used to describe the service execution data of each microservice node in the data access process, and the service execution data corresponding to the microservice node includes: service name, interface path, service type, interface time consumption and calling time; the structured log of each microservice node is obtained, and the corresponding link process information of each microservice node is determined according to the structured log of each microservice node, the link process information corresponding to the microservice node is used to describe the SQL execution data and execution exception data corresponding to the data access request of the microservice node; the link service information and the link process information corresponding to each microservice node are fused to obtain the calling execution information corresponding to each microservice node of the data access request; based on the calling execution information corresponding to each microservice node of the data access request, the interface diagnosis level corresponding to each microservice node is determined, and the target service node is determined from all microservice nodes according to the interface diagnosis level corresponding to each microservice node; the calling execution information corresponding to the target service node is input into the large language model, and the interface optimization information corresponding to the target service node is determined based on the output of the large language model. In this way, through the context perception and problem induction ability of the large language model, the performance bottleneck diagnosis and optimization suggestion generation can be automatically completed, and the interface performance optimization efficiency is effectively improved.
[0021] The above description is only a summary of the technical solutions of the embodiments of the present application, in order to more clearly understand the technical means of the embodiments of the present application, the embodiments of the present application can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the embodiments of the present application more obvious and easy to understand, the following specific embodiments of the present application are described. BRIEF DESCRIPTION OF DRAWINGS
[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments will be briefly described below, it should be known that the drawings described below only relate to some embodiments of the present disclosure, not to the limitation of the present disclosure, wherein:
[0023] Figure 1 is a flowchart of a method for optimizing interface performance of a joint large language model provided by the present disclosure.
[0024] Figure 2 is a structural diagram of a device for optimizing interface performance of a joint large language model provided by the present disclosure.
[0025] Figure 3 is a structural diagram of a computer device provided by the present disclosure.
[0026] It should be noted that the elements in the drawings are schematic and not drawn to scale. DETAILED DESCRIPTION
[0027] In order to make the purposes, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the described embodiments of the present disclosure, all other embodiments obtained by a person of ordinary skill in the art without creative effort also belong to the scope of protection of the present disclosure.
[0028] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this present subject matter belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the specification and relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein. As used herein, the statement that two or more parts are "connected" or "coupled" together will mean that the parts are joined together either directly or through one or more intermediate parts.
[0029] Reference herein to "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily all directed to the same embodiment, or to a single alternative embodiment. It is explicitly contemplated that embodiments described herein can be combined with each other.
[0030] The term "and / or" used in this document only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can represent: there is A, there is A and B, and there is B. In addition, the character " / " in this document generally represents that the front and rear associated objects are in an "or" relationship. Terms such as "first" and "second" are only used to distinguish one component (or part of a component) from another component (or another part of a component).
[0031] In the description of the present application, unless otherwise specified, the meaning of "a plurality of" is two or more (including two), and similarly, "a plurality of groups" means two or more groups (including two groups).
[0032] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely in conjunction with the drawings.
[0033] Figure 1 is a flowchart of a joint large language model interface performance optimization method provided by an embodiment of the present disclosure, as Figure 1 shown, the specific process of the joint large language model interface performance optimization method includes:
[0034] S110, judging the data access process of the data access request through the microservice gateway, and when the data access process of the data access request judged through the microservice gateway meets the preset calling strategy, calling the link tracking system service interface to obtain link service information.
[0035] Among them, the link service information is used to describe the service execution data of each microservice node in the data access process, and the service execution data corresponding to the microservice node includes: service name, interface path, service type, interface time consumption and calling time.
[0036] The preset calling strategy can be used to describe the preset data triggering moment, such as the moment when the data reading in the data access request process has been completed and the reading data has not been sent to the data reading party. Specifically, in the request response stage intercepted at the microservice gateway, a trace completion message is sent to kafka, the message is listened to by calling the chain data listening service, the trace completion message is consumed in real time, and the complete trace data is obtained by calling the Zipkin Server API.
[0037] The link tracking system service interface can be an API (Application Program Interface) of a distributed link tracking system service such as Zipkin Server. The Zipkin Server API can be used to access trace data by performing request access and link tracking identifier injection processes and span data collection and call chain construction processes. For example, request access and link tracking identifier injection: when a client request enters the system through a microservice gateway, a service chain tracking component (such as Spring Cloud Sleuth) automatically generates a globally unique trace Id for each request and a spanId for each internal service call, and injects it into the log context (MDC), and sends span data to the Zipkin Server to construct a complete call chain. Span data collection and call chain construction: all microservice service nodes on the call link send trace data to the Zipkin Server in a synchronous or asynchronous manner through a link tracking tool (such as the Sleuth Client), and the Zipkin Server aggregates, sorts, and stores all spans under each trace Id, generates complete call link data, and provides API support for accessing trace data according to trace Id.
[0038] In some embodiments, the call link tracking system service interface obtains link service information, including:
[0039] The call link tracking system service interface obtains action execution information of each microservice node, obtains a preset service data structure, and based on the preset service data structure, respectively performs data analysis on the action execution information of each microservice node to obtain service execution data of each microservice node in the data access process.
[0040] The service listens to the trace data (i.e., action execution information) to extract the call chain core dimension information, i.e., service execution data, such as serviceName, http.path, kind (CLIENT / SERVER), duration, and time stamp.
[0041] The embodiment adopts a Spring Cloud technology system, is highly compatible with an existing micro-service platform (such as SpringBoot, Kubernetes), Zipkin supports local or container deployment, a model service can be used through a REST interface, and has extremely low migration and integration costs. By integrating Spring Cloud Sleuth and Zipkin, trace Id and span Id of the whole interface request process are automatically recorded, manual code insertion or analysis of a large number of log files is not required, the whole call link can be accurately restored, and therefore the real-time performance and accuracy of performance problem positioning are significantly improved.
[0042] S120, structured logs of each micro-service node are acquired, and corresponding link process information of each micro-service node is determined according to the structured logs of each micro-service node.
[0043] The link process information corresponding to the micro-service node is used to describe SQL (Structured Query Language) execution data and execution exception data of the micro-service node corresponding to the data access request. The exception data includes an exception type and an exception stack (stack Trace), and the SQL execution data includes a SQL original statement, a SQL execution time (sql Cost), and a service to which the SQL execution data belongs.
[0044] In some embodiments, an information separation mechanism is arranged in each micro-service node. The information separation mechanism is, for example, a log aspect (AOP) or an interceptor mechanism.
[0045] The structured logs of each micro-service node are acquired, including:
[0046] Context information of the data access request is written into corresponding structured logs through the information separation mechanism arranged in each micro-service node, and the structured logs of each micro-service node are collected when a log collection requirement is met.
[0047] The corresponding link process information of each micro-service node is determined according to the structured logs of each micro-service node, including:
[0048] SQL execution data of each micro-service node corresponding to the data access request is identified from the structured logs of each micro-service node, and execution exception data of each micro-service node corresponding to the data access request is identified from the structured logs of each micro-service node.
[0049] In the application service, the trace Id of each request can be associated with the following key context information and written into the structured log through a unified log aspect or interceptor mechanism; the log is output in a unified JSON format to a log file, and real-time log collection is realized by Filebeat→Logstash→Elasticsearch, and finally the log is collected into Elasticsearch.
[0050] The embodiment can automatically extract service time consumption from the call chain, extract context information such as SQL execution time consumption and exception stack from the log, and construct a complete "performance portrait". Not only can the slow layer be displayed, but also the reason for the slow can be given, such as no index for SQL, call blocking, service serialization, etc.
[0051] S130, fuse link service information and link process information corresponding to each microservice node, to obtain call execution information corresponding to each microservice node of the data access request.
[0052] In some embodiments, the service execution data corresponding to the microservice node is associated with execution data of a first service identifier (i.e., traceId) and execution data of a second service (i.e., span Id).
[0053] Fuse link service information and link process information corresponding to each microservice node to obtain call execution information corresponding to each microservice node of the data access request, including:
[0054] Query the execution data corresponding to the first service identifier and the execution data corresponding to the first service identifier of each microservice node from the link service information; according to the data dimension of the execution data corresponding to the first service identifier of each microservice node and the execution data corresponding to the first service identifier, fuse the execution data corresponding to the first service identifier of each microservice node and the execution data corresponding to the first service identifier to the link process information corresponding to each microservice node, to obtain the call execution information corresponding to each microservice node of the data access request.
[0055] For example, query the exception log and SQL log corresponding to the trace Id from Elasticsearch; aggregate the SQL execution time consumption according to the service dimension; and sort all call events according to the timestamp to generate a complete structured call chain context, i.e., the call execution information of each microservice node. The call execution information is specifically as follows.
[0056]
[0057] The execution data of the first service identifier is as follows.
[0058]
[0059] The execution data of the secondary service identifier is as follows (only one is shown as an example).
[0060]
[0061] S140, based on the call execution information corresponding to each microservice node of the data access request, determining the interface diagnosis level corresponding to each microservice node, and determining the target service node from all microservice nodes according to the interface diagnosis level corresponding to each microservice node.
[0062] The interface diagnosis level includes a first level and a second level, the first level indicating that the interface of the microservice node is normal and does not need to be optimized, and the second level indicating that the interface of the microservice node is abnormal and needs to be optimized.
[0063] In some embodiments, based on the call execution information corresponding to each microservice node of the data access request, determining the interface diagnosis level corresponding to each microservice node includes:
[0064] Obtaining the interface performance alarm condition corresponding to each microservice node; comparing the call execution information corresponding to each microservice node of the data access request with the interface performance alarm condition corresponding to each microservice node, respectively, and determining the interface diagnosis level corresponding to each microservice node according to the comparison result of the call execution information of the microservice node and the corresponding interface performance alarm condition.
[0065] The interface performance alarm condition can be used to limit and constrain the interface performance, for example, the interface performance alarm condition corresponding to the microservice node is configured as: time consumption > 500 ms; if the interface time consumption in the call execution information of the microservice node is greater than 500 ms, the interface diagnosis level corresponding to the microservice node is determined as the second level; if the interface time consumption in the call execution information of the microservice node is not greater than 500 ms, the interface diagnosis level corresponding to the microservice node is determined as the first level.
[0066] After determining the interface diagnosis level corresponding to the microservice node, the target service node can be determined from all microservice nodes according to the interface diagnosis level corresponding to each microservice node. For example, the microservice nodes with the second level interface diagnosis level in all microservice nodes are determined as the target service nodes.
[0067] In some embodiments, before inputting the call execution information corresponding to the target service node into the large language model, it further includes:
[0068] Obtaining the institutional input conversion template corresponding to the large language model, and performing structured input conversion on the call execution information corresponding to the target service node according to the institutional input conversion template corresponding to the large language model.
[0069] The institutionalized input conversion template can be a prompt template, and the parameter item in the prompt template can include interface path, call chain structure, SQL time consumption, exception stack, and other context information. The parameter item contained in the prompt template is extracted from the call execution information corresponding to the target service node, so as to structure the input conversion of the call execution information corresponding to the target service node, and facilitate the input of the call execution information corresponding to the target service node into the large language model for abnormal analysis optimization.
[0070] The prompt template is as follows.
[0071]
[0072] S150, input the call execution information corresponding to the target service node into the large language model, and determine the interface optimization information corresponding to the target service node based on the output of the large language model.
[0073] The large language model receives complete context prompts, identifies possible performance bottlenecks (services, SQL, resource contention) through context understanding, abnormal analysis, SQL recognition, and experience reasoning, analyzes error types and possible causes, outputs natural language optimization suggestions (such as "add xxx index to xxx table" and "avoid processing business logic in the control layer"), and returns structured suggestion data and analysis summary.
[0074] The embodiment constructs a structured prompt input into a large language model, and the model automatically generates diagnostic conclusions and optimization suggestions based on call chain, SQL, and exception context semantic information, replacing the experience judgment of operation and maintenance personnel in the traditional mode, thereby effectively improving the coverage and practicality of analysis suggestions.
[0075] The interface optimization information output by the large language model is as follows.
[0076]
[0077]
[0078] In this embodiment, the micro-service gateway is used to determine the data access process of the data access request, and when the data access process of the data access request determined by the micro-service gateway meets the preset calling strategy, the link tracking system service interface is called to obtain link service information, which is used to describe the service execution data of each micro-service node in the data access process. The service execution data corresponding to the micro-service node includes: service name, interface path, service type, interface time consumption and calling time; the structured log of each micro-service node is obtained, and the corresponding link process information is determined according to the structured log of each micro-service node. The link process information corresponding to the micro-service node is used to describe the SQL execution data and execution exception data corresponding to the data access request of the micro-service node; the link service information and the link process information corresponding to each micro-service node are fused to obtain the calling execution information corresponding to each micro-service node of the data access request; based on the calling execution information corresponding to each micro-service node of the data access request, the interface diagnosis level corresponding to each micro-service node is determined, and the target service node is determined from all micro-service nodes according to the interface diagnosis level corresponding to each micro-service node; the calling execution information corresponding to the target service node is input into the large language model, and the interface optimization information corresponding to the target service node is determined based on the output of the large language model. In this way, through the context perception and problem induction ability of the large language model, the performance bottleneck diagnosis and optimization suggestion generation can be automatically completed, and the interface performance optimization efficiency is effectively improved.
[0079] In some embodiments, the method further comprises:
[0080] determining an interface risk level corresponding to the target service node according to the interface optimization information corresponding to the target service node; determining a corresponding risk request triggering strategy based on the interface risk level corresponding to the target service node, and presenting the interface optimization information corresponding to the target service node in a visual manner.
[0081] If the total interface response time consumption in the interface optimization information corresponding to the target service node is greater than 2000ms, the interface risk level corresponding to the target service node is determined as a high risk level; if the total interface response time consumption in the interface optimization information corresponding to the target service node is not greater than 2000ms, the interface risk level corresponding to the target service node is determined as a low risk level.
[0082] If it is determined that the interface risk level corresponding to the target service node is a high risk level, the corresponding risk request triggering strategy is determined as a first triggering strategy, such as using email or Dingding to send an alarm prompt; if it is determined that the interface risk level corresponding to the target service node is a low risk level, the corresponding risk request triggering strategy is determined as a second triggering strategy, such as using a system message prompt to send an alarm prompt. And the complete calling link diagram, SQL execution details, exception type and exception stack, and suggestion card are presented in a visual manner.
[0083] The embodiment can realize automatic slow interface alarm by integrating Prometheus+Alertmanager, and can display diagnosis report and optimization suggestion generated by model through front-end platform, to realize the closed-loop process from "finding problems - diagnosing problems - proposing suggestions - implementing optimization".
[0084] In summary, the interface performance optimization method combined with the large language model proposed in the embodiment realizes automatic collection of full-link call data based on Sleuth+Zipkin: by integrating Spring Cloud Sleuth and Zipkin components, full-process tracking of distributed service requests is realized; without invading business code, trace Id and span Id can be automatically injected, and the timestamp, interface path, service name, time consumption and other information of each service call are reported to Zipkin Server in the form of standardized span data; this mechanism provides a reliable data collection basis for link-level performance analysis. Dynamic analysis of span data and construction of standardized call chain data: a call chain data extraction service is designed, which can automatically parse the complete call path from Zipkin trace data, and aggregate the call time, service name, interface name and other information of each service node into a standardized callChain data structure; this structure supports multi-node and multi-level call aggregation display, and can be used for subsequent performance portrait modeling and abnormal point positioning. Context information fusion to construct high-quality structured Prompt: an internal log extraction service is designed to obtain the context information in the call process of the trace Id based on the trace Id as the index, and structure the information into the Prompt template as the context input of the large model reasoning, so as to improve the accuracy of problem description and the relevance of diagnosis suggestions. Intelligent identification of performance bottlenecks and generation of optimization strategies using large language models: structured prompts are input into large language models to intelligently identify performance bottlenecks in interface call paths by taking advantage of their semantic understanding, causal reasoning and experience induction capabilities. The model can automatically output executable optimization suggestions, replacing the traditional manual troubleshooting process and greatly improving problem positioning efficiency and coverage. Realize the automatic closed loop of performance alarm and optimization suggestion visualization: built-in rule engine and alarm components can automatically trigger performance diagnosis and alarm tasks based on interface time consumption threshold, abnormal proportion and other indicators. The optimization suggestions returned by the large model will be displayed through the visualization platform, including service call topology graph, SQL execution details, abnormal positioning and suggestion cards, supporting development and operation personnel to mark adoption, repair status and effect backtracking, forming a performance management closed-loop process of "collection - analysis - suggestion - verification".
[0085] Figure 2A structural schematic diagram of an interface performance optimization device of a joint large language model is provided in the embodiment. The interface performance optimization device of the joint large language model can include:
[0086] The calling module 210 is configured to determine a data access process of the data access request by the micro-service gateway, and call a link tracking system service interface to obtain link service information when the data access process of the data access request determined by the micro-service gateway meets a preset calling strategy. The link service information is used to describe service execution data of each micro-service node in the data access process. The service execution data corresponding to the micro-service node includes a service name, an interface path, a service type, interface time consumption, and calling time.
[0087] The first determination module 220 is configured to obtain structured logs of each micro-service node, and determine corresponding link process information of each micro-service node according to the structured logs of each micro-service node. The link process information corresponding to the micro-service node is used to describe SQL execution data and execution exception data of the micro-service node corresponding to the data access request.
[0088] The fusion module 230 is configured to fuse the link service information and the link process information corresponding to each micro-service node to obtain calling execution information of the data access request corresponding to each micro-service node.
[0089] The second determination module 240 is configured to determine an interface diagnosis level corresponding to each micro-service node based on the calling execution information of the data access request corresponding to each micro-service node, and determine a target service node from all micro-service nodes according to the interface diagnosis level corresponding to each micro-service node.
[0090] The third determination module 250 is configured to input the calling execution information corresponding to the target service node into a large language model, and determine interface optimization information corresponding to the target service node based on an output of the large language model.
[0091] In the embodiment, the calling module 210 is specifically configured to:
[0092] The calling module 210 is configured to call the link tracking system service interface to obtain action execution information of each micro-service node, obtain a preset service data structure, and perform data analysis on the action execution information of each micro-service node based on the preset service data structure to obtain service execution data of each micro-service node in the data access process.
[0093] In the embodiment, the information separation mechanism is arranged in each micro-service node.
[0094] The first determination module 220 is specifically configured to:
[0095] The context information of the data access request is written into corresponding structured logs through an information separation mechanism set in each microservice node; when log collection requirements are met, the structured logs of each microservice node are collected; SQL execution data corresponding to the data access request of each microservice node is identified from the structured logs of each microservice node; and execution exception data corresponding to the data access request of each microservice node is identified from the structured logs of each microservice node.
[0096] In the embodiment, the service execution data corresponding to the microservice node is associated with execution data corresponding to a first service identifier and execution data corresponding to a second service identifier.
[0097] The fusion module 230 is specifically configured to:
[0098] The execution data corresponding to the first service identifier and the execution data corresponding to the first service identifier of each microservice node are queried from the link service information; and the execution data corresponding to the first service identifier and the execution data corresponding to the first service identifier of each microservice node are fused into the link process information corresponding to each microservice node according to the data dimensions of the execution data corresponding to the first service identifier and the execution data corresponding to the first service identifier of each microservice node, to obtain the calling execution information corresponding to each microservice node of the data access request.
[0099] In the embodiment, the second determination module 240 is specifically configured to:
[0100] The interface performance alarm conditions corresponding to each microservice node are obtained; the calling execution information corresponding to each microservice node of the data access request is compared with the interface performance alarm conditions corresponding to each microservice node, respectively, and the interface diagnosis level corresponding to each microservice node is determined according to the comparison results of the calling execution information of the microservice node and the corresponding interface performance alarm conditions.
[0101] In the embodiment, the conversion module is further included.
[0102] The conversion module is configured to obtain a structured input conversion template corresponding to the large language model, and perform structured input conversion on the calling execution information corresponding to the target service node according to the structured input conversion template corresponding to the large language model.
[0103] In the embodiment, the fourth determination module is further included.
[0104] The fourth determination module is configured to determine the interface risk level corresponding to the target service node according to the interface optimization information corresponding to the target service node, determine the corresponding risk request triggering strategy based on the interface risk level corresponding to the target service node, and display the interface optimization information corresponding to the target service node in a visual manner.
[0105] The interface performance optimization device for a joint large language model provided in the present disclosure can execute the above method embodiments. Its specific implementation principles and technical effects can be found in the above method embodiments, and the present disclosure will not repeat them here.
[0106] The present application also provides a computer device. Figure 3 , Figure 3 This is a basic structural block diagram of the computer device in this embodiment.
[0107] The computer device includes a memory 310 and a processor 320 that are interconnected and communicate with each other via a system bus. It should be noted that the figure only shows a computer device with a memory 310 and a processor 320, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a microprocessor, an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0108] Computer devices can be desktop computers, laptops, PDAs, cloud servers, etc. Computer devices can interact with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0109] The memory 310 includes at least one type of readable storage medium, including non-volatile memory or volatile memory, for example, flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. The RAM can include static RAM or dynamic RAM. In some embodiments, the memory 310 can be an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. In other embodiments, the memory 310 can also be an external storage device of the computer device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, or a flash card, etc. equipped on the computer device. Of course, the memory 310 can include both an internal storage unit and an external storage device of the computer device. In the present embodiment, the memory 310 is generally used to store an operating system and various application software installed on the computer device, for example, program codes of the above-described method, etc. In addition, the memory 310 can also be used to temporarily store various data that has been output or will be output.
[0110] The processor 320 is generally used to perform the overall operation of the computer device. In the present embodiment, the memory 310 is used to store program codes or instructions, which include computer operation instructions, and the processor 320 is used to execute the program codes or instructions stored in the memory 310 or process data, for example, run the program codes of the above-described method.
[0111] In this article, the bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus system can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is shown in the figure, but it does not mean that there is only one bus or only one type of bus.
[0112] Another embodiment of the present application also provides a computer readable medium, which can be a computer readable signal medium or a computer readable medium. The processor in the computer reads the computer readable program code stored in the computer readable medium, so that the processor can perform the function actions specified in each step or combination of steps in the above method; generate the device implementing the function actions specified in each block or combination of blocks in the block diagram.
[0113] The computer readable medium includes but is not limited to electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any appropriate combination of the foregoing, for storing program codes or instructions, which include computer operation instructions, and processors for executing the program codes or instructions of the above method stored in the memory.
[0114] The definition of the memory and the processor can refer to the description of the foregoing computer device embodiment, which will not be repeated here.
[0115] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiment described above is only schematic, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed each other can be indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0116] The function units or modules in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software function unit.
[0117] If the integrated unit is implemented in the form of a software function unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or say the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods in the various embodiments of the present application. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0118] In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of both hardware and software, and any combination thereof. In the device claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The mere fact that certain measures are recited in mutually different claims does not indicate that a combination of these measures cannot be used to advantage. The use of relative terms such as "first", "second" and "third", and / or "at least one", with respect to an element, should not be construed as necessarily limiting the scope of the application to a single element unless specifically stated otherwise. The steps of the methods described herein do not have to be performed in the exact order disclosed unless specifically stated.
[0119] The above embodiments are only used to illustrate the technical solutions of the present application, rather than limit them; even though the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. An interface performance optimization method of a joint large language model, characterized in that, include: The microservice gateway determines the data access process of the data access request, and when the microservice gateway determines that the data access process of the data access request meets the preset call policy, calls the link tracking system service interface to obtain link service information. The link service information is used to describe the service execution data of each microservice node during the data access process. The service execution data corresponding to the microservice node includes: service name, interface path, service type, interface time and call time; Obtaining a structured log of each microservice node, and determining corresponding link process information according to the structured log of each microservice node, where the link process information corresponding to the microservice node is used to describe SQL execution data and execution exception data corresponding to the data access request of the microservice node; Fusion of the link service information and the link process information corresponding to each of the microservice nodes to obtain call execution information of the data access request corresponding to each of the microservice nodes; Determining an interface diagnostic level corresponding to each microservice node based on call execution information corresponding to each microservice node of the data access request, and determining a target service node from all the microservice nodes according to the interface diagnostic level corresponding to each microservice node; The call execution information corresponding to the target service node is input into a large language model, and the interface optimization information corresponding to the target service node is determined based on an output of the large language model.
2. The method of claim 1, wherein, The calling of the link tracking system service interface to obtain link service information includes: Calling the link tracking system service interface to obtain action execution information of each microservice node; A preset service data structure is obtained, and based on the preset service data structure, data is parsed for the action execution information of each microservice node to obtain service execution data of each microservice node during the data access process.
3. The method of claim 1, wherein, An information separation mechanism is provided in each of the microservice nodes; The obtaining of the structured log of each microservice node includes: Writing the context information of the data access request into the corresponding structured log through the information separation mechanism set in each microservice node; and collecting the structured log of each microservice node when the log collection requirements are met; Determining corresponding link process information according to the structured log of each microservice node includes: Identify SQL execution data corresponding to the data access request of each microservice node from the structured log of each microservice node; and identify execution exception data corresponding to the data access request of each microservice node from the structured log of each microservice node.
4. The method of claim 1, wherein, The service execution data corresponding to the microservice node is associated with the execution data of the first-level service identifier and the execution data of the second-level service; The fusing the link service information and the link process information corresponding to each of the microservice nodes to obtain the call execution information of the data access request corresponding to each of the microservice nodes includes: querying execution data corresponding to a first service identifier and execution data corresponding to a first service identifier of each of the microservice nodes from the link service information; fusing the execution data corresponding to a first service identifier and the execution data corresponding to a first service identifier of each of the microservice nodes into link process information corresponding to each of the microservice nodes according to the data dimensions of the execution data corresponding to a first service identifier and the execution data corresponding to a first service identifier of each of the microservice nodes, to obtain calling execution information corresponding to each of the microservice nodes of the data access request.
5. The method of claim 1, wherein, The determining of the interface diagnosis level corresponding to each of the microservice nodes based on the calling execution information corresponding to each of the microservice nodes of the data access request comprises: obtaining an interface performance alarm condition corresponding to each of the microservice nodes; respectively comparing the calling execution information corresponding to each of the microservice nodes of the data access request with the interface performance alarm condition corresponding to each of the microservice nodes, and determining the interface diagnosis level corresponding to each of the microservice nodes according to the comparison result of the calling execution information of the microservice node and the corresponding interface performance alarm condition.
6. The method of claim 1, wherein, Before the inputting of the calling execution information corresponding to the target service node into the large language model, the method further comprises: obtaining an institutionalized input conversion template corresponding to the large language model, and performing structured input conversion on the calling execution information corresponding to the target service node according to the institutionalized input conversion template corresponding to the large language model.
7. The method of claim 1, wherein, The method further comprises: determining an interface risk level corresponding to the target service node according to the interface optimization information corresponding to the target service node; determining a corresponding risk request triggering strategy based on the interface risk level corresponding to the target service node, and displaying the interface optimization information corresponding to the target service node in a visual manner.
8. An interface performance optimization device for a joint large language model, characterized in that: The method comprises: a calling module configured to determine a data access process of a data access request through a microservice gateway, and to call a link tracking system service interface to obtain link service information when the data access process of the data access request determined through the microservice gateway meets a preset calling strategy, the link service information being used to describe service execution data of each microservice node in a data access process, the service execution data of the microservice node including a service name, an interface path, a service type, an interface time consumption, and a calling time; a first determining module configured to obtain structured logs of each of the microservice nodes, and to determine corresponding link process information according to the structured logs of each of the microservice nodes, the link process information of the microservice node being used to describe SQL execution data and execution exception data corresponding to the data access request of the microservice node; a fusion module configured to fuse the link service information and the link process information corresponding to each of the microservice nodes to obtain calling execution information corresponding to each of the microservice nodes of the data access request. A second determination module is configured to determine an interface diagnosis level of each micro-service node based on the call execution information corresponding to each micro-service node of the data access request, and determine a target service node from all the micro-service nodes according to the interface diagnosis level of each micro-service node. A third determination module is configured to input the call execution information corresponding to the target service node into a large language model, and determine interface optimization information corresponding to the target service node based on the output of the large language model.
9. A computer device, comprising: The interface performance optimization method of the joint large language model comprises a memory and a processor, the memory stores a computer program, and the processor executes the computer program to implement the interface performance optimization method of the joint large language model according to any one of claims 1-7.
10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the interface performance optimization method of the joint large language model according to any one of claims 1-7.
Citation Information
Cited By
Full-link monitoring method, system and equipment of large model and medium
CN121792378A