An abnormal service positioning method and device, electronic equipment and storage medium

By constructing a directed graph and utilizing the weight information of service nodes and optimizing the PageRank algorithm, the problem of low accuracy in locating abnormal services in long cross-system chains is solved, achieving efficient and accurate identification of abnormal services.

CN118819690BActive Publication Date: 2025-11-21CHINA MOBILE SHANGHAI ICT CO LTD +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311512081.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-11-13
Publication Date
2025-11-21
Estimated Expiration
2043-11-13

AI Technical Summary

Technical Problem

The lack of a unified standard in cross-system long-chain tracing leads to low accuracy in locating abnormal services, making it difficult to effectively identify and locate abnormal services.

Method used

By constructing a directed graph based on service call data, and utilizing the weight information of service nodes and the optimized PageRank algorithm, abnormal service nodes can be identified, narrowing the location range and improving location efficiency and accuracy.

Benefits of technology

It enables accurate location of abnormal services in long chains across systems, improving the accuracy and efficiency of location results and reducing processing time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118819690B_ABST
    Figure CN118819690B_ABST
Patent Text Reader

Abstract

The application discloses an abnormal service positioning method and device, electronic equipment and storage medium. The method comprises the following steps: constructing a directed graph based on service call data corresponding to a target service; wherein the directed graph comprises at least one service chain, the service chain represents the call relationship between two service nodes associated with the corresponding service, the node information of the service node comprises the identification of the global service chain, the identification of the current service chain and the identification of the service node, and the identification of the global service chain is used to generate the service call data; and determining an abnormal service from each service chain corresponding to the service based on the weight information of each service node in the directed graph. In this way, on the one hand, a unified tracking standard can be determined in cross-system long-chain tracking; on the other hand, when determining the abnormal service, all service nodes do not need to be checked one by one without distinction, the processing time for positioning the abnormal service is shortened, and the positioning result of the abnormal service is more accurate and efficient.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to, but is not limited to, the technical field of cloud computing and big data edge computing, and in particular relates to an abnormal service positioning method and device, an electronic device and a storage medium. BACKGROUND

[0002] With the increase of business complexity, the system is further specialized in the vertical and horizontal fields, and the system evolves towards smaller service particles, more blurred boundaries and more diversified access points.

[0003] In related technologies, in cross-system long-chain tracking, there is a lack of unified standards, so that the accuracy of the tracking result is not high, so that the abnormal service cannot be accurately positioned. SUMMARY

[0004] Therefore, the embodiments of the present application provide at least an abnormal service positioning method, device, electronic device and computer readable storage medium.

[0005] The technical scheme of the embodiments of the present application is as follows:

[0006] On the one hand, the embodiments of the present application provide an abnormal service positioning method, which comprises:

[0007] Based on the service call data corresponding to the target business, a directed graph is constructed; wherein the directed graph includes at least one service chain, the service chain represents the call relationship between two service nodes associated with the corresponding service, the call relationship is determined based on the node information of the corresponding two service nodes, the node information of the service node includes the identifier of the global service chain, the identifier of the current service chain and the identifier of the service node, the identifier of the global service chain is used to generate the service call data, and the identifier of the current service chain includes one of the identifier of the global service chain and the identifier of the service node calling the service node.

[0008] Based on the weight information of each service node in the directed graph, an abnormal service is determined from each service corresponding to the service chain.

[0009] In some embodiments, based on the service call data corresponding to the target business, the directed graph is constructed, which comprises: the service call data is parsed to obtain a set of service call records; wherein the set of service call records includes at least one service call record, and the service call record represents the execution process of the corresponding service; based on the at least one service call record, the directed graph is constructed.

[0010] In this way, by parsing the service call data to obtain each service call record, and constructing the directed graph according to the service call record, the accuracy of the directed graph is improved.

[0011] In some embodiments, the determining the abnormal service from the services corresponding to the at least one service chain associated with the target service node comprises: determining weight information of each service node in the directed graph; determining a target service node from the at least one service node based on the weight information of each service node; and determining the abnormal service from the services corresponding to the at least one service chain associated with the target service node.

[0012] In this way, on the one hand, the target service node is determined according to the weight information of each service node, which improves the accuracy of the target service node; on the other hand, the abnormal service is determined from the services associated with the target service node, without the need to determine the abnormal service from all services associated with all service nodes, which narrows the positioning range, shortens the processing time, and improves the accuracy and efficiency of the positioning result.

[0013] In some embodiments, the determining the weight information of the service node comprises: obtaining, based on the directed graph, a parent node set of the service node and an associated node set corresponding to each parent node in the parent node set; determining, for each parent node in the parent node set, a first total call duration corresponding to the service node based on a system weight value corresponding to the service node, a first call duration between the service node and the parent node, and weight information of the parent node; determining a second total call duration corresponding to the parent node based on a second call duration between each associated node in the associated node set corresponding to the parent node and the parent node, and the system weight value; determining a proportion based on the first total call duration and the second total call duration; and determining the weight information of the service node based on each proportion.

[0014] In this way, the weight information of the service node is determined based on the system weight value corresponding to the service node, the weight information of the parent node, and the call duration between each service node, which improves the accuracy of the weight information of the service node and thus improves the accuracy of the positioning result of the abnormal service.

[0015] In some embodiments, the determining the first total call duration corresponding to the service node based on the system weight value corresponding to the service node, the first call duration between the service node and the parent node, and the weight information of the parent node comprises: determining the system weight value based on a system peak ranking value and a system reference ranking value; determining a first product among the system weight value, the first call duration, and the weight information of the parent node; and determining the first total call duration corresponding to the service node based on the first product.

[0016] Thus, the first total call duration is determined according to the system peak ranking value, the system reference ranking value and the weight information of the parent node, the accuracy of the first total call duration is improved, the accuracy of the weight information of the service node is improved, and the accuracy of the positioning result of the abnormal service is improved.

[0017] In some embodiments, the system weight value is determined based on the system peak ranking value and the system reference ranking value, including: determining a second product between the system peak ranking value and a first weighting coefficient; determining a third product between the system reference ranking value and a second weighting coefficient; and determining the system weight value based on the second product and the third product.

[0018] Thus, the system weight value is determined according to the system peak ranking value, the first weighting coefficient, the system reference ranking value and the second weighting coefficient, the accuracy of the system weight value is improved, and the accuracy of the first total call duration is improved.

[0019] In some embodiments, the system weight value is determined based on the second product and the third product, including: determining a first sum value between the second product and the third product; determining a ratio between the first sum value and a system total number; wherein the system total number is determined based on the system peak ranking value and the system reference ranking value; and determining the system weight value based on the ratio.

[0020] Thus, the system weight value is determined according to the system total number, the accuracy of the system weight value is improved, and the accuracy of the first total call duration is improved.

[0021] In some embodiments, the second total call duration corresponding to the parent node is determined based on the second call duration between each associated node in the associated node set corresponding to the parent node and the parent node, and the system weight value, including: for each associated node, determining a third total call duration corresponding to the associated node based on the second call duration between the associated node and the parent node, and the system weight value; and determining the second total call duration corresponding to the parent node based on each third total call duration.

[0022] Thus, the second total call duration is determined based on the system weight value and the second call duration between each associated node and the parent node, the accuracy of the second total call duration is improved, the accuracy of the weight information of the service node is improved, and the accuracy of the positioning result of the abnormal service is improved.

