A method and system for calculating multi-layer response time in network applications

By refining the calculation method for the response time of multi-layered network applications, this paper solves the technical problems that cannot be solved in the existing technology. It provides a method and system for calculating the multi-layered response time of network applications, which solves the problem that the existing technology cannot accurately calculate the multi-layered response time of network applications under complex architectures. It achieves higher response time accuracy and precision, and is suitable for performance monitoring of multi-layered distributed applications under microservice and cloud computing architectures.

CN120434156BActive Publication Date: 2026-04-03BEIJING WANGSHEN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-15
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot accurately calculate the multi-layer response time of network applications under complex architectures, resulting in inaccurate performance monitoring, failing to meet the accuracy requirements of industry standards, and being unable to distinguish between front-end and back-end response times, leading to misjudgments in optimization direction.

Method used

By dividing traffic into layers through pre-configured configuration files, parsing data packet IP addresses to extract timestamps, calculating the actual response times of the front-end, middleware, and back-end, refining the granularity of response times, and providing a multi-layer response time calculation method and system.

Benefits of technology

It improves the accuracy and precision of response time, helping developers pinpoint slow application response issues and achieve precise optimization. It is suitable for performance monitoring of multi-layered distributed applications under microservice and cloud computing architectures.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434156B_ABST
    Figure CN120434156B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for calculating multi-layer response time of network applications, belonging to the field of network application performance monitoring. The method first pre-configures a configuration file, defining the server IP, middleware device IP, and backend device IP. It then divides application traffic into six categories: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client. The method acquires the multi-layer network application traffic to be calculated, parses the IP addresses of the round-trip data packets, identifies the layer to which the traffic belongs based on the configuration file, and extracts the corresponding timestamps. Based on the extracted timestamps, it calculates the response time for each layer, including the actual response time of the frontend, the actual response time of the middleware, and the actual response time of the backend, and outputs the results. This invention refines the granularity of response time calculation, resulting in more accurate and precise network application response times.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of network application performance monitoring, specifically relating to a method and system for calculating the multi-layer response time of network applications. Background Technology

[0002] In the context of the digital economy, end-to-end server response timeliness has become a core indicator of modern enterprise service capabilities. With the increasing complexity and diversification of services, the network service architecture of modern enterprises is also becoming increasingly complex. In such complex architectures, request processing involves the collaborative work of 10+ network hops and 30+ service nodes, making multi-layered response times a blind spot for performance monitoring. This leads to inaccurate monitoring and an inability to provide better service to users. Meanwhile, end users are increasingly demanding higher work efficiency and have lower tolerance for response latency. When the HTTP / 3 request first byte time-to-first-byte (TTFB) exceeds 800ms, the mobile user interaction abandonment rate increases exponentially. In complex SPA applications, the front-end resource loading latency (LCP) accounts for up to 62±8% of the total response time. However, existing technologies (such as CN114338489A) rely on TCP handshake timing to estimate latency (such as the SYN / SYN-ACK time difference), which cannot distinguish the independent response time of each node in a multi-layered architecture and lacks the ability to monitor front-end response and back-end processing times, leading to misjudgments in performance optimization. Meanwhile, industry standards impose hard constraints on end-to-end latency. For example, in the financial trading field, the FIX protocol version 4.4 stipulates that the end-to-end latency of high-frequency trading systems must be <3ms (including the processing time of the 7-layer protocol stack). The HL7 FHIR standard for medical IoT requires that the end-to-end latency of vital signs data be ≤50ms (including the time of edge computing nodes).

[0003] In existing technologies, traditional methods can typically only detect the overall end-to-end response time between the server and the client. Often, after receiving a request, the server itself needs to initiate requests to other nodes (middleware, backend, etc.) and wait for responses. Traditional methods often skip the fine-grained calculation of this response time, only calculating the overall response time, and cannot calculate and monitor the multi-layer response time of network applications in complex architectures. At the same time, when applying traditional response time monitoring methods to complex architectures, they cannot achieve the required accuracy. Summary of the Invention

