Micro-service fault positioning method, device, equipment and medium

By obtaining the node root cause scoring model and combining the cross entropy loss function and updating the configuration parameters, the poor positioning effect caused by unsupervised learning in microservice fault location is solved, and the accuracy of fault location is significantly improved.

CN119166403APending Publication Date: 2024-12-20BEIJING YOUTEJIE INFORMATION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411212796.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing microservice fault location methods rely on unsupervised learning, resulting in poor positioning effect and inability to effectively utilize real root cause data, resulting in low accuracy of fault root cause positioning.

Method used

By obtaining the node root cause scoring model, combining the fault microservice historical indicator data, target real root cause positioning data and cross entropy loss function, we determine the model update configuration parameters and update the node root cause scoring model, so as to perform feedback learning and improve the accuracy of fault positioning. Spend.

Benefits of technology

It improves the accuracy of microservice fault location, avoids the shortcomings of unsupervised learning, and significantly improves the accuracy of root cause location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119166403A_ABST
    Figure CN119166403A_ABST
Patent Text Reader

Abstract

The invention discloses a micro-service fault positioning method and device, equipment and a medium. The micro-service fault positioning method comprises the following steps: acquiring a node root cause scoring model; determining model update configuration parameters based on the node root cause scoring model, the fault micro-service historical index data, the target real root cause positioning data and the cross entropy loss function; and updating the node root cause scoring model according to the model updating configuration parameters to obtain a current node root cause scoring model, and sending the micro-service target index data to the current node root cause scoring model to obtain a micro-service fault positioning node. According to the technical scheme of the embodiment of the invention, the accuracy of micro-service fault positioning can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of microservice technology, and in particular to a microservice fault locating method, device, equipment and medium. Background Art

[0002] Discovering problems, locating problems, and solving problems are important ways to solve microservice failures. However, as the complexity of microservice systems increases, locating problems becomes more and more difficult, so a method is needed to locate problems faster.

[0003] Existing methods are mainly based on the correlation between time series, or on building causal graphs based on causal discovery algorithms, and then locating problems through causal graphs. However, these methods are often unsupervised, which makes it impossible to use some actual root cause data, resulting in poor root cause location results for existing microservice failures. Summary of the invention

[0004] The present invention provides a microservice fault locating method, device, equipment and medium to solve the problem of poor locating effect of existing microservice fault locating.

[0005] According to one aspect of the present invention, a microservice fault locating method is provided, comprising:

[0006] Get the node root cause scoring model;

[0007] Determine the model update configuration parameters based on the node root cause scoring model, the historical indicator data of the faulty microservice, the target real root cause location data, and the cross entropy loss function;

[0008] The node root cause scoring model is updated according to the model update configuration parameters to obtain the current node root cause scoring model, and the microservice target indicator data is sent to the current node root cause scoring model to obtain the microservice fault location node.

[0009] According to another aspect of the present invention, a microservice fault locating device is provided, comprising:

[0010] Model acquisition module, used to obtain the node root cause scoring model;

[0011] The model parameter update module is used to determine the model update configuration parameters based on the node root cause scoring model, the historical indicator data of the fault microservice, the target real root cause location data, and the cross entropy loss function;

[0012] The fault location module is used to update the node root cause scoring model according to the model update configuration parameters, obtain the current node root cause scoring model, and send the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node.

[0013] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0014] at least one processor; and

[0015] a memory communicatively connected to the at least one processor; wherein,

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the microservice fault locating method described in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the microservice fault locating method described in any embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention obtains the node root cause scoring model, thereby determining the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function, and then updates the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and sends the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node. In this solution, the node root cause scoring model is fed back through the target real root cause location data, avoiding the situation where unsupervised learning is performed by relying solely on the node root cause scoring model, and the root cause location cannot be substantially improved, solving the problem of poor location effect of existing microservice fault location, and improving the accuracy of microservice fault location.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0021] Figure 1 A flowchart of a microservice fault locating method provided in Embodiment 1 of the present invention;