[0023] In some embodiments, the determining the third total call duration corresponding to the associated node based on the second call duration between the associated node and the parent node and the system weight value comprises: determining a fourth product between the second call duration and the system weight value; and determining the third total call duration corresponding to the associated node based on the fourth product.

[0024] In this way, the third total call duration corresponding to the associated node is determined based on the second call duration and the system weight value, which improves the accuracy of the third total call duration, and thus improves the accuracy of the second total call duration.

[0025] In some embodiments, the determining the weight information of the service node comprises: determining the weight information of the service node by using an optimized PageRank algorithm, wherein the weight information PR(v i ) of the service node v i is:

[0026]

[0027] wherein v j is a parent node of the service node v i , M(v i ) is a parent node set of the service node v i , the service node v k is an associated node of the parent node v j , out(v j ) is an associated node set of the parent node v j , w ji is the first call duration between the parent node v j and the service node v i , w jk is the second call duration between the parent node v j and the service node v k , P x is the system weight value, and PR(v j ) is the weight information of the parent node v j .

[0028] In this way, the system weight value is added in the determination of the weight information of the service node, which optimizes the existing PageRank algorithm and improves the accuracy and efficiency of the positioning of the abnormal service.

[0029] In another aspect, the embodiments of the present application provide an abnormal service positioning device, which comprises:

[0030] The constructing module is configured to construct a directed graph based on the service invocation data corresponding to the target service; wherein the directed graph comprises at least one service chain, the service chain represents an invocation relationship between two service nodes associated with the corresponding service, the invocation relationship is determined based on node information of the two corresponding service nodes, the node information of the service node comprises an identifier of a global service chain, an identifier of a current service chain, and an identifier of the service node, the identifier of the global service chain is used to generate the service invocation data, and the identifier of the current service chain comprises one of the identifier of the global service chain and the identifier of the service node that invokes the service node.

[0031] The determining module is configured to determine an abnormal service from each service corresponding to the service chain based on weight information of each service node in the directed graph.

[0032] In another aspect, an embodiment of the present application provides an electronic device, comprising a memory and a processor, the memory stores a computer program capable of running on the processor, and the processor implements part or all of the steps of the above method when executing the program.

[0033] In another aspect, an embodiment of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement part or all of the steps of the above method.

[0034] In the embodiment of the present application, the directed graph is constructed based on the service invocation data corresponding to the target service; wherein the directed graph comprises at least one service chain, the service chain represents an invocation relationship between two service nodes associated with the corresponding service, the invocation relationship is determined based on node information of the two corresponding service nodes, the node information of the service node comprises an identifier of a global service chain, an identifier of a current service chain, and an identifier of the service node, the identifier of the global service chain is used to generate the service invocation data, and the identifier of the current service chain comprises one of the identifier of the global service chain and the identifier of the service node that invokes the service node; an abnormal service is determined from each service corresponding to the service chain based on weight information of each service node in the directed graph. In this way, first, the service invocation data is generated according to the identifier of the global service chain, all communication service nodes contained in the target service in the system or across the system can be accurately obtained, a unified tracking standard is determined, so that the current service can be identified in the long chain across the system; second, the directed graph is constructed based on the service invocation data, so as to accurately display the service flow process; finally, the abnormal service is found according to the weight information of each service node, all nodes do not need to be checked one by one without difference, the processing time for positioning the abnormal service is shortened, and the positioning result of the abnormal service is more accurate and efficient.

[0035] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, not limiting the technical solutions of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0036] The drawings incorporated in the specification and constituting a part of the specification illustrate embodiments consistent with the present application and, together with the specification, serve to explain the technical solutions of the present application.

[0037] Figure 1 Flowchart of an abnormal service positioning method provided for an embodiment of the present application Figure 1 ;

[0038] Figure 2 Flowchart of an abnormal service positioning method provided for an embodiment of the present application Figure 2 ;

[0039] Figure 3A Flowchart of an abnormal service positioning method provided for an embodiment of the present application

[0040] Figure 3B Schematic diagram of node information of a service node provided for an embodiment of the present application

[0041] Figure 3C Schematic diagram of a directed graph provided for an embodiment of the present application

[0042] Figure 4 Schematic diagram of an abnormal service positioning device provided for an embodiment of the present application

[0043] Figure 5 Schematic diagram of a hardware entity of an electronic device in an embodiment of the present application DETAILED DESCRIPTION

[0044] In order to make the purposes, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further described in detail below in combination with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the scope of protection of the present application.

[0045] In the following description, “some embodiments” are described, which describe a subset of all possible embodiments, but it can be understood that “some embodiments” can be the same or different subsets of all possible embodiments, and can be combined with each other without conflict.

[0046] It should be noted that the terms "first", "second", "third" involved in the embodiments of the present application are only to distinguish similar objects, and do not represent the specific order of the objects. Understandably, "first", "second", "third" can be interchanged in a specific order or sequence as allowed, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the embodiments of the present application belong. It should also be understood that terms such as those defined in a general dictionary should be understood to have meanings consistent with those in the context of the prior art, and should not be interpreted to have idealized or overly formal meanings unless specifically defined as such herein.

[0048] In the related art, with the increase of business complexity, the system is further specialized in vertical and horizontal fields, the system evolves in the direction of smaller service granularity, more blurred boundaries, and more diversified access points. In the multi-vendor decentralized development mode, there is a lack of unified standards for cross-system long-chain tracking, resulting in a lack of collaborative analysis capability of end call chain. At the same time, in the heterogeneous system, the evaluation of abnormal analysis lacks system-level weight evaluation, making the abnormal analysis weak in cross-system adaptation capability. Therefore, defining a unified standard for cross-system long-chain tracking and optimizing abnormal analysis in heterogeneous systems is a technical problem.

[0049] Based on the above problems, the embodiment of the application first provides a positioning method of an abnormal service. First, service calling data is generated according to the identification of a global service chain, all communication service nodes contained in the target service in the system or across the system can be accurately obtained, a unified tracking standard is determined, so that the current service can be identified in the long chain across the system; second, a directed graph is constructed according to the service calling data, so as to accurately show the flow process of the service; finally, the abnormal service that may occur is found according to the weight information of each service node, without differentiating all nodes and checking them one by one, the processing time of positioning the abnormal service is shortened, and the positioning result of the abnormal service is more accurate and efficient. The method provided by the embodiment of the application can be executed by an electronic device, wherein the electronic device can be a notebook computer, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated message device, a portable game device) and various types of terminals, and can also be implemented as a server. The server can be a stand-alone physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content distribution networks (CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0050] Figure 1 Flowchart of a positioning method of an abnormal service provided by the embodiment of the application Figure 1 As shown in Figure 1 The method at least includes the following steps S11 to S12, wherein:

[0051] Step S11, based on the service calling data corresponding to the target service, a directed graph is constructed; wherein the directed graph includes at least one service chain, the service chain represents the calling relationship between two service nodes associated with the corresponding service, the calling relationship is determined based on the node information of the corresponding two service nodes, the node information of the service node includes the identification of the global service chain, the identification of the current service chain and the identification of the service node, the identification of the global service chain is used to generate the service calling data, and the identification of the current service chain includes one of the following: the identification of the global service chain and the identification of the service node calling the service node.

[0052] Here, the service invocation data refers to node information of each service node, which can include but is not limited to at least one of an identifier S-TraceID of a global service chain, an identifier TraceID of a current service chain, an identifier SpanID of a service node, an identifier P-SpanID of a service node that invokes the service node, and the like. In implementation, a single service invocation is referred to as a Span, and a single business request is referred to as a Trace.