[0004] In view of the above-mentioned defects or deficiencies in the prior art, the present invention aims to provide a method and system for calculating the multi-layer response time of network applications. By dividing the multi-layer response time of network applications and refining the granularity of calculation, the accuracy and precision of response time are improved, the user's perception of the network is enhanced, and developers are helped to accurately locate the problem of slow application response and achieve precise optimization. It is applicable to the performance monitoring of multi-layer distributed applications under microservice and cloud computing architectures.

[0005] To achieve the above objectives, the embodiments of the present invention adopt the following technical solutions:

[0006] In a first aspect, embodiments of the present invention provide a method for calculating the multi-layer response time of a network application, the method comprising the following steps:

[0007] Step S1: Pre-configure the configuration file. Define the server IP, middleware device IP, and backend device IP in the configuration file, and divide the application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client.

[0008] Step S2: Obtain the multi-layer traffic of the network application to be calculated;

[0009] Step S3: parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp;

[0010] Step S4: Calculate the response time of each layer of traffic based on the extracted timestamps, including the actual response time of the front end, the actual response time of the middle layer, and the actual response time of the back end.

[0011] Step S5: Output the multi-layer response time of the network application.

[0012] In a preferred embodiment of the present invention, step S2 involves capturing multi-layer traffic data packets of the network application to be calculated using a mirroring method.

[0013] As a preferred embodiment of the present invention, the formula for calculating the actual front-end response time is as follows:

[0014] Actual front-end response time = total response time - middleware response time - back-end response time.

[0015] As a preferred embodiment of the present invention, the formula for calculating the actual response time of the intermediate layer is as follows:

[0016] The actual response time of the middle layer = the response time of the middle layer + the response time of the backend - the response time of the backend.

[0017] As a preferred embodiment of the present invention, the formula for calculating the actual backend response time is as follows:

[0018] The actual backend response time = the time it takes for the backend response information to be captured - the time it takes for the information requested by the middle layer from the backend to be captured.

[0019] In a preferred embodiment of the present invention, the six levels of traffic correspond to six different response times; they are configured as follows:

[0020] T1: The time point at which the client's request information was captured;

[0021] T2: The time point at which the front-end response information was captured;

[0022] T3: The time point at which the information requested by the front end from the middle layer is captured;

[0023] T4: The time point at which the intermediate layer response information was captured;

[0024] T5: The time point at which the information requested by the middle layer from the backend is captured;

[0025] T6: The time point when the backend response information was captured.

[0026] As a preferred embodiment of the present invention, the actual front-end response time T is calculated. response 1. Actual response time T of the intermediate layer response 2 and the actual response time T of the backend response 3. The formulas are as follows:

[0027] T response 1 = (T2 - T1) - (T4 - T3);

[0028] T response 2 = (T4 - T3) - (T6 - T5);

[0029] T response 3 = T6 - T5.

[0030] Secondly, embodiments of the present invention also provide a system for calculating the multi-layer response time of network applications, the system comprising: a file configuration module, a traffic capture module, a traffic identification module, a multi-layer response time calculation module, and an output module; wherein,

[0031] The file configuration module is used to pre-configure configuration files, which define server IP, middleware device IP, and backend device IP, and divide application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client.

[0032] The traffic capture module is used to acquire multi-layer traffic of network applications to be calculated.

[0033] The traffic identification module is used to parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp;

[0034] The multi-layer response time calculation module is used to calculate the response time of each layer of traffic based on the extracted timestamps, including the actual response time of the front end, the actual response time of the middle layer, and the actual response time of the back end.

[0035] The output module outputs the multi-layer response time of the network application.

[0036] The technical solutions provided in the embodiments of the present invention have the following beneficial effects:

[0037] The network application multi-layer response time calculation method and system provided in this invention calculates application response time in layers, decomposing the response time into front-end actual response time, middle-layer actual response time, and back-end actual response time. This refines the granularity of response time, uses a more accurate algorithm to calculate the multi-layer response time of network applications, and more accurately judges application response time, improving users' perception of the network and helping developers accurately locate slow application response problems and achieve precise optimization.