[0022] Figure 2A flowchart of a microservice fault locating method provided in Embodiment 2 of the present invention;

[0023] Figure 3 A schematic diagram of the structure of a microservice fault locating device provided in Embodiment 3 of the present invention;

[0024] Figure 4 A schematic diagram of the structure of an electronic device that can be used to implement an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the term "target" and the like in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Embodiment 1

[0028] Figure 1 This is a flowchart of a microservice fault location method provided in the first embodiment of the present invention. This embodiment is applicable to the situation of accurately locating microservice faults. The method can be executed by a microservice fault location device. The microservice fault location device can be implemented in the form of hardware and / or software. The microservice fault location device can be configured in an electronic device. Figure 1 As shown, the method includes:

[0029] Step 110: Obtain a node root cause scoring model.

[0030] The node root cause scoring model can be used to evaluate the possibility that each service node in the microservice system is a failure point. The node root cause scoring model can be an unsupervised learning model. Exemplarily, the node root cause scoring model can output the score of each service node as a root cause node (i.e., the service node that causes the root cause of the microservice system failure), and the score can be a number between 0 and 1.

[0031] In an embodiment of the present invention, microservice operation data within a period of time before and after a microservice fault alarm may be obtained, and then an unsupervised learning model may be trained using the obtained microservice operation data to obtain a node root cause scoring model.

[0032] Step 120: Determine the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data, and the cross entropy loss function.

[0033] Among them, the historical indicator data of the faulty microservice may be the historical operating indicator data within a period of time before and after the microservice alarm. The historical indicator data of the faulty microservice may include at least one of service time consumption, throughput and error rate. The target real root cause location data may be data describing the root cause of the fault corresponding to the historical indicator data of the faulty microservice. Exemplarily, assuming that the user feedback shows that the second service is the root cause of the microservice system failure, the target real root cause location data may be [0, 1, ..., 0]. The model update configuration parameters may be the model parameters that the node root cause scoring model needs to update.

[0034] In general, operation and maintenance personnel can usually collect a lot of data, such as system logs, system monitoring data, system performance data, and distributed link data, etc. These data are important bases for fault location, but the amount of data is usually large. For distributed link data, it is often necessary to insert code into the service, or there are requirements for the operating system and operating environment, which limits data collection. Service indicator data is a relatively easier data to obtain, especially the three golden indicators of the service: latency, throughput, and error rate. These data are usually collected based on the monitoring system.

[0035] In an embodiment of the present invention, in order to avoid the limitations of data acquisition, historical indicator data of the faulty microservice can be collected to obtain target real root cause location data corresponding to the historical indicator data of the faulty microservice, and then the historical indicator data of the faulty microservice is analyzed through a node root cause scoring model, so that the analysis result of the node root cause scoring model and the target real root cause location data are substituted into a cross entropy loss function, and the model loss of the node root cause scoring is calculated through the cross entropy loss function, and the node root cause scoring model is iteratively optimized with the goal of reducing the model loss to obtain the model update configuration parameters.

[0036] Step 130: Update the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and send the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node.

[0037] The current node root cause scoring model may be a model obtained by updating the node root cause scoring model parameters using the model update configuration parameters. The microservice target indicator data may be indicator data for a period of time before and after the current fault microservice alarm. The microservice fault location node may be a candidate node for the root cause of the microservice failure obtained by analyzing the microservice target indicator data using the current node root cause scoring model. The number of microservice fault location nodes is greater than or equal to 1.

[0038] In an embodiment of the present invention, the node root cause scoring model can be updated with the model update configuration parameters to obtain the current node root cause scoring model, and then the microservice target indicator data is sent to the current node root cause scoring model to analyze the microservice target indicator data through the current node root cause scoring model, and output the microservice fault location node for operation and maintenance personnel to perform targeted troubleshooting.

