Topological aggregation method, device, electronic device and medium based on zipkin link data

By aggregating and cleaning logs in zipkin link data, the topological relationship between application service nodes and the number of requests received are determined, which solves the problem of non-real nodes in topology aggregation in zipkin scenarios and achieves accurate topological relationship construction.

CN117692310BActive Publication Date: 2024-09-17BEIJING YOUTEJIE INFORMATION TECH
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202311796334.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-25
Publication Date
2024-09-17
Estimated Expiration
2043-12-25

AI Technical Summary

Technical Problem

In the zipkin scenario, there will be two logs for service reception and request in the link data, and there is a lack of source-related information. As a result, non-real nodes may be aggregated during topology aggregation, affecting the accuracy of topological relationships.

Method used

By obtaining the log fields to be filtered, the original logs are filtered out, and the logs with the same tracking identifier are aggregated, cleaned and spliced ​​into spliced ​​logs, and the topological relationship between the application service nodes and the number of requests received are determined based on the log fields of the service type in the spliced ​​logs. .

Benefits of technology

Correctly aggregate node topology relationships in zipkin scenarios, avoid the appearance of non-real nodes, and improve the accuracy of topology applications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117692310B
    Figure CN117692310B
Patent Text Reader

Abstract

The embodiments of the present application disclose a topological aggregation method, device, electronic device and medium based on zipkin link data. The method includes: obtaining the log field to be filtered, and filtering out the original log from the zipkin link data according to the log to be filtered; aggregating the original logs with the same tracking identifier to obtain the log data set corresponding to each tracking identifier; for the log data set corresponding to any tracking identifier, cleaning and splicing the original logs with the same span identifier into a spliced ​​log; determining the topological relationship between application service nodes and the number of requests received according to the log field of the service type in the spliced ​​log. Based on this, the embodiments of the present application can aggregate the original logs with the same span identifier, clean the fields therein, determine the topological relationship between application service nodes and the number of requests received according to the cleaned log fields, and correctly aggregate the node topological relationship in the zipkin scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of log analysis technology, and in particular to a topological aggregation method, device, electronic device and medium based on Zipkin link data. Background Art

[0002] In order to explore the calling relationship of nodes in the network, the topological relationship of network nodes is usually aggregated based on link data. Usually, the logs in the link data will contain the request source and the receiving destination. When aggregating, the concatenation aggregation can be performed directly based on the request source and the receiving destination.

[0003] However, for link data in the Zipkin scenario, usually two logs will appear for the reception and request of a service, and the logs will not indicate the source-related information. When topological aggregation is performed based on link data in the Zipkin scenario, non-real nodes may be aggregated, resulting in incorrect topological relationships, which will have a significant adverse impact on subsequent topological applications. Summary of the invention

[0004] The embodiments of the present application provide a topological aggregation method, device, electronic device and medium based on Zipkin link data to correctly aggregate the node topological relationship in the Zipkin scenario.

[0005] In a first aspect, an embodiment of the present application provides a topology aggregation method based on zipkin link data, the method comprising:

[0006] Get the log fields to be filtered, and filter out the original logs from the zipkin link data according to the logs to be filtered;

[0007] Aggregate the original logs with the same tracking ID to obtain the log data set corresponding to each tracking ID;

[0008] For the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs;

[0009] The topological relationship between application service nodes and the number of requests received are determined based on the log field of the service type in the splicing log.

[0010] In a second aspect, an embodiment of the present application provides a topology aggregation device based on zipkin link data, the device comprising:

[0011] The filtering module is used to obtain the log fields to be filtered and filter out the original logs from the zipkin link data according to the logs to be filtered;

[0012] The aggregation module is used to aggregate the original logs with the same tracking identifier to obtain the log data set corresponding to each tracking identifier;

[0013] A cleaning and splicing module is used to clean and splice original logs with the same span identifier into spliced ​​logs for a log data set corresponding to any tracking identifier;

[0014] The topology aggregation module is used to determine the topological relationship between application service nodes and the number of requests received based on the log fields of the service type in the spliced ​​log.

[0015] In a third aspect, an embodiment of the present application further provides an electronic device, the electronic device comprising:

[0016] one or more processors;