[0038] Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description

[0039] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0040] Figure 1 This is a flowchart of the method for calculating the multi-layer response time of network applications according to an embodiment of the present invention;

[0041] Figure 2 This is a schematic diagram illustrating the multi-level partitioning principle of the response time in the calculation method described in this embodiment of the invention. Detailed Implementation

[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. It should be noted that, without conflict, the embodiments and features in the embodiments of the present invention can also be combined with each other.

[0043] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In the description of this invention, the terms "first," "second," "third," "fourth," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0044] To address the issue of multi-layered response time in complex network applications, this invention provides a method and system for calculating multi-layered response time. By dividing the multi-layered response time of network applications and refining the granularity of response time calculation, more accurate and precise time is obtained, thereby improving the user's perception of the network. At the same time, it can accurately locate nodes with slow application response and achieve precise optimization of response time.

[0045] like Figure 1 As shown, the method for calculating the multi-layer response time of the network application includes the following steps:

[0046] Step S1: Pre-configure the configuration file. Define the server IP, middleware device IP, and backend device IP in the configuration file, and divide the application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client.

[0047] In this step, such as Figure 2 As shown, the six levels of traffic correspond to six different response times; they are set as follows:

[0048] T1: The time point at which the client's request information was captured;

[0049] T2: The time point at which the front-end response information was captured;

[0050] T3: The time point at which the information requested by the front end from the middle layer is captured;

[0051] T4: The time point at which the intermediate layer response information was captured;

[0052] T5: The time point at which the information requested by the middle layer from the backend is captured;

[0053] T6: The time point when the backend response information was captured.

[0054] Step S2: Obtain the multi-layer traffic of the network application to be calculated.

[0055] In this step, network application multi-layer traffic data packets to be calculated are captured using a mirroring method.

[0056] Step S3: parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp.

[0057] Step S4: Based on the extracted timestamps, calculate the response time of each layer of traffic, including the actual response time of the front-end, the actual response time of the middle layer, and the actual response time of the back-end, and:

[0058] Front-end actual response time = total response time - middleware response time - back-end response time;

[0059] That is: T response 1 = (T2 - T1) - (T4 - T3)

[0060] The actual response time of the middle layer = the response time of the middle layer + the response time of the backend - the response time of the backend;

[0061] That is: T response 2 = (T4 - T3) - (T6 - T5)

[0062] The actual backend response time = the time it takes for the backend response information to be captured - the time it takes for the information requested from the middle layer to be captured;

[0063] That is, T response 3 = T6 - T5.

[0064] Step S5: Output the multi-layer response time of the network application.

[0065] Based on the same idea, this invention also provides a system for calculating the multi-layer response time of network applications. The system includes: a file configuration module, a traffic capture module, a traffic identification module, a multi-layer response time calculation module, and an output module; wherein...

[0066] The file configuration module is used to pre-configure configuration files, which define server IP, middleware device IP, and backend device IP, and divide application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client.

[0067] The traffic capture module is used to acquire multi-layer traffic of network applications to be calculated.

[0068] The traffic identification module is used to parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp;

[0069] The multi-layer response time calculation module is used to calculate the response time of each layer of traffic based on the extracted timestamps, including the actual response time of the front end, the actual response time of the middle layer, and the actual response time of the back end.

[0070] The output module outputs the multi-layer response time of the network application.

[0071] In this embodiment, each module is implemented using a processor, with additional memory added as needed for storage. The processor can be, but is not limited to, a microprocessor (MPU), a central processing unit (CPU), a network processor (NP), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), other programmable logic devices, discrete gates, transistor logic devices, discrete hardware components, etc. The memory can include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory can also be at least one storage device located remotely from the aforementioned processor.

[0072] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.

[0073] It should also be noted that the network application multi-layer response time calculation system and the network application multi-layer response time calculation method described in this embodiment are corresponding. The description and limitations of the method also apply to the system, and will not be repeated here.

