Service node time consumption statistical method, system and device and storage medium
By deploying a unified data collector and streaming host across various business systems, the problems of inconsistent data collection standards and clock asynchrony were solved, enabling accurate statistics and visual analysis of time consumption across business nodes in different systems, which is suitable for heterogeneous system environments.
Patent Information
- Application Number
- CN202511627533.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-07
- Publication Date
- 2026-02-03
AI Technical Summary
In existing technologies, problems such as inconsistent data acquisition standards, asynchronous clocks across systems, high system coupling, and poor real-time performance make business process monitoring difficult.
Deploy a unified data collector across all business systems, use the same time reference source to generate node event messages, and process and display them uniformly through a streaming processing and analysis host to ensure the accuracy and comparability of timestamps. Use a clock synchronization service to eliminate clock asynchrony issues and utilize a time-series database for visualization.
It enables accurate statistics on the time consumption of business nodes across systems, reduces system coupling, improves real-time performance and data format uniformity, supports visual analysis and location of global business processes, has good scalability, and is suitable for heterogeneous system environments.
Smart Images

Figure CN121456031A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a business node time consumption statistical method, system, device and storage medium. BACKGROUND
[0002] In the current enterprise informatization environment, a complete business process usually needs to span multiple independently deployed business systems (such as channel systems, core transaction systems, etc.) with different technology stacks. In order to optimize the business process, analyze performance bottlenecks, etc., it is particularly important to monitor the time consumption of the business nodes in the whole process in a fine-grained manner. The business node is the smallest manageable unit that constitutes the entire business process. Related technologies either use a method based on system log analysis or a method based on application program performance monitoring tools. However, related technologies have the problems of non-uniform data collection standards, out-of-sync cross-system clocks, high system coupling degree, and poor real-time performance. Therefore, how to solve the problems of non-uniform data collection standards, out-of-sync cross-system clocks, high system coupling degree, and poor real-time performance has become a technical problem to be solved by the technical personnel in the field. SUMMARY
[0003] The purpose of the present application is to provide a business node time consumption statistical method, system, device and storage medium to solve the problems of non-uniform data collection standards, out-of-sync cross-system clocks, high system coupling degree, and poor real-time performance.
[0004] To solve the above technical problems, the present application provides a business node time consumption statistical method, comprising:
[0005] Receiving a node event message reported by a data collector; the data collector is deployed in each business system spanned by a business process; the node event message includes a global process identifier, a timestamp of business node triggering, business node information, and processing object information; each data collector uses the same time reference source;
[0006] Dividing the node event messages with the same global process identifier into the same group;
[0007] According to the timestamp, the node event messages in the group are sorted;
[0008] Calculating the time difference of the timestamps in the continuous node event messages after sorting to obtain the business node time consumption;
[0009] Writing the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption into a time series database;
[0010] Querying data from the time series database and drawing and displaying a target view according to the data.
[0011] In some embodiments, the data collector is internally integrated with a clock synchronization service, which is synchronized with a target time server and calibrated periodically; the target time server is a public network time protocol server or a public precise time protocol server; the data collector calls the clock synchronization service to obtain time to generate the timestamp.
[0012] In some embodiments, receiving the node event message reported by the data collector comprises:
[0013] The data collector sends the node event message received by the data aggregation gateway in batches; the data aggregation gateway receives and buffers the node event message sent by each data collector, and when the number of node event messages reaches a preset threshold, all node event messages are forwarded in batches.
[0014] In some embodiments, the data collector provides a data reporting application programming interface; the business system calls the data reporting application programming interface to generate and report the node event message at the business node; or, when the data collector listens to a preset signal, the node event message is generated and reported.
[0015] In some embodiments, according to the data, a target view is drawn and displayed, comprising:
[0016] According to the data, a business node relationship diagram is drawn and displayed, and the business node time consumption is mapped as a graph attribute.
[0017] In some embodiments, according to the data, a target view is drawn and displayed, comprising:
[0018] According to the data, a business node time consumption history curve is drawn and displayed.
[0019] In some embodiments, further comprising:
[0020] When the business node time consumption exceeds a preset threshold, an alarm is triggered and a target object is notified.
[0021] To solve the above technical problems, the application further provides a business node time consumption statistical system, comprising:
[0022] A data collector, a stream processing and analysis host; the data collector is deployed in each business system crossed by a business process; each data collector uses the same time reference source;
[0023] The data collector is used to generate and report a node event message; the node event message comprises a global process identifier, a timestamp triggered by a business node, business node information, and processing object information.
[0024] The stream processing and analysis host is configured to receive node event messages reported by data collectors, divide node event messages with the same global process identifier into the same group, sort node event messages in the group according to the time stamp, calculate the time difference of the time stamp in the continuous node event messages after sorting to obtain the service node time consumption, write the global process identifier, the time stamp, the service node information, the processing object information and the service node time consumption into a time series database, query data from the time series database, and draw and display a target view according to the data.
[0025] To solve the above technical problems, the application further provides an electronic device, which comprises:
[0026] a memory configured to store a computer program;
[0027] a processor configured to execute the computer program to implement the steps of the service node time consumption statistical method.
[0028] To solve the above technical problems, the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the steps of the service node time consumption statistical method.
[0029] The service node time consumption statistical method provided by the application comprises the following steps: receiving node event messages reported by data collectors; the data collectors are deployed in each business system crossed by a business process; the node event messages comprise a global process identifier, a time stamp of service node triggering, service node information and processing object information; each data collector uses the same time reference source; node event messages with the same global process identifier are divided into the same group; node event messages in the group are sorted according to the time stamp; the time difference of the time stamp in the continuous node event messages after sorting is calculated to obtain the service node time consumption; the global process identifier, the time stamp, the service node information, the processing object information and the service node time consumption are written into a time series database; data in the time series database is queried, and a target view is drawn and displayed according to the data.
[0030] It can be seen that the business node time consumption statistical method provided in the application effectively solves the problem of non-uniform data format by deploying data collectors in each business system crossed by the business process, and each data collector generates and reports a node event message. The use of the same time reference source by each data collector ensures the accuracy and comparability of the timestamp, so that the statistical result of the cross-system business node time consumption is real and reliable. Deploying data collectors in the business system has little impact on the existing business system and low access cost. The new business system only needs to deploy a set of data collectors to quickly access the monitoring system, and has good scalability. In addition, the method is suitable for heterogeneous system environments of various technology stacks, and can effectively solve the adaptation problem of application system performance monitoring tools in a mixed technology stack environment. In addition, the global process identifier is written into the time series database, and data is queried from the time series database for visual display, which can visualize the complete business process, support analysis and positioning from the business perspective, and has more comprehensive and practical functions.
[0031] The business node time consumption statistical system, the electronic device and the computer readable storage medium provided in the application have the above technical effects. BRIEF DESCRIPTION OF DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the application, the drawings needed to be used in the prior art and the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the application, and other drawings can be obtained by those skilled in the art without creative labor.
[0033] Figure 1 A flowchart of a business node time consumption statistical method provided in an embodiment of the application;
[0034] Figure 2 A system structure diagram provided in an embodiment of the application;
[0035] Figure 3 A workflow timing diagram provided in an embodiment of the application;
[0036] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the application. DETAILED DESCRIPTION
[0037] The core of the application is to provide a business node time consumption statistical method, system, device and storage medium, to solve the problems of non-uniform data collection standard, cross-system clock desynchronization, high system coupling degree and poor real-time performance.
[0038] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are some but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of protection of the present application.
[0039] Please refer to Figure 1 , Figure 1 The flowchart of a method for counting time consumption of a business node provided by the embodiments of the present application is shown in FIG. 1. The method comprises the following steps. Figure 1
[0040] S101: receiving a node event message reported by a data collector; the data collector is deployed in each business system crossed by a business process; the node event message comprises a global process identifier, a timestamp of triggering of a business node, business node information and processing object information; each data collector uses the same time reference source.
[0041] S102: dividing the node event messages with the same global process identifier into a same group.
[0042] S103: sorting the node event messages in the group according to the timestamps.
[0043] S104: calculating the time difference of the timestamps in the sorted continuous node event messages to obtain the time consumption of the business node.
[0044] The method for counting time consumption of a business node provided by the embodiments of the present application adopts a unified collection-centralized processing distributed architecture. Each business system crossed by a business process is deployed with a lightweight and standardized data collector (Agent). The data collector is responsible for node event collection and preliminary processing of the business system. The stream processing and analysis host performs data association, calculation and display. The unified collection-centralized processing distributed architecture can realize low coupling with the business system.
[0045] The execution subject of the service node time consumption statistical method provided in the embodiments of the present application is a stream processing and analysis host. The stream processing and analysis host receives a node event message reported by a data collector. The service nodes (for example, "flow start point", "approval pass", "flow end") that need to be monitored can be defined through a configuration mode. The data collector can generate a node event message in a standard format (predefined format) when a service node occurs, by listening to application logs, database changes, API calls and the like. The message body of the node event message includes a global process identifier, and a timestamp of triggering of the service node. The global process identifier can be a GPID (Global Process ID), service node information, and processing object information. The service node information can include a node identifier (which can be a node ID), a node type and the like. The processing object (handler) information can include a processing object name, a processing object ID and the like. In addition, the node event message can also include other optional context information. The formats of the node event messages generated by the various data collectors are uniform, thereby effectively solving the problem of non-uniform data formats. The various data collectors execute a uniform node event message format (for example, using Protocol Buffers or JSON Schema specification). The node event message must include core fields such as a global process identifier and a timestamp.
[0046] If the current business process does not have a globally unique global process identifier, a new global process identifier is generated. If the current business process already has a globally unique global process identifier (for example, obtained from an upstream request header), the existing global process identifier is directly used.
[0047] The message receiving end of the stream processing and analysis host receives the node event message and performs format checking. A stream processing engine (for example, Apache Flink, Spark Streaming) in the stream processing and analysis host consumes the message stream in real time. When processing, the stream processing engine takes the global process identifier as the Key, and associates the scattered node event messages in the memory, thereby losslessly reconstructing a complete, cross-system business process chain, to provide correct data relationships for subsequent calculation. The stream processing engine associates the cross-system service nodes through the GPID, and calculates the time difference between the continuous service nodes, that is, the service node time consumption. In addition, the system internal flow transfer time consumption and the cross-system flow transfer total time consumption can also be calculated, thereby realizing the change from post-analysis to real-time monitoring.
[0048] Specifically, the processing procedure of the flow processing engine includes: firstly, a KeyBy operation is performed to group node event messages according to global process identifiers, so that all node event messages of the same business process are routed to the same computing node for processing. In the same group, the node event messages are arranged in ascending order according to timestamps, and the real execution sequence of the business process is restored. The sorted node event message list is traversed, and the time difference (ΔT = Event_n.timestamp - Event_{n-1}.timestamp) between adjacent business nodes is calculated. Event_n.timestamp represents the timestamp of the nth business node, and Event_{n-1}.timestamp represents the timestamp of the (n-1)th business node. The time difference ΔT is the time consumption of the business node, that is, the time consumption of the flow transfer between two business nodes. In addition, the total time consumption of the business process (the timestamp of the last business node - the timestamp of the first business node) can also be calculated.
[0049] In some embodiments, the data collector is internally integrated with a clock synchronization service, which is synchronized with a target time server and calibrated periodically; the target time server is a public network time protocol server or a public precision time protocol server; the data collector calls the clock synchronization service to obtain time to generate the timestamp.
[0050] In this embodiment, the standardized data collector is internally integrated with a high-precision clock synchronization service. The clock synchronization service is automatically synchronized with a target time server when the data collector starts, and is calibrated periodically. The target time server is a public NTP (Network Time Protocol) / PTP (Precision Time Protocol) server, or can also be an internal time server of an enterprise. When generating a timestamp, the data collector directly calls the local clock synchronization service to obtain time, without using the time of the operating system of the business system. Thus, it is ensured at the source that all timestamps of cross-system node events are based on the same time reference, eliminating the calculation errors caused by the unsynchronized system clocks, and effectively solving the problem of time consumption calculation distortion caused by unsynchronized clocks.
[0051] In some embodiments, receiving the node event message reported by the data collector includes:
[0052] Receiving the node event message sent by the data collector in batches forwarded by the data aggregation gateway; the data aggregation gateway receives and buffers the node event messages sent by each data collector, and when the number of the node event messages reaches a preset threshold, forwards all the node event messages in batches.
[0053] The data collector sends the node event message to the data aggregation gateway through the network (usually in an asynchronous manner, for example, through a Kafka message queue). The data aggregation gateway is responsible for receiving the node event message reported by all data collectors, and performing preliminary verification, buffering, and load balancing. When the number of node event messages reaches a preset threshold, the data aggregation gateway forwards the node event messages in batches to the downstream stream processing engine. This process needs to keep the network unblocked, and a heartbeat connection is maintained between the data collector and the data aggregation gateway. By buffering the node event message through the data aggregation gateway and forwarding it in batches, the collection and preliminary integration of data are realized, effectively decoupling the data collection and data processing links, and preventing data flood from overwhelming the backend services.
[0054] In some embodiments, the data collector provides a data reporting application programming interface; the business system calls the data reporting application programming interface at the business node to generate and report the node event message; or, when the data collector listens to a preset signal, generates and reports the node event message.
[0055] The data collector provides a unified data reporting API (such as an HTTP / RESTful interface) and a configuration interface. When implemented, it is embedded or deployed on the server where each business system is located. The business system calls the API at the key node of the business process, or the data collector actively listens to a predefined signal (such as a log keyword, a database Binlog, etc.), generates and reports a node event message in a standard format (including GPID, node ID, timestamp, etc.). This approach can avoid direct coupling with the databases or complex internal APIs of each business system, and only needs to be deployed once to achieve continuous data collection.
[0056] S105: Write the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption to a time series database.
[0057] S106: Query data from the time series database, and draw and display a target view according to the data.
[0058] This step aims to store and visually display data, which not only displays time consumption data, but also graphically restores the business process chain and intuitively locates time consumption abnormal nodes (bottlenecks), and supports time consumption trend analysis.
[0059] In some embodiments, drawing and displaying a target view according to the data includes:
[0060] Drawing and displaying a business node relationship diagram according to the data, and mapping the business node time consumption to a graph element attribute.
[0061] In some embodiments, rendering and presenting a target view according to the data comprises:
[0062] rendering and presenting a business node time consumption history curve according to the data.
[0063] In particular, the calculated business node time consumption is written into a time series database (e.g. InfluxDB) in real time. In addition, the global process identifier, timestamp, business node identifier, etc. can also be written into the time series database in real time. Data is queried from the time series database. The business node relationship diagram is automatically drawn through the process topology component, and the business node time consumption is mapped to the graph element attribute (e.g. color depth, size); or the business node time consumption history curve is drawn and presented through the time trend chart component. The original data is transformed into intuitive and interactive business insight view, which can greatly reduce the use and understanding cost.
[0064] In some embodiments, further comprising:
[0065] When the business node time consumption exceeds the preset threshold, an alarm is triggered and the target object is notified.
[0066] The preset threshold is configured through the alarm rule engine, and when the time consumption of a certain business node exceeds the preset threshold, an alarm is triggered and the target object is notified. For example, when the time consumption of a certain business node is > 5s, an alarm is triggered and the target object is notified. The target object can be the person in charge, etc.
[0067] Reference Figure 2 The system structure diagram is shown, and a specific embodiment is described as follows:
[0068] The business node time consumption statistical system mainly includes a standardized node data collector, a data aggregation gateway, a stream processing and analysis host.
[0069] When the business process flows to a business node (e.g. "process submission") in a certain business system, it can be perceived through a pre-defined mechanism. This process can be achieved in various ways: an API provided by the data collector can be called in the business code to perform application layer burying; the data collector can also analyze application logs in real time and match pre-configured keywords (e.g. "INFO: Order Created..."); or the Binlog or trigger of the database can also be listened to, and the business node can be captured when the data of a specific table changes. The process needs to be pre-defined in the configuration file of the data collector, including the node rules to be monitored (including business system ID, node ID, node type and unique identifier of the current business instance). In this way, non-invasive or low-invasive perception of the business node is achieved, providing a basis for data sources for all subsequent functions.
[0070] After the data collector perceives the business node, it immediately performs the following operations: first, if the current business process does not have a globally unique business process ID (GPID), a new GPID is generated. If a GPID already exists, the existing globally unique business process ID is directly used. Then, the data collector calls its built-in high-precision clock synchronization service to obtain the current standard time accurate to milliseconds or microseconds, and this process is completely independent of the operating system time. Finally, the data collector encapsulates the GPID, business system ID, business node ID, high-precision timestamp, and other optional context information into a standard message (such as a JSON format) with a predefined schema.
[0071] The collector sends the standardized node event message to the data aggregation gateway through the network. The data aggregation gateway is responsible for receiving all node event messages reported by the data collectors, and performs preliminary verification, buffering, and load balancing, and then batch forwards to the downstream stream processing engine.
[0072] In the stream processing and analysis host, the stream processing engine consumes the message stream in real time. The processing process mainly includes: first, the association (KeyBy) operation is performed, the message stream is grouped according to the GPID, so that all node event messages of the same business process are routed to the same computing node for processing; then, according to the timestamp field, the node event messages in the same GPID grouping are sorted in ascending order, and the real execution sequence of the business process is restored; finally, the sorted node event message list is traversed, and the time difference between adjacent business nodes is calculated, which is the flow transfer time between the two business nodes.
[0073] The calculated business node time is written into the time series database in real time, and the visualization module queries the data from the database and displays it in multiple forms. The display forms include a real-time process topology diagram, which displays the process path in a graphical manner, and the node size or color represents the time length, so as to intuitively locate the bottleneck; a time trend panel, which displays the time trend of a specific process or node with time in the form of a line chart; and an alarm notification function, which automatically triggers an alarm according to the preset rules and notifies the responsible person through email, SMS, etc.
[0074] For example, refer to Figure 3As shown, the system A application business node trigger, such as order creation, triggers the data collector A deployed in system A to generate a timestamp and encapsulate it into a node event message. The data collector A reports the node event message to the data aggregation gateway. The system B application business node trigger, such as risk control audit, triggers the data collector B deployed in system B to generate a timestamp and encapsulate it into a node event message. The data collector B reports the node event message to the data aggregation gateway. The data aggregation gateway forwards all node event messages to the stream processing and analysis host. The stream processing engine in the stream processing and analysis host groups the node event messages according to GPID and sorts the node event messages in the same group according to the timestamp. The time consumption between order creation and risk control audit is calculated as follows:
[0075] ΔT=T_systemB-T_systemA. T_systemB represents the timestamp of the risk control audit trigger, and T_systemA represents the timestamp of the order creation trigger.
[0076] In summary, the statistical method of business node time consumption provided by the application effectively solves the problem of inconsistent data formats by deploying data collectors in each business system crossed by the business process, and each data collector generates and reports a node event message. The use of the same time reference source by each data collector ensures the accuracy and comparability of the timestamp, making the statistical result of the cross-system business node time consumption real and reliable. Deploying data collectors in business systems has minimal impact on existing business systems and low access cost. New business systems only need to deploy a set of data collectors to quickly access the monitoring system, which has good scalability. In addition, the method is suitable for heterogeneous system environments of various technical stacks and can effectively solve the adaptation problem of application system performance monitoring tools in mixed technical stack environments. In addition, the global process identifier is written into the time series database, and the data is queried from the time series database for visual display, which can visualize the complete business process, support analysis and positioning from the business perspective, and has more comprehensive and practical functions.
[0077] The application also provides a statistical system of business node time consumption. The system described below can be mutually corresponding with the method described above. The system comprises:
[0078] a data collector and a stream processing and analysis host; the data collector is deployed in each business system crossed by a business process; each data collector uses the same time reference source;
[0079] The data collector is configured to generate and report a node event message; the node event message comprises a global process identifier, a timestamp of a business node trigger, business node information, and processing object information.
[0080] The stream processing and analysis host is configured to receive node event messages reported by the data collector, divide node event messages with the same global process identifier into the same group, sort node event messages in the group according to the timestamp, calculate the time difference of the timestamps of the continuous node event messages after sorting to obtain the service node time consumption, write the global process identifier, the timestamp, the service node information, the processing object information and the service node time consumption into a time series database, query data from the time series database, and draw and display a target view according to the data.
[0081] In some embodiments, the data collector is internally integrated with a clock synchronization service, the clock synchronization service is synchronized with a target time server and is periodically calibrated, the target time server is a public network time protocol server or a public precise time protocol server, and the data collector calls the clock synchronization service to obtain time to generate the timestamp.
[0082] In some embodiments, receiving node event messages reported by the data collector includes:
[0083] The data aggregation gateway receives and buffers node event messages sent by each data collector, and when the number of the node event messages reaches a preset threshold, batch forwards all the node event messages.
[0084] In some embodiments, the data collector provides a data reporting application programming interface, the service system calls the data reporting application programming interface to generate and report node event messages at the service node, or the data collector generates and reports node event messages when a preset signal is listened.
[0085] In some embodiments, the stream processing and analysis host is configured to:
[0086] According to the data, a service node relationship diagram is drawn and displayed, and the service node time consumption is mapped as a graph element attribute.
[0087] In some embodiments, the stream processing and analysis host is configured to:
[0088] According to the data, a service node time consumption history curve is drawn and displayed.
[0089] In some embodiments, the stream processing and analysis host is further configured to:
[0090] When the service node time consumption exceeds a preset threshold, an alarm is triggered and a target object is notified.
[0091] The application also provides an electronic device, which refers to Figure 4As shown, the device comprises a memory 1 and a processor 2.
[0092] The memory 1 is configured to store a computer program.
[0093] The processor 2 is configured to execute the computer program to implement the following steps:
[0094] receiving a node event message reported by a data collector; the data collector is deployed in each business system crossed by a business process; the node event message comprises a global process identifier, a timestamp of triggering of a business node, business node information, and processing object information; each data collector uses a same time reference source; the node event messages with the same global process identifier are divided into a same group; the node event messages in the group are sorted according to the timestamps; a time difference of the timestamps in the sorted continuous node event messages is calculated to obtain a business node time consumption; the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption are written into a time series database; data is queried from the time series database, and a target view is drawn and displayed according to the data.
[0095] For the device provided in the present application, refer to the method embodiments described above, which will not be repeated here.
[0096] The present application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the following steps:
[0097] receiving a node event message reported by a data collector; the data collector is deployed in each business system crossed by a business process; the node event message comprises a global process identifier, a timestamp of triggering of a business node, business node information, and processing object information; each data collector uses a same time reference source; the node event messages with the same global process identifier are divided into a same group; the node event messages in the group are sorted according to the timestamps; a time difference of the timestamps in the sorted continuous node event messages is calculated to obtain a business node time consumption; the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption are written into a time series database; data is queried from the time series database, and a target view is drawn and displayed according to the data.
[0098] The computer readable storage medium can include a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various media that can store program codes.
[0099] The computer readable storage medium provided in the present application is described above with reference to the method embodiments. The present application will not be repeated here.
[0100] The embodiments in the specification are described progressively, and each embodiment focuses on the difference from other embodiments. The same or similar parts between embodiments can be referred to each other. For the apparatus, device and computer readable storage medium disclosed by the embodiments, since they correspond to the method disclosed by the embodiments, the description is relatively simple, and the relevant part can be referred to the method part.
[0101] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0102] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage medium known in the art.
[0103] The statistical method, system, device and storage medium for service node time consumption provided by the present application are described in detail. The principles and implementation modes of the present application are described by applying specific examples. The above description of the embodiments is only to help understand the method and its core idea of the present application. It should be pointed out that, for those skilled in the art, without departing from the principles of the present application, some improvements and modifications can be made to the present application, and these improvements and modifications also fall within the protection scope of the present application.
Claims
1. A method of statistics of time consumption of a service node, characterized by The method comprises the following steps: receiving node event messages reported by data collectors; the data collectors are deployed in each business system crossed by a business process; the node event messages comprise a global process identifier, a timestamp of a business node trigger, business node information, and processing object information; each data collector uses the same time reference source; the node event messages with the same global process identifier are divided into the same group; the node event messages in the group are sorted according to the timestamp; the time difference between the timestamps of the continuous node event messages after sorting is calculated to obtain business node time consumption; the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption are written into a time series database; data is queried from the time series database, and a target view is drawn and displayed according to the data.
2. The statistical method according to claim 1, characterized in that, The data collector is internally integrated with a clock synchronization service, which is synchronized with a target time server and calibrated periodically; the target time server is a public network time protocol server or a public precise time protocol server; the data collector calls the clock synchronization service to obtain time to generate the timestamp.
3. The statistical method of claim 1, wherein, The method comprises the following steps: receiving node event messages reported by data collectors; 4. The statistical method of claim 1, wherein, the data collectors are deployed in each business system crossed by a business process; the node event messages comprise a global process identifier, a timestamp of a business node trigger, business node information, and processing object information; each data collector uses the same time reference source; 5. The statistical method of claim 1, wherein, the node event messages with the same global process identifier are divided into the same group; the node event messages in the group are sorted according to the timestamp; 6. The statistical method of claim 1, wherein, the time difference between the timestamps of the continuous node event messages after sorting is calculated to obtain business node time consumption; the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption are written into a time series database; 7. The statistical method of claim 1, wherein, data is queried from the time series database, and a target view is drawn and displayed according to the data. The method comprises the following steps:
8. A system for the statistics of service node time consumption, characterized by a business node relationship diagram is drawn and displayed according to the data, and the business node time consumption is mapped as a graph attribute. The method comprises the following steps: a business node time consumption history curve is drawn and displayed according to the data. The method further comprises the following steps: when the business node time consumption exceeds a preset threshold, an alarm is triggered and a target object is notified. The method comprises the following steps: data collectors and a stream processing and analysis host; the data collectors are deployed in each business system crossed by a business process; each data collector uses the same time reference source; the data collectors are used to generate and report node event messages; the node event messages comprise a global process identifier, a timestamp of a business node trigger, business node information, and processing object information; the stream processing and analysis host is used to receive node event messages reported by data collectors; the node event messages with the same global process identifier are divided into the same group; the node event messages in the group are sorted according to the timestamp; the time difference between the timestamps of the continuous node event messages after sorting is calculated to obtain business node time consumption; the global process identifier, the timestamp, the business node information, the processing object information, and the business node time consumption are written into a time series database; Querying data from the time series database and rendering and presenting a target view based on the data.
9. An electronic device, comprising: Comprising: a memory for storing a computer program; a processor for implementing the steps of the method for the statistics of the service node time consumption according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the steps of the method for the statistics of the service node time consumption according to any one of claims 1 to 7.