[0017] a storage device for storing one or more programs,

[0018] When one or more programs are executed by one or more processors, the one or more processors implement a topological aggregation method based on zipkin link data as provided in any embodiment of the present application.

[0019] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium on which a computer program is stored, characterized in that when the program is executed by a processor, a topological aggregation method based on zipkin link data as provided in any embodiment of the present application is implemented.

[0020] The technical solution of the embodiment of the present application obtains the log field to be filtered, and filters out the original log from the zipkin link data according to the log to be filtered; aggregates the original logs with the same tracking identifier to obtain the log data set corresponding to each tracking identifier; for the log data set corresponding to any tracking identifier, cleans and splices the original logs with the same span identifier into a spliced ​​log; determines the topological relationship between the application service nodes and the number of requests received according to the log field of the service type in the spliced ​​log. Based on this, the embodiment of the present application can aggregate the original logs with the same span identifier, clean the fields therein, determine the topological relationship between the application service nodes and the number of requests received according to the cleaned log fields, and correctly aggregate the node topological relationship in the zipkin scenario. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of the process of a topological aggregation method based on zipkin link data provided in Example 1 of the present application;

[0022] Figure 2 A schematic diagram of the structure of a topological aggregation device based on zipkin link data provided in Example 2 of the present application;

[0023] Figure 3 A schematic diagram of the structure of an electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0024] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.

[0025] Embodiment 1

[0026] Figure 1 A schematic diagram of a topological aggregation method based on zipkin link data provided in Example 1 of the present application is shown in FIG. Figure 1 As shown, the topology aggregation method based on zipkin link data provided in this embodiment may specifically include the following steps:

[0027] Step 101: Get the log field to be filtered, and filter out the original log from the zipkin link data according to the log to be filtered.

[0028] In this step, in order to meet the user's analysis needs, the user can enter the date field to be filtered, and then filter out the original logs with the log field to be filtered from the zipkin link data.

[0029] It should be noted that Zipkin link data refers to the log data generated when service requests and receipts are made in the Zipkin scenario.

[0030] Step 102: Aggregate original logs with the same tracking identifier to obtain a log data set corresponding to each tracking identifier.

[0031] It should be noted that, in a specific example, the trace identifier may be traceid, which is usually a globally unique identifier of a service call request, and may identify a series of request receiving processes generated by the service call request.

[0032] In this step, the original logs with the same trace ID may be aggregated into a log data set. In a specific example, the trace ID may be 666666. To better illustrate this embodiment, the following original logs with the same trace ID (trace ID is 666666) may be provided:

[0033] Log 1: traceid=666666; type=server; parentid=null; spanid=90; application=A; service=1.

[0034] Log 2: traceid=666666; type=client; parentid=90; spanid=80; application=A; service=2.

[0035] Log 3: traceid=666666; type=server; parentid=90; spanid=80; application=B; service=2.

[0036] Log 4: traceid=666666; type=client; parentid=80; spanid=70; application=B; service=3.

[0037] Log 5: traceid=666666; type=server; parentid=80; spanid=70; application=C; service=3.

[0038] Log 6: traceid=666666; type=client; parentid=70; spanid=60; application=C; service=4.

[0039] Log 7: traceid=666666; type=server; parentid=70; spanid=60; application=D; service=4.

[0040] Log 8: traceid=666666; type=client; parentid=60; spanid=50; application=D; service=5.

[0041] Step 103: For the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs.

[0042] In this step, for a log data set corresponding to any tracking identifier, the original logs in the log data set are polled; each time an original log is polled, the original logs with the same span identifier as the original log are screened out, and the screened original logs and the polled original logs are extracted from the log data set; the log fields in the extracted original logs are cleaned according to the log type of the original log, and the cleaned log fields are spliced ​​into a spliced ​​log.

[0043] Since there are multiple original logs in each log data set, and in the Zipkin scenario, there are usually two original logs with the same span identifier, and in order to clean and splice the original logs with the same span identifier, this application needs to first query the original logs with the same span identifier.

[0044] The query method in this step is the polling method, which polls the original logs one by one from the log data set. Every time an original log is polled, the span identifier in the original log, i.e. spanid, is extracted, and then other original logs in the log data set with the same span identifier are searched. After the search is completed, the polled original logs and the queried original logs can be extracted from the log data set.