[0039] The technical solution of the embodiment of the present invention obtains the node root cause scoring model, thereby determining the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function, and then updates the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and sends the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node. In this solution, the node root cause scoring model is fed back through the target real root cause location data, avoiding the situation where unsupervised learning is performed by relying solely on the node root cause scoring model, and the root cause location cannot be substantially improved, solving the problem of poor location effect of existing microservice fault location, and improving the accuracy of microservice fault location.

[0040] Embodiment 2

[0041] Figure 2 This is a flowchart of a microservice fault location method provided in Example 2 of the present invention. This example is specific based on the above example and provides a specific optional implementation method for determining the model update configuration parameters based on the historical indicator data of the faulty microservice, the target real root cause location data, and the cross entropy loss function. Figure 2 As shown, the method includes:

[0042] Step 210: Obtain a node root cause scoring model.

[0043] In an optional embodiment of the present invention, obtaining the node root cause scoring model may include: constructing the node root cause scoring model based on a similarity algorithm, a Markov prediction method, and a causal reasoning algorithm.

[0044] The similarity algorithm may include but is not limited to the cosine similarity algorithm, the Euclidean distance or the absolute value of the Pearson correlation coefficient, etc. The Markov prediction method may be used to calculate the transition probability matrix. The causal reasoning algorithm may include but is not limited to the PC algorithm (Bayesian network).

[0045] In the embodiment of the present invention, a node root cause scoring model may be constructed based on a similarity algorithm, a Markov prediction method, and a causal reasoning algorithm.

[0046] Step 220: Calculate the node root cause score based on the fault microservice historical indicator data and the node root cause scoring model.

[0047] The node root cause score may be determined by analyzing the historical indicator data of the faulty microservice by a node root cause scoring model, and each microservice node is scored as a root cause node.

[0048] In an embodiment of the present invention, the historical indicator data of the faulty microservice can be input into the node root cause scoring model, and then the historical indicator data of the faulty microservice can be analyzed based on the node root cause scoring model to output the score of each service node as the root cause node through the node root cause scoring model, that is, the node root cause score.

[0049] In an optional embodiment of the present invention, calculating the node root cause score based on the fault microservice historical indicator data and the node root cause scoring model may include: based on a preset time window, sampling and aggregating the fault microservice historical indicator data to obtain the historical indicator data to be analyzed; calculating the indicator sequence similarity based on the historical indicator data to be analyzed, the service call graph, and the similarity algorithm in the node root cause scoring model; determining the target transition probability matrix based on the Markov prediction method in the node root cause scoring model, the indicator sequence similarity, and the preset model parameters, and calculating the node root cause score based on the target transition probability matrix and the causal reasoning algorithm in the node root cause scoring model.

[0050] Among them, the preset time window can be a time window of a fixed length that is preset. The historical indicator data to be analyzed can be the data obtained after sampling and aggregation of the historical indicator data of the faulty microservice in each time window. The service call graph can be used to describe the call relationship between microservices. The nodes in the service call graph represent microservices. The indicator sequence similarity can be used to describe the similarity of the indicator sequences of the alarm service and the non-alarm service in the microservice system. The preset model parameters can be the parameters initialized when the node root cause scoring model calculates the transition probability matrix. The target transition probability matrix can be a transition probability matrix determined according to the Markov prediction method, the indicator sequence similarity and the preset model parameters.

[0051] In an embodiment of the present invention, a preset time window can be used to perform sampling and aggregation processing on the historical indicator data of the faulty microservice, that is, the average value or sum of the historical indicator data of the faulty microservice in each time window is calculated, and the processing result is used as the historical indicator data to be analyzed (equivalent to the indicator time series of the microservice), and the historical indicator data to be analyzed is further parsed to determine the indicator time series of the alarm microservice and the non-alarm microservice (other microservices), so as to use the similarity algorithm in the node root cause scoring model to calculate the indicator sequence similarity between the alarm microservice and the non-alarm microservice according to the relationship between the nodes and edges between the service call graphs, and further based on the indicator sequence similarity and the preset model parameters, the target transfer probability matrix is ​​calculated according to the Markov prediction method, so as to calculate the node root cause score based on the target transfer probability matrix and the causal reasoning algorithm in the node root cause scoring model.