[0053] In a single service invocation, invocation information of the service is recorded as the node information of the service node, that is, the identifier of the service node is taken as the identifier SpanID of the service node in the single service invocation, and the identifier of the service node that invokes the service node or the identifier of the global service chain is taken as the identifier TraceID of the current service chain. In some embodiments, the multiple single service chains invoked by the target business in the current system can be concatenated through the TraceID.

[0054] The identifier TraceID of the current service chain can include but is not limited to one of the identifier S-TraceID of the global service chain and the identifier P-SpanID of the service node that invokes the service node. The identifier S-TraceID of the global service chain is used to generate the service invocation data.

[0055] In some embodiments, in the process of cross-system invocation, the identifier S-TraceID of the global service chain does not change and is taken as a unique identifier of the global invocation chain and is generated by a service initiation system when initiating a service. For example, a touch point as a starting point records the TraceID when the service initiation system initiates a service, determines the identifier S-TraceID of the global service chain as the identifier of the current service chain according to the identifier TraceID of the current service chain invoked by the service initiation system, and keeps the identifier S-TraceID of the global service chain unique in multiple systems in the cross-system. The touch point is a channel for interaction between different systems in the cross-system. In some embodiments, the touch point itself does not record the TraceID, and the touch point records the TraceID when the service initiation system initiates a service. The touch point can be located between heterogeneous systems, and when the touch point is triggered, the heterogeneous systems can exchange information, data, and the like with each other.

[0056] In some embodiments, after the touch point obtains the identifier TraceID of the current service chain of the service initiation system, the initial service node is generated, a certain service in the service initiation system is invoked according to the node information of the initial service node, and the corresponding service is called to the downstream in stages, and the identifier S-TraceID of the global service chain does not change in the whole invocation process.

[0057] In some embodiments, since the service is initiated by the service initiation system, the TraceIDs of the current service chain of each service node in the service initiation system are the same, and are the identifier of the service initiation system, i.e., the identifier of the global service chain. In another system different from the service initiation system, the identifier of the current service chain is determined based on the upstream service node of each service node in the system. When a certain service node is called, the node information of the service node is set, i.e., the identifier of the current service node is set as the SpanID, the identifier of the service node calling the service node is set as the TraceID, and the parent service node of the service node is set as the P-SpanID. In implementation, if the current service node has a parent service node in the system, the identifier of the service node calling the service node is set as the P-SpanID; if the current service node does not have a parent service node in the system, the P-SpanID can be set as NULL.

[0058] A directed graph is a graph with directionality, which is composed of a set of vertices and a set of directed edges, each directed edge connecting an ordered pair of vertices. After obtaining the service call data corresponding to the target business, for the service initiation system, the directed graph corresponding to the service initiation system can be constructed according to the SpanID and the P-SpanID in the node information of each service node; for the non-service initiation system, the directed graph corresponding to the non-service initiation system can be constructed according to the TraceID and the P-SpanID in the node information of each service node, and finally, the directed graph of the cross-system is obtained by using the directed graph corresponding to the service initiation system and the directed graph corresponding to the non-service initiation system. In some embodiments, the directed graph can be a directed acyclic graph (DAG graph), i.e., a loop-free directed graph.

[0059] In some embodiments, the step S11 includes steps S111 to S112, wherein:

[0060] In step S111, the service call data is parsed to obtain a set of service call records; wherein the set of service call records includes at least one service call record, and the service call record represents the execution process of the corresponding service.

[0061] Here, the service call data includes node information of each service node, and at least one service call record can be obtained according to the node information of each service node. The service call record can include, but is not limited to, a calling service node, a called service node, and the like. In implementation, the P-SpanID or the TraceID in the node information of the service node can be used to obtain a parent service node of the service node, the parent service node is taken as the calling service node, and the service node is taken as the called service node. For example, for a plurality of service nodes in the service initiation system, the parent service node can be obtained according to the P-SpanID in the node information of the service node; for a plurality of service nodes in the non-service initiation system, if the P-SpanID in the node information of the service node is empty, the parent service node can be obtained according to the TraceID in the node information of the service node.

[0062] In step S112, the directed graph is constructed based on the at least one service call record.

[0063] Here, the two service nodes in each service call record are taken as two nodes of the directed graph, and the directed connection line between the calling service node and the called service node is taken as a connection edge, so as to construct the directed graph.

[0064] In this way, the service call data is parsed to obtain each service call record, and the directed graph is constructed according to the service call record, so that the accuracy of the directed graph is improved.

[0065] In step S12, the abnormal service is determined from the services corresponding to each service chain based on the weight information of each service node in the directed graph.

[0066] Here, different service nodes can have different weight information, and the weight information can be determined by any suitable manner in implementation, for example, a preset ranking algorithm.

[0067] In some embodiments, each service node can be ranked according to the weight information, and the earlier the ranking is, the higher the possibility that the service node is an abnormal service node is. Therefore, the abnormal service can be determined by investigating a plurality of services corresponding to the abnormal service node.

[0068] In the embodiment of the present application, first, the service calling data is generated according to the identifier of the global service chain, so that all communication service nodes contained in the target service in the system or across the system can be accurately obtained, a unified tracking standard is determined, so that the current service can be identified in the long chain across the system; second, a directed graph is constructed according to the service calling data, so as to accurately show the service flow process; finally, the abnormal service that may occur is found according to the weight information of each service node, without differentiating all nodes and checking them one by one, the processing time for positioning the abnormal service is shortened, and the positioning result of the abnormal service is more accurate and efficient.

[0069] Figure 2 Flowchart of the positioning method of abnormal service provided in the embodiment of the present application Figure 2 As shown in Figure 2 The method at least includes the following steps S21 to S24, wherein:

[0070] Step S21, based on the service calling data corresponding to the target service, a directed graph is constructed; wherein the directed graph includes at least one service chain, the service chain represents the calling relationship between two service nodes associated with the corresponding service, the calling relationship is determined based on the node information of the corresponding two service nodes, the node information of the service node includes the identifier of the global service chain, the identifier of the current service chain and the identifier of the service node, the identifier of the global service chain is used to generate the service calling data, and the identifier of the current service chain includes one of the following: the identifier of the global service chain and the identifier of the service node calling the service node.

[0071] Here, the above step S21 corresponds to the aforementioned step S11, and in implementation, the specific embodiments of the aforementioned step S11 can be referred to.

[0072] Step S22, for each service node in the directed graph, the weight information of the service node is determined.

[0073] Here, the directed graph can include a plurality of service nodes, and in implementation, the weight information of each service node can be determined by any suitable manner, for example, load balancer configuration, service registry, custom monitoring and management, PageRank algorithm. The load balancer is a component for distributing traffic to downstream service nodes, and in the configuration of the load balancer, the weight of each service node can be set, and these weight values can be set according to the performance of the server, resource utilization or other factors. The service registry can maintain the weight information of the service node and other data related to the service, and the client can obtain the weight information of the service node from the service registry. The custom monitoring and management mechanism involves custom scripts, monitoring tools and management interfaces for manually or automatically managing node weights to obtain the weight information of the service node. The PageRank algorithm is an algorithm for calculating the importance of Internet web pages. PageRank is a function defined on the set of web pages, which gives a positive real number to each web page, representing the importance of the web page, and constitutes a vector as a whole. The higher the PageRank value, the more important the web page, and it may be ranked in the front in Internet search sorting. Through the PageRank algorithm, the weight information of each service node in the directed graph can be calculated.