[0045] The extracted original logs are cleaned and spliced ​​to obtain a spliced ​​log, and then the next original log in the log data set is polled.

[0046] It should be noted that after the original logs are extracted, the extracted original logs no longer exist in the log data set.

[0047] Taking the above log data set as an example, when polling log 2, its spanid is 80, log 3 with spanid 80 is found, and then log 1 and log 2 are extracted.

[0048] During the specific cleaning and splicing, for any extracted original log, the log type identifier of the original log is extracted, and the original log type identifier is combined and named with the log field in the original log to obtain the spliced ​​fields corresponding to each log field; create a target application field and a target service field, add the field content of the spliced ​​field named as the first field name to the target application field, and add the field content of the spliced ​​field named as the second field name to the target service field; combine the spliced ​​field, the target application field and the target service field into a spliced ​​log of the extracted original log.

[0049] In a specific example, the log type of log 2 is client type, and the log type identifier of this type is client. The log type of log 3 is server type, and the corresponding log type identifier is server. At this time, the corresponding log fields are combined and named as follows:

[0050] Parentid (parent node identifier) ​​= 90; spanid = 80; server_application: B; server_service: 2; server_time consumed: 2; client_application: A; client_service: 2; client_time consumed: 2.

[0051] Then create the target application field ("target_application") and the target service field ("target_service"), and fill them with the following content: target_application: B; target_service: 2. It should be noted that the first field name is server_application, and the second field name is server_service.

[0052] If server_application has no data, target_application is null; if server_service has no data, target_service is the field content of client_service.

[0053] After the above process, the splicing log is as follows:

[0054] a) target_application: B

[0055] b)target_service: 2

[0056] c) parentid = 90

[0057] d) spanid = 80

[0058] e) server_application: B

[0059] f)server_service: 2

[0060] g) server_time: 2

[0061] h) client_application: A

[0062] i) client_service: 2

[0063] J)client_Time taken: 2.

[0064] Step 104: Determine the topological relationship between the application service nodes and the number of received requests according to the log field of the service type in the splicing log.

[0065] In this step, for any splicing log, a source application field and a source service field are created; a target splicing log with a target span identifier is filtered out, and the target span identifier is a span identifier that is the same as the parent node identifier of any splicing log; the field content of the splicing field named as the first field name in the target splicing log is added to the source application field, and the field content of the splicing field named as the second field name is added to the source service field; the topological relationship between application service nodes is determined according to the target application field, target service field, source application field and source service field in the splicing log; the number of requests received between application service nodes is determined according to the target application field, target service field, source application field and source service field in the splicing log.

[0066] It should be noted that the source application field can be source_application, and the source service field can be source_service.

[0067] Taking the spliced ​​log obtained from the above cleaning and splicing example as an example, its parentid is 90, then you can search for the spliced ​​log with spanid 90. In the above example, the spliced ​​log corresponding to log 1 is the target spliced ​​log.

[0068] In the target splicing log, the first field name is server_application, and its content is A. The second field name is server_service, and its content is 1. After filling their contents into the corresponding fields, the following splicing log is obtained:

[0069] a) source_application: A

[0070] b)source_service: 1

[0071] c) target_application: B

[0072] d)target_service: 2

[0073] e)pid=90

[0074] f) spanid = 80

[0075] g) server_application: B

[0076] h)server_service: 2

[0077] i) server_time: 2

[0078] j) client_application: A

[0079] k)client_service: 2

[0080] l)client_time consumed: 2.

[0081] Based on the latest spliced ​​logs obtained above, for any spliced ​​log, the source application field and the source service field are spliced ​​into a source application service node, and the target application field and the target service field are spliced ​​into a target application service node; the source application service node is pointed to the target application service node to determine the topological relationship between the source service application node and the target application service node; the topological relationships determined by all spliced ​​logs are combined to obtain the topological relationship between all application service nodes.

[0082] Specifically, the field contents of source_application and source_service are concatenated to obtain A1, and the field contents of target_application and target_service are concatenated to obtain B2. A1 is the source application service node, B2 is the target application service node, and A1 pointing to B2 is the topological relationship between A1 and B2.