[0052] In an optional embodiment of the present invention, before calculating the indicator sequence similarity based on the historical indicator data to be analyzed, the service call graph, and the similarity algorithm in the node root cause scoring model, it may also include: obtaining the service call graph based on the configuration management database, the data call service or the call graph construction algorithm; calculating the indicator sequence similarity based on the historical indicator data to be analyzed, the service call graph, and the similarity algorithm in the node root cause scoring model, which may include: when the historical indicator data to be analyzed is non-single indicator data, calculating the indicator sequence similarity based on the high-dimensional similarity algorithm in the historical indicator data to be analyzed, the service call graph, and the node root cause scoring model.

[0053] Among them, the configuration management database is cmbd. The data call service can be an application that calls a service call graph. The call graph construction algorithm can be an algorithm that calculates the service call graph using the historical indicator data to be analyzed through a causal reasoning algorithm. Non-single indicator data can be multiple types of indicator data, that is, not a single type of indicator data. The high-dimensional similarity algorithm can be an algorithm for calculating the similarity of high-dimensional data. Exemplarily, the high-dimensional similarity algorithm can be to weight and normalize the data and separately calculate the sum or mean of the Pearson correlation coefficient to determine the similarity of the high-dimensional data, or to determine the similarity of the high-dimensional data through distance Covariance.

[0054] In an embodiment of the present invention, a service call graph can be obtained from a configuration management database or a data call service call graph data source. If the service call graph cannot be obtained based on the above method, the service call graph is constructed based on a call graph construction algorithm using the historical indicator data to be analyzed.

[0055] In an embodiment of the present invention, the indicator sequence similarity can be calculated based on the number of indicator types included in the historical indicator data to be analyzed, and the corresponding similarity algorithm can be used to calculate the indicator sequence similarity. When the historical indicator data to be analyzed is non-single indicator data, the high-dimensional similarity algorithm in the node root cause scoring model is used to calculate the indicator sequence similarity between the alarm microservice and the non-alarm microservice according to the relationship between the nodes and edges between the service call graph.

[0056] Step 230: Determine the model update configuration parameters according to the node root cause score, the target true root cause positioning data, and the cross entropy loss function.

[0057] In an embodiment of the present invention, the node root cause score and the target true root cause positioning data can be substituted into the cross entropy loss function, and through iterative optimization of the model, the model parameters when the model loss is less than the original model loss are used as model update configuration parameters.

[0058] In an optional embodiment of the present invention, determining the model update configuration parameters according to the node root cause score, the target true root cause location data and the cross entropy loss function may include: substituting the node root cause score and the target true root cause location data into the cross entropy loss function to obtain the target loss function; and determining the model update configuration parameters according to the gradient descent method based on the partial derivatives of the target loss function with respect to the target model parameters.

[0059] The target loss function may be a cross entropy loss function after parameter substitution. The target model parameter may be a model parameter that needs to be updated in the node root cause scoring model.

[0060] In an embodiment of the present invention, the node root cause scores and the target true root cause positioning data are used to substitute parameters into the variables in the cross entropy loss function to obtain the target loss function, and then the partial derivatives of the target loss function with respect to the target model parameters are calculated, so as to update the target model parameters using the gradient descent method to obtain the model update configuration parameters.

[0061] In an optional embodiment of the present invention, based on the partial derivatives of the target loss function with respect to the target model parameters, the model update configuration parameters are determined according to the gradient descent method, which may include: based on the partial derivatives of the target loss function with respect to the target model parameters, the parameters are iteratively updated according to the gradient descent method to obtain the updated parameters of the current iteration round; when the model loss corresponding to the updated parameters of the current iteration round is less than the initial model loss, the updated parameters of the current iteration round are used as the model update configuration parameters.