[0074] Step S23, determining a target service node from at least one service node based on the weight information of each service node.

[0075] Here, the number of target service nodes can be at least one, and the target service node can be a service node that can have an abnormal service. In implementation, the weight information of the target service node can be the weight information of the service node that meets the preset condition. The preset condition can include but is not limited to the maximum, the closest to the abnormal threshold, greater than the abnormal threshold and other suitable conditions.

[0076] Step S24, determining an abnormal service from the services corresponding to at least one service chain associated with the target service node.

[0077] Here, the target service node can be associated with at least one service chain, each service chain corresponding to a service call respectively. The number of the abnormal services can be at least one. In some embodiments, each service corresponding to each service chain can be regarded as an abnormal service. In some embodiments, weight information of each service chain can be determined, the target service chain can be determined from each service chain according to the weight information of each service chain, and the abnormal service chain can be determined according to the target service chain, and the service corresponding to the abnormal service chain can be regarded as an abnormal service. In implementation, the determination manner of the weight information of the service chain can be any suitable manner, for example, similar to the determination manner of the weight information of the service node. The determination manner of the target service chain can be similar to the determination manner of the target service node, that is, the service chain satisfying the condition is regarded as the target service chain, and the condition can be maximum, closest to the threshold value, or greater than the threshold value, etc. In this way, the target service chain is determined through the weight information of each service chain, so as to narrow the range of investigation, reduce the data processing amount, and improve the positioning efficiency of the abnormal service.

[0078] In the embodiments of the present application, on the one hand, the target service node is determined according to the weight information of each service node, so as to improve the accuracy of the target service node; on the other hand, the abnormal service is determined from the services associated with the target service node, without determining the abnormal service from all services associated with all service nodes, so as to narrow the positioning range, shorten the processing time, and improve the accuracy and efficiency of the positioning result.

[0079] In some embodiments, the step S22 of “determining the weight information of the service node” includes steps S221 to S223, wherein:

[0080] In step S221, based on the directed graph, a parent node set of the service node and an associated node set corresponding to each parent node in the parent node set are obtained.

[0081] Here, the parent node set can include at least one parent node. The associated node set includes at least one node associated with the parent node, for example, all downstream nodes. In implementation, the directed graph is parsed to obtain a plurality of edges connected to the service node, and at least one parent node of the service node and an associated node set corresponding to each parent node can be obtained according to the direction of the plurality of edges.

[0082] Step S222, for each parent node in the parent node set, determining a first total call duration corresponding to the service node based on the system weight value corresponding to the service node, the first call duration between the service node and the parent node, and the weight information of the parent node; determining a second total call duration corresponding to the parent node based on the second call duration between each associated node in the associated node set corresponding to the parent node and the parent node, and the system weight value; and determining an occupancy ratio based on the first total call duration and the second total call duration.

[0083] Here, the system weight value is the system weight value of the system in which the service node is located, and the system weight value represents the importance of the system. In the process of cross-system business, each system has a corresponding system weight value.

[0084] The determination method of the first total call duration can include but is not limited to a first product, weighting, taking logarithm, or taking a pointer of the first product. The first product refers to the product of the system weight value, the first call duration, and the weight information of the parent node. For example, the first product is taken as the first total call duration.

[0085] In some embodiments, the i-th service node v i The corresponding first total call duration T i1 That is:

[0086] T i1 =D1(1-1);

[0087] Where D1 is the first product.

[0088] The determination method of the second total call duration can include but is not limited to a third total call duration corresponding to an associated node, a sum value between the third total call duration corresponding to each associated node, and weighting of the sum value. The third total call duration corresponding to an associated node is determined based on the second call duration between the associated node and the parent node, and the system weight value. For example, the sum value between all third total call durations is taken as the second total call duration.

[0089] In some embodiments, the parent node v j The corresponding second total call duration T j2 That is:

[0090]

[0091] Where T k3 is the third total call duration corresponding to the k-th associated node v k .

[0092] The determination manner of the proportion ratio can include but is not limited to a ratio between the first total calling duration and the second total calling duration, a weighting / taking logarithm / taking index of the ratio, etc. For example, the ratio between the first total calling duration and the second total calling duration is taken as the proportion ratio.

[0093] In some embodiments, the proportion ratio of the jth parent node v j may be determined by the following formula (1-3): j that is,

[0094]

[0095] wherein, T j2 is the second total calling duration corresponding to the parent node v j , and T i1 is the first total calling duration corresponding to the ith service node v i .

[0096] In step S223, the weight information of the service node is determined based on each of the proportion ratios.

[0097] Here, the determination manner of the weight information can include but is not limited to a certain proportion ratio, a weighting / taking logarithm / taking index of a certain proportion ratio, a sum value between all proportion ratios, a weighting / taking logarithm / taking index of the sum value, etc. For example, the sum value between all proportion ratios is taken as the weight information.

[0098] In some embodiments, the weight information of the service node v i may be determined by the following formula (1-4):

[0099]

[0100] wherein, v j is a parent node of the service node v i , M(v i ) is a parent node set of the service node v i , and B j is the proportion ratio of the jth parent node v j .

[0101] In the embodiments of the present application, the weight information of the service node is determined according to the system weight value corresponding to the service node, the weight information of the parent node, and the calling duration between each service node, which improves the accuracy of the weight information of the service node, and thus improves the accuracy of the positioning result of the abnormal service.

[0102] In some embodiments, the step S222 of "determining the second total calling duration corresponding to the parent node based on the second calling duration between each of the associated nodes and the parent node in the associated node set corresponding to the parent node and the system weight value" comprises steps S2221-S2222, wherein:

[0103] In step S2221, for each associated node, a third total calling duration corresponding to the associated node is determined based on the second calling duration between the associated node and the parent node and the system weight value.

[0104] Here, the associated node is a downstream node of the parent node. The determination of the third total calling duration can include but is not limited to the fourth product, weighting of the fourth product, taking logarithm of the fourth product, taking a pointer of the fourth product, etc. For example, the fourth product is taken as the third total calling duration.

[0105] In some embodiments, the step S2221 comprises steps S251-S252, wherein:

[0106] In step S251, a fourth product between the second calling duration and the system weight value is determined.

[0107] Here, the fourth product is a product between the second calling duration and the system weight value.

[0108] In step S252, the third total calling duration corresponding to the associated node is determined based on the fourth product.

[0109] Here, the determination of the third total calling duration can include but is not limited to the fourth product, weighting of the fourth product, taking logarithm of the fourth product, taking a pointer of the fourth product, etc. For example, the fourth product is taken as the third total calling duration.

[0110] In this way, the third total calling duration corresponding to the associated node is determined based on the second calling duration and the system weight value, which improves the accuracy of the third total calling duration and thus improves the accuracy of the second total calling duration.

[0111] In some embodiments, the third total calling duration T k of the kth associated node v k3 may be determined by the following formula (1-5):

[0112] T k3 = P x *w jk (1-5);

[0113] wherein P x is the system weight value, and w jka second invocation duration between the parent node v j and the associated node v k .

[0114] At step S2222, a second total invocation duration corresponding to the parent node is determined based on each of the third total invocation durations.

[0115] Here, the determination manner of the second total invocation duration can include but is not limited to a certain third total invocation duration, a weighted / logarithm / pointer of a certain third total invocation duration, a sum value between all third total invocation durations, a weighted / logarithm / pointer of the sum value, etc. For example, the sum value between all third total invocation durations is taken as the second total invocation duration.