[0083] After the above operations, the following topological relationship can be obtained: A1 points to B2, B2 points to C3, C3 points to D4, and the comprehensive topological relationship is: A1 points to B2 points to C3 points to D4.

[0084] In addition, for the number of requests received, search for splicing logs in which the target application field, target service field, source application field and source service field are the same; determine the number of first logs in which the target splicing field has data in the searched splicing logs, and the number of second logs in which both the source application field and the source service field have data.

[0085] The first log quantity is determined as the number of requests between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field.

[0086] The second log quantity is determined as the reception quantity between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field.

[0087] In a specific example, the first log quantity is 1, and the second log quantity is also 1. Then, between A1 and B2, the request quantity is 1, and the reception quantity is 1.

[0088] It should be noted that for any source application service node and target application service node with a topological relationship, it is determined whether the request quantity and the received quantity are the same; if they are not the same, the request quantity and the received quantity are displayed in red. The red display can remind the user to focus on analyzing the location.

[0089] In this embodiment, the log fields to be filtered are obtained, and the original logs are filtered out from the zipkin link data according to the logs to be filtered; the original logs with the same tracking identifier are aggregated to obtain the log data set corresponding to each tracking identifier; for the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs; the topological relationship between the application service nodes and the number of requests received are determined according to the log fields of the service type in the spliced ​​log. Based on this, the embodiment of the present application can aggregate the original logs with the same span identifier, clean the fields therein, determine the topological relationship between the application service nodes and the number of requests received according to the cleaned log fields, and correctly aggregate the node topological relationship in the zipkin scenario.

[0090] Embodiment 2

[0091] Figure 2 This is a schematic diagram of the structure of a topological aggregation device based on zipkin link data provided in the second embodiment of the present application. The topological aggregation device based on zipkin link data provided in the embodiment of the present application can execute the topological aggregation method based on zipkin link data provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. The device can be implemented in software and / or hardware, such as Figure 2 As shown, the topological aggregation device based on Zipkin link data specifically includes: a screening module 201, an aggregation module 202, a cleaning and splicing module 203, and a topological aggregation module 204.

[0092] Among them, the filtering module is used to obtain the log fields to be filtered, and filter out the original logs from the zipkin link data according to the logs to be filtered;

[0093] The aggregation module is used to aggregate the original logs with the same tracking identifier to obtain the log data set corresponding to each tracking identifier;

[0094] A cleaning and splicing module is used to clean and splice original logs with the same span identifier into spliced ​​logs for a log data set corresponding to any tracking identifier;

[0095] The topology aggregation module is used to determine the topological relationship between application service nodes and the number of requests received based on the log fields of the service type in the spliced ​​log.

[0096] In this embodiment, the log fields to be filtered are obtained, and the original logs are filtered out from the zipkin link data according to the logs to be filtered; the original logs with the same tracking identifier are aggregated to obtain the log data set corresponding to each tracking identifier; for the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs; the topological relationship between the application service nodes and the number of requests received are determined according to the log fields of the service type in the spliced ​​log. Based on this, the embodiment of the present application can aggregate the original logs with the same span identifier, clean the fields therein, determine the topological relationship between the application service nodes and the number of requests received according to the cleaned log fields, and correctly aggregate the node topological relationship in the zipkin scenario.

[0097] Embodiment 3

[0098] Figure 3 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present application is shown in FIG. Figure 3 As shown, the electronic device includes a processor 310, a memory 320, an input device 330 and an output device 340; the number of the processor 310 in the electronic device can be one or more. Figure 3 A processor 310 is taken as an example; the processor 310, the memory 320, the input device 330 and the output device 340 in the electronic device can be connected via a bus or other means. Figure 3 The example of connecting through bus is taken in the following.

[0099] The memory 320, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the topological aggregation method based on zipkin link data in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory 320, that is, to implement the above-mentioned topological aggregation method based on zipkin link data:

[0100] Get the log fields to be filtered, and filter out the original logs from the zipkin link data according to the logs to be filtered;

[0101] Aggregate the original logs with the same tracking ID to obtain the log data set corresponding to each tracking ID;

[0102] For the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs;

[0103] The topological relationship between application service nodes and the number of requests received are determined based on the log field of the service type in the splicing log.