[0062] Among them, the update parameter of the current iteration round can be the value of the target model parameter determined in the current iteration round according to the gradient descent method.

[0063] In an embodiment of the present invention, the partial derivatives of the target loss function with respect to the target model parameters are calculated, and then the target model parameters are iteratively updated according to the gradient descent method to obtain the update parameters of the current iteration round, thereby determining the model loss corresponding to the update parameters of the current iteration round. When the model loss corresponding to the update parameters of the current iteration round is less than the initial model loss, the update parameters of the current iteration round can be used as model update configuration parameters.

[0064] Step 240: Update the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and send the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node.

[0065] In a specific example, according to the alarm start time and alarm end time of the microservice alarm, the historical service time consumption data from thirty minutes before the alarm start to the alarm end time, that is, the historical indicator data of the faulty microservice, can be obtained, and the historical service time consumption data can be sampled and aggregated according to the time window of 30 seconds (calculate the average value or sum of each time window). Obtain service call graph data from cmbd or other service call graph data sources. If it still cannot be done, the service call graph can be constructed with the indicator data through the PC algorithm.

[0066] Calculate the indicator sequence similarity S of the alarm microservice and the non-alarm microservice i =Sim(m i , m ef ), where m i is the indicator time series of non-alarm microservices, m efis the indicator time series of the alarm microservice, Sim is the indicator similarity calculation method, which can be cosine similarity, Euclidean distance or the absolute value of Pearson correlation coefficient, etc. Further, the target transition probability matrix P is calculated, α, β, γ are three target model parameters, recorded in the database. When not trained, α, β, γ are initialized to 1 as the preset model parameters.

[0067]

[0068] Among them, S j S represents the similarity between the indicator time series of the jth non-alarm microservice and the indicator time series of the alarm microservice. i represents the similarity between the indicator time series of the i-th non-alarm microservice and the indicator time series of the alarm microservice. E represents the set of edges in the service call graph. e ij Represents the edge from microservice node i to microservice node j. max k :S ik It represents the maximum value of the similarity between the indicator time series of the i-th to k-th non-alarm microservices and the indicator time series of the alarm microservice. Based on the above formula, different weights can be given to different transmissions (upload, download and autotransmission).

[0069] The elements in P are calculated based on the following formula:

[0070]

[0071] The node root cause scoring model uses the target transition probability matrix and the PC algorithm to calculate the score of each microservice node. The nodes with high scores are the root cause candidate nodes, and the top three nodes are recommended.

[0072] The user can provide feedback on the target real root cause location data, and then update the target model parameters α, β, γ according to the target real root cause location data to improve the accuracy of root cause location. The update method is as follows: Assuming that there are k microservices in total, and the user feedbacks that the i-th microservice is the root cause node, the target real root cause location data can be expressed as Y = [0,0,...,1,...,0,0], which is 1 at the i-th position of the sequence and 0 at other positions. According to the node root cause scoring model, the node root cause score of each microservice node is calculated to obtain the predicted score Y' = [y'_1, y'_2,..., y'_i,..., y'_k], and the target loss function is established as L = -sum(Y*log(Y')), where y'_j is a nested function of α, β, γ, and the number of nestings is t. Therefore, the partial derivatives of L with respect to α, β, γ can be calculated, and then the corresponding values ​​of the target model parameters can be updated using the gradient descent method until the loss of the model loss corresponding to the new parameters is indeed less than the original loss. Then, the updated corresponding values ​​of α, β, and γ are used as model update configuration parameters and stored in the database for the next root cause location calculation.

[0073] After simulation, the above mechanism can adjust the node root cause scoring model to increase the accuracy of root cause location. The accuracy of the first three microservice nodes determined as root cause nodes by the unsupervised method can reach about 50%. Based on this solution, the accuracy can be improved to 70%, avoiding the disadvantage of requiring a large amount of training data for supervision, and being able to update the model with feedback, while solving the problem that the unsupervised model cannot improve the effect.