[0116] In the embodiments of the present application, the second total invocation duration is determined through the system weight value and the second invocation duration between each associated node and the parent node, which improves the accuracy of the second total invocation duration, thereby improving the accuracy of the weight information of the service node, and further improving the accuracy of the positioning result of the abnormal service.

[0117] In some embodiments, the step S222 of "determining the first total invocation duration corresponding to the service node based on the system weight value corresponding to the service node, the first invocation duration between the service node and the parent node, and the weight information of the parent node" includes steps S261 to S263, wherein:

[0118] At step S261, the system weight value is determined based on a system peak ranking value and a system reference ranking value.

[0119] Here, the system peak ranking value (Transactions Per Second, TPS) refers to the number of transactions per second, which is a measurement unit of software test results. One transaction refers to a process in which a client sends a request to a server and the server responds. The client starts timing when sending the request and stops timing when receiving the server response, so as to calculate the used time and the number of completed transactions. The system reference ranking value represents the total number of references of all service nodes in a system within a unit time.

[0120] The determination manner of the system weight value can include but is not limited to a ratio between the first sum value and the system total number, a weighted / logarithm / pointer of the ratio, a second sum value between the ratio and a preset value, a weighted / logarithm / pointer of the second sum value, etc. The preset value can be any suitable value, for example, 1, 0.5, etc.

[0121] The system total is determined based on the system peak ranking value and the system reference ranking value. In some embodiments, the system total can include, but is not limited to, the system peak ranking value, the system reference ranking value, the mean / variance / mean square deviation between the system peak ranking value and the system reference ranking value, etc. For example, the system total is the larger value between the system peak ranking value and the system reference ranking value.

[0122] The first sum is a sum between a second product and a third product, the second product being determined based on the system peak ranking value and a first weighting coefficient, and the third product being determined based on the system reference ranking value and a second weighting coefficient.

[0123] In some embodiments, the second product can be a product between the system peak ranking value and the first weighting coefficient, a weighting / logarithm / pointer taking, etc. For example, the product between the system peak ranking value and the first weighting coefficient is taken as the second product.

[0124] In some embodiments, the third product can be a product between the system reference ranking value and the second weighting coefficient, a weighting / logarithm / pointer taking, etc. For example, the product between the system reference ranking value and the second weighting coefficient is taken as the third product.

[0125] In some embodiments, the system weight value can be pre-set, real-time determined, or updated according to an update period.

[0126] Step S262, determining a first product between the system weight value, the first call duration, and the weight information of the parent node.

[0127] Here, the first product can be a product between the system weight value, the first call duration, and the weight information of the parent node. In some embodiments, the first product D1 can be represented by the following formula (1-6), i.e.:

[0128] D1=P x *w ji *PR(v j )(1-6);

[0129] Wherein, P x is the system weight value, w ji is the first call duration between the parent node v j and the service node v i , and PR(v j ) is the weight information of the parent node v j .

[0130] Step S263, determining a first total call duration corresponding to the service node based on the first product.

[0131] Here, the determination manner of the first total call duration can include but is not limited to the first product, weighting of the first product, logarithm of the first product, and the like. For example, the first product is taken as the first total call duration.

[0132] In the embodiments of the present application, the first total call duration is determined according to the system peak ranking value, the system reference ranking value, and the weight information of the parent node, which improves the accuracy of the first total call duration, thereby improving the accuracy of the weight information of the service node, and further improving the accuracy of the positioning result of the abnormal service.

[0133] In some embodiments, the step S261 includes steps S2611 to S2613, wherein:

[0134] In step S2611, a second product between the system peak ranking value and a first weighting coefficient is determined.

[0135] Here, the first weighting coefficient can be a weight value corresponding to the system peak ranking value. In implementation, the first weighting coefficient can be pre-set or determined in real time according to the system peak ranking value. The second product can be a product of the system peak ranking value and the first weighting coefficient.

[0136] In some embodiments, the second product D2 can be determined by the following formula (1-7), i.e.:

[0137] D2=A*Q1(1-7);

[0138] Wherein, A is the system peak ranking value, and Q1 is the first weighting coefficient.

[0139] In step S2612, a third product between the system reference ranking value and a second weighting coefficient is determined.

[0140] Here, the second weighting coefficient can be a weight value corresponding to the system reference ranking value. In implementation, the second weighting coefficient can be pre-set or determined in real time according to the system peak ranking value. The third product can be a product of the system peak ranking value and the second weighting coefficient.

[0141] In some embodiments, a sum between the second weighting coefficient and the first weighting coefficient is not greater than 1.

[0142] In some embodiments, the third product D3 can be determined by the following formula (1-8), i.e.:

[0143] D3=C*Q2(1-8);

[0144] Wherein, C is the system reference ranking value, and Q2 is the second weighting coefficient.

[0145] Step S2613, determining the system weight value based on the second product and the third product.

[0146] Here, the determination manner of the system weight value can include but is not limited to a ratio between a first sum value and a system total number, weighting / taking logarithm / taking index of the ratio, a second sum value between the ratio and a preset value, weighting / taking logarithm / taking index of the second sum value, etc. The preset value can be any suitable value, for example, 1, 0.5, etc. The first sum value is a sum value between the second product and the third product. The system total number is determined based on the system peak ranking value and the system reference ranking value.

[0147] In the embodiments of the present application, the system weight value is determined according to the system peak ranking value, the first weighting coefficient, the system reference ranking value and the second weighting coefficient, which improves the accuracy of the system weight value, thereby improving the accuracy of the first total call duration.

[0148] In some embodiments, the step S263 includes steps S2631 to S2633, wherein:

[0149] Step S2631, determining a first sum value between the second product and the third product.

[0150] Here, the first sum value can be a sum between the second product and the third product. In some embodiments, the first sum value H1 can be represented by the following formula (1-9), i.e.:

[0151] H1=D2+D3(1-9);

[0152] Wherein, D2 is the second product, and D3 is the third product.

[0153] Step S2632, determining a ratio between the first sum value and a system total number; wherein the system total number is determined based on the system peak ranking value and the system reference ranking value.

[0154] Here, the determination manner of the system total number can include but is not limited to the system peak ranking value, the system reference ranking value, a mean value / difference / variance between the system peak ranking value and the system reference ranking value, etc. For example, the system total number can be a larger value between the system peak ranking value and the system reference ranking value.

[0155] The ratio can be a ratio between the first sum value and the system total number. In some embodiments, the ratio F can be represented by the following formula (1-10), i.e.:

[0156]

[0157] wherein H1 is a first sum, max(A, C) is a maximum of the system peak ranking value A and the system reference ranking value C.

[0158] At step S2633, the system weight value is determined based on the ratio.

[0159] Here, the system weight value can be determined in a manner including but not limited to the ratio, a weighted / logarithm / indicator of the ratio, a second sum between the ratio and a preset value, a weighted / logarithm / indicator of the second sum, etc. The preset value can be any suitable value, such as 1, 0.5, etc.

[0160] In some embodiments, the system weight value P can be represented by the following formula (1-11): x i.e.

[0161] P x = 1 + F (1-11);

[0162] wherein F is a ratio between the first sum and the total number of systems.

[0163] In the embodiments of the present application, the system weight value is determined according to the total number of systems, which improves the accuracy of the system weight value, and thus improves the accuracy of the first total call duration.