[0074] As can be seen from the above technical solutions, the network application multi-layer response time calculation method and system provided in the embodiments of the present invention calculate the application response time in layers, decomposes the response time into the actual response time of the front end, the actual response time of the middle layer, and the actual response time of the back end, refines the granularity of the response time, calculates the multi-layer response time of the network application with a more accurate algorithm, and judges the application response time more accurately, improves the user's perception of the network, helps developers accurately locate the problem of slow application response, and achieves precise optimization.

[0075] The above description is merely a preferred embodiment of the present invention and an explanation of the technical principles employed, and is not intended to limit the scope of the claimed invention, but merely to illustrate preferred embodiments of the invention. Those skilled in the art should understand that the scope of the invention is not limited to the specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the inventive concept. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

Claims

1. A method for calculating the multi-layer response time of a network application, characterized in that, The method is used for performance monitoring of multi-layered distributed applications under microservice and cloud computing architectures, and includes the following steps: Step S1: Pre-configure the configuration file. Define the server IP, middleware device IP, and backend device IP in the configuration file, and divide the application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client. Step S2: Obtain the multi-layer traffic of the network application to be calculated; Step S3: parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp; Step S4: Based on the extracted timestamps, calculate the actual response time for each layer of traffic, including the actual response time of the front-end, the actual response time of the middle layer, and the actual response time of the back-end; where, The six traffic levels correspond to six different response times; they are set as follows: T1: The time point at which the client's request information was captured; T2: The time point at which the front-end response information was captured; T3: The time point at which the information requested by the front end from the middle layer is captured; T4: The time point at which the intermediate layer response information was captured; T5: The time point at which the information requested by the middle layer from the backend is captured; T6: The time point when the backend response information was captured; Calculate the actual response time T of the front end response 1 The actual response time T of the intermediate layer response 2 and the actual response time T of the backend response 3 The formulas are as follows: T response 1 =(T2-T1)-(T4-T3); T response 2 =(T4-T3)-(T6-T5); T response 3 =T6-T5; Step S5: Output the multi-layer response time of the network application and locate the node with slow application response.

2. The calculation method according to claim 1, characterized in that, In step S2, network application multi-layer traffic data packets to be calculated are captured by mirroring.

3. A calculation system for multi-layer response time in network applications, characterized in that, The system is used for performance monitoring of multi-layered distributed applications under microservice and cloud computing architectures, and includes: a file configuration module, a traffic capture module, a traffic identification module, a multi-layer response time calculation module, and an output module; wherein, The file configuration module is used to pre-configure configuration files, which define server IP, middleware device IP, and backend device IP, and divide application traffic into six types: from client to frontend, from frontend to middleware, from middleware to backend, from backend to middleware, from middleware to frontend, and from frontend to client. The traffic capture module is used to acquire multi-layer traffic of network applications to be calculated. The traffic identification module is used to parse the IP address of the current traffic round-trip data packet, identify which layer the traffic belongs to according to the configuration file, and extract the corresponding timestamp; The multi-layer response time calculation module is used to calculate the actual response time of each layer of traffic based on the extracted timestamps, including the actual response time of the front-end, the actual response time of the middle layer, and the actual response time of the back-end; wherein... The six traffic levels correspond to six different response times; they are set as follows: T1: The time point at which the client's request information was captured; T2: The time point at which the front-end response information was captured; T3: The time point at which the information requested by the front end from the middle layer is captured; T4: The time point at which the intermediate layer response information was captured; T5: The time point at which the information requested by the middle layer from the backend is captured; T6: The time point when the backend response information was captured; Calculate the actual response time T of the front end response 1 The actual response time T of the intermediate layer response 2 and the actual response time T of the backend response 3 The formulas are as follows: T response 1 =(T2-T1)-(T4-T3); T response 2 =(T4-T3)-(T6-T5); T response 3 =T6-T5; The output module outputs the multi-layer response time of the network application and locates nodes with slow application response.

Citation Information

Patent Citations

  • Automatic testing method, device and equipment for multimedia conference system and storage medium

    CN114338489A

  • Capacity planning for data center services

    US20110040876A1