[0074] The technical solution of the embodiment of the present invention obtains the node root cause scoring model, thereby calculating the node root cause score according to the fault microservice historical indicator data and the node root cause scoring model, and then determines the model update configuration parameters according to the node root cause score, the target real root cause location data and the cross entropy loss function, and further updates the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and sends the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node. In this solution, the node root cause scoring model is fed back through the target real root cause location data, avoiding the situation where unsupervised learning is performed by relying solely on the node root cause scoring model, and the root cause location cannot be substantially improved, thereby solving the problem of poor location effect of existing microservice fault location, and improving the accuracy of microservice fault location.

[0075] Embodiment 3

[0076] Figure 3 This is a schematic diagram of the structure of a microservice fault location device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device comprises:

[0077] A model acquisition module 310 is used to acquire a node root cause scoring model;

[0078] A model parameter updating module 320 is used to determine the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function;

[0079] The fault location module 330 is used to update the node root cause scoring model according to the model update configuration parameters, obtain the current node root cause scoring model, and send the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node.

[0080] The technical solution of the embodiment of the present invention obtains the node root cause scoring model, thereby determining the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function, and then updates the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and sends the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node. In this solution, the node root cause scoring model is fed back through the target real root cause location data, avoiding the situation where unsupervised learning is performed by relying solely on the node root cause scoring model, and the root cause location cannot be substantially improved, solving the problem of poor location effect of existing microservice fault location, and improving the accuracy of microservice fault location.

[0081] Optionally, the model acquisition module 310 is specifically used to construct the node root cause scoring model based on a similarity algorithm, a Markov prediction method, and a causal reasoning algorithm.

[0082] Optionally, the model parameter updating module 320 includes a node root cause score calculation unit and a model parameter updating unit. The node root cause score calculation unit is used to calculate the node root cause score according to the fault microservice historical indicator data and the node root cause scoring model. The model parameter updating unit is used to determine the model update configuration parameters according to the node root cause score, the target true root cause location data and the cross entropy loss function.

[0083] Optionally, a node root cause score calculation unit is specifically used to sample and aggregate the historical indicator data of the fault microservice based on a preset time window to obtain the historical indicator data to be analyzed; calculate the indicator sequence similarity based on the historical indicator data to be analyzed, the service call graph, and the similarity algorithm in the node root cause scoring model; determine the target transition probability matrix based on the Markov prediction method in the node root cause scoring model, the indicator sequence similarity, and preset model parameters, and calculate the node root cause score based on the target transition probability matrix and the causal reasoning algorithm in the node root cause scoring model.

[0084] Optionally, a model parameter updating unit is specifically used to substitute the node root cause score and the target true root cause positioning data into the cross entropy loss function to obtain a target loss function; based on the partial derivative of the target loss function with respect to the target model parameters, determine the model update configuration parameters according to the gradient descent method.

[0085] Optionally, the microservice fault locating device may include a service call graph acquisition module, which is used to acquire the service call graph based on a configuration management database, a data call service, or a call graph construction algorithm.

[0086] Optionally, the node root cause score calculation unit is specifically used to calculate the indicator sequence similarity based on the historical indicator data to be analyzed, the service call graph and the high-dimensional similarity algorithm in the node root cause scoring model when the historical indicator data to be analyzed is non-single indicator data.

[0087] Optionally, a model parameter updating unit is specifically used to iteratively update the parameters according to the gradient descent method based on the partial derivatives of the target loss function with respect to the target model parameters, so as to obtain the updated parameters of the current iteration round; when the model loss corresponding to the updated parameters of the current iteration round is less than the initial model loss, the updated parameters of the current iteration round are used as the model update configuration parameters.

[0088] The microservice fault locating device provided in the embodiment of the present invention can execute the microservice fault locating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0089] Embodiment 4