[0164] In some embodiments, the step S22 of determining the weight information of the service node comprises step S271, wherein:

[0165] At step S271, the weight information of the service node is determined by using the optimized PageRank algorithm.

[0166] Here, the weight information PR(v i ) of the service node v i may be represented by the following formula (1-12), i.e.

[0167]

[0168] wherein v j is a parent node of the service node v i , M(v i ) is a parent node set of the service node v i , v k is an associated node of the parent node v j , out(v j ) is an associated node set of the parent node v j , w ji is a first call duration between the parent node v j and the service node v i , and wjk is a second call duration between the parent node v j and the service node v k , P x is a corresponding system weight value of the service node v i , PR(v j ) is weight information of the parent node v j .

[0169] In the embodiments of the present application, the system weight value is added in the determination of the weight information of the service node, the existing PageRank algorithm is optimized, and the accuracy and positioning efficiency of the abnormal service positioning are improved.

[0170] The application of the service abnormality positioning method provided in the embodiments of the present application in actual scenarios is described below, taking zipkin as an example.

[0171] In the related art, the distributed call chain tracking analysis technology based on the PageRank algorithm has been widely used in cloud native micro-service systems. However, with the increase of business complexity, the system is further specialized in the vertical and horizontal fields, the system evolves in the direction of smaller service granularity, more blurred boundaries, and more diversified access points. The existing call chain technical solution lacks unified standards in tracking, lacks collaborative analysis capabilities of end call chains, and has weak cross-system adaptation capabilities in abnormal analysis.

[0172] The embodiments of the present application provide a service abnormality positioning method, which extends the zipkin protocol, adds the global service chain identifier S-TraceID as the global unique identifier of the cross-system, and generates the global service chain identifier S-TraceID by the service initiation system. When the cross-system is transmitted, the value must be ensured to be globally unique. According to the global service chain identifier S-TraceID, the service call data is generated, the all communication service nodes contained in the target business in the system or the cross-system can be accurately obtained, the unified tracking standard is determined, and the current service can be identified in the long chain of the cross-system. By using the association relationship between the TraceID and the SpanID of the current system, a complete call chain under the heterogeneous cross-system can be formed. At the same time, according to the weight information of each service node, the abnormal service that may occur is found, all nodes do not need to be checked one by one without difference, the processing duration of positioning the abnormal service is shortened, and the positioning result of the abnormal service is more accurate and efficient.

[0173] The improved zipkin protocol can include the following key fields:

[0174] TraceID: The unique code defined in the process of a complete service call request in a single system. When cross-system calls are made, the last node SpanID of the previous system is filled in. When calls are made within the system, the default is the TraceID within the system.

[0175] Span: The process body in the call chain, which can be a called business node, a functional module, or a service.

[0176] SpanID: The span number in a single call chain, which is globally unique.

[0177] SpanName: The name of the SPAN, which remains unchanged in the call. The front-end generates rules for the current page combined with the operation DOM element. The server-side generates rules for the class full path combined with the method signature.

[0178] P-SpanID: The parent call node of the current SPAN in the call chain. If the current SPAN is the entry node, P-SpanID is empty.

[0179] Attributes: Additional business information on the span node, which can include front-end information, back-end information, etc. The front-end information can include but is not limited to client information, user information, operator information, business type, page trigger event, etc. The back-end information can include but is not limited to client information, user information, operator information, business type, etc.

[0180] SpanContext: The context of the service node, which stores information passed to other successor SPANs. In implementation, the context of the service node can include TraceID, CurTraceID, SpanID, baggage-Items, etc. Baggage-Items is composed of key-value form key-value pairs, which stores information needed for business and non-business transmission.

[0181] S-TraceID: Global call chain identifier, from which the original global TraceID can be obtained when cross-system calls are made.

[0182] Figure 3A As shown in FIG. 3, the method includes steps S31-S36, wherein: Figure 3A

[0183] Step S31: The service call data of the target business is parsed to obtain multiple service call records.

[0184] ​Here, the service invocation data includes node information of each service node, which can include but is not limited to SpanName, P-SpanID, TraceID, SpanID and S-TraceID.

[0185] Figure 3B A schematic diagram of node information of a service node provided by an embodiment of the present application is shown in Figure 3B , wherein:

[0186] Taking the contact 31 as a starting point, the contact 31 generates the initial service node Client after obtaining the identification TraceID of the current service chain of the system 1 (corresponding to the service initiation system). In the execution process of the target service, the Client calls the service node 321 of the system 1, the service node 321 calls the service node 322 of the system 1 and the service node 331 of the system 2 (corresponding to the aforementioned non-service initiation system) respectively, the service node 322 calls the service node 323 of the system 1, the service node 332 of the system 2 and the service node 333 of the system 2 respectively, and then:

[0187] (1) For the Client, since the system 1 is the service initiation system, the S-TraceID and the TraceID in the node information of the Client are both the identification T1 of the system 1; the SpanName is the name ClientA of the Client; the SpanID is the identification Client0 of the Client; since the Client is the initial service node, the P-SpanID is NULL;

[0188] (2) For the service node 321, since the service node 321 is located in the system 1, the S-TraceID and the TraceID in the node information of the service node 321 are both the identification T1 of the system 1; the SpanName is the name A of the service node 321; the SpanID is the identification A1 of the service node 321; the service node 321 is called by the Client, so the P-SpanID is the identification Client0 of the Client;

[0189] (3) For the service node 322, since the service node 322 is located in the system 1, the S-TraceID and the TraceID in the node information of the service node 322 are both the identification T1 of the system 1; the SpanName is the name B of the service node 322; the SpanID is the identification B1 of the service node 322; the service node 322 is called by the service node 321 in the system 1, so the P-SpanID is the identification A1 of the service node 321;

[0190] (4) For the service node 323, since the service node 323 is located in the system 1, the S-TraceID and the TraceID in the node information of the service node 323 are both the identifier T1 of the system 1; the SpanName is the name C of the service node 323; the SpanID is the identifier C1 of the service node 323; the service node 323 is called by the service node 322 in the system 1, and thus the P-SpanID is the identifier B1 of the service node 322;

[0191] (5) For the service node 331, since the service node 331 is located in the system 2, the S-TraceID in the node information of the service node 331 is the identifier T1 of the system 1; since the service node 331 is called by the service node 321 in the system 1, the TraceID is the identifier A1 of the service node 321; the SpanName is the name F of the service node 331; the SpanID is the identifier F1 of the service node 331; the service node 331 does not have a parent node, and thus the P-SpanID is NULL;

[0192] (6) For the service node 332, since the service node 332 is located in the system 2, the S-TraceID in the node information of the service node 332 is the identifier T1 of the system 1; since the service node 332 is called by the service node 322 in the system 1, the TraceID is the identifier B1 of the service node 322; the SpanName is the name D of the service node 332; the SpanID is the identifier D1 of the service node 332; the service node 332 does not have a parent node, and thus the P-SpanID is NULL;

[0193] (7) For the service node 333, since the service node 333 is located in the system 2, the S-TraceID in the node information of the service node 333 is the identifier T1 of the system 1; since the service node 333 is called by the service node 322 in the system 1, the TraceID is the identifier B1 of the service node 322; the SpanName is the name E of the service node 333; the SpanID is the identifier E1 of the service node 333; the service node 333 does not have a parent node, and thus the P-SpanID is NULL.

[0194] In step S32, a directed graph is constructed according to the plurality of service call records.