[0104] Furthermore, for a log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs, including:

[0105] For a log data set corresponding to any tracking identifier, poll the original logs in the log data set;

[0106] Whenever an original log is polled, the original logs having the same span identifier as the original log are filtered out, and the filtered original logs and the polled original logs are extracted from the log data set;

[0107] The log fields in the extracted original logs are cleaned according to the log types of the original logs, and the cleaned log fields are spliced ​​into spliced ​​logs.

[0108] Furthermore, the log fields in the extracted original logs are cleaned according to the log types of the original logs, and the cleaned log fields are spliced ​​into spliced ​​logs, including:

[0109] For any extracted original log, extract the log type identifier of the original log, and combine the original log type identifier with the log field in the original log to name it, so as to obtain the concatenated field corresponding to each log field;

[0110] Create a target application field and a target service field, add the field content of the concatenated field named as the first field name to the target application field, and add the field content of the concatenated field named as the second field name to the target service field;

[0111] The splicing fields, the target application fields, and the target service fields are combined into a splicing log of the extracted original logs.

[0112] Furthermore, the spliced ​​log contains a target application field and a target service field;

[0113] Determine the topological relationship between application service nodes and the number of requests received based on the log fields of the service type in the splicing log, including:

[0114] For any spliced ​​log, create the source application field and the source service field;

[0115] Filter out the target splicing log with the target span identifier, where the target span identifier is the same as the parent node identifier of any splicing log;

[0116] Add the field content of the splicing field named as the first field name in the target splicing log to the source application field, and add the field content of the splicing field named as the second field name to the source service field;

[0117] Determine the topological relationship between application service nodes according to the target application field, target service field, source application field, and source service field in the splicing log;

[0118] The number of requests received between application service nodes is determined based on the target application field, target service field, source application field, and source service field in the concatenated log.

[0119] Further, determining the topological relationship between the application service nodes according to the target application field, the target service field, the source application field, and the source service field in the splicing log includes:

[0120] For any spliced ​​log, the source application field and the source service field are spliced ​​into a source application service node, and the target application field and the target service field are spliced ​​into a target application service node;

[0121] Pointing the source application service node to the target application service node determines the topological relationship between the source service application node and the target application service node;

[0122] The topological relationships determined by all the spliced ​​logs are combined to obtain the topological relationships between all application service nodes.

[0123] Further, the number of requests received between application service nodes is determined according to the target application field, the target service field, the source application field, and the source service field in the splicing log, including:

[0124] Search for concatenated logs with the same target application field, target service field, source application field, and source service field.

[0125] Determine the number of first logs in which the target splicing field has data in the searched splicing logs, and the number of second logs in which both the source application field and the source service field have data;

[0126] Determine the first log quantity as the number of requests between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field;

[0127] The second log quantity is determined as the reception quantity between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field.

[0128] Furthermore, the method also includes:

[0129] For any source application service node and target application service node having a topological relationship, determine whether the number of requests and the number of receipts are the same;

[0130] If they are different, the requested quantity and received quantity will be highlighted in red.

[0131] The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] Embodiment 4

[0133] Embodiment 4 of the present application further provides a storage medium containing computer executable instructions, which are used to execute a topology aggregation method based on zipkin link data when executed by a computer processor, the method comprising:

[0134] Get the log fields to be filtered, and filter out the original logs from the zipkin link data according to the logs to be filtered;

[0135] Aggregate the original logs with the same tracking ID to obtain the log data set corresponding to each tracking ID;

[0136] For the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs;

[0137] The topological relationship between application service nodes and the number of requests received are determined based on the log field of the service type in the splicing log.

[0138] Furthermore, for a log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs, including:

[0139] For a log data set corresponding to any tracking identifier, poll the original logs in the log data set;

[0140] Whenever an original log is polled, the original logs having the same span identifier as the original log are filtered out, and the filtered original logs and the polled original logs are extracted from the log data set;

[0141] The log fields in the extracted original logs are cleaned according to the log types of the original logs, and the cleaned log fields are spliced ​​into spliced ​​logs.

[0142] Furthermore, the log fields in the extracted original logs are cleaned according to the log types of the original logs, and the cleaned log fields are spliced ​​into spliced ​​logs, including:

[0143] For any extracted original log, extract the log type identifier of the original log, and combine the original log type identifier with the log field in the original log to name it, so as to obtain the concatenated field corresponding to each log field;

[0144] Create a target application field and a target service field, add the field content of the concatenated field named as the first field name to the target application field, and add the field content of the concatenated field named as the second field name to the target service field;

[0145] The splicing fields, the target application fields, and the target service fields are combined into a splicing log of the extracted original logs.

[0146] Furthermore, the spliced ​​log contains a target application field and a target service field;

[0147] Determine the topological relationship between application service nodes and the number of requests received based on the log fields of the service type in the splicing log, including:

[0148] For any spliced ​​log, create the source application field and the source service field;

[0149] Filter out the target splicing log with the target span identifier, where the target span identifier is the same as the parent node identifier of any splicing log;

[0150] Add the field content of the splicing field named as the first field name in the target splicing log to the source application field, and add the field content of the splicing field named as the second field name to the source service field;

[0151] Determine the topological relationship between application service nodes according to the target application field, target service field, source application field, and source service field in the splicing log;

[0152] The number of requests received between application service nodes is determined based on the target application field, target service field, source application field, and source service field in the concatenated log.

[0153] Further, determining the topological relationship between the application service nodes according to the target application field, the target service field, the source application field, and the source service field in the splicing log includes:

[0154] For any spliced ​​log, the source application field and the source service field are spliced ​​into a source application service node, and the target application field and the target service field are spliced ​​into a target application service node;

[0155] Pointing the source application service node to the target application service node determines the topological relationship between the source service application node and the target application service node;

[0156] The topological relationships determined by all the spliced ​​logs are combined to obtain the topological relationships between all application service nodes.

[0157] Further, the number of requests received between application service nodes is determined according to the target application field, the target service field, the source application field, and the source service field in the splicing log, including:

[0158] Search for concatenated logs with the same target application field, target service field, source application field, and source service field.

[0159] Determine the number of first logs in which the target splicing field has data in the searched splicing logs, and the number of second logs in which both the source application field and the source service field have data;

[0160] Determine the first log quantity as the number of requests between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field;

[0161] The second log quantity is determined as the reception quantity between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field.

[0162] Furthermore, the method also includes:

[0163] For any source application service node and target application service node having a topological relationship, determine whether the number of requests and the number of receipts are the same;

[0164] If they are different, the requested quantity and received quantity will be highlighted in red.

[0165] Of course, the storage medium containing computer executable instructions provided in the embodiment of the present application, whose computer executable instructions are not limited to the above method operations, can also execute related operations in the topological aggregation method based on zipkin link data provided in any embodiment of the present application.

[0166] Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present application can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0167] It is worth noting that in the embodiment of the above-mentioned search device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.

[0168] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.

Claims

1. A topological aggregation method based on zipkin link data, characterized in that: The method comprises: Obtain the log field to be filtered, and filter out the original log from the zipkin link data according to the log to be filtered; Aggregate the original logs with the same tracking identifier to obtain a log data set corresponding to each tracking identifier; For a log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs; Determine the topological relationship between application service nodes and the number of requests received according to the log field of the service type in the splicing log; Wherein, the splicing log contains a target application field and a target service field; The determining of the topological relationship between application service nodes and the number of received requests according to the log field of the service type in the splicing log includes: For any of the spliced ​​logs, create a source application field and a source service field; Filter out a target splicing log having a target span identifier, wherein the target span identifier is a span identifier that is the same as a parent node identifier of any of the splicing logs; Add the field content of the splicing field named as the first field name in the target splicing log to the source application field, and add the field content of the splicing field named as the second field name to the source service field; Determine the topological relationship between the application service nodes according to the target application field, the target service field, the source application field and the source service field in the splicing log; Determine the number of requests received between the application service nodes according to the target application field, the target service field, the source application field and the source service field in the splicing log; The determining of the topological relationship between the application service nodes according to the target application field, the target service field, the source application field, and the source service field in the splicing log includes: For any of the spliced ​​logs, the source application field and the source service field are spliced ​​into a source application service node, and the target application field and the target service field are spliced ​​into a target application service node; Pointing the source application service node to the target application service node is determined as a topological relationship between the source application service node and the target application service node; The topological relationships determined by all the spliced ​​logs are combined to obtain the topological relationships between all the application service nodes.

