Statistical method and device for flow index
By obtaining and analyzing the traffic-related data of the service traffic processed by the service nodes, determining the service link and business scenarios, the problem of difficulty in analyzing the operating status of the service nodes in fine-grained manner is solved in the existing technology, and an accurate analysis of the traffic situation of the service nodes in different scenarios is achieved.
Patent Information
- Application Number
- CN202211538069.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-01
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2042-12-01
AI Technical Summary
The prior art is difficult to analyze the operating status of service nodes from a fine-grained manner, especially after the operating parameters of the service node are changed, it is difficult to accurately perceive the specific impact of such changes on a certain service or operating scenario.
By obtaining the traffic-related data of the target service traffic processed by the target detection service node within the preset time period, the traffic indicators of the target service link and its respective service nodes in different business scenarios are determined.
The accurate analysis of the traffic conditions of the target detection service node in different business scenarios is realized, and the health status of the service node can be understood in more detail from the granularity of the business scenarios, such as determining the impact of parameter changes on each business scenario.
Smart Images

Figure CN116248538B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this specification belong to the field of Internet technology, and more particularly, to a method and device for counting traffic indicators. Background Art
[0002] At present, APP (Application) applications or Web applications can provide users with a variety of network services such as video viewing and online payment. In order to improve service quality and efficiency, service providers often deploy multiple service nodes to provide users with the above network services, such as splitting applications into microservices for business implementation and deploying service nodes for providing each microservice. In the process of enjoying network services, users tend to pay more and more attention to their own privacy.
[0003] The provider of network services may need to analyze the operating status of service nodes, such as evaluating whether changes in the service parameters of a service node will affect the business success rate of the node, how many flows a specified service node successfully handles within a certain period of time, etc. Taking the change of operating parameters as an example, at this stage, the operating data such as the CPU occupancy rate, memory usage, and error information of the service device where the service node is located are usually collected for analysis to determine whether the above changes are abnormal.
[0004] However, the above analysis method has a coarse granularity and can only detect the impact of abnormal changes on the overall operating parameters of the machine, but cannot perceive the specific impact of abnormal changes on a certain service or even a certain operating scenario. For example, after the operating parameters of a service node are changed, the overall business parameters of the service device where the node is located may not change significantly, but the business success rate of the node in a certain business scenario is greatly reduced. At this time, the above analysis method often finds it difficult to detect such abnormalities. Summary of the invention
[0005] The purpose of the present invention is to provide a method and device for counting flow indicators.
[0006] According to a first aspect of one or more embodiments of this specification, a method for calculating traffic indicators is provided, including:
[0007] For target service traffic processed by the target detection service node within a preset time period, acquiring traffic-related data of the target service traffic;
[0008] Determine a target service link according to the traffic-related data, wherein the target service link is composed of service nodes participating in processing the target service traffic; and determine, according to the traffic-related data, a service scenario to which each service node in the target service link belongs when participating in processing the target service traffic;
[0009] The traffic indicators of the target business traffic in each business scenario are counted according to the determined business scenario.
[0010] According to a second aspect of one or more embodiments of this specification, a flow index statistics device is provided, including:
[0011] An acquisition unit, configured to acquire flow-related data of a target service flow processed by a target detection service node within a preset time period;
[0012] a determination unit, configured to determine a target service link according to the traffic-related data, wherein the target service link is composed of service nodes participating in processing the target service traffic; and to determine a service scenario to which each service node in the target service link belongs when participating in processing the target service traffic according to the traffic-related data;
[0013] The statistical unit is used to count the flow indicators of the target business flow in each business scenario according to the determined business scenario.
[0014] According to a third aspect of one or more embodiments of this specification, an electronic device is provided, including:
[0015] processor;
[0016] a memory for storing processor-executable instructions;
[0017] The processor implements the method as described in any one of the first aspects by running the executable instructions.
[0018] According to a fourth aspect of one or more embodiments of the present specification, a computer-readable storage medium is provided, on which computer instructions are stored, and when the instructions are executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0019] In an embodiment of the present specification, the flow-related data of the target business traffic processed by the target detection service node within a preset time period is first obtained; then, based on the data, a target service link composed of each service node participating in processing the target business traffic, and a business scenario to which each service node in the target service link belongs when participating in processing the target business traffic are determined; finally, based on the above-mentioned business scenarios, the flow indicators of the target business traffic in each business scenario are counted.
[0020] It can be understood that, because the target service link and the business scenario to which each service node belongs when participating in the processing of the target business traffic can be determined based on the traffic-related data generated by the target detection service node processing the target business traffic, the traffic indicators of the target business traffic in each business scenario counted in the above manner can accurately reflect the traffic situation of the target detection service node in different business scenarios. For example, in the case where the above-mentioned target detection service node includes service nodes before and after the business parameters are changed, the traffic indicators counted in the above manner can determine the impact of the change on each of the above-mentioned business scenarios. It can be seen that this solution can analyze the operating status of the target detection service node in a more detailed and accurate manner from the granularity of the business scenario. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0022] Figure 1 It is a flow chart of a method for calculating statistics of traffic indicators provided by an exemplary embodiment.
[0023] Figure 2 It is a schematic diagram of a processing process of a target service link provided by an exemplary embodiment.
[0024] Figure 3 It is a schematic diagram of a clipping effect of a target service link provided by an exemplary embodiment.
[0025] Figure 4 It is a schematic diagram of another clipping effect of a target service link provided by an exemplary embodiment.
[0026] Figure 5 It is a structural schematic diagram of a device provided by an exemplary embodiment.
[0027] Figure 6 It is a block diagram of a statistical device for flow indicators provided by an exemplary embodiment. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0029] In order to achieve a more fine-grained operation status analysis for the service node, this specification proposes a traffic indicator statistical method for statistically analyzing the traffic indicators of the service node at the business scenario level. The above traffic indicators can realize the operation status analysis of the target detection service node at the business scenario level. The following is a detailed description of the scheme in conjunction with the accompanying drawings.
[0030] See also Figure 1 , Figure 1 FIG. 1 is a flow chart of a method for calculating flow indicators provided by an exemplary embodiment. Figure 1 As shown, the method can be applied to a management device having an analysis function for a service node, and the method includes the following steps 102-106.
[0031] Step 102: acquiring flow-related data of the target service flow processed by the target detection service node within a preset time period.
[0032] The service nodes described in this specification have various forms, such as independent APP applications or Web applications (hereinafter referred to as applications), functional components in applications, and microservices created based on SOA (Service-Oriented Architecture) architecture. Among them, microservices can be lightweight services divided from the above-mentioned applications, and any microservice can be built around specific businesses. Any microservice can run in an independent process, and different microservices can communicate with each other using lightweight communication mechanisms. Exemplarily, the above communication mechanism can be a RESTful API (Application Programming Interface) mechanism based on HTTP (Hyper Text Transfer Protocol). In this way, different microservices can coordinate and cooperate with each other to process business traffic in order to provide users with corresponding service value. Among them, the above-mentioned microservices can be built based on standards such as OpenTelemetry.
[0033] In addition, the service nodes described in this specification can be independently deployed in corresponding service devices, such as creating multiple containers in the same service device, and deploying the same or different service nodes in each container. The above-mentioned service nodes can be deployed in a distributed or centralized manner, and can be deployed in a production environment to process real business traffic in the production environment, or can be deployed in a simulation environment to process test business traffic in the simulation environment (such as a copy of the above-mentioned real business traffic), and the embodiments of the present invention are not limited to this.
[0034] The above-mentioned service nodes can form a service cluster at the logical level, and the cluster can be used to process various service requests received by the service platform. The processing process of any service request can correspond to at least one business flow, and any business flow can be processed by at least one service node. Any service node may have a corresponding business scenario when participating in the processing of business flow, which is referred to as belonging to a certain business scenario below.
[0035] Among them, the business scenario is a concept at the business level. Specifically, the business scenario can correspond to the business function implemented by the service node, such as a service node for implementing the online payment function can belong to the online payment scenario when processing business traffic, and a service node for implementing the online lottery function can belong to the online lottery scenario when processing business traffic. The application scenario can also be determined by the preset method called in the process of processing business traffic. For example, if a service node calls the identity authentication method in the process of processing business traffic, it is considered that the service node belongs to the online verification scenario, and if another service node calls the record query method in the process of processing the business traffic, it is considered that the service node belongs to the record query scenario. It can be understood that in the process of multiple service nodes cooperating with each other to process a certain business traffic, some or all of the service nodes may not belong to the application scenario (that is, these nodes do not have corresponding application scenarios), such as a service node may not call any method; and in the case where multiple service nodes belong to their own application scenarios, the application scenarios to which any two service nodes belong may be the same or different, and the embodiment of the present invention does not limit this.
[0036] Before obtaining the traffic-related data of the target business traffic, the management device needs to first determine the target detection service node, and the target detection service node can be any target detection service node in the aforementioned service cluster. For example, the business parameters of any service node may change, such as the service device where the service node is located may change the business parameters of the service node according to preset rules or in response to the operation of the operation and maintenance personnel. Exemplarily, the above changes may include updating the price of a certain commodity from 100 yuan to 120 yuan, updating the discount of a certain commodity from 90% to 70%, updating the deadline for the preferential activities for a certain commodity, etc. For the above business parameter changes, the management device can determine the service node before the business parameter change (hereinafter referred to as the original service node) and / or the service node after the change (hereinafter referred to as the changed service node) as the target detection service node. For another example, the operation and maintenance personnel can also specify certain service nodes as target detection service nodes through service identifiers, so that the management device can determine the designated service node represented by the designated service identifier as the target detection service node, wherein the service identifier can be the name of the service instance or a socket (Socket), etc. For another example, for a service node belonging to an application (such as a service node that is divided from an application), the operation and maintenance personnel can also specify certain applications through an application identifier. At this time, the service node belonging to the specified application (hereinafter referred to as the specified application service node) can be used as a target detection service node, wherein the application identifier can be the name of the application or a pre-assigned number, etc. In summary, the target detection service node described in this specification may include at least one of the following: an original service node whose business parameters have not changed, a changed service node after a business parameter has changed, a specified service node represented by a specified service identifier, and a specified application service node belonging to an application represented by a specified application identifier.
[0037] Corresponding to the process of at least one service node processing any business traffic, the at least one service node can form a service link for the business traffic. Wherein, in the case where only one service node participates in the processing of any business traffic, the service link of the traffic only includes the service node; and in the case where multiple service nodes cooperate with each other to participate in the processing of any business traffic, the service link of the traffic includes the above-mentioned multiple service nodes, and the connection relationship between each service node may satisfy a linear structure, a tree structure, a ring structure, etc. In the process of the above-mentioned at least one service node processing any business traffic, corresponding traffic-related data will be generated, such as the node information of each service node, the connection information between multiple service nodes, the intermediate data transmitted between adjacent service nodes, the method call parameters used by each service node in the process of processing the business traffic, and / or the processing results of the corresponding data, etc. In addition, the traffic-related data generated by any service node for any business traffic can also include the traffic identifier of the business traffic. Through the identifier maintained by each service node, each service node participating in the processing of any business traffic can be accurately located.
[0038] After determining the above-mentioned target detection service node, the management device can obtain the corresponding traffic-related data for the target business traffic processed by it within the preset time period. It should be noted that the management device can determine one or more target detection service nodes, wherein, in the case of determining a target detection service node, the target business traffic and its traffic-related data that the node participates in processing within the preset time period can be further determined; in the case of determining multiple target detection service nodes, the target business traffic that each target detection service node participates in processing within the same or different preset time periods can be determined respectively, and the traffic-related data of each target business traffic can be obtained respectively. In addition, any target business traffic can be processed by at least one service node, and in the case where the traffic is processed by multiple service nodes, the multiple service nodes can include at least one target detection service node. Taking a certain change service node A whose business parameters have changed as an example, the node can cooperate with service node B to participate in processing a certain target business traffic, and service node B can be either a change service node after the business parameters have changed, or any service node whose business parameters have not changed.
[0039] Step 104, determining a target service link based on the traffic-related data, wherein the target service link is composed of various service nodes that participate in processing the target business traffic; and determining, based on the traffic-related data, a business scenario to which each service node in the target service link belongs when participating in processing the target business traffic.
[0040] After acquiring the traffic-related data of the target business traffic, the management device can determine the target service link of the target business traffic and the business scenarios to which each service node in the link belongs when participating in processing the target business traffic based on the data. The target service link of the target business traffic is composed of each service node (including the target detection service node) participating in processing the traffic. The service nodes constituting the target service link may have corresponding business scenarios respectively, or at least one service node may not have a corresponding business scenario.
[0041] In one embodiment, the management device can determine the target service link according to the traffic identifier in the traffic-related data. For example, the management device can first obtain the traffic-related data of each service traffic processed by the candidate service node within the preset time period; wherein the candidate service node can be part or all of the service nodes in the aforementioned service cluster, and the traffic-related data of any service traffic processed by any candidate service node can include the traffic identifier of any service traffic, and the forward node identifier of the previous service node and the backward node identifier of the next service node for any candidate service node processing any service traffic, and the forward node and the backward node represented by the forward node identifier and / or the backward node identifier are adjacent to any candidate service node. For example, when service nodes A, B and C process the same service traffic in sequence, service nodes A and C are respectively the forward node and the backward node adjacent to service node B, and accordingly, the node identifiers of service nodes A and C are respectively the forward node identifier and / or the backward node identifier. Based on this, the management component can query the aforementioned candidate service nodes for candidate service nodes whose traffic-related data contains the same traffic identifier, and determine the connection relationship between the candidate service nodes according to the forward node identifier and / or backward node identifier of each candidate service node queried. The connection relationship corresponds to the target service link represented by the traffic identifier. In other words, the connection relationship can be used to reflect the target service link.
[0042] Figure 2 FIG. 1 is a schematic diagram of a target service link processing process provided by an exemplary embodiment. Figure 2As shown, the management device can respectively obtain the flow-related data of each service flow processed by multiple candidate service nodes including A, B, C, and D within a certain time period, wherein the flow-related data of any service flow processed by any candidate service node includes the flow identifier of the flow and the corresponding forward node identifier and / or backward node identifier. Taking service flow 1 as an example, firstly, according to the flow-related data respectively maintained by each node, it can be determined that service nodes A~D are service nodes participating in processing the flow; secondly, the backward node identifier included in the flow-related data of node A can be the node identifier of node B, the forward node identifier and the backward node identifier included in the flow-related data of node B can be the node identifiers of nodes A and C respectively, the forward node identifier and the backward node identifier included in the flow-related data of node C can be the node identifiers of nodes B and D respectively, and the forward node identifier included in the flow-related data of node D can be the node identifier of node C. According to the forward node identifier and / or backward node identifier respectively maintained by each node, it can be determined that the target service link formed by service nodes A~D is A→B→C→D, as shown in FIG. Figure 2 Similarly, according to the traffic-related data of flows 2 and 3 maintained by service nodes A to D, it can be determined that the target service link corresponding to flow 2 is A→B→C→D, as shown in traceId1 in a. Figure 2 As shown in traceId2 in a; and, it is determined that the target service link corresponding to flow 3 is A→B→C→D, as shown in Figure 2 As shown in traceId3 in a.
[0043] In one embodiment, the management device may determine the business scenario to which any service node belongs through multiple devices. For example, the traffic-related data of any service node may include the business scenario of the node, and the business scenario may be determined as the business scenario to which any service node belongs when participating in processing the target business traffic. Figure 2 In the above-mentioned embodiment shown, if the traffic-related data of traffic 1 maintained by service node C includes its own scenario 1 (such as an online payment scenario), the management device can determine scenario 1 as the business scenario to which node C belongs when participating in processing traffic 1. For another example, the traffic-related data of any service node also includes the method call parameters of the node. At this time, the corresponding called method can be determined based on the method call parameters, and the business scenario to which the method belongs is determined as the business scenario to which any service node belongs when participating in processing the target business traffic. Figure 2As shown in a, if the traffic-related data for traffic 1 maintained by service node D includes a method call parameter of a certain method, and the method belongs to scenario 3, then scenario 3 can be determined as the business scenario to which node D belongs when participating in processing traffic 1. In the above manner, the business scenario to which any service node belongs when participating in processing the target business traffic can be more accurately determined based on the business scenario or method call parameter directly included in the traffic-related data.
[0044] In addition, different service nodes participating in processing the same business traffic may belong to different business scenarios, such as service nodes C and D participating in processing traffic 1 belong to scenarios 1 and 3 respectively; in addition, the same service node may belong to the same or different business scenarios when participating in processing different business traffic, such as service node C belongs to scenario 1 when participating in processing traffic 1 and 2, and belongs to scenario 2 when participating in processing traffic 3; of course, the same service node may belong to a certain business scenario when participating in processing certain business traffic, and may not belong to any business scenario when participating in processing other business traffic, such as service node B does not belong to any business scenario when participating in processing traffic 1, and belongs to scenario 4 when participating in processing traffic 2. The embodiments of this specification do not limit whether any service node has a business scenario, which business scenario it belongs to, and whether it is the same as the business scenario it belongs to when participating in processing other traffic, etc., when participating in processing any traffic, and it should be determined according to the actual situation of the corresponding traffic-related data.
[0045] In one embodiment, the target detection service node may include an original service node whose service parameters have not changed and a changed service node after the service parameters have changed, and any original service node and any changed service node may belong to different target service links respectively. In this case, the management device may obtain the first flow-related data of the first target service flow processed by the original service node, and determine the target service link before the change where the original service node is located according to the first flow-related data; and obtain the second flow-related data of the second target service flow processed by the changed service node, and determine the target service link after the change where the changed service node is located according to the second flow-related data. It can be seen that the first target service link contains at least the original service node, and the second target service link contains at least the changed service node. It can be understood that for the same service node, it can participate in processing any first target service flow as an original service node before the service parameters are changed, and can participate in processing any second target service flow as a changed service node after the service parameters are changed.
[0046] See also Figure 2 , from the above determination method, we can know that Figure 2Any target service link shown in FIG. 1 includes a target detection service node corresponding to the link, and may also include a service node different from the target detection service node. Figure 2 As shown in a, the target detection service nodes in each target service link are unchanged service nodes, and each target service link is a target service link after the change: the target detection service node in traceId1 is node B, which has undergone changes 1 and 2; the target detection service nodes in traceId2 include nodes B and D, which have undergone changes 1 and 3 respectively; the target detection service node in traceId3 is node B, which has undergone change 2. It can be seen that Figure 2 Each of the flows shown is processed by the change service node. In other words, each of the change service nodes participates in processing the corresponding flows after the service parameters are changed. Figure 2 Similar to the target detection service nodes shown in the figure, the management node can also determine the corresponding target service link based on the traffic-related data involved in the processing of the target business traffic by the corresponding original service node within a preset time period, as the target service link before the change.
[0047] Step 106: Count the traffic indicators of the target service traffic in each service scenario according to the determined service scenario.
[0048] Through the above-mentioned method, each target business flow processed by the target detection service node within a preset time period can be determined, and the target service link corresponding to each target business flow and the business scenario to which each service node in each target service link belongs when processing the corresponding target business flow can be further determined based on the corresponding flow-related data. On this basis, the management device can count the flow indicators of the target business flow in each business scenario based on the above-mentioned business scenarios.
[0049] In an embodiment of the present specification, the flow-related data of the target business traffic processed by the target detection service node within a preset time period is first obtained; then, based on the data, a target service link composed of each service node participating in processing the target business traffic, and a business scenario to which each service node in the target service link belongs when participating in processing the target business traffic are determined; finally, based on the above-mentioned business scenarios, the flow indicators of the target business traffic in each business scenario are counted.
[0050] It can be understood that, because the target service link and the business scenario to which each service node belongs when participating in the processing of the target business traffic can be determined based on the traffic-related data generated by the target detection service node processing the target business traffic, the traffic indicators of the target business traffic in each business scenario counted in the above manner can accurately reflect the traffic situation of the target detection service node in different business scenarios. For example, in the case where the above-mentioned target detection service node includes service nodes before and after the business parameters are changed, the traffic indicators counted in the above manner can determine the impact of the change on each of the above-mentioned business scenarios. It can be seen that this solution can analyze the operating status of the target detection service node in a more detailed and accurate manner from the granularity of the business scenario.
[0051] Continuing from the above embodiment, when determining the target service link before the change and the target service link after the change, the management device can count the first flow index of the first target service flow in each business scenario according to the business scenario to which each service node in the target service link before the change belongs, and count the second flow index of the second target service flow in each business scenario according to the business scenario to which each service node in the target service link after the change belongs. Then, the flow change index corresponding to the parameter change can be determined by comparing the first flow index and the second flow index.
[0052] Taking the number of payments per minute in the online payment scenario as an example, for the target service link before the change, the first number of payments of the first target business flow in the online payment scenario can be counted according to the business scenarios to which each service node in the target service link before the change belongs, and the second number of payments of the second target business flow in the online payment scenario can be counted according to the business scenarios to which each service node in the target service link after the change belongs. Furthermore, the change rate (or change amount, etc.) of the number of payments corresponding to the parameter change can be determined by comparing the first number of payments and the second number of payments. The change rate can be used to reflect the impact of the parameter change on the number of payments, such as an increase in the discount will cause an increase in the number of payments (i.e., an increase in the transaction volume), and an increase in the unit price will cause a decrease in the number of payments (i.e., a decrease in the transaction volume).
[0053] It is understandable that, in the case where any target service link contains multiple target detection service nodes (i.e., original service nodes or changed service nodes), the parameter changes corresponding to each target detection service node may affect the flow index of the target business flow corresponding to the link. In this regard, in order to more accurately determine the possible impact of parameter changes on the flow index of the target business flow and facilitate the analysis of the link topology of the target service link, the management device can also split the target service link according to the aforementioned parameter changes. For example, in the case where any target service link contains multiple target detection service nodes, the target service link before the change can be split into a first single change link corresponding to each original service node, and the target service link after the change can be split into a second single change link corresponding to each changed service node. Among them, each single change link after the split according to the parameter change contains a target detection service node corresponding to a parameter change. For example, for any target service link containing N original service nodes, it can be split into N single change links, any of which only contains the target detection service node before the parameter change; for any target service link containing M change service nodes, it can be split into M single change links, any of which only contains the target detection service node after the parameter change.
[0054] like Figure 2 As shown in b, the target detection service node in traceId1 is node B, which has two parameter changes, namely change 1 and change 2. Based on this, traceId1 can be split into two single change links of A→B→C→D: node B in the first single change link only has change 1, and node B in the first single change link only has change 2. The other nodes in the two single change links except node B are the same and have not changed. In addition, because the two single change links after splitting according to parameter changes are used to reflect the node connection relationship A→B→C→D, the two single change links are still marked as "traceId1" respectively, so it is specially explained. Similar to traceId1, traceId2 can also be split into two single change links of A→B→C→D: node B in the first single change link has change 1, and node D in the first single change link has change 3; in traceId3, only node B has one change 2, that is, traceId3 is already a single change link, so it does not need to be split according to parameter changes. It can be understood that the above splitting according to parameter changes corresponds to the number of times the parameter changes occur: a parameter change that occurs (before or after) at any target detection service node corresponds to a changed link obtained after the splitting.
[0055] In the case of obtaining the changed links by splitting according to the parameter changes, the management device can count the first flow index of the first target business flow in each business scenario according to each split first single change link; and count the second flow index of the second target business flow in each business scenario according to each split second single change link. In this way, the number of changes can be reflected by the number of single links, which helps to accurately analyze the possible impact of each parameter change on the flow index of the target business flow, and helps to improve the accuracy of the flow index statistics.
[0056] The number of service nodes involved in processing certain business traffic may be large, making the target service link length of such traffic too long. It is understandable that such overly long links often introduce more noise into the statistical process of traffic indicators, which may result in lower accuracy of statistical results. In this regard, in one embodiment, the target service link can be pruned before statistics, and the traffic indicator can be statistically analyzed based on the pruned core link. For example, the management device can first determine the preceding level and the succeeding level of the target detection service node, and the preceding level and the succeeding level are used to characterize the number of continuous valid service nodes in the target service link that are located before and after the target detection service node, respectively. Then, the target service link can be pruned into a core link based on the preceding level and the succeeding level, with the target detection service node as the center, and the core link can be composed of the target detection service node and its corresponding valid service node. Among them, the specific values of the preceding layer and the subsequent layer can be the same or different, and any layer can be a preset value, and the preset value can be set according to the business scenario to which the service node belongs or the traffic type of the target business traffic; or, any layer can also be a preset proportion of the target service link length, such as 50%, 20% or 60% of the total number of service nodes included in the link.
[0057] After the above-mentioned trimming is completed, the traffic indicators of the target business traffic in various business scenarios can be counted according to the trimmed core link. In this way, for all service nodes in the target service link, the core link can be trimmed with the target detection service node as the center. The service nodes that constitute the core link include the target detection service node and the nodes of the previous level before the node and the nodes of the subsequent level after the node. Obviously, the distance between the service nodes in the core link and the target detection service node is not too long, thereby avoiding the inaccurate traffic indicator statistics that may be caused by an overly long target service link.
[0058] It should be noted that the above splitting can be performed based on the parameter change, that is, the pruned target detection service node can be the single change link obtained by the above splitting. Figure 2 For c, it is assumed that the preceding and succeeding levels of the target detection service node are both 1, that is, in the pruning process, with any target detection service node as the center, the preceding and succeeding service nodes of the target detection service node are retained. Figure 2 The structures of each single change link shown in b are A→B→C→D. In the two single change links of traceId1, the first single change link of traceId2, and the single change link of traceId3, the target detection service node where the parameter change occurs is node B. Therefore, in each of the above single change links, nodes A and C are retained respectively to obtain the pruned core link A→B→C. In the second single change link of traceId2, since node D is the last node of the link (that is, node D does not have a subsequent node), only its previous node (that is, node C) needs to be retained to obtain the pruned core link C→D.
[0059] Of course, the above-mentioned trimming can also be performed directly on the target service link. For example, if the preceding level and the subsequent level of the target detection service node are both 1, for node B in traceId1, the previous node A and the subsequent node C can be retained, and the trimmed core link is A→B→C. For node B in traceId2, the previous node A and the subsequent node C can be retained; for node D in traceId2, the previous node C can be retained, so no trimming is required at this time, and the core link of traceId2 is A→B→C→D. For node B in traceId3, the previous node A and the subsequent node C can be retained to obtain the trimmed core link A→B→C. Among them, the above-mentioned trimming directly performed on the target service link, Figure 2 Not shown in the figure.
[0060] Among them, according to whether there are branches in the target detection service node, the management device can adopt a corresponding method to implement the above-mentioned trimming. As an exemplary embodiment, when there are no branches in the target service link, in the target service link, the first valid service node can be determined according to the preceding level of the first target detection service node, and the last valid service node can be determined according to the succeeding level of the last target detection service node; and, the service nodes before the first valid service node and after the last valid service node in the target service link can be deleted, and the link formed by the remaining service nodes can be determined as the core link. It can be understood that there are no branches in the target service link, that is, the target detection service node is a linear single link. From the above analysis, it can be seen that Figure 2The traceId1 to 3 shown and the single change links obtained by splitting them are all linear single links without branches.
[0061] like Figure 3 As shown, nodes 1 to 8 for processing the same target business traffic are connected in sequence to form a target detection service node, wherein node 1 belongs to the application App1 running in the server Server1, and the IP address of the node is IP1. The remaining nodes are similar and will not be repeated. It should be noted that the information such as the application to which any service node described in this specification belongs, the server it is located on, and the IP address during operation is not fixed, and the embodiments of the present invention do not limit this. For example, two service nodes involved in processing the same target business traffic may belong to the same application or to different applications, etc., which will not be repeated. Let's assume Figure 3 The target detection service nodes in the target service link shown are node 2, node 5, and node 6, respectively, and the preceding level of the target detection service node is 0 and the subsequent level is 1. It can be seen that the first target detection service node is node 2 and the last target detection service node is node 6. At this time, the management device can determine the first valid service node corresponding to node 2, that is, node 2 itself; and determine the last valid service node corresponding to node 6, that is, node 7. After that, the node before node 2 (that is, node 1) and the node after node 7 (that is, node 8) in the link can be deleted, and the remaining nodes (that is, nodes 2 to 7) constitute the pruned core link. It can be seen that the above-mentioned pruning is essentially to use the partial link composed of all service nodes between the first valid service node and the last valid service node (including these two service nodes) in the target detection service node as the core link.
[0062] As another exemplary embodiment, when there are branches in the target service link and each branch satisfies a tree structure, the branch links from the root node to each leaf node are determined, and each branch link is pruned into a core branch link; wherein, in any branch link, the first valid branch service node can be determined according to the preceding level of the first target detection service node, and the last valid branch service node can be determined according to the succeeding level of the last target detection service node; and the service nodes before the first valid branch service node and after the last valid branch service node in any branch link can be deleted, and the link formed by the remaining service nodes can be determined as the core branch link after any branch link is pruned.
[0063] like Figure 4As shown in the figure, nodes 1 to 6 for processing the same target business traffic are connected to form two target detection service nodes, namely traceId1 and traceId2. Among them, nodes 1 to 4 constitute traceId1, specifically node 1→node 2→node 3→node 4; nodes 1 and 5 to 6 constitute traceId2, specifically node 1→node 5→node 6. Let's assume that the target detection service node in traceId1 is node 2, the target detection service node in traceId2 is node 5, and the previous level of the target detection service node is 0 and the subsequent level is 1. At this time, for traceId1, its first valid branch service node is node 2 itself, and the last valid branch service node is node 3. At this time, the node before node 1 (i.e. node 1) and the node after node 3 (i.e. node 4) in traceId1 can be deleted, and the link node 2→node 3 formed by the remaining service nodes (i.e. nodes 2 and 3) is the core branch link after the branch link of traceId1 is pruned. Similarly, for traceId2, its first valid branch service node is node 5 itself, and the last valid branch service node is node 6. At this time, the node before node 5 (i.e., node 1) and the node after node 6 (there is no such node) in traceId2 can be deleted, and the link node 5→node 6 formed by the remaining service nodes (i.e., nodes 5 and 6) is the core branch link after the branch link of traceId2 is pruned.
[0064] In another embodiment, in order to more clearly and accurately count the traffic indicators of the target business traffic in different business scenarios, the target service link can also be split according to the application scenario. For example, the target service link can be split into at least one single-scenario link according to the business scenario, and the number of service nodes with business scenarios contained in any single-scenario link is one. Through link splitting, the management device can clearly know which links correspond to each business scenario. Among them, the above splitting according to the business scenario can be performed on the target detection service node, and can also be performed on the aforementioned trimmed core link. Taking the splitting for the core link as an example, Figure 2 As shown in d. Figure 2 c, Figure 2 The link structure shown in d has not changed, the only difference is Figure 2 The c focuses on the difference in parameter changes, while Figure 2 The d focuses on the differences in business scenarios.
[0065] like Figure 2As shown in d, for the two core links of traceId1 and one core link of traceId3, only one service node (i.e., node C) in any core link belongs to the corresponding business scenario. Therefore, these three links are already single-scenario links and do not need to be split according to the business. In the first core link of traceId1, node B belongs to scenario 4 and node C belongs to scenario 1. Therefore, the link can be split into two single-scenario links A→B→C: in the first single-scenario link, only node C belongs to scenario 1, and the other nodes do not have their own business scenarios; in the second single-scenario link, only node B belongs to scenario 4, and the other nodes do not have their own business scenarios. Similarly, in the second core link of traceId2, node C belongs to scenario 1 and node D belongs to scenario 3. Therefore, the link can be split into two single-scenario links C→D: in the first single-scenario link, only node C belongs to scenario 1, and node D does not have its own business scenario; in the second single-scenario link, only node D belongs to scenario 3, and node C does not have its own business scenario. It can be seen that in any single-scenario link obtained by the above splitting, only one node has the corresponding business scenario, while the remaining nodes do not have their corresponding business scenarios.
[0066] On this basis, the management device can count the number of single-scenario links corresponding to any business scenario and including any target detection service node, and determine the number as the number of calls of any target detection service node in any business scenario. It is understandable that Figure 2 Any single-scenario link shown in e contains a target detection service node whose business parameters have changed and a node belonging to the corresponding business scenario (the node and the target detection service node whose business parameters have changed can be the same node or a different node). Therefore, the number of single-scenario links can be counted as the number of changes corresponding to the scenario dimension.
[0067] like Figure 2 As shown in f, the result of counting the number of single-scenario links corresponding to scenario 1 and including node B with change 1 is 2, which means that change 1 of node B affects the two target service flows including scenario 1. In addition, the number of statistics for each change and its corresponding service scenario can be found in Figure 2 I will not go into details about f.
[0068] Of course, the above traffic indicators can be counted according to multiple dimensions, such as Figure 2For each single-scenario link shown in e, the number of calls corresponding to different changes occurring in each scenario can also be counted. For example, the number of calls corresponding to change 1 and change 2 occurring in scenario 1 are 2 times and 1 time respectively, the number of calls corresponding to change 2 and change 3 occurring in scenario 2 are both 1 time, the number of calls corresponding to change 3 occurring in scenario 3 is 1 time, the number of calls corresponding to change 1 occurring in scenario 4 is 1 time, and so on. Of course, in addition to the number of calls, traffic indicators such as the number of traffic processing times, processing success rate, and average processing time within a unit time period can also be counted, and the embodiments of the present invention are not limited to this.
[0069] In one embodiment, after the traffic index is obtained by statistics, the service or traffic can be analyzed based on the traffic index. For example, when the traffic index meets the abnormal rule, an alarm information for the traffic index can be generated, and the alarm information is used to indicate that the target detection service node has a traffic abnormality. In this way, the user can be informed of the traffic abnormality in a timely manner so that he can perform corresponding processing.
[0070] Exemplarily, when the target service traffic is the real service traffic in the production environment (i.e., the traffic is processed by each service node deployed in the production environment), if the user wants to change at least one service parameter of the service node involved in processing the traffic, the service parameter of the corresponding node deployed in the simulation environment can be modified, and the modified node can participate in processing the corresponding test service traffic. Thereafter, the management device can count the traffic indicators of the real service traffic and the test service traffic respectively according to the traffic-related data corresponding to the service traffic, and analyze whether the above parameter changes have an adverse effect on the test service traffic by comparing the traffic indicators, such as whether it causes a decrease in the success rate of traffic processing, whether the decrease in the success rate is acceptable, etc. Furthermore, a change suggestion can be provided to the user based on the above analysis results. For example, if the decrease in the success rate exceeds an acceptable threshold, the user can be advised not to make the above parameter change to avoid the change having a greater adverse effect on the real service traffic.
[0071] Figure 5 is a schematic structural diagram of a device provided by an exemplary embodiment. Figure 5At the hardware level, the device includes a processor 502, an internal bus 504, a network interface 506, a memory 508, and a non-volatile memory 510, and may also include hardware required for other services. One or more embodiments of this specification may be implemented based on software, such as the processor 502 reading the corresponding computer program from the non-volatile memory 510 into the memory 508 and then running it. Of course, in addition to the software implementation, one or more embodiments of this specification do not exclude other implementations, such as logic devices or a combination of software and hardware, etc., that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0072] like Figure 6 As shown, Figure 6 is a block diagram of a flow index statistics device provided by this specification according to an exemplary embodiment. The device can be applied to Figure 5 The device shown in the figure is used to implement the technical solution of this specification. The device includes:
[0073] An acquisition unit 601 is used to acquire flow-related data of a target service flow processed by a target detection service node within a preset time period;
[0074] A determination unit 602 is configured to determine a target service link according to the traffic-related data, wherein the target service link is composed of service nodes participating in processing the target service traffic; and determine, according to the traffic-related data, a service scenario to which each service node in the target service link belongs when participating in processing the target service traffic;
[0075] The statistical unit 603 is used to count the traffic indicators of the target service traffic in each service scenario according to the determined service scenario.
[0076] Optionally, the target detection service node includes at least one of the following:
[0077] The original service node whose business parameters have not been changed, the changed service node after the business parameters have been changed, the designated service node represented by the designated service identifier, and the designated application service node belonging to the application represented by the designated application identifier.
[0078] Optionally, when the target detection service node includes an original service node whose service parameters have not changed and a changed service node whose service parameters have changed, and any original service node and any changed service node belong to different target service links,
[0079] The acquisition unit 601 is further used to: acquire first flow-related data of the first target service flow processed by the original service node, and acquire second flow-related data of the second target service flow processed by the changed service node;
[0080] The determining unit 602 is further configured to: determine the target service link before the change where the original service node is located according to the first flow-related data; and determine the target service link after the change where the changed service node is located according to the second flow-related data;
[0081] The statistical unit 603 is also used to: count the first flow indicators of the first target business flow in each business scenario according to the business scenarios to which each service node in the target service link before the change belongs, and count the second flow indicators of the second target business flow in each business scenario according to the business scenarios to which each service node in the target service link after the change belongs; and determine the flow change indicator corresponding to the parameter change by comparing the first flow indicator and the second flow indicator.
[0082] Optional,
[0083] It also includes a change splitting unit 604, which is used to split the target service link before the change into first single change links corresponding to each original service node, and split the target service link after the change into second single change links corresponding to each change service node, in the case where any target service link includes multiple target detection service nodes, and each single change link after the split includes a target detection service node corresponding to a parameter change;
[0084] The statistical unit 603 is also used to: count the first flow index of the first target business traffic in each business scenario according to each split first single change link; and count the second flow index of the second target business traffic in each business scenario according to each split second single change link.
[0085] Optional,
[0086] It also includes a data acquisition unit 605, which is used to acquire the flow-related data of each service flow processed by the candidate service node within the preset time period; wherein the flow-related data of any service flow processed by any candidate service node includes: the flow identifier of any service flow, and the forward node identifier of the previous service node and / or the backward node identifier of the next service node involved in processing any service flow by any candidate service node;
[0087] The determination unit 602 is further used to: query the candidate service nodes whose traffic-related data contain the same traffic identifier, and determine the connection relationship between the candidate service nodes according to the forward node identifier and / or backward node identifier of each candidate service node queried, wherein the connection relationship corresponds to the target service link represented by the traffic identifier.
[0088] Optionally, the determining unit 602 is further configured to:
[0089] In the case where the traffic-related data includes a business scenario of any of the service nodes, determining the business scenario as a business scenario to which any of the service nodes belongs when participating in processing the target service traffic; or
[0090] In the case where the traffic-related data includes device calling parameters of any of the service nodes, the corresponding called device is determined according to the device calling parameters, and the business scenario to which the called device belongs is determined as the business scenario to which any of the service nodes belongs when participating in processing the target business traffic.
[0091] Optional,
[0092] The system further includes a level determination unit 606, which is used to determine a preceding level and a succeeding level of the target detection service node, wherein the preceding level and the succeeding level are used to represent the number of consecutive valid service nodes located before and after the target detection service node in the target service link, respectively; and, with the target detection service node as the center, the target service link is cut into a core link according to the preceding level and the succeeding level, wherein the core link is composed of the target detection service node and its corresponding valid service nodes;
[0093] The statistical unit 603 is further used to: count the traffic indicators of the target service traffic in various service scenarios according to the pruned core links.
[0094] Optionally, the level determination unit 606 is further configured to:
[0095] In the case where there is no branch in the target service link, in the target service link, a first valid service node is determined according to a preceding level of a first target detection service node, and a last valid service node is determined according to a succeeding level of a last target detection service node; and, service nodes before the first valid service node and after the last valid service node in the target service link are deleted, and a link composed of the remaining service nodes is determined as the core link; or,
[0096] When there are branches in the target service link and each branch satisfies the tree structure, the branch links from the root node to each leaf node are determined, and each branch link is pruned into a core branch link; wherein, in any branch link, the first valid branch service node is determined according to the preceding level of the first target detection service node, and the last valid branch service node is determined according to the succeeding level of the last target detection service node; and, the service nodes before the first valid branch service node and after the last valid branch service node in any branch link are deleted, and the link formed by the remaining service nodes is determined as the core branch link after any branch link is pruned.
[0097] Optionally, the traffic indicator includes the number of calls of the target detection service node.
[0098] The device also includes a scenario splitting unit 607, which is used to split the target service link into at least one single-scenario link according to the business scenario, and the number of service nodes with business scenarios included in any single-scenario link is one;
[0099] The statistical unit 603 is further used to: count the number of single-scenario links corresponding to any business scenario and including any target detection service node, and determine the number as the number of calls of any target detection service node in any business scenario.
[0100] Optionally, also include:
[0101] The alarm unit 608 is used to generate alarm information for the flow indicator when the flow indicator meets the abnormal rule, and the alarm information is used to indicate that the target detection service node has a flow anomaly.
[0102] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD, such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0103] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0104] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a server system. Of course, the present invention does not exclude that with the development of computer technology in the future, the computer that implements the functions of the above embodiments may be, for example, a personal computer, a laptop computer, a vehicle-mounted human-computer interaction device, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0105] Although one or more embodiments of the present specification provide method operation steps as described in the embodiments or flow charts, more or less operation steps may be included based on conventional or non-creative means. The order of steps listed in the embodiments is only one way of executing the order of many steps, and does not represent the only execution order. When the device or terminal product in practice is executed, it can be executed in sequence or in parallel according to the method shown in the embodiments or the drawings (for example, a parallel processor or a multi-threaded processing environment, or even a distributed data processing environment). The term "include", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, product or equipment including a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or equipment. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or equipment including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.
[0106] For the convenience of description, the above devices are described in various modules according to their functions. Of course, when implementing one or more of the present specification, the functions of each module can be implemented in the same or more software and / or hardware, or the module implementing the same function can be implemented by a combination of multiple sub-modules or sub-units, etc. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0107] The present invention is described with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0108] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0109] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0110] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0111] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0112] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage, graphene storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0113] It should be understood by those skilled in the art that one or more embodiments of the present specification may be provided as a method, system or computer program product. Therefore, one or more embodiments of the present specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of the present specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0114] One or more embodiments of this specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of this specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0115] Each embodiment in this specification is described in a progressive manner, and the same and similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. In the description of this specification, the description of the reference terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representation of the above terms does not necessarily target the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art can combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples without contradiction.
[0116] The above description is only an example of one or more embodiments of this specification and is not intended to limit one or more embodiments of this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included in the scope of the claims.
Claims
1. A statistical method for traffic indicators, comprising: For target service traffic processed by the target detection service node within a preset time period, acquiring traffic-related data of the target service traffic; Determine a target service link according to the traffic-related data, wherein the target service link is composed of service nodes involved in processing the target service traffic; And, determining, according to the traffic-related data, the business scenarios to which each service node in the target service link belongs when participating in processing the target business traffic; wherein the target detection service node includes an original service node whose business parameters have not changed and a changed service node after the business parameters have changed, and any original service node and any changed service node belong to different target service links respectively; The acquiring of the traffic-related data of the target service traffic and determining the target service link according to the traffic-related data comprises: acquiring first traffic-related data of the first target service traffic processed by the original service node, and determining the target service link before the change where the original service node is located according to the first traffic-related data; and acquiring second traffic-related data of the second target service traffic processed by the changed service node, and determining the target service link after the change where the changed service node is located according to the second traffic-related data; The flow indicators of the target business traffic in each business scenario are counted according to the determined business scenario, including: counting the first flow indicator of the first target business traffic in each business scenario according to the business scenario to which each service node in the target service link before the change belongs, and counting the second flow indicator of the second target business traffic in each business scenario according to the business scenario to which each service node in the target service link after the change belongs; and determining the flow change indicator corresponding to the business parameter change by comparing the first flow indicator and the second flow indicator, so as to reflect the impact of the business parameter change on the flow indicator.
2. According to the method of claim 1, the target detection service node comprises at least one of the following: The original service node whose business parameters have not been changed, the changed service node after the business parameters have been changed, the designated service node represented by the designated service identifier, and the designated application service node belonging to the application represented by the designated application identifier.
3. The method according to claim 1, Also includes: In the case where any target service link contains multiple target detection service nodes, the target service link before the change is split into first single change links corresponding to the original service nodes respectively, and the target service link after the change is split into second single change links corresponding to the change service nodes respectively, and each of the split single change links contains a target detection service node corresponding to a parameter change; The counting of the first flow index of the first target service flow in each service scenario includes: counting the first flow index of the first target service flow in each service scenario according to each split first single change link; The counting of the second flow index of the second target business flow in each business scenario includes: counting the second flow index of the second target business flow in each business scenario according to each split second single change link.
4. The method according to claim 1, Also includes: Obtaining flow-related data of each service flow processed by the candidate service node within the preset time period; wherein the flow-related data of any service flow processed by any candidate service node includes: a flow identifier of any service flow, and a forward node identifier of a previous service node and / or a backward node identifier of a subsequent service node for any candidate service node involved in processing the any service flow; The determining of the target service link according to the flow-related data comprises: querying the candidate service nodes whose flow-related data contain the same flow identifier among the candidate service nodes, and determining the connection relationship between the candidate service nodes according to the forward node identifier and / or the backward node identifier of each candidate service node queried, wherein the connection relationship corresponds to the target service link represented by the flow identifier.
5. The method according to claim 1, determining, according to the traffic-related data, a service scenario to which any service node in the target service link belongs when participating in processing the target service traffic, comprises: In a case where the traffic-related data includes a business scenario of any of the service nodes, determining the business scenario as a business scenario to which any of the service nodes belongs when participating in processing the target service traffic; or, In the case where the traffic-related data includes method call parameters of any of the service nodes, the corresponding called method is determined according to the method call parameters, and the business scenario to which the called method belongs is determined as the business scenario to which any of the service nodes belongs when participating in processing the target business traffic.
6. The method according to claim 1, Also includes: Determine a preceding level and a succeeding level of the target detection service node, wherein the preceding level and the succeeding level are used to represent the number of consecutive valid service nodes located before and after the target detection service node in the target service link, respectively; and, with the target detection service node as the center, cut the target service link into a core link according to the preceding level and the succeeding level, wherein the core link is composed of the target detection service node and its corresponding valid service nodes; The counting of traffic indicators of the target service traffic in each service scenario includes: counting the traffic indicators of the target service traffic in each service scenario according to the pruned core links.
7. The method according to claim 6, wherein the target detection service node is taken as the center, and the target service link is cut into core links according to the preceding layer and the succeeding layer, comprising: In the case where there is no branch in the target service link, in the target service link, a first valid service node is determined according to a preceding level of a first target detection service node, and a last valid service node is determined according to a succeeding level of a last target detection service node; and, service nodes before the first valid service node and after the last valid service node in the target service link are deleted, and a link composed of the remaining service nodes is determined as the core link; or, When there are branches in the target service link and each branch satisfies the tree structure, the branch links from the root node to each leaf node are determined, and each branch link is pruned into a core branch link; wherein, in any branch link, the first valid branch service node is determined according to the preceding level of the first target detection service node, and the last valid branch service node is determined according to the succeeding level of the last target detection service node; and, the service nodes before the first valid branch service node and after the last valid branch service node in any branch link are deleted, and the link formed by the remaining service nodes is determined as the core branch link after any branch link is pruned.
8. The method according to claim 1, wherein the traffic indicator comprises the number of calls of the target detection service node, The method further comprises: Splitting the target service link into at least one single-scenario link according to the business scenario, wherein the number of service nodes with the business scenario included in any single-scenario link is one; The traffic indicators of the target business traffic in each business scenario are counted according to the determined business scenario, including: counting the number of single-scenario links corresponding to any business scenario and including any target detection service node, and determining the number as the number of calls of any target detection service node in any business scenario.
9. The method according to claim 1, further comprising: When the traffic indicator satisfies an abnormality rule, alarm information for the traffic indicator is generated, where the alarm information is used to indicate that a traffic abnormality exists in the target detection service node.
10. A statistical device for flow indicators, comprising: An acquisition unit, configured to acquire flow-related data of a target service flow processed by a target detection service node within a preset time period; A determination unit, configured to determine a target service link according to the traffic-related data, wherein the target service link is composed of service nodes participating in processing the target service traffic; And, determining, according to the traffic-related data, the business scenarios to which each service node in the target service link belongs when participating in processing the target business traffic; wherein the target detection service node includes an original service node whose business parameters have not changed and a changed service node after the business parameters have changed, and any original service node and any changed service node belong to different target service links respectively; The acquisition unit is specifically used to acquire first flow-related data of the first target service flow processed by the original service node, and acquire second flow-related data of the second target service flow processed by the changed service node; the determination unit is specifically used to determine the target service link before the change where the original service node is located according to the first flow-related data; and determine the target service link after the change where the changed service node is located according to the second flow-related data; A statistical unit is used to count the flow indicators of the target business flow in each business scenario according to the determined business scenario, specifically to count the first flow indicators of the first target business flow in each business scenario according to the business scenarios to which each service node in the target service link before the change belongs, and to count the second flow indicators of the second target business flow in each business scenario according to the business scenarios to which each service node in the target service link after the change belongs; and, by comparing the first flow indicator and the second flow indicator, determine the flow change indicator corresponding to the business parameter change, so as to reflect the impact of the business parameter change on the flow indicator.
11. An electronic device, comprising: processor; a memory for storing processor-executable instructions; The processor implements the method according to any one of claims 1 to 9 by running the executable instructions.
12. A computer-readable storage medium having computer instructions stored thereon, which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Business monitoring method and device based on graph data, equipment and storage medium
CN113536054A
Micro-service upgrading plan evaluation method and system and computer equipment
CN114327555A