[0195] Here, the directed graph can involve at least two systems.

[0196] Figure 3C A schematic diagram of a directed graph provided by an embodiment of the present application is shown in FIG. 2. Figure 3CAs shown, the directed graph includes a system 1 (corresponding to the aforementioned service initiation system), a heterogeneous system 2 (i.e., a non-service initiation system), and a Client, wherein the target service is from the Client to a service node 321 in the system 1; from the service node 321 in the system 1 to a service node 322 in the system 1, and from the service node 321 in the system 1 to a service node 331 in the heterogeneous system 2; from the service node 322 in the system 1 to a service node 323 in the system 1, from the service node 322 in the system 1 to a service node 332 in the heterogeneous system 2, and from the service node 322 in the system 1 to a service node 333 in the heterogeneous system 2, respectively.

[0197] In step S33, for each service node in the directed graph, a parent node set of the service node and an associated node set corresponding to each parent node in the parent node set are determined.

[0198] In step S34, using the optimized PageRank algorithm, the weight information of each service node is determined based on the parent node set of each service node and the associated node set corresponding to each parent node.

[0199] Here, the system weight value P is added to the PageRank algorithm. x , the adaptability of the abnormality of the cross-system service can be quickly located. x The system weight value P is added to the PageRank algorithm. x The system weight value P is added to the PageRank algorithm. x In some embodiments, the weight coefficient is updated every half year, and is used as a constant in the improved convergence function, where x is the weight number of the system. Through the system weight value P, the accuracy of abnormality positioning in a heterogeneous situation can be significantly improved.

[0200] Table 1 is the accuracy rate of the positioning result of the unoptimized PageRank algorithm and the optimized PageRank algorithm under different numbers of service nodes. As can be seen from Table 1, for the optimized PageRank algorithm, the more the number of service nodes, the higher the positioning accuracy of the abnormal service; for the same number of service nodes, the positioning accuracy of the optimized PageRank algorithm is higher than that of the unoptimized PageRank algorithm.

[0201] Table 1 is the accuracy rate of the positioning result of the unoptimized PageRank algorithm and the optimized PageRank algorithm

[0202]

[0203] Step S35, determining a target service node from the plurality of service nodes according to the weight information of each service node;

[0204] Step S36, determining the abnormal service from the service corresponding to the at least one service chain associated with the target service node.

[0205] Based on the above embodiment, the embodiment of the application provides a service abnormality positioning device, Figure 4 A schematic diagram of a service abnormality positioning device provided by the embodiment of the application is shown in Figure 4 As shown in the figure, the service abnormality positioning device 400 includes a construction module 401 and a determination module 402, wherein:

[0206] The construction module 401 is configured to construct a directed graph based on service call data corresponding to a target service; wherein the directed graph includes at least one service chain, the service chain represents the calling relationship between two service nodes associated with the corresponding service, the calling relationship is determined based on the node information of the corresponding two service nodes, and the node information of the service node includes the identifier of the global service chain, the identifier of the current service chain, and the identifier of the service node. The identifier of the global service chain is used to generate the service call data, and the identifier of the current service chain includes one of the following: the identifier of the global service chain and the identifier of the service node calling the service node.

[0207] The determination module 402 is configured to determine an abnormal service from the service corresponding to each service chain in the directed graph based on the weight information of each service node in the directed graph.

[0208] In some embodiments, the construction module 401 is further configured to parse the service call data to obtain a set of service call records; wherein the set of service call records includes at least one service call record, and the service call record represents the execution process of the corresponding service; and construct the directed graph based on the at least one service call record.

[0209] In some embodiments, the determining module 402 is further configured to: determine weight information of each service node in the directed graph; determine a target service node from at least one service node based on the weight information of the service nodes; and determine the abnormal service from services corresponding to at least one service chain associated with the target service node.

[0210] In some embodiments, the determining module 402 is further configured to: obtain a parent node set of the service node and an associated node set corresponding to each parent node in the parent node set based on the directed graph; determine a first total call duration corresponding to the service node based on a system weight value, a first call duration between the service node and each parent node in the parent node set, and weight information of the parent nodes; determine a second total call duration corresponding to each parent node in the parent node set based on a second call duration between each associated node in the associated node set corresponding to the parent node and the parent node, and the system weight value; and determine weight information of the service node based on each of the ratios.

[0211] In some embodiments, the determining module 402 is further configured to: determine the system weight value based on a system peak ranking value and a system reference ranking value; determine a first product of the system weight value, the first call duration, and the weight information of the parent node; and determine the first total call duration corresponding to the service node based on the first product.

[0212] In some embodiments, the determining module 402 is further configured to: determine a second product of the system peak ranking value and a first weighting coefficient; determine a third product of the system reference ranking value and a second weighting coefficient; and determine the system weight value based on the second product and the third product.

[0213] In some embodiments, the determining module 402 is further configured to: determine a first sum of the second product and the third product; determine a ratio between the first sum and a system total number; wherein the system total number is determined based on the system peak ranking value and the system reference ranking value; and determine the system weight value based on the ratio.

[0214] In some embodiments, the determining module 402 is further configured to: for each associated node, determine a third total call duration corresponding to the associated node based on the second call duration between the associated node and the parent node and the system weight value; and determine a second total call duration corresponding to the parent node based on each third total call duration.

[0215] In some embodiments, the determining module 402 is further configured to: determine a fourth product between the second call duration and the system weight value; and determine the third total call duration corresponding to the associated node based on the fourth product.

[0216] In some embodiments, the determining module 402 is further configured to: determine the weight information of the service node by using an optimized PageRank algorithm, wherein the weight information PR(v i ) of the service node v i is:

[0217]

[0218] wherein v j is a parent node of the service node v i , M(v i ) is a parent node set of the service node v i , v k is an associated node of the parent node v j , out(v j ) is an associated node set of the parent node v j , w ji is the first call duration between the parent node v j and the service node v i , w jk is the second call duration between the parent node v j and the service node v k , P x is the system weight value, and PR(v j ) is the weight information of the parent node v j .

[0219] The above device embodiments are similar to the descriptions of the above method embodiments, and have similar beneficial effects as the method embodiments. For technical details not disclosed in the device embodiments of the present application, please refer to the description of the method embodiments of the present application.

[0220] It should be noted that, in the embodiments of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application can be embodied in the form of a software product in essence or the part that contributes to the related art, and the software product is stored in a storage medium, including a number of instructions to make an electronic device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the methods described in the embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk, and various media that can store program codes. Thus, the embodiments of the present application are not limited to any specific hardware and software combination.

[0221] The embodiments of the present application provide an electronic device, including a processor and a memory, the memory stores a computer program capable of running on the processor, and the processor implements the steps in the above method when executing the computer program.

[0222] The embodiments of the present application provide a storage medium having a computer program stored thereon, and the computer program is executed by a processor to implement the steps in the above method. The storage medium can be transitory or non-transitory.

[0223] It should be noted that, Figure 5 A hardware entity of an electronic device in the embodiments of the present application is shown in FIG. 5, which includes a processor 501, a communication interface 502 and a memory 503, wherein: Figure 5

[0224] The processor 501 generally controls the overall operation of the electronic device 500.

[0225] The communication interface 502 can enable the electronic device to communicate with other terminals or servers through a network.

