Problem processing method and apparatus, computer readable storage medium, terminal
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU SHUYUN INFORMATION TECH CO LTD
- Filing Date
- 2023-03-02
- Publication Date
- 2026-08-07
AI Technical Summary
然而,在实际应用中,一个普通问题的处理可能需要结合业务流程中上下游多个节点的十几个服务日志,进行数据分析和问题定位,而当前各个部门的业务系统往往是相互独立的,因而难以形成高效且稳定的问题诊断与处理方法
[0020]本发明实施例提供一种问题诊断方法,确定待诊断的业务流程,所述待诊断的业务流程包括多层,每层包括一个或多个待诊断业务节点;逐层遍历所述待诊断业务节点,并对遍历到的当前待诊断业务节点的埋点数据进行初分析,其中,每当当前待诊断业务节点的埋点数据的分析结果为正常时,对当前待诊断业务节点的下一层的各个待诊断业务节点进行剪枝处理,并继续对下一个待诊断业务节点的埋点数据进行分析,直至当前待诊断业务节点的埋点数据的初分析结果为异常;至少基于异常的埋点数据进行再分析,以确定所述待诊断的业务流程中存在的待处理问题;响应于所述待处理问题存在已有的处理策略,执行对应的处理策略。
Smart Images

Figure CN116302885B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer technology, and in particular to a problem-solving method and apparatus, a computer-readable storage medium, and a terminal. Background Technology
[0002] As a company's business develops, the functions and number of its business systems, as well as the number of business nodes within the same system, will expand daily. Various problems frequently arise during the daily operation of these systems. Failure to promptly identify and efficiently address these problems can lead to system malfunctions, business failures, or even system crashes.
[0003] In existing technologies, problem investigation, diagnosis, and resolution processes primarily rely on manual intervention. However, in practical applications, handling a common problem may require combining data analysis and problem localization with logs from over a dozen service nodes across the upstream and downstream of the business process. Currently, the business systems of different departments are often independent, making it difficult to develop efficient and stable methods for problem diagnosis and resolution. Furthermore, in current technologies, problems and solutions are also independent of each other, lacking any established correlation. These factors contribute to high costs and low efficiency in the problem diagnosis and resolution process. Summary of the Invention
[0004] The technical problem solved by the embodiments of the present invention is how to improve the efficiency of problem diagnosis and processing while achieving automation.
[0005] To address the aforementioned technical problems, this invention provides a problem-solving method comprising the following steps: determining a business process to be diagnosed, wherein the business process to be diagnosed comprises multiple layers, each layer comprising one or more business nodes to be diagnosed; traversing the business nodes to be diagnosed layer by layer, and performing preliminary analysis on the event tracking data of the current business node to be diagnosed, wherein whenever the analysis result of the event tracking data of the current business node to be diagnosed is normal, pruning is performed on each business node to be diagnosed in the next layer, and the event tracking data of the next business node to be diagnosed is analyzed until the preliminary analysis result of the event tracking data of the current business node to be diagnosed is abnormal; performing re-analysis based at least on the abnormal event tracking data to determine the unresolved issues existing in the business process to be diagnosed; and executing the corresponding processing strategy in response to the existence of an existing processing strategy for the unresolved issues.
[0006] Optionally, determining the business process to be diagnosed includes: in response to receiving a problem diagnosis request submitted by a user, determining diagnostic parameters according to the problem diagnosis request; based on the diagnostic parameters, selecting one or more business nodes containing the diagnostic parameters from the business nodes included in the business system as the business nodes to be diagnosed; and determining the business process to be diagnosed according to each business node to be diagnosed and its topological relationship.
[0007] Optionally, determining diagnostic parameters based on the problem diagnosis request includes: performing word segmentation on the problem diagnosis request to obtain one or more words; for at least a portion of the words obtained from the word segmentation, searching for the business parameters corresponding to each word from a preset business parameter database; and using the searched business parameters as the diagnostic parameters; wherein the business parameter database contains multiple words, multiple business parameters, and the mapping relationship between the words and the business parameters.
[0008] Optionally, determining the business process to be diagnosed includes: in response to receiving an automatic problem diagnosis start instruction, selecting each business node from a preset business node list among the business nodes included in the business system as the business node to be diagnosed; and determining the business process to be diagnosed based on each business node to be diagnosed and its topological relationship.
[0009] Optionally, before performing initial analysis on the event tracking data of the current business node to be diagnosed, the method further includes: using a static instrumentation node set in the current business node to be diagnosed, executing the event tracking data acquisition code contained in the static instrumentation node during the execution of the original code of the current business node to be diagnosed, so as to obtain the event tracking data of the current business node to be diagnosed.
[0010] Optionally, the embedded data of the current business node to be diagnosed includes one or more of the following: the processing result of the input data in the current business node to be diagnosed; the start processing timestamp of the input data in the current business node to be diagnosed; the end processing timestamp of the input data in the current business node to be diagnosed; and the processing time of the input data in the current business node to be diagnosed.
[0011] Optionally, the step of executing the corresponding processing strategy in response to the existence of an existing processing strategy for the problem to be processed includes: searching whether the problem to be processed exists in a preset processing strategy database; in response to the existence of the problem to be processed in the processing strategy database, determining the processing strategy corresponding to the problem to be processed, and executing the processing strategy; wherein, the processing strategy database contains multiple problems to be processed and processing strategies corresponding to each problem to be processed.
[0012] Optionally, there is a preset one-to-many relationship between the problem to be processed and the processing strategy; the method further includes: forming a processing strategy package from multiple processing strategies belonging to the same problem to be processed, wherein each processing strategy is associated with one or more classes; determining the set of classes associated with each processing strategy in each processing strategy package; and using a class isolation mechanism to isolate the set of classes associated with different processing strategy packages.
[0013] Optionally, the method further includes: for each processing strategy package, whenever the processing strategy in the processing strategy package is updated, a preset class loader is used to reload the class collection associated with the processing strategy package.
[0014] Optionally, a breadth-first search principle is adopted to traverse the business nodes to be diagnosed layer by layer; the step of continuing to analyze the data points of the next business node to be diagnosed includes: analyzing the data points of the next business node to be diagnosed that belongs to the same layer as the current business node to be diagnosed.
[0015] Optionally, after reanalyzing at least the abnormal event tracking data, the method further includes: if the unresolved issues in the business process to be diagnosed cannot be determined, a depth-first approach is adopted, starting from the next layer of the business node to be diagnosed that has an abnormal initial analysis result, and continuing to traverse at least a portion of the business nodes to be diagnosed; reanalyzing at least the event tracking data with an abnormal initial analysis result and the event tracking data of the at least a portion of the business nodes to be diagnosed that are traversed further, in order to determine the unresolved issues in the business process to be diagnosed.
[0016] This invention also provides a problem handling device, comprising: a business process determination module for determining the business process to be diagnosed, wherein the business process to be diagnosed includes multiple layers, each layer including one or more business nodes to be diagnosed; a node traversal and pruning module for traversing the business nodes to be diagnosed layer by layer and performing preliminary analysis on the tracking data of the current business node to be diagnosed, wherein whenever the analysis result of the tracking data of the current business node to be diagnosed is normal, pruning is performed on each business node to be diagnosed in the next layer of the current business node to be diagnosed, and the tracking data of the next business node to be diagnosed is analyzed until the preliminary analysis result of the tracking data of the current business node to be diagnosed is abnormal; a problem analysis module for re-analyzing at least based on the abnormal tracking data to determine the problems to be handled in the business process to be diagnosed; and a problem handling module for executing the corresponding handling strategy in response to the existence of an existing handling strategy for the problem to be handled.
[0017] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when run by a processor, executes the steps of the above-described problem-solving method.
[0018] This invention also provides a terminal, including a memory and a processor, wherein the memory stores a computer program that can run on the processor, and the processor executes the steps of the above-described problem-solving method when running the computer program.
[0019] Compared with the prior art, the technical solution of the embodiments of the present invention has the following beneficial effects:
[0020] This invention provides a problem diagnosis method, which determines a business process to be diagnosed, the business process to be diagnosed comprising multiple layers, each layer comprising one or more business nodes to be diagnosed; traversing the business nodes to be diagnosed layer by layer, and performing an initial analysis on the event tracking data of the current business node to be diagnosed, wherein whenever the analysis result of the event tracking data of the current business node to be diagnosed is normal, pruning is performed on each business node to be diagnosed in the next layer, and the event tracking data of the next business node to be diagnosed is analyzed until the initial analysis result of the event tracking data of the current business node to be diagnosed is abnormal; re-analysis is performed based at least on the abnormal event tracking data to determine the unresolved problems existing in the business process to be diagnosed; in response to the existence of existing processing strategies for the unresolved problems, the corresponding processing strategies are executed.
[0021] In this embodiment of the invention, by pre-establishing the association between problems to be processed and processing strategies, after analyzing layer by layer and identifying problems to be processed in the business process to be diagnosed, the corresponding processing strategy is executed in response to the existence of existing processing strategies for the problems to be processed. This achieves automation in problem diagnosis and processing, reducing costs. Furthermore, this embodiment of the invention combines multi-round analysis and pruning strategies. Specifically, in the initial analysis stage, whenever the analysis result is normal, pruning is performed on the next layer of business nodes to be diagnosed, until the initial analysis result of the current business node's data points is abnormal, at which point a re-analysis stage is entered to identify and process existing problems. This significantly reduces the number of business nodes to be diagnosed and removes invalid paths in the business process to be diagnosed, thereby improving the efficiency and accuracy of problem diagnosis.
[0022] Furthermore, after reanalyzing at least the abnormal event tracking data, the method further includes: if the unresolved issues in the business process to be diagnosed cannot be determined, a depth-first approach is adopted to continue traversing at least a portion of the business nodes to be diagnosed, starting from the next layer below the business node whose initial analysis result is abnormal; and reanalyzing at least the event tracking data whose initial analysis result is abnormal, and the event tracking data of the at least a portion of the business nodes to be diagnosed, to determine the unresolved issues in the business process to be diagnosed.
[0023] In this embodiment of the invention, by employing the aforementioned depth-first traversal scheme, it is beneficial to: 1) identify the specific problem to be addressed; and 2) for the current business node to be diagnosed, although the initial analysis result of its tracking data indicates an anomaly, the cause of the anomaly may not be a problem with the current business node itself, but rather may be due to packet loss or other issues during the acquisition of the tracking data of the current business node. In this case, by analyzing the tracking data of the downstream nodes of the current business node to be diagnosed, it can be determined that the current business node to be diagnosed does not have a problem, thereby helping to avoid misjudgment and improve the accuracy of problem localization.
[0024] Furthermore, the process for determining the business process to be diagnosed may include: in response to receiving a problem diagnosis request submitted by a user, determining diagnostic parameters based on the problem diagnosis request; based on the diagnostic parameters, selecting one or more business nodes containing the diagnostic parameters from the business nodes included in the business system as the business nodes to be diagnosed; and determining the business process to be diagnosed based on each business node to be diagnosed and its topological relationship. In this embodiment of the invention, problem diagnosis can be passively triggered based on a problem diagnosis request submitted by a user, thus meeting different problem diagnosis needs in actual application scenarios and improving the flexibility of problem diagnosis and handling.
[0025] Furthermore, determining the business process to be diagnosed may include: in response to receiving an automatic problem diagnosis activation command, selecting each business node from a preset business node list among the business nodes included in the business system as the business node to be diagnosed; and determining the business process to be diagnosed based on each business node to be diagnosed and its topological relationship. In this embodiment of the invention, problem diagnosis can be triggered in a fully automatic manner based on the automatic problem diagnosis activation command. Thus, problem diagnosis can be triggered at appropriate times and scenarios without human intervention, meeting the needs for convenience and automation in problem diagnosis and handling. Attached Figure Description
[0026] Figure 1 This is a flowchart of a problem-solving method according to an embodiment of the present invention;
[0027] Figure 2 yes Figure 1 A flowchart of the first specific implementation of step S11;
[0028] Figure 3 yes Figure 1 A flowchart of the second specific implementation method of step S11;
[0029] Figure 4 This is a schematic diagram of the structure of a problem-solving device according to an embodiment of the present invention. Detailed Implementation
[0030] As mentioned in the background section, existing problem diagnosis and handling methods mainly rely on manual analysis, lacking automation, and the problems and solutions are independent of each other without any correlation. This results in high costs and low efficiency in the problem diagnosis and handling process.
[0031] To address the aforementioned technical problems, this invention provides a problem-solving method, specifically comprising: determining a business process to be diagnosed, wherein the business process to be diagnosed includes multiple layers, each layer including one or more business nodes to be diagnosed; traversing the business nodes to be diagnosed layer by layer, and performing preliminary analysis on the event tracking data of the current business node to be diagnosed, wherein whenever the analysis result of the event tracking data of the current business node to be diagnosed is normal, pruning is performed on each business node to be diagnosed in the next layer, and the event tracking data of the next business node to be diagnosed is analyzed until the preliminary analysis result of the event tracking data of the current business node to be diagnosed is abnormal; performing re-analysis based at least on the abnormal event tracking data to determine the unresolved problems existing in the business process to be diagnosed; and executing the corresponding processing strategy in response to the existence of an existing processing strategy for the unresolved problem.
[0032] Therefore, in this embodiment of the invention, by pre-establishing the association between the problems to be processed and the processing strategies, after analyzing layer by layer and identifying the problems to be processed in the business process to be diagnosed, the corresponding processing strategy is executed in response to the existence of an existing processing strategy for the problem to be processed. This achieves automation in problem diagnosis and processing, reducing costs. Furthermore, this embodiment of the invention combines a multi-round analysis strategy and a pruning strategy. Specifically, in the initial analysis stage, whenever the analysis result is normal, a pruning operation is performed on the next layer of business nodes to be diagnosed, until the initial analysis result of the current business node's data points is abnormal, at which point a re-analysis stage is entered to identify and process the existing problems to be processed. This significantly reduces the number of business nodes to be diagnosed and removes invalid paths in the business process to be diagnosed, thereby improving the efficiency and accuracy of problem diagnosis.
[0033] To make the above-mentioned objectives, features and beneficial effects of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0034] Reference Figure 1 , Figure 1 This is a flowchart of a problem-solving method according to an embodiment of the present invention. The method can be applied to various terminal devices with data analysis and processing functions, including but not limited to computers, mobile phones, tablets, vehicle-mounted terminal devices, servers, cloud platforms, etc.
[0035] The method may include steps S11 to S14:
[0036] Step S11: Determine the business process to be diagnosed, wherein the business process to be diagnosed includes multiple layers, and each layer includes one or more business nodes to be diagnosed;
[0037] Step S12: Traverse the business nodes to be diagnosed layer by layer, and perform preliminary analysis on the data points of the current business nodes to be diagnosed. Whenever the analysis result of the data points of the current business nodes to be diagnosed is normal, prune each business node to be diagnosed in the next layer of the current business nodes to be diagnosed, and continue to analyze the data points of the next business nodes to be diagnosed until the preliminary analysis result of the data points of the current business nodes to be diagnosed is abnormal.
[0038] Step S13: Reanalyze at least the abnormal event tracking data to identify unresolved issues in the business process to be diagnosed;
[0039] Step S14: In response to the existence of an existing processing strategy for the problem to be processed, execute the corresponding processing strategy.
[0040] In the specific implementation of step S11, the business node to be diagnosed can be a business node contained in a single functional module of the same business system, a business node contained in multiple functional modules of the same business system, or a business node contained in different functional modules of multiple business systems with business relationships.
[0041] The business process to be diagnosed may include n layers of processes, each layer may include one or more business nodes to be diagnosed, and each business node to be diagnosed may have its own flow order (the flow order is used to indicate the order in which input data flows through each business node to be diagnosed). The flow order between the business nodes to be diagnosed constitutes a topological relationship. The flow order of business nodes to be diagnosed at the same layer may be the same or different. Here, n is a positive integer.
[0042] The flow of input data in the business process to be diagnosed is as follows: Input data enters from the first-level process, is processed by each node in the first-level process, and then flows sequentially through the second-level process for further processing, the third-level process, and so on up to the nth-level process. The processing result output by the previous level serves as the input data for the next level. The input data of each node can obtain the corresponding processing result after a certain processing time at that node (if the node is abnormal, the corresponding processing result may not be obtained, or the incorrect processing result may be output).
[0043] Reference Figure 2 , Figure 2 yes Figure 1 A flowchart of the first specific implementation of step S11. The business process to be diagnosed in step S11 may include steps S21 to S23.
[0044] In step S21, in response to receiving a problem diagnosis request submitted by the user, diagnostic parameters are determined based on the problem diagnosis request.
[0045] The problem diagnosis request can be entered through an input box on the display interface, or it can be selected by the user from an existing list of problem diagnosis requests on the display interface, or it can be submitted using other appropriate methods. This embodiment of the invention does not limit the specific content or submission method of the problem diagnosis request.
[0046] Further, determining diagnostic parameters based on the problem diagnosis request may include: performing word segmentation on the problem diagnosis request to obtain one or more words; for at least a portion of the words obtained from the word segmentation, searching for the business parameters corresponding to each word from a preset business parameter database; and using the searched business parameters as the diagnostic parameters; wherein the business parameter database contains multiple words, multiple business parameters, and the mapping relationship between the words and the business parameters.
[0047] In step S22, based on the diagnostic parameters, one or more business nodes containing the diagnostic parameters are selected from the business nodes included in the business system as the business nodes to be diagnosed.
[0048] As a non-limiting embodiment, the user submits a problem diagnosis request for "Order No. 12345 Points Not Issued"; after word segmentation, the words "Order No.", "12345", "Not Issued", and "Points" are obtained; by searching the business parameter database, the business parameters corresponding to each word are obtained as follows: "Order No." corresponds to "order_num", "12345" corresponds to "12345", and "Points" corresponds to "point"; then "order_num", "12345", and "point" are used as diagnostic parameters; based on the diagnostic parameters, one or more business nodes containing the above diagnostic parameters (including all or some of the diagnostic parameters) are selected from the business nodes included in the business system as the business nodes to be diagnosed.
[0049] In step S23, the business process to be diagnosed is determined based on each of the business nodes to be diagnosed and their topological relationships.
[0050] In this embodiment of the invention, the process of determining the business process to be diagnosed based on the problem diagnosis request and continuing the subsequent diagnosis can be called "passive" triggering of problem diagnosis. Such a solution can meet different problem diagnosis needs in actual application scenarios and improve the flexibility of problem diagnosis and handling.
[0051] Reference Figure 3 , Figure 3 yes Figure 1 A flowchart of a second specific implementation of step S11. The process of determining the business process to be diagnosed in step S11 may include steps S31 to S32.
[0052] In step S31, in response to receiving the automatic problem diagnosis start command, each business node in the preset business node list is selected from the business nodes included in the business system as the business node to be diagnosed.
[0053] Both the automatic problem diagnosis activation command and the business node list can be pre-set. There can be a pre-defined one-to-one correspondence between multiple automatic problem diagnosis activation commands and multiple business node lists. The business nodes included in each pre-set business node list can be set according to the actual needs of the scenario.
[0054] In practical implementation, the automatic problem diagnosis activation command can be triggered automatically by the system, such as periodically, randomly, or in response to a system malfunction. Alternatively, the automatic problem diagnosis activation command can be triggered manually by the user clicking a function key on the display interface or keyboard.
[0055] In step S32, the business process to be diagnosed is determined based on each of the business nodes to be diagnosed and their topological relationships.
[0056] In this embodiment of the invention, the process of determining the business process to be diagnosed and continuing subsequent diagnosis based on the automatic problem diagnosis start instruction can be called "proactive / automatic" triggering of problem diagnosis. Such a solution can reduce manual intervention and meet the needs of convenience and automation in problem diagnosis and handling.
[0057] Continue to refer to Figure 1 In the specific implementation of step S12, the step of traversing the business nodes to be diagnosed layer by layer can specifically refer to: starting from the first layer of the business process to be diagnosed or other appropriate layers, traversing each business node to be diagnosed layer by layer from top to bottom.
[0058] In some embodiments, a breadth-first search principle can be adopted to traverse the business nodes to be diagnosed layer by layer. Analyzing the data points of the next business node to be diagnosed includes analyzing the data points of the next business node to be diagnosed that belongs to the same layer as the current business node. This traversal scheme can improve traversal efficiency and the accuracy of abnormal node location, thereby improving the efficiency of problem diagnosis and handling.
[0059] Furthermore, the method for pruning each of the next-level business nodes to be diagnosed in step S12 can be: using preset pruning rules to prune each of the next-level business nodes to be diagnosed.
[0060] For example, if the current business node to be diagnosed is node a, and the next layer of business nodes to be diagnosed includes nodes b, c, d, and e, then the pruning rules for node a can include: if the order number obtained from the event tracking data of the current business node a is "111", then prune the next layer nodes c and e and their downstream branch paths; if the order number obtained from the event tracking data of the current business node a is "112", then prune the next layer nodes b and d.
[0061] Alternatively, the pruning rules for node a may include: selecting nodes at preset positions in the next layer below node a for pruning, such as selecting nodes at odd or even positions from left to right for pruning.
[0062] Alternatively, the pruning rules for node a could include: selecting a preset proportion of nodes in the next layer below node A for pruning, such as selecting half of the total number of business nodes to be diagnosed in the next layer for pruning.
[0063] In the above embodiment, all child nodes in the pruned node and its downstream branch path will be deleted, so the output data of node a will not flow to the downstream branch path that has been pruned.
[0064] It should be noted that the pruning rules for each business node to be diagnosed can be the same or different. In specific implementations, the pruning rules for each business node to be diagnosed can be set according to the actual application scenario, and this embodiment of the invention does not impose any restrictions on this.
[0065] In this embodiment of the invention, by performing pruning operations during the initial analysis phase, the number of business nodes to be diagnosed can be significantly reduced, thereby improving the efficiency of problem diagnosis. Furthermore, during the initial analysis phase, when a node with an abnormal initial analysis result has multiple upstream paths, it may be difficult to pinpoint which path has the problem. To address this issue, this implementation scheme eliminates some invalid paths through pruning operations (for example, if a branch path upstream of the current abnormal node has been pruned and deleted, it can at least be determined that the problem does not originate from that pruned and deleted path, thus improving the efficiency and accuracy of subsequent problem location analysis).
[0066] Without limitation, the event tracking data of the current business node to be diagnosed may include one or more of the following: the processing result of the input data in the current business node to be diagnosed; the start timestamp of the input data processing in the current business node to be diagnosed; the end timestamp of the input data processing in the current business node to be diagnosed; and the processing duration of the input data in the current business node to be diagnosed. The event tracking data of the current business node to be diagnosed may also include other appropriate data required for problem diagnosis and analysis, depending on the actual application scenario.
[0067] Specifically, the initial analysis can also be called data anomaly analysis or early warning analysis, and the object of the analysis can be some or all of the data points of the business node to be diagnosed. In practical applications, anomaly analysis rules can be pre-configured on each business node of the business system. The anomaly analysis rules for each business node can be determined based on the specific functions implemented by that business node.
[0068] The processing result output by the previous business node to be diagnosed is used as the input data for the current business node to be diagnosed. The processing time of this input data in the current business node to be diagnosed can be determined based on the end processing timestamp and the start processing timestamp of the input data in the current business node to be diagnosed.
[0069] In a non-limiting example, the purpose of preliminary analysis of the embedded data may include determining the accuracy of the processing results. For instance, for a business node to be diagnosed, the standard or accurate processing result to be output is m1. The anomaly analysis rule for this business node to be diagnosed could be "compare the processing result m2 output by the business node to be diagnosed with the standard processing result m1"; if they match, the preliminary analysis result is normal; if they do not match, the preliminary analysis result is abnormal.
[0070] In another non-limiting example, the purpose of preliminary analysis of the embedded data may include determining whether the data processing time meets the requirements. For example, for a certain business node to be diagnosed, the standard processing time for processing the input data should be less than or equal to t1. The anomaly analysis rule for this business node to be diagnosed may be "comparing the processing time t2 of the business node to be diagnosed for processing the input data with the standard processing time t1"; if t2≤t1, the preliminary analysis result is normal; if t2>t1, the preliminary analysis result is abnormal.
[0071] In another non-restrictive example, the purpose of preliminary analysis of the event tracking data can include determining whether data is missing. For instance, for a business node to be diagnosed, the standard or accurate processing result to be output is n1. The anomaly analysis rule for this business node to be diagnosed could be "determine whether the processing result output by the business node to be diagnosed is empty"; if the output is empty, the preliminary analysis result is abnormal; if it is not empty and is consistent with n1, the preliminary analysis result is normal.
[0072] Furthermore, before performing initial analysis on the event tracking data of the current business node to be diagnosed, the method further includes: using a static instrumentation node set in the current business node to be diagnosed, executing the event tracking data acquisition code contained in the static instrumentation node during the execution of the original code of the current business node to be diagnosed, so as to obtain the event tracking data of the current business node to be diagnosed.
[0073] The static instrumentation points can be implemented using the Extended Berkeley Packet Filter (eBPF) mechanism enabled by the Linux operating system kernel. eBPF enables the programmability of the Linux kernel; specifically, eBPF is a technology that allows user-written programs to run within the Linux kernel without modifying the kernel code or loading kernel modules. This allows for custom processing of inflexible parts of the kernel, significantly improving the flexibility of code implementation.
[0074] In this embodiment of the invention, by using static instrumentation points in business nodes to obtain event tracking data, compared to conventional logging methods, it helps to decouple the event tracking data acquisition code from the business node's own processing code (e.g., business source code). Furthermore, if additional event tracking data is needed, it can be achieved without re-modifying and recompiling the business source code. This improves the flexibility of event tracking data acquisition.
[0075] In the specific implementation of step S13, the re-analysis based at least on abnormal event tracking data can be tailored to the specific business scenario. For example, keyword extraction or compilation and rule matching of the event tracking data can be used to analyze the reasons for the abnormality in the event tracking data of the business node to be diagnosed. For instance, the cause of missing event tracking data might be a network interruption during data transmission or abnormal database access during data processing; similarly, the cause of inaccurate event tracking data might be an error in the processing of a specific field by a business node to be diagnosed.
[0076] The data objects to be reanalyzed may include any of the following:
[0077] (1) The embedded data of the business nodes to be diagnosed that are currently abnormal according to the initial analysis;
[0078] (2) The data points of the business nodes to be diagnosed that are currently abnormal according to the initial analysis, and the data points of each business node to be diagnosed upstream of them. For example, it may include a data point data package consisting of the data points of all business nodes to be diagnosed from the first layer of the process to the current node.
[0079] (3) The data obtained by integrating the embedded data of the business node to be diagnosed that is currently abnormal according to the initial analysis result and the external resource data;
[0080] (4) The data obtained by integrating the event tracking data of the business node to be diagnosed that is currently considered abnormal in the initial analysis, the event tracking data of each upstream business node to be diagnosed, and external resource data. The external resource data may come from external databases, HTTP interfaces, file systems, message brokers, etc.
[0081] In a specific application scenario, the business process to be diagnosed includes the following business nodes: Node A (original order input) -> Node B (order data processing) -> Node C (matching with points rules and generating points distribution events) -> Node D (points distribution event for consumption, updating points account). The following situations may occur during the problem diagnosis process.
[0082] Scenario 1: By traversing the business process to be diagnosed and determining through initial analysis that the data points at node B are abnormal (e.g., data loss), a problem in the A->B process leading to data loss can be initially identified. If a more specific cause needs to be determined, whether it is a failure of node A to send data or a failure of node B to receive data normally but process it, further analysis can be performed on the data sent by node A and the data received by node B to identify the specific problem to be addressed, such as a network interruption at node A or a failure of node A to access the message middleware during data transmission.
[0083] Scenario 2: By traversing the business process to be diagnosed and determining through initial analysis that the event tracking data of node B is abnormal (e.g., inaccurate processing / output results), further analysis can be performed based on the event tracking data of node A and node B. For example, the output results of node A and the verification data generated by the preset order amount verification rules can be compared with the output results of node B to determine the cause of the abnormal event tracking data of node B, such as an error in the processing of the order amount field.
[0084] Furthermore, after reanalyzing at least the abnormal event tracking data, the method further includes: if the unresolved issues in the business process to be diagnosed cannot be determined, a depth-first approach is adopted to continue traversing at least a portion of the business nodes to be diagnosed, starting from the next layer below the business node whose initial analysis result is abnormal; and reanalyzing at least the event tracking data whose initial analysis result is abnormal, and the event tracking data of the at least a portion of the business nodes to be diagnosed, to determine the unresolved issues in the business process to be diagnosed.
[0085] The at least some of the business nodes to be diagnosed that continue to be traversed can be a preset number of nodes, or all downstream nodes of the business node to be diagnosed whose initial analysis result is abnormal. In specific implementation, the nodes to be traversed and the number of nodes can be determined based on the actual application scenario requirements.
[0086] In this embodiment of the invention, by employing the aforementioned depth-first traversal scheme, on the one hand, it helps to identify the specific problem to be processed; on the other hand, for the current business node to be diagnosed, although the initial analysis result of its tracking data is abnormal, the reason for the abnormality may not be a problem with the current business node itself, but may be due to packet loss or other issues during the acquisition of the tracking data of the current business node to be diagnosed. In this case, by acquiring and analyzing the tracking data of the downstream nodes of the current business node to be diagnosed, it can be determined that the current business node to be diagnosed does not have a problem, thereby avoiding misjudgment and improving the accuracy of problem localization. In the specific implementation of step S14, different problems to be processed and their corresponding processing strategies can be pre-stored in a preset processing strategy database.
[0087] Further, step S14 may include: checking whether the problem to be processed exists in a preset processing strategy database; in response to the existence of the problem to be processed in the processing strategy database, determining the processing strategy corresponding to the problem to be processed, and executing the processing strategy; wherein, the processing strategy database contains multiple problems to be processed and processing strategies corresponding to each problem to be processed.
[0088] In this embodiment of the invention, by pre-establishing the association between problems to be processed and processing strategies, after analyzing layer by layer and identifying problems to be processed in the business process to be diagnosed, the corresponding processing strategy is executed in response to the existence of existing processing strategies for the problems to be processed. This achieves automation in problem diagnosis and processing, reducing costs. Furthermore, this embodiment of the invention combines multi-round analysis and pruning strategies. Specifically, in the initial analysis stage, whenever the analysis result is normal, pruning is performed on the next layer of business nodes to be diagnosed, until the initial analysis result of the current business node's data points is abnormal, at which point a re-analysis stage is entered to identify and process existing problems. This significantly reduces the number of business nodes to be diagnosed and removes invalid paths in the business process to be diagnosed, thereby improving the efficiency and accuracy of problem diagnosis.
[0089] Furthermore, there is a pre-defined one-to-many relationship between the problem to be processed and the processing strategy; the method further includes: forming a processing strategy package from multiple processing strategies belonging to the same problem to be processed, wherein each processing strategy is associated with one or more classes; determining the set of classes associated with each processing strategy in each processing strategy package; and employing a class isolation mechanism to isolate the sets of classes associated with different processing strategy packages. The class isolation mechanism can be, for example, the class isolation mechanism of the Java Virtual Machine (JVM). In this embodiment of the invention, by isolating the sets of classes associated with different processing strategy packages, it is possible to achieve mutual isolation and non-interference between strategy packages belonging to different problems to be processed, which helps to improve the stability and reliability of problem processing.
[0090] Furthermore, the method also includes: for each processing strategy package, whenever the processing strategy in the processing strategy package is updated, a preset class loader is used to reload the class collection associated with the processing strategy package.
[0091] The preset class loader can be a Java-based class loader. In this embodiment of the invention, whenever the processing strategy in the processing strategy package is updated, the class collection associated with the processing strategy package is reloaded using the class loader (e.g., "hot reloading"), thereby enabling the changed code to take effect without restarting the system. This approach helps improve the efficiency of processing strategy updates and reduce the resource overhead of system restarts.
[0092] Reference Figure 4 , Figure 4 This is a schematic diagram of a problem-solving device according to an embodiment of the present invention. The problem-solving device may include:
[0093] The business process to be diagnosed module 41 determines the business process to be diagnosed, which includes multiple layers, and each layer includes one or more business nodes to be diagnosed.
[0094] The node traversal and pruning module 42 traverses the business nodes to be diagnosed layer by layer and performs a preliminary analysis on the data points of the current business nodes to be diagnosed. Whenever the analysis result of the data points of the current business nodes to be diagnosed is normal, the next layer of business nodes to be diagnosed is pruned, and the data points of the next business nodes to be diagnosed are analyzed until the preliminary analysis result of the data points of the current business nodes to be diagnosed is abnormal.
[0095] Problem analysis module 43 performs re-analysis based at least on abnormal event tracking data to identify unresolved issues in the business process to be diagnosed.
[0096] The problem handling module 44 executes the corresponding handling strategy in response to the existence of an existing handling strategy for the problem to be handled.
[0097] For the principles, implementation details, and beneficial effects of this problem-solving device, please refer to the preceding text. Figures 1 to 3 The descriptions of the problem-solving methods shown are not repeated here.
[0098] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, performs the above-described... Figures 1 to 3 The steps of the problem-solving method are shown. The computer-readable storage medium may include non-volatile or non-transitory memory, and may also include optical discs, hard disk drives, solid-state drives, etc.
[0099] Specifically, in this embodiment of the invention, the processor can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0100] It should also be understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of random access memory (RAM) are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced synchronous DRAM (ESDRAM), synchronous linked DRAM (SLDRAM), and direct rambus RAM (DR RAM).
[0101] This invention also provides a terminal, including a memory and a processor. The memory stores a computer program that can run on the processor, and when the processor runs the computer program, it performs the above-described... Figures 1 to 3 The steps of the problem-solving method are shown. The terminal may include, but are not limited to, mobile phones, computers, tablets, and other terminal devices, and may also be servers, cloud platforms, etc.
[0102] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article indicates that the preceding and following related objects have an "or" relationship.
[0103] In the embodiments of this application, "multiple" refers to two or more.
[0104] The descriptions of "first," "second," etc., appearing in the embodiments of this application are for illustrative purposes and to distinguish the objects being described. They have no order and do not indicate any special limitation on the number of devices in the embodiments of this application, nor do they constitute any limitation on the embodiments of this application.
[0105] It should be noted that the sequence number of each step in this embodiment does not represent a limitation on the execution order of each step.
[0106] While the present invention has been disclosed above, it is not limited thereto. Any person skilled in the art can make various modifications and alterations without departing from the spirit and scope of the invention; therefore, the scope of protection of the present invention should be determined by the scope defined in the claims.
Claims
1. A problem-solving method, characterized in that, include: The business process to be diagnosed is determined, and the business process to be diagnosed includes multiple layers, each layer including one or more business nodes to be diagnosed. Using a breadth-first approach, the system traverses the business nodes to be diagnosed layer by layer, and performs an initial analysis on the data points of the current business node to be diagnosed. Whenever the analysis result of the data points of the current business node to be diagnosed is normal, the system prunes each business node to be diagnosed in the next layer, and continues to analyze the data points of the next business node to be diagnosed until the initial analysis result of the data points of the current business node to be diagnosed is abnormal. At least based on the abnormal event tracking data, further analysis should be performed to identify any unresolved issues in the business process to be diagnosed. In response to the existence of an existing processing strategy for the problem to be processed, the corresponding processing strategy is executed; The method further includes, after reanalysis based at least on the abnormal event tracking data: If the unresolved issues in the business process to be diagnosed cannot be determined, a depth-first approach is adopted, starting from the next level of the business node to be diagnosed that is currently anomaly in the initial analysis, and continuing to traverse at least a portion of the business nodes to be diagnosed. The analysis is based at least on the event tracking data that is abnormal according to the current initial analysis, and the event tracking data of at least a portion of the business nodes to be diagnosed, to determine the unresolved issues in the business process to be diagnosed.
2. The method according to claim 1, characterized in that, The process for determining the business to be diagnosed includes: In response to receiving a problem diagnosis request submitted by a user, determine the diagnostic parameters based on the problem diagnosis request; Based on the diagnostic parameters, one or more business nodes containing the diagnostic parameters are selected from the business nodes included in the business system as the business nodes to be diagnosed. The business process to be diagnosed is determined based on each of the business nodes to be diagnosed and their topological relationships.
3. The method according to claim 2, characterized in that, Diagnostic parameters are determined based on the problem diagnosis request, including: The problem diagnosis request is segmented into words to obtain one or more words; For at least a portion of the words obtained from word segmentation, the business parameters corresponding to each word are retrieved from the preset business parameter database; The identified business parameters are used as the diagnostic parameters; The business parameter database contains multiple words, multiple business parameters, and the mapping relationship between the words and business parameters.
4. The method according to claim 1, characterized in that, The process for determining the business to be diagnosed includes: In response to receiving an instruction to enable automatic problem diagnosis, each business node in a preset business node list is selected from the business nodes contained in the business system as the business node to be diagnosed. The business process to be diagnosed is determined based on each of the business nodes to be diagnosed and their topological relationships.
5. The method according to claim 1, characterized in that, Before performing initial analysis on the event tracking data of the currently identified business node to be diagnosed, the method further includes: By using the static instrumentation node set in the current business node to be diagnosed, during the execution of the original code of the current business node to be diagnosed, the code for obtaining the data points contained in the static instrumentation node is executed to obtain the data points of the current business node to be diagnosed.
6. The method according to claim 1 or 5, characterized in that, The embedded data of the current business node to be diagnosed includes one or more of the following: The processing result of the input data in the current business node to be diagnosed; The timestamp of the start of processing of the input data in the current business node to be diagnosed; The timestamp of the end processing of the input data in the current business node to be diagnosed; The processing time of the input data in the current business node to be diagnosed.
7. The method according to claim 1, characterized in that, The response that an existing processing strategy exists for the problem to be processed, executing the corresponding processing strategy, includes: Check if the problem to be processed exists in the preset processing strategy database. In response to the existence of the problem to be processed in the processing strategy database, the processing strategy corresponding to the problem to be processed is determined and the processing strategy is executed; The processing strategy database contains multiple problems to be processed and the corresponding processing strategies for each problem.
8. The method according to claim 1, characterized in that, There is a pre-defined one-to-many relationship between the problems to be processed and the processing strategies; The method further includes: Multiple processing strategies belonging to the same problem to be processed are grouped into a processing strategy package, where each processing strategy is associated with one or more classes; Determine the set of classes associated with each processing strategy in each processing strategy package; A class isolation mechanism is used to isolate the collection of classes associated with different processing strategy packages.
9. The method according to claim 8, characterized in that, The method further includes: For each processing strategy package, whenever the processing strategy in the processing strategy package is updated, the set of classes associated with the processing strategy package is reloaded using a preset class loader.
10. The method according to claim 1, characterized in that, The next step is to continue analyzing the data points of the next business node to be diagnosed, including: Analyze the data points of the next business node to be diagnosed that belongs to the same layer as the current business node to be diagnosed.
11. A problem-solving device, characterized in that, include: The business process to be diagnosed module determines the business process to be diagnosed, which includes multiple layers, and each layer includes one or more business nodes to be diagnosed. The node traversal and pruning module adopts the breadth-first principle, traversing the business nodes to be diagnosed layer by layer, and performing preliminary analysis on the data points of the current business node to be diagnosed. Whenever the analysis result of the data points of the current business node to be diagnosed is normal, pruning is performed on each business node to be diagnosed in the next layer, and the analysis of the data points of the next business node to be diagnosed continues until the preliminary analysis result of the data points of the current business node to be diagnosed is abnormal. The problem analysis module re-analyzes at least the abnormal event tracking data to identify unresolved issues in the business process to be diagnosed. The problem handling module executes the corresponding handling strategy in response to the existence of an existing handling strategy for the problem to be handled. After reanalyzing at least the abnormal data points, the problem handling device further performs the following steps: If the unresolved issues in the business process to be diagnosed cannot be determined, a depth-first approach is adopted, starting from the next level of the business node to be diagnosed that is currently anomaly in the initial analysis, and continuing to traverse at least a portion of the business nodes to be diagnosed. The analysis is based at least on the event tracking data that is abnormal according to the current initial analysis, and the event tracking data of at least a portion of the business nodes to be diagnosed, to determine the unresolved issues in the business process to be diagnosed.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program, when run by a processor, performs the steps of the problem-solving method according to any one of claims 1 to 10.
13. A terminal comprising a memory and a processor, wherein the memory stores a computer program capable of running on the processor, characterized in that, When the processor runs the computer program, it performs the steps of the problem-solving method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Multi-link exception handling method and related device
CN110245154A
Test case generation method and device based on breadth-first search
CN112416761A
Business process abnormal node tracing method
CN112800282A