[0090] Figure 4A schematic diagram of an electronic device that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0091] like Figure 4 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0092] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0093] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The processor 11 executes the various methods and processes described above, such as a microservice fault location method.

[0094] In some embodiments, the microservice fault location method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the microservice fault location method described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the microservice fault location method in any other appropriate manner (e.g., by means of firmware).

[0095] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0096] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0097] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0098] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0099] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0100] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0101] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0102] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A microservice fault location method, characterized in that: include: Get the node root cause scoring model; Determine the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data, and the cross entropy loss function; The node root cause scoring model is updated according to the model update configuration parameters to obtain the current node root cause scoring model, and the microservice target indicator data is sent to the current node root cause scoring model to obtain a microservice fault location node.

2. The method according to claim 1, characterized in that The step of obtaining the node root cause scoring model includes: Based on the similarity algorithm, Markov prediction method and causal reasoning algorithm, the node root cause scoring model is constructed.

3. The method according to claim 2, characterized in that The determining of the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function includes: Calculate the node root cause score according to the fault microservice historical indicator data and the node root cause scoring model; The model update configuration parameters are determined according to the node root cause score, the target true root cause positioning data and the cross entropy loss function.

4. The method according to claim 3, characterized in that The calculating the node root cause score according to the fault microservice historical indicator data and the node root cause scoring model includes: Based on a preset time window, the historical indicator data of the faulty microservice is sampled and aggregated to obtain the historical indicator data to be analyzed; Calculate the indicator sequence similarity according to the historical indicator data to be analyzed, the service call graph, and the similarity algorithm in the node root cause scoring model; Based on the Markov prediction method in the node root cause scoring model, the indicator sequence similarity and preset model parameters, a target transition probability matrix is ​​determined, and the node root cause score is calculated according to the target transition probability matrix and the causal reasoning algorithm in the node root cause scoring model.

5. The method according to claim 3, characterized in that: The step of determining the model update configuration parameters according to the node root cause score, the target true root cause positioning data, and the cross entropy loss function includes: Substituting the node root cause score and the target true root cause positioning data into the cross entropy loss function to obtain a target loss function; Based on the partial derivatives of the target loss function with respect to the target model parameters, the model update configuration parameters are determined according to the gradient descent method.

6. The method according to claim 4, characterized in that Before calculating the indicator sequence similarity according to the historical indicator data to be analyzed, the service call graph and the similarity algorithm in the node root cause scoring model, the method further includes: Obtaining the service call graph based on a configuration management database, a data call service, or a call graph construction algorithm; The calculating the indicator sequence similarity according to the historical indicator data to be analyzed, the service call graph and the similarity algorithm in the node root cause scoring model includes: When the historical indicator data to be analyzed is non-single indicator data, the indicator sequence similarity is calculated based on the historical indicator data to be analyzed, the service call graph and the high-dimensional similarity algorithm in the node root cause scoring model.

7. The method according to claim 5, characterized in that The step of determining the model update configuration parameters based on the partial derivative of the target loss function with respect to the target model parameters according to the gradient descent method includes: Based on the partial derivatives of the target loss function with respect to the target model parameters, the parameters are iteratively updated according to the gradient descent method to obtain the updated parameters of the current iteration round; When the model loss corresponding to the current iteration round update parameter is less than the initial model loss, the current iteration round update parameter is used as the model update configuration parameter.

8. A microservice fault location device, characterized in that: include: Model acquisition module, used to obtain the node root cause scoring model; A model parameter updating module, used to determine the model update configuration parameters based on the node root cause scoring model, the fault microservice historical indicator data, the target real root cause location data and the cross entropy loss function; The fault location module is used to update the node root cause scoring model according to the model update configuration parameters to obtain the current node root cause scoring model, and send the microservice target indicator data to the current node root cause scoring model to obtain the microservice fault location node.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the microservice fault locating method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the microservice fault locating method according to any one of claims 1 to 7 when executed.