An end-to-end service delay measurement method, apparatus, device, medium and product
By mapping service links to logical nodes and dividing them into node processing segments and adjacent communication segments, and using the same local clock and relative clock deviation model, message-level latency trajectories are constructed and validity gating is performed. This solves the accuracy problem of end-to-end service latency measurement in cross-entity mass production links, and achieves accurate latency measurement and reliable results.
Patent Information
- Application Number
- CN202611429653.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-15
- Publication Date
- 2026-11-20
AI Technical Summary
Existing end-to-end service latency measurement methods are difficult to achieve unified timing in cross-entity mass production links, and cannot accurately reflect the actual one-way latency caused by queuing, load, protocol stack processing, and uplink/downlink asymmetry. Furthermore, existing calculation methods destroy message-level correlation and cannot accurately reflect the true end-to-end performance.
The service link under test is mapped to a logical node and divided into a node processing segment and an adjacent communication segment. Time records are collected using the same local clock to establish a relative clock deviation model. Message-level latency trajectories are constructed based on message association fields and validity gating is performed. Finally, the end-to-end service latency is obtained by combining the results.
It enables segmentation and accurate measurement of heterogeneous service links, filters invalid latency samples, quantifies the reliable range of latency measurement, improves the reliability and interpretability of measurement results, and avoids distortion in latency calculation across clock domains.
Smart Images

