Business service fault positioning method and device, equipment and medium
By structuring the tracking data and log information of business service requests, constructing a service dependency graph, and utilizing a fault analysis model, the problem of not being able to locate faults accurately in real time in existing technologies is solved, achieving fast and accurate fault location and improving system stability and operational efficiency.
Patent Information
- Application Number
- CN202510919935.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-03
- Publication Date
- 2025-11-21
AI Technical Summary
In industries with high concurrency, high sensitivity, and high stability requirements, such as finance and healthcare, existing technologies cannot achieve real-time and accurate fault location for business services. This results in long root cause location time and low accuracy, affecting the continuity and maintainability of business services.
By acquiring trace data and log information of business service requests, performing structured processing, constructing a service dependency graph, and using a fault analysis model for analysis, abnormal path information is generated.
It significantly improves the accuracy and visualization of fault analysis, quickly locates abnormal paths, shortens troubleshooting time, reduces the frequency of manual intervention, and ensures system continuity and business availability.
Smart Images

Figure CN121000577A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, device, and medium for fault location in business services. Background Technology
[0002] In industries with high concurrency, high sensitivity, and high stability requirements, such as finance and healthcare, business service systems commonly adopt distributed architectures to achieve service decoupling, elastic scaling, and modular management. However, as the number of business services continues to grow, business processes become increasingly complex, and the call relationships between modules change dynamically. Especially in core scenarios involving policy generation, transaction processing, risk assessment, claims calculation, and electronic medical record synchronization, the dependencies between services often span databases, caches, message brokers, and external interfaces. If a performance degradation or failure occurs in any link, it can easily trigger a chain reaction.
[0003] Current technologies largely rely on static topology diagrams, manual log analysis, or manual troubleshooting of alarm events, lacking a comprehensive understanding of the real-time operational status of business services. This results in time-consuming and inaccurate root cause analysis, severely impacting service continuity. Furthermore, the heterogeneous and dispersed nature of log and tracing data limits the adaptive diagnostic capabilities of business services. Therefore, a fault location method is urgently needed that can achieve real-time and accurate fault location, thereby improving the stability and maintainability of business services in complex industries. Summary of the Invention
[0004] This invention provides a method, apparatus, device, and medium for locating faults in business services, in order to solve the technical problem that fault location cannot be achieved in real time and accurately in related technologies.
[0005] Firstly, a fault location method for a business service is provided, the method comprising:
[0006] In response to receiving a business service request for a target business service, the system obtains the tracking data and log information of the business service request between service nodes, and performs structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information;
[0007] The key information in the log information is bound to the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information;
[0008] A service dependency graph is constructed based on the full path information, wherein the service dependency graph includes temporal features and state labels;
[0009] The service dependency graph is analyzed using a fault analysis model to obtain analysis results, which include abnormal path information corresponding to the target business service.
[0010] Secondly, a fault location device for a service is provided, the fault location device for a service comprising:
[0011] The acquisition module is used to, in response to receiving a business service request for a target business service, acquire the tracking data and log information of the business service request between service nodes, and perform structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information;
[0012] The binding module is used to bind key information in the log information with the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information;
[0013] A construction module is used to construct a service dependency graph based on the full path information, wherein the service dependency graph includes temporal features and state labels;
[0014] The fault location module is used to analyze the service dependency graph using a fault analysis model to obtain analysis results, wherein the analysis results include abnormal path information corresponding to the target business service.
[0015] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the fault location method for the aforementioned business services.
[0016] Fourthly, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, it implements the steps of the fault location method for the aforementioned business services.
[0017] The solution implemented by the aforementioned fault location method, apparatus, computer equipment, and storage medium for business services includes the following steps: First, in response to receiving a business service request for a target business service, the method acquires tracing data and log information of the business service request between service nodes, and performs structured processing on the tracing data to obtain the original link record; wherein the original link record includes timestamp information and call direction information. Further, key information in the log information can be bound to the original link record to obtain the full path information corresponding to the business service request; wherein the key information includes time point information, service identifier, and business field information. Thus, a service dependency graph can be constructed based on the full path information, wherein the service dependency graph includes temporal characteristics and status labels, and a fault analysis model is used to analyze the service dependency graph to obtain analysis results, wherein the analysis results include abnormal path information corresponding to the target business service. In this invention, by performing structured processing on the tracing data of the business service request between service nodes and combining it with key information in the log information, complete full path information of the business service is constructed, thereby generating a service dependency graph containing temporal characteristics and status labels. This graph-based modeling approach clearly reconstructs the call relationships and execution states between services, significantly improving the accuracy and visualization of fault analysis. In-depth analysis of service dependency graphs using fault analysis models helps quickly locate abnormal paths in target business services, shortening troubleshooting time and reducing the frequency of manual intervention. Especially in fields with extremely high service stability requirements, such as finance, healthcare, and elderly care, it effectively ensures system continuity and business availability, improving operational efficiency and risk response capabilities. Attached Figure Description
[0018] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of an application environment for a fault location method for business services according to an embodiment of the present invention;
[0020] Figure 2 This is a flowchart illustrating a fault location method for business services according to an embodiment of the present invention;
[0021] Figure 3 yes Figure 1 A schematic diagram of a specific implementation method for step S10;
[0022] Figure 4 This is a schematic diagram of a fault location device for business services according to an embodiment of the present invention;
[0023] Figure 5 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention;
[0024] Figure 6 This is another structural schematic diagram of a computer device according to one embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0026] The fault location method for business services provided in this embodiment of the invention can be applied to, for example... Figure 1In this application environment, the client communicates with the server via a network. The server can respond to a business service request from the client, obtain tracking data and log information of the business service request across service nodes, and perform structured processing on the tracking data to obtain the original link record. The original link record includes timestamp information and call direction information. Key information from the log information is bound to the original link record to obtain the full path information corresponding to the business service request. The key information includes time point information, service identifier, and business field information. A service dependency graph is constructed based on the full path information, including temporal characteristics and status labels. The service dependency graph is analyzed using a fault analysis model to obtain analysis results, including abnormal path information corresponding to the target business service. Finally, the analysis results are fed back to the client. In this invention, by structuring the tracking data of the business service request across service nodes and combining it with key information from the log information, complete full path information of the business service is constructed, thereby generating a service dependency graph containing temporal characteristics and status labels. This graph-based modeling approach clearly reconstructs the call relationships and execution states between services, significantly improving the accuracy and visualization of fault analysis. In-depth analysis of the service dependency graph using the fault analysis model helps to quickly locate abnormal paths in target business services, shortening troubleshooting time and reducing the frequency of manual intervention. Especially in fields with extremely high service stability requirements, such as finance, healthcare, and elderly care, it effectively ensures system continuity and business availability, improving operational efficiency and risk response capabilities. The client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0027] Please see Figure 2 As shown, Figure 2 A flowchart illustrating a fault location method for a business service provided in an embodiment of the present invention, the method comprising the following steps:
[0028] S10: In response to receiving a business service request for the target business service, obtain the tracking data and log information of the business service request between service nodes, and perform structured processing on the tracking data to obtain the original link record.
[0029] The original link record includes timestamp information and call direction information.
[0030] For example, upon receiving a business service request for a specific target service, the system first retrieves the trace data and log information generated during the request's transmission across multiple service nodes. The trace data records information such as the call path, call order, and time points between each node. Subsequently, this trace data can be structured to generate a raw link record. This record contains the precise timestamp information for each service call, as well as the direction information of the calls between each service node, used to reconstruct the entire service request's flow path and execution link within the system.
[0031] The aforementioned technical methods are of great significance in healthcare or financial systems, as they can be used to diagnose service delays, identify abnormal call paths, and improve the overall system stability and auditability.
[0032] Among them, such as Figure 3 As shown, step S10, namely the structuring of the tracking data to obtain the original link record, includes the following steps:
[0033] S11: Determine the call event data of the business service request between the service nodes, and sort the call event data according to the time order to obtain the sorting result.
[0034] The call event data includes the service name, interface path, response time, return status code, and caller information.
[0035] S12: Based on the sorting result, the tracking data is structured to obtain a call direction structure diagram.
[0036] S13: Perform node merging and filtering on the call direction structure graph in sequence to obtain the processed call direction structure graph.
[0037] S14: Sort the processed call direction structure diagram according to the time sequence to obtain the original link record.
[0038] For example, in step S11, the call event data generated between multiple service nodes for the business service request can first be determined. This call event data includes the specific name of the service, the interface path called, the response time for each call, the service's return status code, and relevant information about the caller. To facilitate subsequent processing, all call event data can be sorted according to their chronological order to generate a sorting result, ensuring the accuracy of the time logic in the chain reconstruction process. This is crucial for the detailed tracking of transaction chains in financial services or the complete traceability of medical data in healthcare systems, helping to improve service response transparency and accountability.
[0039] Next, in steps S12 to S14, the tracking data can be structured based on the sorting results to construct a call direction structure diagram, thereby clarifying the transmission path of service requests. Subsequently, redundant or duplicate nodes in this structure diagram can be merged according to set rules, and irrelevant information can be filtered out, thus simplifying the call chain and improving data readability and processing efficiency. Finally, the processed call direction structure diagram is sorted again in chronological order to generate original link records, providing a foundation for subsequent service performance analysis, anomaly detection, and business auditing.
[0040] This technology can effectively identify key business bottlenecks or security risks in the fields of finance, healthcare, and elderly care, ensuring the reliability of system operation and regulatory compliance.
[0041] S20: Bind the key information in the log information with the original link record to obtain the full path information corresponding to the business service request.
[0042] The key information includes time point information, service identifier, and business field information.
[0043] In some embodiments, binding key information in the log information with the original link record to obtain the full path information corresponding to the business service request includes: extracting log data matching the time window of the original link record from the key information, and establishing a log index based on the log data; comparing the log index with the node identifier in the original link record based on the call node in the original link record to obtain the mapping relationship between the log index and the node representation; embedding the log index into the original link record based on the mapping relationship to obtain call chain information; and sorting the nodes in the call chain information according to the call order to obtain the full path information corresponding to the business service request.
[0044] For example, in step S20, to achieve accurate reconstruction of the entire process of a business service request, key information in the log information can be bound to the previously generated original link record to obtain the full path information of the request. This key information may include the specific time point in time the request occurred, the service identifier that uniquely identifies the service, and the business field information carried, such as transaction number, user identifier, or medical treatment code. By extracting log data that matches the time window of the original link record and establishing a log index, it can be ensured that the binding process only focuses on the data range strongly related to the current request, thereby improving processing efficiency and accuracy. In financial risk control or medical data review, this technique can accurately correspond service calls and log events, ensuring the integrity and verifiability of the event chain.
[0045] Furthermore, the call nodes in the original call log records can be used as a comparison benchmark and matched one by one with the established log index to establish a mapping relationship between log data and node identifiers. This mapping structure is then embedded into the original call log records to generate call chain information with more contextual information. Finally, the nodes in the embedded call chain information are reordered according to the call order to obtain complete and accurate full-path information for business service requests.
[0046] The aforementioned technical means can be applied to the accurate restoration of multi-level accounting processing chains in financial systems, and are also applicable to the auditing and optimization analysis of multi-stage diagnosis and treatment processes in medical, health and elderly care services. This ensures that in the event of anomalies, disputes or performance bottlenecks, specific links can be quickly traced and located, supporting compliance supervision and service optimization.
[0047] S30: A service dependency graph is constructed based on the full path information, wherein the service dependency graph includes temporal features and state labels.
[0048] In some embodiments, constructing a service dependency graph based on the full path information includes: extracting each calling node from the full path information and constructing a calling edge structure for the service node based on the calling node; analyzing the interface relationships, database access behavior, and cache read / write structure in the calling edge structure to obtain a service graph structure; and adding temporal features to each node and edge in the service graph structure to obtain the service dependency graph.
[0049] For example, in step S30, a service dependency graph can be constructed based on the full path information of the business service request obtained in the previous step to show the call relationships and operational characteristics between service nodes. Specifically, by extracting all call nodes involved in the full path information and forming a call edge structure between service nodes according to their call order and logic, the dependency relationships between services can be restored. On this basis, the interface interaction, database access behavior, and cache read / write operations during the call process can be further analyzed to establish a comprehensive service graph structure. This structure helps identify cross-service transaction flow paths in financial scenarios and can be used to track the flow path of patient information between various system modules in healthcare and elderly care systems.
[0050] Furthermore, each node and edge in the service graph structure can be assigned temporal characteristics, such as the specific time of the call, its duration, and dependencies, while also being labeled with runtime status tags, such as success, failure, timeout, or abnormal interruption, ultimately generating a service dependency graph. This graph not only intuitively reflects the call chain of each service component but also displays its runtime status and evolution process, enabling technical personnel to quickly locate bottleneck nodes or abnormal behaviors. In financial risk control, this helps identify high-risk interface call chains, while in medical systems, it supports full-process traceability and operational optimization, providing data support for system stability assurance and business process supervision.
[0051] S40: Analyze the service dependency graph using a fault analysis model to obtain analysis results, wherein the analysis results include abnormal path information corresponding to the target business service.
[0052] In some embodiments, the step of analyzing the service dependency graph using a fault analysis model to obtain analysis results includes: extracting nodes and edges with abnormal state labels from the service dependency graph to construct an anomaly propagation candidate subgraph; analyzing the anomaly propagation candidate subgraph using the fault analysis model to obtain an anomaly score for each node; identifying nodes with anomaly scores higher than a preset score threshold as key anomaly nodes, and determining the path information of the key anomaly nodes as the anomaly path information corresponding to the target business service.
[0053] For example, in step S40, to identify the source and impact path of anomalies in the target business service, a fault analysis model needs to be applied to conduct in-depth analysis based on the constructed service dependency graph. First, all nodes and edges with anomaly status labels can be extracted from the service dependency graph, such as elements marked as response failure, interface timeout, or data inconsistency, and a candidate subgraph for anomaly propagation can be constructed based on this. This subgraph represents a potential chain of anomaly flow. Subsequently, the nodes in this subgraph can be analyzed using the fault analysis model to assess the impact of each node in the anomaly propagation, thereby assigning it an anomaly score. This technique can be used in financial services to identify key service nodes affecting delayed payments or risk control misjudgments, and in the healthcare field to locate system modules that cause interruptions in the diagnosis and treatment process or data anomalies.
[0054] Furthermore, nodes with anomaly scores exceeding a preset threshold can be marked as critical anomaly nodes, representing the root cause or core of the failure. The path information of these critical anomaly nodes is then extracted from the service dependency graph, ultimately generating anomaly path information corresponding to the target business service. This path information clearly shows the complete chain of anomaly propagation from its source to its final impact, facilitating system maintenance personnel to quickly locate the root cause of the problem and shorten fault handling time.
[0055] This method can significantly improve the efficiency of anomaly tracing in high-concurrency financial systems, and can also support emergency response to sudden failures and cross-system problem diagnosis in medical and elderly care service systems, thereby enhancing the overall system resilience and business continuity.
[0056] In some embodiments, the method further includes: acquiring a training dataset and a pre-trained model; wherein the training dataset includes several historical service dependency graphs; the training dataset is labeled to obtain labeling results, wherein the labeling results include historical abnormal path information corresponding to the historical service dependency graphs; and the pre-trained model is trained using the training dataset and the labeling results to obtain the fault analysis model.
[0057] Based on the above embodiments, the fault analysis model is iteratively trained to extract data features based on the training dataset and the annotation results, and a loss function is calculated; the loss function is iteratively trained using a preset method with the aim of reducing the value of the loss function until the value of the loss function is less than the expected threshold; based on the loss function after iterative training, the iterative fault analysis model is obtained.
[0058] Specifically, a training dataset containing several historical service dependency graphs can be collected for training purposes. For example, the training dataset can be obtained through manual collection, web scraping, or publicly available datasets; this application does not limit the methods used.
[0059] Furthermore, each set of historical service dependency graphs can be labeled to obtain the labeling results corresponding to each set of historical service dependency graphs. These labeling results are then used as the labels for the input data set. Each set of labeled training datasets is then input into the pre-trained model for supervised learning. Training ends when the training termination conditions are met, such as when the number of training iterations reaches a threshold or the model's output accuracy reaches a threshold, resulting in a completed fault analysis model.
[0060] In this embodiment, the training dataset and annotation results can be input into a pre-trained model for supervised learning, thereby training a fault analysis model. This allows for the output of annotation results based on the fault analysis model.
[0061] The above embodiments enhance data quality and diversity during the training process of the fault analysis model, thereby improving the model's generalization ability and practical application effectiveness.
[0062] Understandably, in order to train a fault analysis model with higher accuracy, the model can be iteratively trained repeatedly to continuously reduce the loss function until it meets the expected threshold. In this way, a more accurate result can be obtained based on the iterated fault analysis model.
[0063] It should be noted that this application does not limit the above-mentioned preset method and expected threshold. For example, the preset method can be gradient descent algorithm, batch gradient descent algorithm, stochastic gradient descent algorithm, etc. This application uses gradient descent algorithm as an example for explanation.
[0064] The purpose of the gradient descent algorithm is to find the minimum value of the loss function, or to converge to the minimum value, through iteration. Geometrically speaking, gradient descent occurs where the gradient decreases most rapidly in the opposite direction of the vector along the path of the function's change, making it easier to find the function's minimum. Based on this, in this embodiment, the gradient descent algorithm can be used to iteratively train the fault analysis model, continuously reducing the loss function and thus minimizing the error in the calculation results.
[0065] In this embodiment, the gradient descent algorithm is used to iteratively train the fault analysis model, thereby continuously reducing the loss function and obtaining an iterative fault analysis model. As a result, a more accurate result can be obtained based on the iterative fault analysis model.
[0066] As can be seen, the above solution constructs a complete full-path information for business services by structuring the tracking data of business service requests between service nodes and combining it with key information from logs. This generates a service dependency graph containing temporal characteristics and status labels. This graph-based modeling approach clearly reconstructs the call relationships and execution states between services, significantly improving the accuracy and visualization of fault analysis. In-depth analysis of the service dependency graph using the fault analysis model helps to quickly locate abnormal paths in target business services, shortening troubleshooting time and reducing the frequency of manual intervention. Especially in fields with extremely high service stability requirements, such as finance, healthcare, and elderly care, it effectively ensures system continuity and business availability, improving operational efficiency and risk response capabilities.
[0067] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0068] In one embodiment, a fault location device for a service is provided, which corresponds one-to-one with the fault location method for the service in the above embodiments. For example... Figure 4 As shown, the fault location device for this service includes an acquisition module 101, a binding module 102, a construction module 103, and a fault location module 104. Detailed descriptions of each functional module are as follows:
[0069] The acquisition module 101 is used to, in response to receiving a business service request for a target business service, acquire the tracking data and log information of the business service request between service nodes, and perform structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information;
[0070] The binding module 102 is used to bind key information in the log information with the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information;
[0071] The construction module 103 is used to construct a service dependency graph based on the full path information, wherein the service dependency graph includes temporal features and state labels;
[0072] The fault location module 104 is used to analyze the service dependency graph using a fault analysis model to obtain analysis results, wherein the analysis results include abnormal path information corresponding to the target business service.
[0073] The acquisition module 101 is used to determine the call event data of the business service request between the service nodes, and sort the call event data according to the time order to obtain a sorting result; wherein, the call event data includes service name, interface path, response time, return status code and caller information; based on the sorting result, the tracking data is structured to obtain a call direction structure diagram; the call direction structure diagram is sequentially processed by node merging and filtering to obtain a processed call direction structure diagram; the processed call direction structure diagram is sorted according to the time order to obtain the original link record.
[0074] The binding module 102 is used to extract log data that matches the time window of the original link record from the key information, and to build a log index based on the log data; using the call node in the original link record as a benchmark, the log index is compared with the node identifier in the original link record to obtain the mapping relationship between the log index and the node representation; based on the mapping relationship, the log index is embedded into the original link record to obtain call chain information; the nodes in the call chain information are sorted according to the call order to obtain the full path information corresponding to the business service request.
[0075] The construction module 103 is used to extract each calling node in the full path information and construct the calling edge structure of the service node based on the calling node; analyze the interface relationship, database access behavior and cache read and write structure in the calling edge structure to obtain the service graph structure; add time sequence features to each node and edge in the service graph structure to obtain the service dependency graph.
[0076] The fault location module 104 is used to extract nodes and edges with abnormal status labels in the service dependency graph and construct an abnormal propagation candidate subgraph; analyze the abnormal propagation candidate subgraph through the fault analysis model to obtain the abnormal score of each node; determine the nodes with abnormal scores higher than a preset score threshold as key abnormal nodes, and determine the path information of the key abnormal nodes as the abnormal path information corresponding to the target business service.
[0077] In one embodiment, the acquisition module 101 is further configured to: acquire a training dataset and a pre-trained model; wherein the training dataset includes several historical service dependency graphs; label the training dataset to obtain labeling results, wherein the labeling results include historical abnormal path information corresponding to the historical service dependency graphs; and train the pre-trained model using the training dataset and the labeling results to obtain the fault analysis model.
[0078] In one embodiment, the acquisition module 101 is further configured to: perform iterative training on the fault analysis model based on the training dataset and the annotation results to extract data features and calculate a loss function; perform iterative training on the loss function using a preset method with the aim of reducing the value of the loss function until the value of the loss function is less than an expected threshold; and obtain an iterative fault analysis model based on the loss function after iterative training.
[0079] This invention provides a fault location device for business services. By structuring the tracking data of business service requests between service nodes and combining it with key information from logs, a complete full-path information of the business service is constructed, thereby generating a service dependency graph containing temporal characteristics and status labels. This graph-based modeling approach clearly reconstructs the call relationships and execution states between services, significantly improving the accuracy and visualization of fault analysis. In-depth analysis of the service dependency graph using the fault analysis model helps to quickly locate abnormal paths in target business services, shortening troubleshooting time and reducing the frequency of manual intervention. Especially in fields with extremely high service stability requirements, such as finance, healthcare, and elderly care, it can effectively ensure system continuity and business availability, improving operational efficiency and risk response capabilities.
[0080] Specific limitations regarding the fault location device for business services can be found in the limitations of the fault location method for business services described above, and will not be repeated here. Each module in the aforementioned fault location device for business services can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in the computer device in hardware form, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0081] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile and / or volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with external clients via a network connection. When the computer program is executed by the processor, it implements the functions or steps of a fault location method for a business service on the server side.
[0082] In one embodiment, a computer device is provided, which may be a client, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, network interface, display screen, and input devices connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The network interface is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the client-side functions or steps of a fault location method for a business service.
[0083] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the following steps:
[0084] In response to receiving a business service request for a target business service, the system obtains the tracking data and log information of the business service request between service nodes, and performs structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information;
[0085] The key information in the log information is bound to the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information;
[0086] A service dependency graph is constructed based on the full path information, wherein the service dependency graph includes temporal features and state labels;
[0087] The service dependency graph is analyzed using a fault analysis model to obtain analysis results, which include abnormal path information corresponding to the target business service.
[0088] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0089] In response to receiving a business service request for a target business service, the system obtains the tracking data and log information of the business service request between service nodes, and performs structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information;
[0090] The key information in the log information is bound to the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information;
[0091] A service dependency graph is constructed based on the full path information, wherein the service dependency graph includes temporal features and state labels;
[0092] The service dependency graph is analyzed using a fault analysis model to obtain analysis results, which include abnormal path information corresponding to the target business service.
[0093] It should be noted that the functions or steps that can be implemented by the computer-readable storage medium or computer device described above can be referred to the relevant descriptions on the server side and client side in the foregoing method embodiments. To avoid repetition, they will not be described one by one here.
[0094] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0095] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0096] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A method for fault location in a business service, characterized in that, The method includes: In response to receiving a business service request for a target business service, the system obtains the tracking data and log information of the business service request between service nodes, and performs structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information; The key information in the log information is bound to the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information; A service dependency graph is constructed based on the full path information, wherein the service dependency graph includes temporal features and state labels; The service dependency graph is analyzed using a fault analysis model to obtain analysis results, which include abnormal path information corresponding to the target business service.
2. The method according to claim 1, characterized in that, The process of structuring the tracking data to obtain the original link records includes: The call event data of the business service request between the service nodes is determined, and the call event data is sorted in chronological order to obtain a sorting result; wherein, the call event data includes service name, interface path, response time, return status code and caller information; The tracking data is structured based on the sorting results to obtain a call direction structure diagram; The call direction structure graph is sequentially processed by node merging and filtering to obtain the processed call direction structure graph. The processed call direction structure diagram is sorted according to the time sequence to obtain the original link record.
3. The method according to claim 1, characterized in that, The step of binding key information in the log information with the original link record to obtain the full path information corresponding to the business service request includes: Extract log data that matches the time window of the original link record from the key information, and build a log index based on the log data; Using the calling node in the original link record as a reference, the log index is compared with the node identifier in the original link record to obtain the mapping relationship between the log index and the node representation; Based on the mapping relationship, the log index is embedded into the original link record to obtain the call chain information; The nodes in the call chain information are sorted according to the call order to obtain the full path information corresponding to the business service request.
4. The method according to claim 1, characterized in that, The process of constructing the service dependency graph based on the full path information includes: Extract each calling node from the full path information, and construct the calling edge structure of the service node based on the calling nodes; The service graph structure is obtained by analyzing the interface relationships, database access behavior, and cache read / write structure in the call edge structure. Add temporal features to each node and edge in the service graph structure to obtain the service dependency graph.
5. The method according to claim 1, characterized in that, The analysis of the service dependency graph using a fault analysis model yields the following results: Extract the nodes and edges with abnormal state labels from the service dependency graph to construct an anomaly propagation candidate subgraph; The anomaly propagation candidate subgraph is analyzed using the fault analysis model to obtain an anomaly score for each node. Nodes with abnormal scores higher than a preset score threshold are identified as critical abnormal nodes, and the path information of the critical abnormal nodes is identified as the abnormal path information corresponding to the target business service.
6. The method according to claim 1, characterized in that, The method further includes: Obtain the training dataset and the pre-trained model; wherein the training dataset includes several historical service dependency graphs; The training dataset is labeled to obtain the labeling results, wherein the labeling results include the historical abnormal path information corresponding to the historical service dependency graph; The pre-trained model is trained using the training dataset and the annotation results to obtain the fault analysis model.
7. The method according to claim 6, characterized in that, After obtaining the fault analysis model, the process further includes: Based on the training dataset and the annotation results, the fault analysis model is iteratively trained to extract data features, and the loss function is calculated. The loss function is iteratively trained using a preset method with the aim of reducing the value of the loss function until the value of the loss function is less than the expected threshold. Based on the loss function after iterative training, the iterative fault analysis model is obtained.
8. A fault location device for a business service, characterized in that, The fault location device for the service includes: The acquisition module is used to, in response to receiving a business service request for a target business service, acquire the tracking data and log information of the business service request between service nodes, and perform structured processing on the tracking data to obtain the original link record; wherein, the original link record includes timestamp information and call direction information; The binding module is used to bind key information in the log information with the original link record to obtain the full path information corresponding to the business service request; wherein, the key information includes time point information, service identifier and business field information; A construction module is used to construct a service dependency graph based on the full path information, wherein the service dependency graph includes temporal features and state labels; The fault location module is used to analyze the service dependency graph using a fault analysis model to obtain analysis results, wherein the analysis results include abnormal path information corresponding to the target business service.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the fault location method for the service as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the fault location method for the service as described in any one of claims 1 to 7.