2. The method according to claim 1, characterized in that For the log data set corresponding to any tracking identifier, the original logs with the same span identifier are cleaned and spliced ​​into spliced ​​logs, including: For a log data set corresponding to any tracking identifier, polling the original logs in the log data set; Whenever an original log is polled, an original log having the same span identifier as the original log is screened out, and the screened original log and the polled original log are extracted from the log data set; The log fields in the extracted original logs are cleaned according to the log types of the original logs, and the cleaned log fields are spliced ​​into spliced ​​logs.

3. The method according to claim 2, characterized in that The step of cleaning the log fields in the extracted original logs according to the log types of the original logs and splicing the cleaned log fields into a spliced ​​log includes: For any of the extracted original logs, extract the log type identifier of the original log, and combine and name the original log type identifier with the log field in the original log to obtain a concatenated field corresponding to each log field; Create a target application field and a target service field, add the field content of the concatenated field named as the first field name to the target application field, and add the field content of the concatenated field named as the second field name to the target service field; The splicing field, the target application field, and the target service field are combined into a splicing log of the extracted original log.

4. The method according to claim 1, characterized in that: The determining the number of requests received between application service nodes according to the target application field, the target service field, the source application field, and the source service field in the splicing log includes: Search for the splicing logs in which the target application field, the target service field, the source application field and the source service field are all the same; Determine the number of first logs in which the target splicing field has data in the searched splicing logs, and the number of second logs in which both the source application field and the source service field have data; Determine the first log quantity as the number of requests between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field; The second log quantity is determined as the reception quantity between the source application service node corresponding to the source application field and the source service field and the target application service node corresponding to the target application field and the target service field.

5. The method according to claim 4, characterized in that The method further comprises: For any source application service node and target application service node having a topological relationship, determine whether the number of requests and the number of receipts are the same; If they are different, the requested quantity and received quantity will be highlighted in red.

6. A topology aggregation device based on zipkin link data, characterized in that: The device comprises: A filtering module is used to obtain the log fields to be filtered, and filter out the original logs from the zipkin link data according to the logs to be filtered; An aggregation module, used for aggregating the original logs with the same tracking identifier to obtain a log data set corresponding to each tracking identifier; A cleaning and splicing module, used for cleaning and splicing the original logs with the same span identifier into a spliced ​​log for a log data set corresponding to any tracking identifier; A topology aggregation module, used to determine the topological relationship between application service nodes and the number of received requests according to the log field of the service type in the spliced ​​log; Wherein, the splicing log contains a target application field and a target service field; Among them, the topology aggregation module is specifically used to create a source application field and a source service field for any of the splicing logs; filter out a target splicing log with a target span identifier, wherein the target span identifier is a span identifier that is the same as the parent node identifier of any of the splicing logs; add the field content of the splicing field named as the first field name in the target splicing log to the source application field, and add the field content of the splicing field named as the second field name to the source service field; determine the topological relationship between the application service nodes according to the target application field, the target service field, the source application field and the source service field in the splicing log; determine the number of requests received between the application service nodes according to the target application field, the target service field, the source application field and the source service field in the splicing log; Among them, the topology aggregation module is specifically used to, for any of the spliced ​​logs, splice the source application field and the source service field into a source application service node, and splice the target application field and the target service field into a target application service node; point the source application service node to the target application service node to determine the topological relationship between the source application service node and the target application service node; and combine the topological relationships determined by all the spliced ​​logs to obtain the topological relationship between all the application service nodes.

7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the topological aggregation method based on zipkin link data as described in any one of claims 1-5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, a topological aggregation method based on zipkin link data as described in any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • Distributed big data log link tracking method and system under micro-service architecture

    CN112612675A

  • Full-link monitoring method and device, equipment, storage medium and program product

    CN114490268A

  • Automatic construction method for link topology in financial transaction log

    CN114817170A

  • Method for tracking service call chain based on Opentracing link

    CN116192621A

  • Calling link display method and device, electronic equipment and storage medium

    CN117149894A