[0226] The memory 503 is configured to store instructions and applications executable by the processor 501, and can also cache data (for example, image data, audio data, voice communication data and video communication data) to be processed by the processor 501 and modules in the electronic device 500, which can be implemented by a flash (FLASH) or a random access memory (RAM). The processor 501, the communication interface 502 and the memory 503 can transmit data through a bus 504.

[0227] ​It should be noted that the description of the electronic device and storage medium embodiments above is similar to the description of the method embodiments above, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the electronic device and storage medium embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.

[0228] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that the size of the sequence number of each step / process in various embodiments of the present application does not mean the order of execution, and the execution order of each step / process should be determined according to its function and inherent logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The sequence number of the above embodiments of the present application is only for description, not representing the advantages and disadvantages of the embodiments.

[0229] It should be noted that in this document, the terms "comprise", "contain" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprises a" does not exclude the presence of additional identical elements in the process, method, article or device including the element.

[0230] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division, and actual implementation can have another division manner, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed components can be through some interface, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.

[0231] The units described above as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units; they can be located in one place or distributed on multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0232] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be separately as a unit, or two or more units can be integrated in one unit; the integrated unit can be realized in the form of hardware or in the form of hardware plus software function unit.

[0233] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium, and the program executes the steps including the above-mentioned method embodiments when executed; and the foregoing storage medium includes mobile storage equipment, read only memory (Read Only Memory, ROM), magnetic disc or optical disc and various storage program codes.

[0234] Alternatively, the integrated unit of the present application, if realized in the form of software function module and sold or used as an independent product, can also be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application can be embodied in the form of software product, and the computer software product is stored in a storage medium, including a plurality of instructions for making a computer device (which can be a personal computer, a server, or a network device, etc.) execute all or part of the method described in each embodiment of the present application. And the foregoing storage medium includes mobile storage equipment, ROM, magnetic disc or optical disc and various storage program codes.

[0235] The above is only the embodiment of the present application, but the protection scope of the present application is not limited to this, any person skilled in the art can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application.

Claims

1. A method for locating abnormal services, characterized in that, The method includes: Based on the service call data corresponding to the target business, a directed graph is constructed; wherein, the directed graph includes at least one service chain, the service chain represents the call relationship between two service nodes associated with the corresponding service, the call relationship is determined based on the node information of the two corresponding service nodes, the node information of the service node includes the identifier of the global service chain, the identifier of the current service chain, and the identifier of the service node, the identifier of the global service chain is used to generate the service call data, and the identifier of the current service chain includes one of the following: the identifier of the global service chain, the identifier of the service node that calls the service node; For each service node in the directed graph, determine the weight information of the service node; based on the weight information of each service node in the directed graph, identify abnormal services from the services corresponding to each service chain. The determination of the weight information of the service node includes: Based on the directed graph, obtain the set of parent nodes of the service node and the set of associated nodes corresponding to each parent node in the set of parent nodes; For each parent node in the set of parent nodes, a first total call duration is determined based on the system weight value corresponding to the service node, the first call duration between the service node and the parent node, and the weight information of the parent node. A second total call duration is determined based on the second call duration between each associated node in the set of associated nodes corresponding to the parent node and the parent node, and the system weight value. A percentage is determined based on the first total call duration and the second total call duration. The weight information of the service node is determined based on each of the aforementioned proportions.

2. The method according to claim 1, characterized in that, The construction of a directed graph based on the service call data corresponding to the target business includes: The service call data is parsed to obtain a service call record set; wherein, the service call record set includes at least one service call record, and the service call record represents the execution process of the corresponding service; Based on the at least one service call record, construct the directed graph.

3. The method according to claim 1, characterized in that, The method further includes: Based on the weight information of each service node, the target service node is determined from at least one service node; The abnormal service is determined from the services corresponding to at least one service chain associated with the target service node.

4. The method according to claim 1, characterized in that, The determination of the first total call duration corresponding to the service node based on the system weight value corresponding to the service node, the first call duration between the service node and the parent node, and the weight information of the parent node includes: The system weight value is determined based on the system peak ranking value and the system reference ranking value; Determine the first product between the system weight value, the first call duration, and the weight information of the parent node; Based on the first product, the first total call duration corresponding to the service node is determined.

5. The method according to claim 4, characterized in that, The determination of the system weight value based on the system peak ranking value and the system reference ranking value includes: Determine the second product between the system's peak ranking value and the first weighting coefficient; Determine the third product between the system's citation ranking value and the second weighting coefficient; The system weight value is determined based on the second product and the third product.

6. The method according to claim 5, characterized in that, Determining the system weight value based on the second product and the third product includes: Determine the first sum value between the second product and the third product; Determine the ratio between the first sum and the total number of systems; wherein the total number of systems is determined based on the system peak ranking value and the system reference ranking value; The system weight value is determined based on the ratio.

7. The method according to claim 1, characterized in that, The determination of the second total call duration corresponding to the parent node based on the second call duration between each associated node in the associated node set corresponding to the parent node and the parent node, and the system weight value, includes: For each associated node, a third total call duration is determined based on the second call duration between the associated node and the parent node, and the system weight value. Based on the third total call duration for each of the above, the second total call duration corresponding to the parent node is determined.

8. The method according to claim 7, characterized in that, The process of determining the third total call duration corresponding to the associated node based on the second call duration between the associated node and the parent node, and the system weight value, includes: Determine the fourth product between the second call duration and the system weight value; Based on the fourth product, the third total call duration corresponding to the associated node is determined.

9. The method according to claim 1, characterized in that, The determination of the weight information of the service node includes: The optimized PageRank algorithm is used to determine the weight information of the service node, wherein the service node v i Weight information PR(v) i )for: Among them, v j It is service node v i A parent node, M(v i ) for service node v i The set of parent nodes, service node v k It is the parent node v j The associated node, out(v j ) is the parent node v j The set of associated nodes, w ji For parent node v j Service node v i The first call duration between, w jk For parent node v j Service node v k The second call duration between P x PR(v) represents the system weight value. j ) is the parent node v j Weight information.

10. A device for locating abnormal services, characterized in that, The device includes: A construction module is used to construct a directed graph based on service call data corresponding to the target business. The directed graph includes at least one service chain, which represents the call relationship between two service nodes associated with a corresponding service. The call relationship is determined based on the node information of the two corresponding service nodes. The node information of the service node includes the identifier of the global service chain, the identifier of the current service chain, and the identifier of the service node itself. The identifier of the global service chain is used to generate the service call data. The identifier of the current service chain includes one of the following: the identifier of the global service chain, or the identifier of the service node that calls the service node. The determination module is used to determine the weight information of each service node in the directed graph; and to determine abnormal services from the services corresponding to each service chain based on the weight information of each service node in the directed graph. The determining module is further configured to: obtain the set of parent nodes of the service node and the set of associated nodes corresponding to each parent node in the set of parent nodes based on the directed graph; for each parent node in the set of parent nodes, determine the first total call duration corresponding to the service node based on the system weight value corresponding to the service node, the first call duration between the service node and the parent node, and the weight information of the parent node; determine the second total call duration corresponding to the parent node based on the second call duration between each associated node in the set of associated nodes corresponding to the parent node and the parent node, and the system weight value; determine the percentage based on the first total call duration and the second total call duration; and determine the weight information of the service node based on each percentage.

11. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program that can run on the processor, the processor executing the computer program to implement the method of any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the method of any one of claims 1 to 9.

Citation Information

Patent Citations

  • Fault positioning method and device

    CN112866010A

  • Micro-service abnormity diagnosis method based on attribute relation graph

    CN114201326A