Full-link monitoring method, apparatus, device, and storage medium
By acquiring parent node information and generating child node identifiers through a full-link monitoring method, the problem of inconsistent monitoring in batch processing and stream processing scenarios is solved, realizing full-link monitoring of batch and stream processing, and improving data monitoring efficiency and problem location speed.
Patent Information
- Application Number
- CN202311094196.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-25
- Publication Date
- 2026-11-20
- Estimated Expiration
- 2043-08-25
AI Technical Summary
In existing technologies, end-to-end monitoring in batch processing and stream processing scenarios suffers from problems such as difficulty in location, high cost, and inconsistent monitoring, making it impossible to achieve comprehensive and complete data monitoring.
This paper provides a full-link monitoring method that obtains the link tracing information of the parent node, generates the node identifier of the child node, and generates a link log containing the information of the parent node from the child node, thereby realizing full-link monitoring of batch and stream.
It improves data monitoring efficiency in batch and stream processing scenarios, can monitor all business nodes in each system, and restores the link through link logs, simplifying problem localization.
Smart Images

Figure CN117251346B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer technology, and in particular relates to a method, apparatus, device and storage medium for end-to-end monitoring. Background Technology
[0002] With the rapid development of technology, various digital marketing systems for customers have emerged, mainly used to help business personnel complete campaign execution and customer contact.
[0003] Currently, common marketing systems mainly include batch processing engines, stream processing engines, and multiple customer contact channel systems. In order to improve the robustness of the system and facilitate customers to investigate the marketing process, it is necessary to monitor the data of each system. However, since the link rules, data processing modules, and deployment environments are different in batch processing and stream processing scenarios, different systems can only build their own internal monitoring modules. This results in problems such as difficulty and time in locating problems due to the long link, high cost of building multiple monitoring modules, and inability to achieve comprehensive and complete monitoring due to inconsistent monitoring standards among systems.
[0004] In summary, how can we provide a comprehensive end-to-end monitoring solution that integrates batch and stream processing to improve data monitoring efficiency in both batch and stream processing scenarios? Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for end-to-end monitoring. It aims to provide an integrated batch and stream monitoring solution to improve data monitoring efficiency in both batch and stream processing scenarios.
[0006] To achieve the above objectives, the present invention provides a full-link monitoring method, which is applied to a monitoring system. The monitoring system includes a first business node and a second business node, wherein the first business node is the parent node of the second business node, and the first business node and the second business node belong to a batch processing scenario or a stream processing scenario.
[0007] The end-to-end monitoring method includes:
[0008] Obtain the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node;
[0009] Generate a second node identifier for the second business node based on the first node identifier;
[0010] Link logs are generated through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
[0011] Optionally, the step of obtaining the first link tracing information of the first service node includes:
[0012] In the batch processing scenario, the second business node pulls data table information from the first business node and obtains the first link tracing information of the first business node from the data table information.
[0013] Optionally, the step of generating the second node identifier of the second service node based on the first node identifier includes:
[0014] In the batch processing scenario, the first node identifier is used as the second node identifier of the second business node.
[0015] Optionally, the step of obtaining the first link tracing information of the first service node includes:
[0016] In the streaming processing scenario, when the first service node calls the second service node, the second service node receives the first link tracing information sent by the first service node.
[0017] Optionally, the step of generating the second node identifier of the second service node based on the first node identifier includes:
[0018] In the streaming processing scenario, it is detected whether the second service node is a merging node in the link;
[0019] If the second service node is detected to be the merged node, then the first node identifier is incremented by one to obtain the second node identifier of the second service node;
[0020] If the second service node is detected to be not the merged node, then the first node identifier is used as the second node identifier.
[0021] Optionally, the step of generating link logs through the second service node includes:
[0022] In the streaming processing scenario, the second service node generates second link tracing information based on the second node identifier and the second node name of the second service node, and sends the second link tracing information to the third service node, wherein the third service node is a child node of the second service node, and the third service node belongs to the batch processing scenario or the streaming processing scenario;
[0023] If the second service node receives the response information returned by the third service node based on the link tracing information, then the step of generating link logs through the second service node is executed.
[0024] Optionally, after the step of generating link logs through the second service node, the method further includes:
[0025] Upon receiving a link investigation request triggered by a customer, it checks whether the second business node is a core node, wherein the data processed by the core node is related to the customer;
[0026] If the second business node is detected to be the core node, the link is restored based on the link logs so that the customer can troubleshoot the link.
[0027] In addition, to achieve the above objectives, the present invention also provides a full-link monitoring device, which is applied to a monitoring system. The monitoring system includes a first business node and a second business node, wherein the first business node is the parent node of the second business node, and the first business node and the second business node belong to a batch processing scenario or a stream processing scenario.
[0028] The end-to-end monitoring device includes:
[0029] The acquisition module is used to acquire the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node;
[0030] The identifier generation module is used to generate a second node identifier for the second business node based on the first node identifier;
[0031] The log generation module is used to generate link logs through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
[0032] In addition, to achieve the above objectives, the present invention also provides a terminal device, the terminal device comprising: a memory, a processor, and a full-link monitoring program stored in the memory and executable on the processor, wherein the full-link monitoring program of the terminal device, when executed by the processor, implements the steps of the full-link monitoring method as described above.
[0033] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing a full-link monitoring program, which, when executed by a processor, implements the steps of the full-link monitoring method as described above.
[0034] This invention provides a full-link monitoring method, apparatus, terminal device, and computer-readable storage medium. The method is applied to a monitoring system, which includes a first service node and a second service node. The first service node is the parent node of the second service node, and the first service node and the second service node belong to a batch processing scenario or a stream processing scenario. The full-link monitoring method includes: acquiring first link tracing information of the first service node, wherein the first link tracing information includes a first node name and a first node identifier of the first service node; generating a second node identifier of the second service node based on the first node identifier; and generating a link log through the second service node, wherein the link log includes the first node name, the first node identifier, the second node identifier, and the second node name of the second service node.
[0035] This invention provides a comprehensive end-to-end monitoring solution for batch and stream processing by acquiring the link tracing information of the parent node (i.e., the first link tracing information mentioned above). This link tracing information includes the node name (i.e., the first node name) and node identifier (i.e., the first node identifier) of the current parent node. Based on the node identifier of the parent node, a node identifier (i.e., the second node identifier) of the child node is generated. Then, the current child node generates a link log containing the node name and node identifier of the parent node, as well as the node name and node identifier of the child node. Thus, compared to the traditional method of monitoring each system separately, this invention can monitor all business nodes in each system and perform link tracing based on the parent node information contained in the link logs generated by the business nodes to reconstruct the link. This provides a comprehensive end-to-end monitoring solution for both batch and stream processing, thereby improving the data monitoring efficiency in batch and stream processing scenarios. Attached Figure Description
[0036] Figure 1 This is a schematic diagram of the device structure of the terminal device hardware operating environment involved in the embodiments of the present invention;
[0037] Figure 2 This is a flowchart illustrating the steps of the first embodiment of the end-to-end monitoring method of the present invention;
[0038] Figure 3 This is a schematic diagram of a composite link involved in an embodiment of the end-to-end monitoring method of the present invention;
[0039] Figure 4 This is a schematic diagram of the asynchronous processing architecture involved in an embodiment of the end-to-end monitoring method of the present invention;
[0040] Figure 5 This is a schematic diagram illustrating the link construction involved in an embodiment of the end-to-end monitoring method of the present invention;
[0041] Figure 6This is a schematic diagram of the synchronization processing architecture involved in an embodiment of the end-to-end monitoring method of the present invention;
[0042] Figure 7 This is a schematic diagram comparing the batch and stream processing sampling links involved in an embodiment of the end-to-end monitoring method of the present invention.
[0043] Figure 8 This is a schematic diagram of the functional modules of an embodiment of the end-to-end monitoring device of the present invention.
[0044] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0045] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0046] Reference Figure 1 , Figure 1 This is a schematic diagram of the hardware operating environment of the terminal device involved in the embodiment of the present invention.
[0047] The terminal device in this embodiment of the invention can be a terminal device integrated with a monitoring system applied in the field of computer technology. Furthermore, the monitoring system includes a first service node and a second service node, with the first service node being the parent node of the second service node. The first and second service nodes belong to either a batch processing scenario or a stream processing scenario. Specifically, the terminal device can be a smartphone, PC (Personal Computer), tablet computer, portable computer, etc.
[0048] like Figure 1 As shown, the terminal device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen and an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0049] Those skilled in the art will understand that Figure 1The terminal device structure shown does not constitute a limitation on the terminal device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0050] like Figure 1 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and a full-link monitoring program.
[0051] exist Figure 1 In the terminal shown, network interface 1004 is mainly used to connect to the backend server and communicate with it; user interface 1003 is mainly used to connect to the client and communicate with it; and processor 1001 can be used to call the end-to-end monitoring program stored in memory 1005 and perform the following operations:
[0052] Obtain the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node;
[0053] Generate a second node identifier for the second business node based on the first node identifier;
[0054] Link logs are generated through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
[0055] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005 and perform the following operations:
[0056] In the batch processing scenario, the second business node pulls data table information from the first business node and obtains the first link tracing information of the first business node from the data table information.
[0057] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005 and perform the following operations:
[0058] In the batch processing scenario, the first node identifier is used as the second node identifier of the second business node.
[0059] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005 and perform the following operations:
[0060] In the streaming processing scenario, when the first service node calls the second service node, the second service node receives the first link tracing information sent by the first service node.
[0061] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005 and perform the following operations:
[0062] In the streaming processing scenario, it is detected whether the second service node is a merging node in the link;
[0063] If the second service node is detected to be the merged node, then the first node identifier is incremented by one to obtain the second node identifier of the second service node;
[0064] If the second service node is detected to be not the merged node, then the first node identifier is used as the second node identifier.
[0065] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005 and perform the following operations:
[0066] In the streaming processing scenario, the second service node generates second link tracing information based on the second node identifier and the second node name of the second service node, and sends the second link tracing information to the third service node, wherein the third service node is a child node of the second service node, and the third service node belongs to the batch processing scenario or the streaming processing scenario;
[0067] If the second service node receives the response information returned by the third service node based on the link tracing information, then the step of generating link logs through the second service node is executed.
[0068] Optionally, the processor 1001 can also be used to call the end-to-end monitoring program stored in the memory 1005, and after the step of generating link logs through the second service node, perform the following operations:
[0069] Upon receiving a link investigation request triggered by a customer, it checks whether the second business node is a core node, wherein the data processed by the core node is related to the customer;
[0070] If the second business node is detected to be the core node, the link is restored based on the link logs so that the customer can troubleshoot the link.
[0071] Based on the aforementioned terminal devices, various embodiments of the end-to-end monitoring method of the present invention are proposed.
[0072] Please refer to Figure 2 , Figure 2This is a flowchart illustrating the first embodiment of the end-to-end monitoring method of the present invention. It should be noted that although the logical order is shown in the flowchart, in certain situations, the end-to-end monitoring method of the present invention may execute the steps shown or described in a different order than that shown here.
[0073] In a first embodiment of the end-to-end monitoring method of the present invention, the end-to-end monitoring method of the present invention includes:
[0074] Step S10: Obtain the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node;
[0075] In this embodiment, the terminal device obtains the link tracing information (hereinafter referred to as the first link tracing information) of the parent node (hereinafter referred to as the first service node for distinction). The first link tracing information includes the node name (hereinafter referred to as the first node name for distinction) and the node identifier (hereinafter referred to as the first node identifier for distinction) of the first service node.
[0076] It should be noted that a Trace represents a complete tracing chain, which consists of a series of Spans. Each Spanula corresponds one-to-one with a business node. Each cross-service processing step constitutes a Spanula. Dependencies exist between Spans, and multiple Spans combine to form a complete Trace record. For batch processing scenarios with a single data source, the system uses a single Trace for tracing. In a single Trace, the traceId is unique and generated by the root node. In stream processing scenarios, multiple events trigger the next processing step, thus the chain has multiple sources. A single Trace design cannot meet the needs of stream processing marketing. This invention proposes the concept of a composite Traced, such as... Figure 3 As shown in the diagram, the composite link is a schematic diagram where Span3 is a child node of Span1 and Span2.
[0077] In one feasible implementation, whether in the batch processing scenario or the stream processing scenario, the terminal device obtains the link tracing information of the parent node of the current service node through the current service node. This link tracing information is used to store the node name and node identifier of the node, which is equivalent to the node's identity information.
[0078] Furthermore, in a feasible embodiment, step S10 above may include:
[0079] Step S101: In the batch processing scenario, the second business node pulls data table information from the first business node and obtains the first link tracing information of the first business node from the data table information.
[0080] In this embodiment, in a batch processing scenario, the terminal device pulls data table information from the parent node (i.e., the aforementioned first business node) through a child node (hereinafter referred to as the second business node for distinction), and then obtains the first link tracing information of the first business node from the data table information.
[0081] It should be noted that the first business node mentioned above is the parent node of the second business node. That is, the first business node can represent all nodes in each link that have the identity of a parent node, and the second business node can represent all nodes in each link that have the identity of a child node. For example, if node 2 is a child node of node 1, then node 2 can be called the second business node and node 1 can be called the first business node. If node 2 is the parent node of node 3, then node 2 can be called the first business node and node 3 can be called the second business node.
[0082] It's important to note that batch processing and stream processing scenarios differ significantly in their activity processing workflows. Stream processing primarily relies on API calls and function passing, while batch processing utilizes Spark, Hive, and micro-batch jobs in its activity execution phase. Activity nodes exchange data via tables and files, without direct data communication.
[0083] In one feasible implementation, in batch processing scenarios, the terminal device pre-configures an asynchronous processing architecture. This asynchronous processing architecture is mainly used to handle log collection based on data transmission, such as the execution flow of batch processing activities. Each processing node retrieves the data table information from the previous node, processes it, and then stores the TraceContext information (i.e., the aforementioned link tracing information) in the table, waiting for downstream nodes to retrieve and process the data. Figure 4 As shown in the diagram, the asynchronous processing architecture involves asynchronous communication between modules. When module A drives module B's execution using data from files / tables / messages, it needs to attach TraceContext-A information and generate Log-A. After asynchronously fetching data, module B parses the TraceContext-A information, generates TraceContext-B information, and places it in intermediate storage, while also generating Log-B. Module C receives and processes the TraceContext-B information, generating the link log Log-C. It should be noted that... Figure 4 Each module in the module corresponds one-to-one with the Span mentioned above, and Figure 4 The monitoring system is composed of Kafka and streaming data engine.
[0084] Furthermore, in a feasible embodiment, step S10 above may further include:
[0085] Step S102: In the streaming processing scenario, when the first service node calls the second service node, the second service node receives the first link tracing information sent by the first service node.
[0086] In this embodiment, in a streaming processing scenario, the terminal device calls the second service node through the first service node, that is, calls the downstream node through the upstream node, and then sends the link tracing information of the first service node to the second service node, that is, the upstream parent node sends the identity information of the parent node to the downstream child node, and then the child node receives the link tracing information sent by the parent node.
[0087] Step S20: Generate a second node identifier for the second service node based on the first node identifier, wherein the second service node is a child node of the first service node;
[0088] In this embodiment, the terminal device generates the node identifier of the child node (i.e., the second service node) based on the node identifier of the parent node (i.e., the first service node mentioned above).
[0089] Furthermore, in a feasible embodiment, step S20 above may include:
[0090] Step S201: In the batch processing scenario, the first node identifier is used as the second node identifier of the second business node.
[0091] In this embodiment, in a batch processing scenario, the terminal device uses the node identifier of the parent node as the node identifier of the child node.
[0092] In one feasible implementation, in a batch processing scenario, the data link is a single data source link with only one root node. Therefore, the node identifiers of each node in this type of link are the same, that is, the node identifiers follow the root node.
[0093] Furthermore, in a feasible embodiment, step S20 above may further include:
[0094] Step S202: In the streaming processing scenario, detect whether the second service node is a merging node in the link;
[0095] In this embodiment, in a stream processing scenario, the terminal device detects whether the current child node is a merging node in the link.
[0096] In one feasible implementation, in a stream processing scenario, before generating the node identifier of the current node based on the parent node identifier of the current node, it is first necessary to detect the node type of the current node, that is, to detect whether the node type of the current node is a merged node.
[0097] Step S203: If the second service node is detected to be the merging node, then increment the first node identifier by one to obtain the second node identifier of the second service node;
[0098] In this embodiment, in a stream processing scenario, if the terminal device detects that the current child node is a merged node, it increments the node identifier of the parent node by one to obtain the calculation result, and uses the calculation result as the node identifier of the current node.
[0099] Step S204: If the second service node is detected to be not the merging node, then the first node identifier is used as the second node identifier.
[0100] In this embodiment, in a stream processing scenario, if the terminal device detects that the current child node is not a merged node, it directly uses the node identifier of the parent node as the node identifier of the current child node.
[0101] In a feasible implementation, in a stream processing scenario, a composite Trace indicates that there are more than one root node in a link. If a traceId (i.e., the aforementioned node identifier) is generated at the root node, it will result in multiple traceIds for the entire link, making it impossible to reconstruct the link based on a single traceId. Therefore, this invention designs the concept of ParentTrace to assist in link reconstruction. Figure 5 As shown in the diagram, a new traceId is generated at each merging node, and the traceId of its parent node (i.e., parentTraceId) is recorded. In this way, a complete tracing link can be constructed based on Trace, ParentTrace, and Span.
[0102] Step S30: Generate a link log through the second service node, wherein the link log includes the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
[0103] In this embodiment, the terminal device generates a link log through the current child node, wherein the link log of the current child node includes the node name and node identifier of the parent node, as well as the node name and node identifier of the current child node.
[0104] In one feasible implementation, each business node in the current business system generates multiple link logs. Based on the identity information of the parent node and the identity information of the current node in each link log, each link can be reconstructed. Thus, by setting the node identification rules and data processing rules for batch processing scenarios and stream processing scenarios respectively, a batch-stream integrated monitoring system is formed.
[0105] Furthermore, in a feasible embodiment, step S30 above may include:
[0106] Step S301: In the streaming processing scenario, the second service node generates second link tracing information based on the second node identifier and the second node name of the second service node, and sends the second link tracing information to the third service node, wherein the third service node is a child node of the second service node, and the third service node belongs to the batch processing scenario or the streaming processing scenario;
[0107] In this embodiment, in the streaming processing scenario, the terminal device generates link tracing information (hereinafter referred to as the second link tracing information for distinction) of the second service node based on the node identifier and node name of the second service node. Specifically, the second link tracing information includes the node identifier and node name of the second service node, and sends the second link tracing information to the child node of the second service node (hereinafter referred to as the third service node for distinction). The third service node also belongs to the batch processing scenario or the streaming processing scenario.
[0108] Step S302: If the second service node receives the response information returned by the third service node based on the link tracing information, then the step of generating link logs through the second service node is executed.
[0109] In this embodiment, the terminal device receives response information returned by the sub-nodes of the second service node based on the second link tracing information through the second service node. After receiving the response information returned by the downstream sub-nodes, the terminal device generates a link log through the second service node.
[0110] In one feasible implementation, in a stream processing scenario, the terminal device pre-configures a synchronous processing architecture, which is primarily used to handle log collection based on interface calls, such as... Figure 6As shown in the diagram, the synchronous processing architecture involves synchronous communication between modules. Module A, acting as the first hop in a request, generates and sends a TraceContext-AB (linked tracing context) to module B when calling module B. After module B returns a response, it generates a link log (Log-A). Simultaneously, upon receiving a request from module A, module B processes the TraceContext-AB in the request. When calling module C, it generates and sends a TraceContext-BC to module C. After module C returns a response, it generates a link log (Log-B). Module C, acting as the last hop in a request, receives and processes the TraceContext-BC in module B's request, generating a link log (Log-C). It should be understood that the order in which modules A, B, and C generate logs is: module C generates Log-C, then module B generates Log-B, and finally module A generates Log-A.
[0111] In this embodiment, the full-link monitoring method of the present invention obtains the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node; in the batch processing scenario, the terminal device pulls data table information from the first service node through the second service node, and then obtains the first link tracing information of the first service node from the data table information; in the stream processing scenario, the terminal device calls the second service node through the first service node, that is, calls the downstream node through the upstream node, and then sends the link tracing information of the first service node to the second service node, that is, the upstream parent node sends the identity information of the parent node to the downstream child node; the node identifier of the second service node is generated based on the node identifier of the first service node; in the batch processing scenario, the terminal device uses the node identifier of the parent node as the node identifier of the child node; in the stream processing scenario, the terminal device detects whether the current child node is a merging node in the link, and if detected... If the current child node is a merged node, the node identifier of the parent node is incremented by one to obtain the calculation result, which is then used as the node identifier of the current node. If the current child node is not a merged node, the node identifier of the parent node is directly used as the node identifier of the current child node. A link log is generated through the current child node, which includes the node name and node identifier of the parent node, as well as the node name and node identifier of the current child node. In a stream processing scenario, the terminal device generates second link tracing information for the second service node based on the node identifier and node name of the second service node, and sends the second link tracing information to the third service node of the second service node. The third service node also belongs to the batch processing scenario or the stream processing scenario. The terminal device receives response information returned by the child nodes of the second service node based on the second link tracing information through the second service node. After receiving the response information returned by the downstream child nodes, the second service node generates a link log.
[0112] Thus, this embodiment of the invention obtains the link tracing information of the parent node (i.e., the aforementioned first link tracing information), which includes the current parent node's node name (i.e., the aforementioned first node name) and node identifier (i.e., the aforementioned first node identifier). Based on the parent node's node identifier, it generates the child node's node identifier (i.e., the aforementioned second node identifier). Then, the current child node generates a link log containing the parent node's node name and node identifier, as well as the child node's node name and node identifier. Therefore, compared to the traditional method of monitoring each system separately, this invention can monitor all business nodes in each system and perform link tracing based on the parent node information contained in the link logs generated by the business nodes to reconstruct the link. This provides a batch and stream integrated end-to-end link monitoring solution, thereby improving data monitoring efficiency in batch processing and stream processing scenarios.
[0113] Furthermore, based on the first embodiment of the end-to-end monitoring method of the present invention described above, a second embodiment of the end-to-end monitoring method of the present invention is proposed.
[0114] In this embodiment, after step S30, the end-to-end monitoring method of the present invention may further include:
[0115] Step A10: Upon receiving a link investigation request triggered by a customer, detect whether the second business node is a core node, wherein the data processed by the core node is related to the customer;
[0116] In this embodiment, when the terminal device receives a link investigation request triggered by the customer, it detects whether the second service node is a core node. The core node is a node related to the customer, that is, the data processed by the core node is customer information.
[0117] Step A20: If the second service node is detected to be the core node, then link restoration is performed based on the link logs for customers to troubleshoot the link.
[0118] In this embodiment, if the terminal device detects that the second service node is a core node, it obtains the link log of that node and restores the link based on the link log for the customer to view.
[0119] In one feasible implementation, the daily log volume generated at each stage of marketing customer contact activities can reach tens of billions. Considering the capacity and performance limitations of the storage cluster, and to balance system-level and customer-level monitoring, this invention designs a dynamic sampling mechanism. The execution engine can move the first hop of the link forward based on its own processing characteristics. Since the data processed by the upstream link (non-core nodes) may not necessarily reach the customer, logs can be recorded at a sampling rate of no more than 1‰, focusing on system-level monitoring. Specifically, logs are recorded at a sampling rate of no more than 1‰. If the log of the current business node is not empty, it is determined that the current business node is working normally; otherwise, it is determined that the current business node has failed, and a fault message is output. During the marketing list generation stage, which records customer information, logs are recorded at a 100% sampling rate to ensure that the link from the customer contact perspective is complete, facilitating the customer's review of the list generation process. Specifically, this is achieved by reconstructing the link and displaying it to the customer. Figure 7 As shown in the diagram, comparing the sampling links for batch and stream processing, in the batch processing scenario, 100% full sampling starts from the output stage of the offline analysis platform. The business nodes involved in output, degassing, optimization, distribution, and feedback are core nodes. In the stream processing scenario, 100% full sampling starts from the optimization stage of the near real-time platform. The business nodes involved in optimization and distribution are core nodes. With the help of a dynamic sampling mechanism, the log size can be controlled to the hundreds of millions level without sacrificing monitoring effectiveness.
[0120] In this embodiment, the full-link monitoring method of the present invention detects whether the second business node is a core node when it receives a link investigation request triggered by a customer. If the second business node is detected to be a core node, the link log of the node is obtained, and the link is restored based on the link log for the customer to view.
[0121] In this way, when the monitoring system receives a link investigation request triggered by a customer, it collects logs generated by each business node according to the preset sampling path. Specifically, it collects logs generated by non-core nodes at a sampling rate of no more than 1‰ and collects logs generated by core nodes at a sampling rate of 100%. In this way, while ensuring data integrity and successful link reconstruction, selectively collecting logs generated by non-core nodes can save the log collection volume of the monitoring system and meet the capacity and performance requirements of the storage cluster.
[0122] Furthermore, this embodiment of the invention also provides a full-link monitoring device, which is applied to a monitoring system. The monitoring system includes a first business node and a second business node. The first business node is the parent node of the second business node. The first business node and the second business node belong to a batch processing scenario or a stream processing scenario.
[0123] Please refer to Figure 8 , Figure 8 This is a functional module diagram of an embodiment of the end-to-end monitoring device of the present invention, as shown below. Figure 8 As shown, the end-to-end monitoring device of the present invention includes:
[0124] The acquisition module 10 is used to acquire the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node;
[0125] The identifier generation module 20 is used to generate a second node identifier for the second service node based on the first node identifier;
[0126] The log generation module 30 is used to generate link logs through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
[0127] Optionally, module 10 includes:
[0128] The pull unit, applied in the batch processing scenario, pulls data table information from the first business node through the second business node, and obtains the first link tracing information of the first business node from the data table information.
[0129] Optionally, the identifier generation module 20 includes:
[0130] The first identifier generation unit is used to use the first node identifier as the second node identifier of the second business node in the batch processing scenario.
[0131] Optionally, module 10 includes:
[0132] The sending unit, applied in the streaming processing scenario, receives first link tracing information sent by the first service node through the second service node when it detects that the first service node calls the second service node.
[0133] Optionally, the identifier generation module 20 includes:
[0134] The detection unit is used to detect whether the second service node is a merging node in the link under the streaming processing scenario;
[0135] The second identifier generation unit is used to increment the first node identifier by one to obtain the second node identifier of the second service node if the second service node is detected to be the merged node.
[0136] The third identifier generation unit is used to use the first node identifier as the second node identifier if it is detected that the second service node is not the merged node.
[0137] Optionally, the log generation module 30 includes:
[0138] The sending unit is configured to, in the streaming processing scenario, generate second link tracing information based on the second node identifier and the second node name of the second service node through the second service node, and send the second link tracing information to the third service node, wherein the third service node is a child node of the second service node, and the third service node belongs to the batch processing scenario or the streaming processing scenario;
[0139] The log generation unit is used to execute the step of generating link logs through the second service node if the second service node receives response information returned by the third service node based on the link tracing information.
[0140] Optionally, the end-to-end monitoring device of the present invention further includes:
[0141] The detection module is used to detect whether the second business node is a core node when a link investigation request triggered by a customer is received, wherein the data processed by the core node is related to the customer;
[0142] The link restoration module is used to restore the link based on the link log if the second service node is detected to be the core node, so that the customer can perform link troubleshooting.
[0143] The present invention also provides a computer storage medium storing a full-link monitoring program, wherein when the full-link monitoring program is executed by a processor, it implements the steps of the full-link monitoring program method as described in any of the above embodiments.
[0144] The specific embodiments of the computer storage medium of the present invention are basically the same as the embodiments of the full-link monitoring program method of the present invention described above, and will not be repeated here.
[0145] The present invention also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the end-to-end monitoring method of the present invention as described in any of the above embodiments, which will not be elaborated here.
[0146] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or system. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or system that includes that element.
[0147] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0148] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes several instructions to cause a terminal device (such as TWS earphones, etc.) to execute the methods described in the various embodiments of the present invention.
[0149] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A full-link monitoring method, characterized in that, The end-to-end monitoring method is applied to a monitoring system, which includes a first business node and a second business node. The first business node is the parent node of the second business node, and the first business node and the second business node belong to a batch processing scenario or a stream processing scenario. The end-to-end monitoring method includes: Obtain the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node; A second node identifier for the second business node is generated based on the first node identifier; Link logs are generated through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node; The step of generating the second node identifier of the second service node based on the first node identifier includes: In the batch processing scenario, the first node identifier is used as the second node identifier of the second business node; In the streaming processing scenario, it is detected whether the second service node is a merging node in the link; If the second service node is detected to be the merged node, then the first node identifier is incremented by one to obtain the second node identifier of the second service node; If the second service node is detected to be not the merged node, then the first node identifier is used as the second node identifier.
2. The end-to-end monitoring method as described in claim 1, characterized in that, The step of obtaining the first link tracing information of the first service node includes: In the batch processing scenario, the second business node pulls data table information from the first business node and obtains the first link tracing information of the first business node from the data table information.
3. The end-to-end monitoring method as described in claim 1, characterized in that, The step of obtaining the first link tracing information of the first service node includes: In the streaming processing scenario, when the first service node calls the second service node, the second service node receives the first link tracing information sent by the first service node.
4. The end-to-end monitoring method as described in claim 1, characterized in that, The step of generating link logs through the second service node includes: In the streaming processing scenario, the second service node generates second link tracing information based on the second node identifier and the second node name of the second service node, and sends the second link tracing information to the third service node, wherein the third service node is a child node of the second service node, and the third service node belongs to the batch processing scenario or the streaming processing scenario; If the second service node receives the response information returned by the third service node based on the link tracing information, then the step of generating link logs through the second service node is executed.
5. The end-to-end monitoring method as described in any one of claims 1 to 4, characterized in that, After the step of generating link logs through the second service node, the method further includes: Upon receiving a link investigation request triggered by a customer, it checks whether the second business node is a core node, wherein the data processed by the core node is related to the customer; If the second business node is detected to be the core node, the link is restored based on the link logs so that the customer can troubleshoot the link.
6. A full-link monitoring device, characterized in that, The end-to-end monitoring device is applied to a monitoring system, which includes a first business node and a second business node. The first business node is the parent node of the second business node, and the first business node and the second business node belong to a batch processing scenario or a stream processing scenario. The end-to-end monitoring device includes: The acquisition module is used to acquire the first link tracing information of the first service node, wherein the first link tracing information includes the first node name and the first node identifier of the first service node; The identifier generation module is used to, in the batch processing scenario, use the first node identifier as the second node identifier of the second service node; in the stream processing scenario, detect whether the second service node is a merging node in the link; if the second service node is detected as the merging node, increment the first node identifier by one to obtain the second node identifier of the second service node; if the second service node is detected as not the merging node, use the first node identifier as the second node identifier. The log generation module is used to generate link logs through the second service node, wherein the link logs include the name of the first node, the identifier of the first node, the identifier of the second node, and the name of the second node of the second service node.
7. A terminal device, characterized in that, The terminal device includes: a memory, a processor, and a full-link monitoring program stored in the memory and executable on the processor. When the full-link monitoring program is executed by the processor, it implements the steps of the full-link monitoring method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a full-link monitoring program, which, when executed by a processor, implements the steps of the full-link monitoring method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Request link tracking method and service request processing method
CA3141329A1
Full-link monitoring method, device and system based on block chain
CN110457190A