Figure CN123145183A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of information service technology, and in particular to an end-to-end service latency measurement method, apparatus, equipment, medium and product. Background Technology
[0002] Vehicle-road-cloud information services are typically provided by multiple systems. These systems are built and maintained by different entities, and they differ in the operating systems, message middleware, communication protocols, logging mechanisms, and time synchronization sources they employ.
[0003] Existing measurement methods typically require all nodes to synchronize to a unified clock, or to directly subtract production logs from the sending and receiving ends. Other methods estimate communication latency based on message size, bandwidth, or round-trip time, or sum the high percentile latency calculated for each segment to obtain the end-to-end high percentile latency.
[0004] In cross-entity mass production links, unified time synchronization is often difficult to achieve and cannot reflect the actual one-way latency caused by queuing, load, protocol stack processing, and uplink / downlink asymmetry. Since high-latency samples in each segment are usually not from the same business message, existing calculation methods will destroy message-level correlation and cannot accurately reflect the true end-to-end performance. Summary of the Invention
[0005] This invention provides an end-to-end service latency measurement method, apparatus, equipment, medium, and product to achieve accurate measurement of end-to-end service latency.
[0006] According to one aspect of the present invention, embodiments of the present invention provide an end-to-end service latency measurement method, comprising: Using the actual topology of the service link under test, the service link under test is mapped as a logical node, and the service link under test is divided into a node processing segment and an adjacent communication segment; Within each of the logical nodes within the target measurement boundary, the same local clock is used to collect time records of entry and exit events to obtain the node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. A data acquisition unit is deployed in the adjacent communication segment to obtain the time records of the transmitting side and the receiving side, and a relative clock deviation model is established to correct the time records of the transmitting side and the receiving side to obtain the one-way communication delay. Based on the message association field, the message-level latency trajectory of the same business message is obtained, and validity gating is performed on the message-level latency trajectory; Once the message-level latency trajectory of the service message passes the validity gating, the corresponding node processing latency and the one-way communication latency are combined to obtain the end-to-end service latency amount. The end-to-end service latency statistics and timing validity results are then output in conjunction with the set measurement uncertainty.
[0007] According to another aspect of the present invention, embodiments of the present invention provide an end-to-end service latency measurement device, comprising: The link segmentation module is used to obtain the actual topology of the service link under test, map the service link under test to logical nodes, and divide the service link under test into node processing segments and adjacent communication segments. The node latency acquisition module is used to collect the time records of entry events and exit events within each of the logical nodes within the target measurement boundary using the same local clock, so as to obtain the node processing latency. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. The communication delay acquisition module is used to deploy acquisition units in the adjacent communication segments to obtain the sending side time record and the receiving side time record, and to establish a relative clock deviation model to correct the sending side time record and the receiving side time record to obtain the one-way communication delay. The gating execution module is used to obtain the message-level latency trajectory of the same business message based on the message association field, and to perform validity gating on the message-level latency trajectory; The result output module is used to combine the corresponding node processing delay and the one-way communication delay after the message-level delay trajectory of the service message passes the validity gate to obtain the end-to-end service delay amount, and output the end-to-end service delay statistics and timing validity results in combination with the set measurement uncertainty.
[0008] According to another aspect of the present invention, an embodiment of the present invention provides an electronic device, the electronic device comprising: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the end-to-end service latency measurement method of any embodiment of the present invention.
[0009] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the end-to-end service latency measurement method according to any embodiment of the present invention.
[0010] According to another aspect of the present invention, a computer program product is provided, the computer program product comprising a computer program that, when executed by a processor, implements the end-to-end service latency measurement method as provided in the first aspect embodiment of the present invention.
[0011] The technical solution of this invention adopts the actual topology of the service link under test, maps the service link under test to logical nodes, and divides the service link under test into node processing segments and adjacent communication segments. Within each logical node within the target measurement boundary, the same local clock is used to collect time records of entry and exit events to obtain node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. Acquisition units are deployed in the adjacent communication segments to obtain sending-side and receiving-side time records, and a relative clock deviation model is established to correct the sending-side and receiving-side time records to obtain one-way communication delay. Based on the message association fields, the message-level delay trajectory of the same service message is obtained, and validity gating is performed on the message-level delay trajectory. When the message-level delay trajectory of the service message passes the validity gating, the corresponding node processing delay and one-way communication delay are combined to obtain the end-to-end service delay quantity. Combined with the set measurement uncertainty, the end-to-end service delay statistics and timing validity results are output.
[0012] The above technical solution obtains node processing latency by collecting time records of logical node entry and exit events, and constructs a relative clock deviation model to correct the time records to obtain one-way communication latency. It also generates message-level latency trajectories based on message association fields and performs validity gating. By combining node processing latency and one-way communication latency, it obtains end-to-end service latency and outputs latency statistics and timing validity results based on measurement uncertainty. This effectively realizes the segmented decomposition and accurate measurement of end-to-end latency in heterogeneous service links, filters invalid latency samples, quantifies the reliability range of latency measurement, avoids latency calculation distortion caused by cross-clock domain clock drift, and improves the reliability and interpretability of end-to-end service latency measurement results.
[0013] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0014] 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.
[0015] Figure 1 This is a flowchart of an end-to-end service latency measurement method provided in Embodiment 1 of the present invention; Figure 2 This is a flowchart of an end-to-end service latency measurement method according to Embodiment 2 of the present invention; Figure 3 This is a schematic diagram of an end-to-end service delay measurement device provided in Embodiment 3 of the present invention; Figure 4 This is a schematic diagram of the structure of an electronic device that implements an end-to-end service delay measurement method according to Embodiment 4 of the present invention. Detailed Implementation
[0016] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0017] Example 1 Figure 1 This is a flowchart of an end-to-end service latency measurement method provided in Embodiment 1 of the present invention. This embodiment is applicable to the quantitative measurement of end-to-end service latency under heterogeneous service links. The method can be executed by an end-to-end service latency measurement device, which can be implemented in software and configured in an electronic device performing service link latency measurement. Figure 1 As shown, the method includes: S101. Using the actual topology of the service link under test, the service link under test is mapped as a logical node, and the service link under test is divided into a node processing segment and an adjacent communication segment.
[0018] In this embodiment, the provided end-to-end service latency measurement method can be implemented by a server deployed in the cloud for latency measurement. The server can implement this method internally through a processor, memory, hard disk, and network communication interface. Specifically, the processor can be used to execute all logical operations for end-to-end service latency measurement; the memory can be used to store intermediate data generated during method execution; the hard disk can be used to store set measurement uncertainties, etc.; and the network communication interface can be used to obtain the actual topology of the service link under test.
[0019] The actual topology can be considered as the network topology consisting of the actual physical devices, the connections between devices, and the business message flow paths of the service link under test. It is the original basis for link mapping and segmentation. The method provided in this embodiment is based on the actual topology for abstract mapping, which can adapt to the scenario of device changes in the real business environment and ensure that the subsequent segmented latency measurement is consistent with the real business flow.
[0020] A logical node can be considered a logical entity abstracted from physical processing devices within an actual topology. One or more physical processing devices can be mapped to the same logical node to define the responsibility boundary for business message processing. For example, multiple business processing hosts with the same function within the same business service link can be merged and abstracted into one logical node, or a single gateway server can be mapped to a separate logical node.
[0021] A node processing segment can be considered the business message processing area within a single logical node, starting with the entry event of a business message entering the logical node and ending with the exit event of a business message leaving the logical node. The node processing segment can be used to collect entry and exit time records of logical nodes and calculate the node processing latency of messages within the logical node. An adjacent communication segment can be considered the business message transmission area between two adjacent logical nodes, ranging from the sending side of the preceding logical node to the receiving side of the following logical node.
[0022] Specifically, this step can be considered as abstracting and mapping the processing devices within the link to obtain logical nodes based on the actual topology of the service link under test. These nodes include at least one source node, at least one intermediate processing node, and one receiving node. Based on the boundaries of the logical nodes, the service link under test is divided into node processing segments and adjacent communication segments for subsequent segmented collection of time records and segmented calculation of end-to-end service latency.
[0023] Among them, the source node is the logical node that generates and sends the business message; the intermediate processing node is the logical node that performs business logic processing during message transmission; and the receiving node is the logical node that ultimately receives the business message.
[0024] S102. Within each of the logical nodes within the target measurement boundary, the same local clock is used to collect the time records of entry events and exit events to obtain the node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics.
[0025] The entry event can be considered as a business observation event triggered when a business message enters the corresponding logical node. Based on the completion of logical node mapping and segmentation in the service link under test, each logical node has a message inflow boundary and a message outflow boundary. When a complete business message has been received and reaches the state where the business processing program can read it, the system captures an entry event to mark the start time of the node processing flow, which is the starting point for calculating the internal processing latency of the node.
[0026] An exit event can be considered a business observation event triggered when a business message leaves the corresponding logical node. When business processing is completed and the complete business message carrying message association fields has been confirmed as accepted by the output interface, sending queue, or downlink protocol processing interface, an exit event is triggered to mark the termination time of the node processing flow. It is used in pairs with the entry event to jointly define the complete time interval of the node processing segment.
[0027] Time records can be considered as structured observation data that the system collects and generates synchronously when capturing entry and exit events. It includes four core types of information: message association fields, local clock timestamps, observation point identifiers, and event semantics.
[0028] Among them, the message association field can be regarded as the unique identifier of a single business message, which is used to connect and match the entry and exit time records of the same business message generated at all logical nodes in the whole link.
[0029] Specifically, the message association fields include: a protocol-native unique identifier, a sequence number, and a transaction identifier. The protocol-native unique identifier is defined by the communication protocol itself and is natively carried with the message; the sequence number is the message sequence number used to distinguish multiple messages sent and received sequentially within the same service; the transaction identifier is used to mark all messages belonging to the same complete service, and multiple messages under the same service share the same transaction identifier.
[0030] The local clock timestamp is a precise time stamp generated by each logical node device based on its own local clock when capturing ingress / egress events. It can be used to quantify the specific moment the event occurred and is the basis for all latency difference calculations. The observation point identifier is used to uniquely identify the source of the current time record, such as from a specific logical node or observation point. Event semantics is used to indicate whether the current event is an ingress or egress event, distinguishing whether the data is the starting or ending data for processing.
[0031] Observation points can be considered as the entry and exit points of logical nodes, or the two ends of adjacent communication segments, used to capture business observation events and generate time records. After dividing the service link under test, observation points need to be deployed at key points of the link to collect time records.
[0032] Node processing latency can be considered the time consumed by a business message within a single logical node to complete business parsing, logical operations, and data processing. It is obtained by subtracting the timestamps of the exit and entry events corresponding to the same logical node. Node processing latency can be considered one of the core components of end-to-end business latency, specifically representing the internal processing overhead of the device. It is independent of the transmission latency of subsequent communication segments and together constitutes the end-to-end latency.
[0033] In this embodiment, this step can be considered as conducting observations within each logical node. By capturing inbound events at the message inflow boundary and outbound events at the message outflow boundary of each logical node, a standardized time record containing message association fields, local clock timestamps, observation point identifiers, and event semantics is generated synchronously based on the same local clock.
[0034] By calculating the timestamp difference between the entry and exit event time records paired on the same logical node, the node processing latency of a message within that logical node can be accurately obtained. The message association field ensures that messages from the same source can be matched throughout the entire chain. The local clock timestamp provides the time base for latency calculation, the observation point identifier enables data location tracing, and event semantics distinguishes the start and end types of events.
[0035] In one implementation, this step can be considered as collecting time records for applicable logical nodes with entry and exit events within the target measurement boundary, and calculating the corresponding node processing delay. Taking the A-B-C-D link as an example, if the starting point of the measurement boundary is the exit of the source node A and the ending point is the entry of the receiving node D, then only intermediate processing nodes B and C have complete entry and exit observation events, and only the node processing delays of B and C are calculated; whether the source node or the receiving node is included in the calculation is determined by the target measurement boundary.
[0036] Log write-to-disk, arrival of the first byte, interface return without proof of message acceptance, and timestamps generated afterward are not considered as the aforementioned entry or exit events.
[0037] S103. Deploy acquisition units in the adjacent communication segments to obtain the time records of the transmitting side and the receiving side, and establish a relative clock deviation model to correct the time records of the transmitting side and the receiving side to obtain the one-way communication delay.
[0038] The acquisition unit can be considered as an observation and acquisition component deployed at both ends of adjacent communication segments. It is used to capture service observation events on the transmitting and receiving sides of the communication link, collect and output raw time records, and serves as the acquisition carrier for obtaining communication segment delay data. The transmitting side can be considered as the exit point of the upstream logical node of the adjacent communication segment; the receiving side can be considered as the entry point of the downstream logical node of the adjacent communication segment. Time records can be generated from service observation events on the transmitting and receiving sides through the acquisition unit.
[0039] The relative clock skew model can be considered as addressing the issue that the time records collected by the acquisition unit on the transmitting and receiving sides do not belong to the same local clock. Therefore, establishing a relative clock skew model can be used to quantify the deviation, drift, and timing errors between the local clocks of two adjacent logical nodes, thereby eliminating cross-node clock asynchrony problems and correcting the timing of the original time records on both the transmitting and receiving sides. One-way communication delay can be considered as the actual one-way transmission delay of the service message on adjacent communication segments, calculated after correcting the transmitting and receiving side time records using the relative clock skew model.
[0040] In this embodiment, this step can be considered as deploying paired observation and acquisition units in the transmission interval between logical nodes to acquire time records of the sending side and the receiving side respectively. By establishing a relative clock deviation model, the timing deviation across clock domains is corrected, and finally, the accurate one-way communication delay is calculated.
[0041] S104. Based on the message association field, obtain the message-level latency trajectory of the same business message, and perform validity gating on the message-level latency trajectory.
[0042] The message-level latency trajectory can be considered as a set of business observation event records generated at various observation points in the link under test for the same business message, obtained by matching message association fields, and possessing a sequential flow order. It may include: corresponding time records, node information, event semantics, clock domain information, calibration segments, message association status, validity of each segment, and auxiliary information such as original evidence location.
[0043] Validity gating can be considered as a means to verify whether the obtained message-level latency trajectory meets all the constraints of end-to-end latency statistics. It verifies the event semantics, message validity, message association uniqueness, and link segment integrity in sequence. Only trajectories that pass all verification items are allowed to participate in subsequent end-to-end service latency synthesis and statistics.
[0044] Specifically, the validity gating of the message-level latency trajectory includes: confirming that the semantics of the start and end service observation events are consistent with the target measurement boundary, that the time corresponding to the service message is within the valid time interval of the relative clock deviation model, that the service message is associated one-to-one with the time record, and that the required segments of the service link under test are complete.
[0045] The effective time interval can be considered as the time range within which the relative clock skew model can be reliably and compliantly used for timing conversion. It is determined by the time range covered by the calibration samples, the maximum extrapolation duration of the model, the clock drift status, the health of the data acquisition, and the estimation uncertainty. The relative clock skew model is only allowed to be used to correct the time record if the time corresponding to the time record of the business message transmission and reception falls within this interval. If the observation time of the business message exceeds the effective time interval, the drift prediction error of the model will increase significantly, and it will no longer be used for one-way communication delay calculation.
[0046] The time range covered by the calibration sample can be considered as the actual time period covered by the calibration data; the maximum extrapolable duration can be considered as the maximum duration that the system allows for short-term prediction of the extension based on existing clock drift patterns after the calibration data coverage period ends; the clock drift status can refer to the real-time cumulative state of clock frequency deviation between adjacent nodes; the acquisition health level can be considered as whether the calibration data is continuous, and whether the acquisition program has been interrupted, restarted, or experienced any abnormalities.
[0047] Estimation uncertainty can be considered as the range of reliable fluctuations in the estimation results of the constructed relative clock deviation model when estimating clock deviation. It reflects the degree of dispersion of the estimation results caused by factors such as model fitting error, clock drift, or acquisition noise. This indicator is a constraint condition for determining the usability of the model. When the estimation uncertainty exceeds a preset threshold, even if the observation time is within the valid time interval, the model cannot be used to correct the time records of business messages.
[0048] In this embodiment, this step can be considered as matching the time records scattered across the entire link observation points based on the message association field, assembling the message-level latency trajectory corresponding to the same business message, and performing validity gating on the message-level latency trajectory.
[0049] S105. After the message-level delay trajectory of the service message passes the validity gate, the corresponding node processing delay and the one-way communication delay are combined to obtain the end-to-end service delay amount, and the end-to-end service delay statistics and timing validity results are output in combination with the set measurement uncertainty.
[0050] The end-to-end service latency can be considered as the total latency obtained by summing the processing latency of all nodes along the path of the service message to be tested, after the message-level latency trajectory has passed through validity gating, and the total one-way communication latency. The range of this latency strictly follows the preset target measurement boundary, and only the latency components of each segment that are valid within the boundary are accumulated; the processing and transmission processes of nodes outside the boundary are not included in the calculation. In essence, it is the total time consumed by the service message from the occurrence of the start event to the occurrence of the end event within the target measurement interval.
[0051] Measurement uncertainty can be considered as the range of confidence for the time delay measurement results obtained by this method, reflecting the confidence level of the end-to-end service delay. It can include a preset uncertainty component determined based on equipment specifications, calibration certificates, time resolution, or known error limits, as well as uncertainty components calculated through repeated experiments and residual statistics. The combined measurement uncertainty at the message level is then obtained by synthesizing the segmented components.
[0052] End-to-end service latency statistics can be considered as the summation of all messages that pass the validity gating, including the number of valid samples, mean, median, percentiles, extreme values, and jitter. Timing validity results can be considered as marking whether each message sample is eligible to participate in the formal end-to-end latency statistics, distinguishing between valid samples, invalid samples, or uncertain results, recording the reasons for sample failure, and counting the number of samples corresponding to each type of failure reason.
[0053] In this embodiment, this step can be considered as the system having screened out message-level latency trajectories that are complete, semantically compliant, uniquely associated, and clock-calibrated after validity gating verification. For such valid trajectories, this method, while retaining the data of each segment and its original evidence association, sequentially splices and combines the processing latency of all nodes in the link with the one-way communication latency to synthesize the end-to-end service latency of a single message within the complete measurement boundary.
[0054] Since simple latency values cannot reflect measurement accuracy and reliability, this step further introduces measurement uncertainty to quantify and constrain the measurement error range and result reliability. Finally, statistical analysis is performed based on the end-to-end service latency of all valid message samples, generating end-to-end service latency statistics. Simultaneously, based on the previous validity gating verification records, the compliance status, failure type, and statistical quantity of each sample are output, forming the timing validity results.
[0055] The technical solution in this embodiment abstracts logical nodes based on the actual topology of the link under test and divides them into node processing segments and adjacent communication segments to achieve segmented delay decomposition of heterogeneous links. It eliminates cross-node clock asynchrony issues through standardized time recording and acquisition and a relative clock deviation model, separately measuring node processing delay and one-way communication delay. Message-level delay trajectories are constructed using message association fields, and validity gating is implemented to filter invalid observation samples. Simultaneously, by combining measurement uncertainty and timing validity results, delay statistics are output, effectively improving the accuracy and interpretability of the measurement results. It can clearly distinguish between valid and invalid samples, enhancing the reliability and engineering practicality of end-to-end service delay measurement results.
[0056] Example 2 Figure 2This is a flowchart of an end-to-end service latency measurement method according to Embodiment 2 of the present invention. The embodiments of the present invention further refine the above-mentioned optional technical solutions, such as... Figure 2 As shown, the method includes: S201. Based on the actual topology, map the processing unit in the service link under test to the logical node. The logical node includes at least one source node, at least one intermediate processing node, and one receiving node.
[0057] In this embodiment, this step can be considered as mapping the processing units in the service link under test to logical nodes based on the actual topology, and dividing them into source nodes, intermediate processing nodes and receiving nodes according to business roles. This role-based logical model supports subsequent link segmentation and latency component decomposition. Whether the node processing latency of the source node and the receiving node participates in the calculation is determined by the target measurement boundary.
[0058] S202. Based on the logical node, divide the corresponding node processing segment and the adjacent communication segment.
[0059] In this embodiment, this step can be considered as using the already constructed logical nodes as boundary benchmarks to segment the entire service link under test, dividing it into two types of intervals: node processing segments and adjacent communication segments. Node processing segments are limited to the interior of a single logical node, corresponding to the interval within which business messages are processed within that logical node; adjacent communication segments are located between two consecutive logical nodes, corresponding to the link intervals where business messages are transmitted between logical nodes.
[0060] S203. Within each of the logical nodes within the target measurement boundary, the same local clock is used to collect the time records of entry events and exit events to obtain the node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics.
[0061] S204. Obtain a calibration sample based on the calibration event identifier in the transmitting side time record and the receiving side time record.
[0062] In this embodiment, this step can be considered as extracting the calibration event identifiers carried in the sending-side time record and the receiving-side time record, and filtering out the record pairs used for clock calibration as calibration samples. The calibration event identifier can be used to distinguish between ordinary service message events and calibration events specifically used for clock deviation calculation. Only pair time records with matching calibration event identifiers at both the sending and receiving ends will be selected as calibration samples.
[0063] A calibration event can be considered as a reference event or a combination of events that can establish a verifiable time correspondence between the transmitting and receiving clock domains. Valid sources of calibration events can include mutually observable reference pulses, bidirectional calibration message exchanges, time / frequency synchronization interfaces supported by hardware timestamps, calibration loopbacks, co-source triggering, or portable reference timing devices, generated or acquired by the acquisition unit, calibration service module, or external reference devices; ordinary one-way messages cannot directly distinguish between clock deviation and one-way communication delay and cannot be used as calibration events on their own.
[0064] Among them, the reference pulse can be considered as a synchronous electrical pulse signal that can be observed synchronously by the sending side and the receiving side; the bidirectional calibration message interaction can be considered as a process between a pair of adjacent logical nodes, where the message is sent by the sending side, received by the receiving side, and then the receiving side replies with a response message to the sending side. The complete interaction process generates a total of 4 time records; the calibration loopback can be considered as directly looping the message sending port to the receiving port within the same device and completing the calibration offline in advance. In this scenario, the one-way communication delay of message transmission is known and fixed.
[0065] The calibration samples can be considered as the basic data for building a relative clock deviation model. They are used to quantify the deviation and drift between the local clocks of two adjacent logical nodes, and support the timing correction of the time records of business message sending and receiving.
[0066] S205. Establish the relative clock deviation model based on the calibration samples.
[0067] In this embodiment, this step can be considered as using the above calibration samples to solve the relative clock deviation estimates and error limits of adjacent logic nodes at each calibration time, and after removing abnormal calibration samples, fitting a relative clock deviation model that can characterize the clock deviation change over time.
[0068] Simultaneously, the effective time interval corresponding to the model is determined, limiting the time range in which the model is applicable. When the observation time corresponding to the business message exceeds this effective time interval, the model will no longer be used for timing correction of the sending and receiving time records, thereby ensuring the reliability of one-way communication delay calculation.
[0069] Specifically, the relative clock bias model can be considered to include at least the calibration time, the relative clock bias between the transmitting and receiving sides, the relative clock drift, the effective time interval, and the acquisition overhead; it can be generated using one or more of the following methods: piecewise constant, linear interpolation, piecewise linear fitting, or dynamic estimation based on continuous calibration messages.
[0070] Relative clock drift can be considered as a slight difference in the frequency of the local clocks of two adjacent logic nodes. Over time, the deviation between the two clock readings will continue to accumulate. Even if the two clocks are calibrated and aligned at a certain moment, the time difference between them will still change over time because the clock frequencies are not completely consistent. This phenomenon is relative clock drift, a key parameter that needs to be quantified in the relative clock deviation model. It is used to predict the clock deviation between nodes at different times and to correct cross-node time records.
[0071] In one implementation, this step can be considered as using a linear time-varying model to describe the relative clock offset between adjacent nodes, with the model taking the form of: ;in Representative reference time The initial relative clock offset between the next two nodes, Represents relative frequency deviation. Defined as the receiver-side clock Relative to the transmitting side clock The model includes records of fitting residuals, acquisition status, and estimation uncertainty. It is only used to correct the sending and receiving time records of messages within the effective time interval corresponding to the sliding window.
[0072] S206. Based on the relative clock deviation model, perform cross-clock domain time correction on the transmitting side time record and the receiving side time record to obtain the one-way communication delay.
[0073] In this embodiment, this step can be considered as using the constructed relative clock deviation model to perform cross-clock domain time conversion on the transmitting side time record and the receiving side time record belonging to two local clock domains, unifying the two sets of time records under the same time base; eliminating the timing misalignment caused by clock deviation and clock drift, and then calculating the time difference based on the corrected time record to obtain the one-way communication delay between adjacent logical nodes.
[0074] In one implementation, this step can be considered as utilizing a model. Calculate the clock offset at the corresponding time. The model will use the receiver clock. The collected time records from the receiving side are uniformly converted to the clock of the transmitting side. The time base system is used, and the difference between the converted receiving side time record and the original sending side time record is calculated. The pre-calibrated inherent acquisition deviation difference between the receiving and sending sides is deducted, and the one-way communication delay between adjacent nodes is finally accurately obtained.
[0075] S207. Based on at least one of the message association fields, match the time records generated under each business observation event for the same business message, and obtain the message-level delay trajectory corresponding to the business message according to the business flow sequence.
[0076] As described above, the message association fields include: the protocol's native unique identifier, the sequence number, and the transaction identifier. Based on this, this step can be considered as extracting at least one of the message association fields as a matching keyword, filtering out time records from multiple time records across the entire chain that belong to the same business message and generate business observation events at different logical node observation points. Following the chronological order of the business message flow, the time records are concatenated and sorted to form a complete message-level latency trajectory for the business message, providing a timing basis for subsequent steps.
[0077] In one implementation, this step can use the message's native unique identifier to perform cross-node time record matching, and organize the successfully matched entry events, exit events, and send / receive communication events into a time-series link according to the order in which the message flows through the logical nodes; the message-level latency trajectory carries the event, timestamp, and event semantics corresponding to each observation point of a single business message in the entire link, and can independently carry out event semantic verification and segmented integrity checks, thereby supporting validity gating judgment.
[0078] S208. The node processing delay and the one-way communication delay of the same service message are summed to form a message-level end-to-end service delay sequence.
[0079] In this embodiment, this step can be considered as follows: for a single service message, the end-to-end latency of that service message is equal to the sum of the processing latency of all nodes the message actually passes through and the one-way communication latency extracted from the corresponding message-level latency trajectory. After aggregating the message samples, a message-level end-to-end service latency sequence is formed, which carries the end-to-end latency values corresponding to multiple valid messages.
[0080] S209. Calculate the percentile of the message-level end-to-end service delay sequence to obtain the end-to-end service delay amount.
[0081] In this embodiment, this step can be considered as selecting a preset percentile based on the message-level end-to-end service latency sequence, and using this as the end-to-end service latency measure. Percentiles can be used to describe what proportion of messages in a set of valid messages do not exceed a certain latency, characterizing latency distribution and long-tail characteristics, avoiding the mean from masking a small number of high-latency samples, and objectively reflecting the latency level of the service link.
[0082] S210. Establish uncertainty budgets for each node processing segment and the adjacent communication segment, and obtain message-level measurement uncertainty by combining the measurement uncertainty.
[0083] In this embodiment, this step can be considered as establishing uncertainty budgets for each node processing segment and adjacent communication segments. The error sources of each segment can be divided into Type A uncertainty components and Type B uncertainty components. Type A components are obtained from multiple observations and statistics, while Type B components are pre-estimated based on prior information such as calibration data, device manuals, and model parameters. According to the uncertainty propagation rules, the Type A and Type B components of all segments of the entire link are summarized and synthesized to obtain the message-level measurement uncertainty, which characterizes the reliable fluctuation range of the end-to-end delay measurement value of the service message.
[0084] S211. The service messages that have passed the validity gating are summarized, and the end-to-end service delay statistics and timing validity results are obtained by combining the message-level measurement uncertainty.
[0085] In this embodiment, this step can be considered as summarizing all business message samples that have passed the validity gating verification. On the one hand, it calculates the latency statistics based on the message-level end-to-end latency sequence corresponding to the sample to obtain the end-to-end business latency statistics result; on the other hand, it evaluates the credibility of the latency measurement process itself by combining the message-level measurement uncertainty attached to each sample and generates the timing validity result.
[0086] The technical solution in this embodiment maps physical processing units into logical node models of source nodes, intermediate processing nodes, and receiving nodes based on the actual topology. It then divides node processing segments and adjacent communication segments based on these logical nodes. This effectively avoids the link boundary ambiguity problem caused by directly modeling based on cluttered physical devices, improving the versatility of heterogeneous service link modeling. By collecting entry and exit event time records within the logical nodes to calculate node processing latency, it effectively preserves multi-dimensional observation metadata, ensuring the traceability of node processing latency collection.
[0087] By screening calibration samples based on calibration event identifiers and establishing a constrained relative clock deviation model, and using the model to complete cross-clock domain time correction to solve for one-way communication delay, the timing errors caused by local clock deviation and clock drift of adjacent nodes are effectively eliminated. This avoids distortion in one-way communication delay measurement caused by directly using the original timestamp in multi-clock domain scenarios, and improves the accuracy of cross-node transmission delay measurement.
[0088] By matching the full-link time records of the same business message through the message association field, a message-level latency trajectory is constructed according to the flow sequence. The latency of each segment is accumulated to form a message-level latency sequence, and the percentile is calculated to obtain the end-to-end business latency, effectively restoring the complete latency path of a single business message. By establishing uncertainty budgets for the node processing segment and adjacent communication segments respectively, the errors introduced by each measurement link are effectively quantified, increasing the credibility assessment dimension of the latency measurement results.
[0089] By combining message-level measurement uncertainty to obtain end-to-end service latency statistics and timing validity results, the system effectively distinguishes between the quality of the service latency metrics and the reliability of the measurement data, thereby improving the reliability of latency assessment conclusions.
[0090] Example 3 Figure 3 This is a schematic diagram of an end-to-end service delay measurement device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes: a link partitioning module 31, a node delay acquisition module 32, a communication delay acquisition module 33, a gating execution module 34, and a result output module 35.
[0091] The link segmentation module 31 is used to obtain the actual topology of the service link under test, map the service link under test to logical nodes, and divide the service link under test into node processing segments and adjacent communication segments. The node delay acquisition module 32 is used to collect the time records of entry events and exit events within each of the logical nodes within the target measurement boundary using the same local clock, so as to obtain the node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. The communication delay acquisition module 33 is used to deploy acquisition units in the adjacent communication segments to obtain the sending side time record and the receiving side time record, and to establish a relative clock deviation model to correct the sending side time record and the receiving side time record to obtain the one-way communication delay. The gate execution module 34 is used to obtain the message-level latency trajectory of the same business message based on the message association field, and to perform validity gate on the message-level latency trajectory; The result output module 35 is used to combine the corresponding node processing delay and the one-way communication delay after the message-level delay trajectory of the service message passes the validity gate to obtain the end-to-end service delay amount, and output the end-to-end service delay statistics and timing validity results in combination with the set measurement uncertainty.
[0092] The technical solution in this embodiment abstracts logical nodes based on the actual topology of the link under test and divides them into node processing segments and adjacent communication segments to achieve segmented delay decomposition of heterogeneous links. It eliminates cross-node clock asynchrony issues through standardized time recording and acquisition and a relative clock deviation model, separately measuring node processing delay and one-way communication delay. Message-level delay trajectories are constructed using message association fields, and validity gating is implemented to filter invalid observation samples. Simultaneously, by combining measurement uncertainty and timing validity results, delay statistics are output, effectively improving the accuracy and interpretability of the measurement results. It can clearly distinguish between valid and invalid samples, enhancing the reliability and engineering practicality of end-to-end service delay measurement results.
[0093] The end-to-end service delay measurement device provided in this embodiment of the invention can execute an end-to-end service delay measurement method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.
[0094] Optionally, the link segmentation module 31 can be specifically used for: Based on the actual topology, the processing units in the service link under test are mapped to the logical nodes, and the logical nodes include at least one source node, at least one intermediate processing node, and one receiving node. The logical node is divided into the corresponding node processing segment and the adjacent communication segment.
[0095] Optionally, the communication latency acquisition module 33 can be specifically used for: A calibration sample is obtained based on the calibration event identifiers in the transmitting-side time record and the receiving-side time record; The relative clock deviation model is established based on the calibration samples; The time record of the transmitting side and the time record of the receiving side are corrected across clock domains according to the relative clock deviation model to obtain the one-way communication delay.
[0096] Optionally, the message association fields include: protocol native unique identifier, sequence number, and transaction identifier.
[0097] Optionally, the gating execution module 34 can be specifically used for: Based on at least one of the message association fields, the time records generated under each business observation event for the same business message are matched, and the message-level latency trajectory corresponding to the business message is obtained according to the business flow sequence.
[0098] Optionally, the validity gating of the message-level latency trajectory includes: confirming that the semantics of the start and end service observation events are consistent with the target measurement boundary, that the time corresponding to the service message is within the valid time interval of the relative clock deviation model, that the service message is associated one-to-one with the time record, and that the required segments of the service link under test are complete.
[0099] Optionally, the result output module 35 can be specifically used for: The node processing delay and the one-way communication delay for the same service message are summed to form a message-level end-to-end service delay sequence; Calculate the percentile of the message-level end-to-end service latency sequence to obtain the end-to-end service latency amount; An uncertainty budget is established for each node processing segment and the adjacent communication segment, and the message-level measurement uncertainty is obtained by combining the measurement uncertainty. The service messages that pass the validity gating are summarized, and the end-to-end service delay statistics and timing validity results are obtained by combining the message-level measurement uncertainty.
[0100] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.
[0101] Example 4 Figure 4 This is a schematic diagram of the structure of an electronic device 40 implementing an end-to-end service latency measurement method according to Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0102] like Figure 4As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded from storage unit 48 into the RAM 43. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.
[0103] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0104] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as end-to-end service latency measurement methods.
[0105] In some embodiments, the end-to-end service latency measurement method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the end-to-end service latency measurement method described above may be performed. Alternatively, in other embodiments, processor 41 may be configured to perform the end-to-end service latency measurement method by any other suitable means (e.g., by means of firmware).
[0106] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.
[0107] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0108] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0109] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0110] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0111] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0112] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0113] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. An end-to-end service latency measurement method, characterized in that, include: Using the actual topology of the service link under test, the service link under test is mapped as a logical node, and the service link under test is divided into a node processing segment and an adjacent communication segment; Within each of the logical nodes within the target measurement boundary, the same local clock is used to collect time records of entry and exit events to obtain the node processing delay. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. A data acquisition unit is deployed in the adjacent communication segment to obtain the time records of the transmitting side and the receiving side, and a relative clock deviation model is established to correct the time records of the transmitting side and the receiving side to obtain the one-way communication delay. Based on the message association field, the message-level latency trajectory of the same business message is obtained, and validity gating is performed on the message-level latency trajectory; Once the message-level latency trajectory of the service message passes the validity gating, the corresponding node processing latency and the one-way communication latency are combined to obtain the end-to-end service latency amount. The end-to-end service latency statistics and timing validity results are then output in conjunction with the set measurement uncertainty.
2. The method according to claim 1, characterized in that, The process of obtaining the actual topology of the service link under test, mapping the service link under test to logical nodes, and dividing the service link under test into node processing segments and adjacent communication segments includes: Based on the actual topology, the processing units in the service link under test are mapped to the logical nodes, and the logical nodes include at least one source node, at least one intermediate processing node, and one receiving node. The logical node is divided into the corresponding node processing segment and the adjacent communication segment.
3. The method according to claim 1, characterized in that, The process of establishing a relative clock offset model to correct the sending-side time record and the receiving-side time record to obtain the one-way communication delay includes: A calibration sample is obtained based on the calibration event identifiers in the transmitting-side time record and the receiving-side time record; The relative clock deviation model is established based on the calibration samples; The time records of the transmitting side and the receiving side are corrected across clock domains according to the relative clock deviation model to obtain the one-way communication delay.
4. The method according to claim 1, characterized in that, The message association fields include: protocol native unique identifier, sequence number, and transaction identifier; The process of obtaining the message-level latency trajectory of the same business message based on the message association field includes: Based on at least one of the message association fields, the time records generated under each business observation event for the same business message are matched, and the message-level latency trajectory corresponding to the business message is obtained according to the business flow sequence. The validity gating of the message-level latency trajectory includes: confirming that the semantics of the start and end service observation events are consistent with the target measurement boundary, that the time corresponding to the service message is within the valid time interval of the relative clock deviation model, that the service message is associated one-to-one with the time record, and that the required segments of the service link under test are complete.
5. The method according to claim 1, characterized in that, The step of combining the corresponding node processing delay and the one-way communication delay to obtain the end-to-end service latency includes: The node processing delay and the one-way communication delay for the same service message are summed to form a message-level end-to-end service delay sequence; Calculate the percentile of the message-level end-to-end service delay sequence to obtain the end-to-end service delay amount.
6. The method according to claim 1, characterized in that, The method of combining the set measurement uncertainty to output end-to-end service delay statistics and timing validity results includes: An uncertainty budget is established for each node processing segment and the adjacent communication segment, and the message-level measurement uncertainty is obtained by combining the measurement uncertainty. The service messages that pass the validity gating are summarized, and the end-to-end service delay statistics and timing validity results are obtained by combining the message-level measurement uncertainty.
7. An end-to-end service delay measurement device, characterized in that, include: The link segmentation module is used to obtain the actual topology of the service link under test, map the service link under test to logical nodes, and divide the service link under test into node processing segments and adjacent communication segments. The node latency acquisition module is used to collect the time records of entry events and exit events within each of the logical nodes within the target measurement boundary using the same local clock, so as to obtain the node processing latency. The time records include message association fields, local clock timestamps, observation point identifiers, and event semantics. The communication delay acquisition module is used to deploy acquisition units in the adjacent communication segments to obtain the sending side time record and the receiving side time record, and to establish a relative clock deviation model to correct the sending side time record and the receiving side time record to obtain the one-way communication delay. The gating execution module is used to obtain the message-level latency trajectory of the same business message based on the message association field, and to perform validity gating on the message-level latency trajectory; The result output module is used to combine the corresponding node processing delay and the one-way communication delay after the message-level delay trajectory of the service message passes the validity gate to obtain the end-to-end service delay amount, and output the end-to-end service delay statistics and timing validity results in combination with the set measurement uncertainty.
8. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the end-to-end service latency measurement method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the end-to-end service latency measurement method according to any one of claims 1-6.
10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, implements the end-to-end service latency measurement method according to any one of claims 1-6.
