An alternate colored mobile network in-stream packet loss detection method
By employing alternating coloring and dual-counter coordination in mobile networks, the problems of cross-cycle statistical misalignment and chaotic coloring mark counting cycles caused by handover are solved, enabling accurate packet loss rate detection in mobile networks and network performance detection that adapts to dynamic topologies.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV
- Filing Date
- 2026-01-27
- Publication Date
- 2026-05-08
AI Technical Summary
In mobile networks, the cross-cycle statistical misalignment and color mark counting cycle disorder caused by handover lead to a decrease in the accuracy of packet loss rate detection, especially in dynamic topologies such as satellite networks, where existing methods are difficult to solve effectively.
An alternating coloring method is adopted, and a packet loss detection strategy is configured at the encapsulation node. Through dual counter collaboration, counting cycle start calibration, and a jump-by-jump periodic reporting mechanism for detection data, combined with data comparison and splicing in the collector, accurate calculation of packet loss information is achieved.
It effectively eliminates the impact of link switching on the continuity of detection data, realizes accurate packet loss rate measurement in mobile scenarios, has low detection head overhead, is easy to operate and maintain, and adapts to the detection needs of mobile networks.
Smart Images

Figure CN121604012B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of communication network performance testing technology, specifically involving an alternating coloring method for detecting packet loss in mobile networks. It is used to perform real-time and accurate packet loss rate detection for specific service flows in networks with mobility characteristics (such as 5G, satellite networks, and vehicle-to-everything networks). Background Technology
[0002] Flow-following detection technology generally refers to the technical means of monitoring and analyzing real service flows in a network. It involves directly embedding or attaching itself to either the service flow or data packets to detect network status and performance, and periodically reporting the data to the control plane. Packet loss measurement is one of the core capabilities of flow-following detection and performance monitoring. Alternate Marking (AM), a commonly used method in flow-following detection, is a core technology defined by the International Organization for Standardization (IETF), and its principle is clearly specified in RFC 9341. Mobility networks refer to networks where nodes have mobility capabilities, and whose topology and link states change dynamically over time. They are widely used in scenarios such as satellite communication, vehicle-to-everything (V2X) networks, drone swarms, and ad hoc networks. In traditional fixed networks, when transmitting node counting on the forwarding plane, due to latency jitter and out-of-order packets, the coloring marking counting cycle may have ended and jumped to the counting cycle of another marking, but the packet may still not have arrived. To address this issue, the IFIT technology, during packet loss rate calculation, reads the corresponding color flag count from the previous counting cycle and adds it to the current cycle's count at 1 / 3 to 2 / 3 of the time interval. Then, it clears the counter and reports it to the collector, thus mitigating the impact of short-term out-of-order packet movement and latency jitter on packet loss rate. Satellite networks, a typical example of mobile networks, inherently possess dynamic topology. Due to the switching of inter-satellite and satellite-to-ground links, existing methods face the following technical bottlenecks:
[0003] (1) Cross-cycle statistical misalignment caused by handover. When a node handover occurs in a mobile network, the service flow is truncated and forwarded to another transmission node. When the transmission node forwards the service flow packets and counts them after the handover, its first colored packet counting period is likely not a complete counting period. This will cause the packet loss coloring value of the transmission node's counting period to be misaligned with the coloring value of the encapsulation node's coloring period, resulting in cross-cycle statistical misalignment of packets. Even when the transmission node counts the number of packet loss coloring values of the previous complete counting period and the previous counting period up to the present in the second counting period at 1 / 3 to 2 / 3 of the time point, it may count the packet loss coloring values of the first and third counting periods, causing a more serious cross-cycle statistical misalignment problem.
[0004] (2) Problem of chaotic coloring mark counting period. In mobile networks, due to short-term out-of-order delivery of small packets and time delay jitter, packets may arrive early or late. Nodes cannot determine the counting period affixed to different coloring mark packets received near the period update time, causing chaotic coloring mark counting period in the collector. Since the alternating coloring method does not use a sequence number mechanism to reduce packet load, the problem of packet loss and counting errors caused by continuous out-of-order delivery of large packets cannot be solved. Summary of the Invention
[0005] This invention proposes a mobile network packet loss detection method based on alternating coloring. Without altering the header content of existing protocols, it employs a dual-counter collaboration mechanism, a counting cycle start calibration, and a hop-by-hop periodic reporting mechanism to compare and concatenate packet loss detection information in the collector before calculating packet loss information. This solves the problems of packet loss calculation accuracy caused by cross-cycle statistical misalignment due to handover and chaotic coloring counting cycles. The specific technical solution is as follows:
[0006] A method for detecting packet loss in mobile networks using alternating coloring, the implementation process of which includes the following steps:
[0007] S1. Detection strategy configuration and stream staining:
[0008] Network administrators configure packet loss detection policies for the monitored service flows at the entry point (encapsulation node), with the core parameter being the statistical period. The encapsulation node, based on the policy, inserts a lightweight detection header into each packet of the service flow under test; the detection header contains at least:
[0009] (1) Detection type identifier: indicates that this is a packet loss detection message.
[0010] (2) Packet loss coloring flag: A field that can be used to mark the state as 0 or 1.
[0011] Encapsulating nodes at a preset period The packet loss flag in the service flow under test is alternately marked between 0 and 1. For example, the first All messages within the period are marked as 0, the next... All messages within a period are marked with 1, and this cycle repeats. Simultaneously, the node records the timestamp of the first marked message sent within each period.
[0012] S2. Periodic Synchronization and Counting:
[0013] After the intermediate nodes (transmission nodes) and destination nodes (decapsulation nodes) in the path recognize the detection head, they automatically enable the detection function for the stream:
[0014] S2.1 Initialization: Create two counters (C0 and C1) and corresponding timestamp recording units for the service flow under test.
[0015] S2.2 Periodic Synchronization: The transmission node and the decapsulation node begin the first counting cycle based on the time when the coloring identifier of the service flow under test is first identified; within this cycle:
[0016] If a 0 / 1 transition is detected in the packet loss coloring flag, the transition moment is immediately used as the starting point of a new counting cycle to achieve precise synchronization with the coloring rhythm of the encapsulation node.
[0017] If no transition is detected, the first recognition time is used as the starting point of the counting cycle.
[0018] S2.3 Continuous Periodic Counting: After synchronization is complete, the transmission node and the decapsulation node enter a stable counting state. Each counting cycle lasts for [duration missing]. The node increments the message count into the corresponding counter (C0 or C1) based on the value of the message coloring flag (0 or 1), and continuously updates the end timestamp of the current counting period (i.e., the arrival time of the last message).
[0019] S2.4 Resource Release: If the values of the two counters in the current counting period remain unchanged at the end of the period, it is determined that the forwarding of the detection flow by the current node has ended, and the maintenance of the detection information of the service flow to be tested is stopped.
[0020] S3. Reporting of test data:
[0021] Encapsulation nodes, transmission nodes, and decapsulation nodes periodically report statistical information to the central collector. Encapsulation nodes report statistical information in each counting cycle. At the end, report the detection data to the collector, including: period. The current period's coloring value (0 or 1), the total number of messages sent in this period, and the timestamp of the first message in this period. The transmission node and decapsulation node do not report during the first counting period, but report within each counting period after completing period synchronization. At each time point, the detection data is reported to the data collector, among which... The reported content includes: the packet loss coloring flag value of the previous complete counting cycle; the start and end timestamps of the previous complete counting cycle; and the time from the start of the previous counting cycle to the current reporting time. The total number of packets with the packet loss flag value received up to this point. The transmitting node and the decapsulation node reset the counters and timestamps corresponding to the previous counting cycle after reporting.
[0022] S4. Detector head removal:
[0023] After completing local statistics and information reporting, the decapsulation node removes the detection header from the message, restoring the original message format and ensuring transparency to upper-layer applications.
[0024] S5. Data Aggregation and Intelligent Sequence Reconstruction:
[0025] The collector receives the detection data reported by all nodes and performs core processing:
[0026] S5.1 Sequence Generation: For the same service flow under test, each node, including the encapsulation node, transmission node and decapsulation node, is arranged into a time-ordered counting sequence according to the start timestamp in the reported data.
[0027] S5.2 Mobility Compensation and Sequence Correction:
[0028] Interruption detection: The collector compares the node counting sequences according to the network topology. If it finds that the counting sequence of downstream node M is suddenly interrupted in time (its end time is earlier than the end time of the counting sequence of upstream node M-1), a handover judgment is initiated.
[0029] Switchover Decision: In the data reported by subsequent transmission nodes and decapsulation nodes, find a new counting sequence Q whose start timestamp is "near" the end timestamp of node M's counting sequence. The decision criteria include: time difference. Is it less than the threshold? ( The system checks whether the number of cycles matches. If they match, the service flow is determined to have switched from node M to the new node to which the counting sequence Q belongs. If they do not match, it is determined that no switch has occurred and packet loss has occurred in this hop, leading to the next hop forwarding. The found counting sequence belongs to the transmission node and decapsulation node of the subsequent forwarding hop.
[0030] Misalignment correction: The counting sequence of node M is concatenated with the counting sequence Q. If the packet loss marker values of two adjacent counting periods are the same, their count values are merged, and the time span is merged; if the marker values are different, they are retained as two independent counting periods.
[0031] Iterative splicing: Repeat this process until all the segmented counting sequences generated by the switching are spliced into a complete, time-continuous jump-by-jump counting sequence.
[0032] S6. Packet loss rate calculation:
[0033] Based on the corrected, complete hop-by-hop counting sequence, the data collector can perform accurate calculations:
[0034] S6.1 Hop-by-hop packet loss rate: For two adjacent nodes A and B, in any identical counting period, the packet loss rate = (A node's transmit count - B node's receive count) / A node's transmit count.
[0035] S6.2 End-to-end packet loss rate: The total count of the encapsulation node and the final decapsulation node within the same time interval.
[0036] The advantages of this invention compared to the prior art are:
[0037] 1. Adaptive to mobility: Through intelligent sequence reconstruction algorithm, the impact of link switching on the continuity of detection data is effectively eliminated, and accurate hop-by-hop positioning is achieved in mobile scenarios.
[0038] 2. High accuracy: Based on business-related flow detection and periodic synchronous counting, it provides near real-time measurement results that correspond one-to-one with the business flow.
[0039] 3. Low overhead: The detection head is extremely small, the reporting cycle is adjustable, and intermediate nodes only need to maintain simple counters and timestamps, which has a negligible impact on network performance.
[0040] 4. Simple configuration: The policy is configured only on the encapsulation node, and subsequent nodes can be used as is. Automatic synchronization and statistics are performed, making operation and maintenance convenient. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the flow-based packet loss detection method for mobile networks using alternating coloring.
[0042] Figure 2 This is a schematic diagram of a satellite packet loss detection system.
[0043] Figure 3 This is a schematic diagram of the periodic jump update determination;
[0044] Figure 4 This is a schematic diagram of cross-cycle statistical misalignment;
[0045] Figure 5 This is a diagram illustrating the switching process of the data collector. Detailed Implementation
[0046] The invention will be further described below with reference to the accompanying drawings, specifically in a typical mobile network such as a satellite network.
[0047] A specific implementation example is a method for detecting packet loss in a satellite network using alternating coloring to adapt to the dynamic characteristics of mobile networks. Without altering the header content of existing protocols, this method solves the problems of cross-cycle statistical misalignment and chaotic coloring mark counting cycles caused by handover through counting cycle start calibration, dual-counter coordination, and hop-by-hop periodic reporting of detection data. Figure 1 As shown, the mobile network packet loss detection method with alternating coloring includes the following steps: First, network nodes synchronize their clocks and insert a detection header with packet loss coloring flags into the service flow at the encapsulation node; then, the encapsulation node alternately colors the coloring flags on the service flow packets and reports the coloring data; next, when the service flow is forwarded by the transmission node and decapsulation node, the nodes initialize the detection process and perform a counting cycle start calibration; subsequently, the transmission node and decapsulation node perform periodic counting, record and report the detection data, and the decapsulation node removes the detection header after completing the detection; finally, the collector processes the detection data, identifies the switching points, and aligns the counters to calculate the packet loss rate. The specific technical solution is as follows:
[0048] S1. Detection Strategy Configuration and Stream Coloring:
[0049] like Figure 2 In the satellite network shown, the network administrator configures packet loss detection policies for the service flows that need to be monitored at the entry point (encapsulation node). The core parameter is the statistical period. The encapsulation node inserts a lightweight detection header into each packet of this service flow according to the policy; the detection header contains at least:
[0050] (1) Detection type identifier: indicates that this is a packet loss detection message.
[0051] (2) Packet loss coloring flag: A field that can be used to mark the state as 0 or 1.
[0052] Encapsulating nodes at a preset period The packet loss flag for messages within the flow is alternately marked between 0 and 1. For example... Figure 3 As shown, the first All messages within the period are marked as 1, the next... All messages within a period are marked as 0, and this cycle repeats. Simultaneously, the node records the timestamp of the first marked message sent within each period.
[0053] S2, Periodic Synchronization and Counting:
[0054] After the intermediate nodes (i.e., transmission nodes) and destination nodes (i.e., decapsulation nodes) in the path recognize the detection head, they automatically enable the detection function for the stream:
[0055] S2.1 Initialization: For each service flow under test, maintain dual counters C0 and C1 corresponding to packet loss coloring values of 0 and 1 respectively, and maintain the period start timestamp and period end timestamp corresponding to each counter. Simultaneously, initialize with [unclear text - likely a typo, should be "initialized"] when the first packet of the flow is received. A timer with a periodic value is used to record the start timestamp of the corresponding packet loss coloring value, and the counting begins while continuously updating the end timestamp of the corresponding packet loss coloring value's period. For example... Figure 2 In the satellite mobility network model shown, service flows are forwarded through transmission nodes 1, 2, and 3. During the forwarding process, handover occurs between transmission nodes 1 and 1', and between transmission nodes 2 and 2'. Transmission nodes 1, 1', 2, 2', 3, and the decapsulation node start their timers with the first message received as the starting point. At this time, t=0, and the preset initial counting period is... .
[0056] S2.2 Cycle Synchronization: A schematic diagram of cross-cycle statistical misalignment caused by switching is shown below. Figure 4 As shown, node 1 forwards the complete service flow to be tested to node 2 during the first counting period. A handover and forwarding occurred to node 3. The processing performed by node 3 after receiving the service flow is as follows: It detects that the current period's count is for packets with a coloring flag of 1, and in the counting period... The data is taken from the previous statistical period to the current period up to the 1 / 3 to 2 / 3 time point (i.e., x∈[1 / 3,2 / 3]). + After counting the packets with a coloring value of 1 within the first period, the packet loss coloring value 1 counter is reported and cleared. The first counting period after the service flow enters node 3 is not a complete period; the packets in the first period should belong to the part after the handover of the first counting period T1 of node 1. If the method in this paper is used to report at the 1 / 3 to 2 / 3 time point within the period, node 3 will report the packets belonging to the third counting period of node 1. The message error count reached its first counting cycle. This statistical method even leads to completely chaotic counter data reported in subsequent counting cycles. The counting data processed in the collector cannot be compared with the coloring information from the encapsulation node's coloring cycle, therefore, counting cycle start calibration is required. Figure 3 As shown, node 2 did not detect any transitions in the first cycle, and the first identification time was used as the start of the cycle; node 3 only performed counting in the first counting cycle after receiving the stream, and cleared the timer and recorded the cycle start timestamp of the corresponding packet loss color value when a transition occurred, thus completing the initial calibration of the counting cycle.
[0057] S2.3 Continuous Periodic Counting: After synchronization is complete, the transmission node and the decapsulation node enter a stable counting state. Each counting cycle lasts for [duration missing]. The transmission node and decapsulation node increment the message count into the corresponding counter (C0 or C1) based on the value of the message coloring flag (0 or 1), and continuously update the end timestamp of the current period (i.e., the arrival time of the last message). For example... Figure 3 As shown, the transmission node and decapsulation node continuously count the packet loss coloring value of the packet loss coloring flag bit for each packet in the service flow under test, and continuously update the end timestamp of the period within the counting period corresponding to the packet loss coloring value. In each counting period except the first period, when the packet loss coloring value changes, if the start timestamp of the period corresponding to the packet loss coloring value after the change has not been recorded, the corresponding start timestamp of the period is recorded.
[0058] S2.4 Resource Release: such as Figure 3 As shown, when node 2 detects that the values of the two counters in the current period have remained unchanged at the end of the period, it determines that the forwarding of the service flow to be tested by the current node has ended and stops maintaining the detection information of the service flow to be tested.
[0059] S3. Reporting of detection data:
[0060] Encapsulation nodes, transmission nodes, and decapsulation nodes periodically report statistical information to the central collector. Encapsulation nodes report statistical information in each counting cycle. At the end, report the detection data to the collector, including: period. The current period's coloring value (0 or 1), the total number of messages sent in this period, and the timestamp of the first message in this period. The transmission node and decapsulation node do not report during the first counting period, but report within each counting period after completing period synchronization. At each time point, the detection data is reported to the data collector, among which... The reported content includes: the packet loss coloring flag value of the previous complete counting cycle; the start and end timestamps of the previous complete counting cycle; and the time from the start of the previous counting cycle to the current reporting time. The total number of packets with the packet loss flag value received so far. The transmitting node and decapsulation node reset the counters and timestamps corresponding to the previous counting cycle after reporting. For example... Figure 3 As shown, node 3 counts in periods other than the first period. When x∈[1 / 3,2 / 3], the total number of color value messages counted in the previous period is reported and cleared to zero.
[0061] S4. Detector head removal:
[0062] like Figure 2 In the satellite network shown, after completing packet loss detection, the decapsulation node also needs to remove the detection header inserted in the packet.
[0063] S5, Data Aggregation and Intelligent Sequence Reconstruction:
[0064] The collector receives the detection data reported by all nodes and performs core processing:
[0065] S5.1 Sequence Generation: For the same service flow under test, based on the start timestamp in the reported data, each node, including the encapsulation node, transmission node, and decapsulation node, is individually arranged into a time-ordered counting sequence according to its reported detection data. The collector compares the detection data reported by the encapsulation node, transmission node, and decapsulation node, and reads the coloring cycle length, coloring flag value, number of coloring packets, coloring timestamp information of the first packet in the coloring cycle, and total number of coloring cycles from the encapsulation node's detection data. The data is then sorted in ascending order of timestamps to generate a counting sequence as the basis for comparing packet loss rates. The system reads the period start timestamp, period end timestamp, packet loss coloring value, and corresponding counter counts from the detection data reported by the transmission and decapsulation nodes. Each node generates a count sequence by sorting the data in ascending order of its period start timestamp. Then, sort the count sequence of each node according to the time order of the start timestamp of the first period. For example... Figure 5 As shown, the detection data reported by nodes 1, 2, and 3 to the collector are sorted according to the time sequence of the cycle start timestamp to form a counting sequence.
[0066] S5.2 Mobility Compensation and Sequence Correction:
[0067] Interruption Detection: The collector compares the counting sequences of transmitting nodes and decapsulation nodes according to the network topology. If it finds that the counting sequence of downstream node M is suddenly interrupted in time (its end time is earlier than the end time of the counting sequence of upstream node M-1), a handover judgment is initiated. Figure 5 As shown, the collector detected an interruption in the counting sequence of node 2, requiring a switchover check to be initiated.
[0068] Switching judgment: In the data reported by subsequent nodes, find a new counting sequence Q whose start timestamp is "near" the end timestamp of node M's counting sequence. Judgment criteria include: time difference. Is it less than the threshold? ( , The order of magnitude is typically seconds, but in practice, the order of milliseconds can be ignored. ,set up And whether the number of cycles matches. If they match, then it is determined that the service flow has switched from node M to the new node to which the counting sequence Q belongs. Figure 5As shown, if the number of periods covered by the counting sequence of node 2 is less than that of the counting sequence reported by the previous node, then a counting sequence is searched in the subsequent counting sequences that satisfies the condition that the start time of the period of the first detection data is adjacent to the end time of the period of the last detection data in this counting sequence. The counting sequence of the found adjacent node 3 is compared with this counting sequence for link switching judgment: if the sum of the number of periods of the node's counting sequence and the number of periods of this counting sequence is still less than or equal to the number of periods of the counting sequence reported by the previous node plus 1, and the difference between the start time of the period of the first detection data in node 3's counting sequence and the end time of the period of the last detection data in this counting sequence is less than or equal to the switching judgment time d, then a link switching is determined to have occurred at this point, and misalignment correction is performed; if the sum of the number of periods of the adjacent counting sequences and the number of periods of the previous counting sequence is greater than the number of key-value pairs in the counting sequence reported by the previous node plus 1, or the difference between the start time of the period of the first detection data in the found adjacent counting sequence and the end time of the period of the last detection data in this counting sequence is greater than the switching judgment time d, then a link switching is determined to have occurred at this point, and misalignment correction is performed; if the sum of the number of periods of the adjacent counting sequences and the number of periods of the previous counting sequence is greater than the number of key-value pairs in the counting sequence reported by the previous node plus 1, or the difference between the start time of the period of the first detection data in the found adjacent counting sequence and the end time of the period of the last detection data in this counting sequence is greater than the switching judgment time d, then a link switching is determined to have occurred at this point, and misalignment correction is performed; If the result is returned, it indicates that no handover occurred but rather packet loss occurred at this hop, leading to the next hop forwarding. The retrieved counting sequence belongs to the transmission node of the subsequent forwarding hop.
[0069] Misalignment correction: The counting sequence of node M is concatenated with the counting sequence Q. If two adjacent periods have the same coloring value, their count values are merged, and the time spans are merged; if the coloring values are different, they are retained as two independent periods. Figure 5 As shown, the information 1 reported by node 2 and the information 1 reported by node 3 are concatenated, their count values of C1 are merged and their time spans are merged, and the start timestamp of the last period of the previous counting sequence and the end timestamp of the first period of the next counting sequence are retained.
[0070] Iterative splicing: Repeat this process until all the segmented counting sequences generated by the switching are spliced into a complete, time-continuous jump-by-jump counting sequence.
[0071] S6 packet loss rate calculation:
[0072] Based on the corrected, complete hop-by-hop counting sequence, the data collector can perform accurate calculations:
[0073] S6.1 Hop-by-hop packet loss rate: For two adjacent nodes A and B, within any identical coloring period, the packet loss rate = (Node A's transmit count - Node B's receive count) / Node A's transmit count. (The preceding node's count sequence is then used.) The counting sequence reported by subsequent nodes Compare each packet individually according to the cycle and calculate the number of lost packets. Then calculate the hop-by-hop packet loss rate. .
[0074] S6.2 End-to-end packet loss rate: Compare the total counts of the encapsulation node and the final decapsulation node within the same time interval. Calculating the end-to-end packet loss rate requires comparing the concatenated count sequence of the decapsulation node with the count sequence reported by the encapsulation node. This yields the packet loss count and packet loss rate information. The counting sequence reported by the encapsulation node Compare each packet individually according to the cycle and calculate the number of lost packets. Then calculate the end-to-end packet loss rate. After calculating the packet loss rate, the data collector can calculate either the end-to-end packet loss rate or the hop-by-hop packet loss rate according to preset modes and user requirements, and output the measurement results and trigger alarms accordingly.
Claims
1. A method for detecting packet loss in mobile networks using alternating coloring, characterized in that, Includes the following steps: S1 Detection Strategy Configuration and Flow Coloring: The encapsulation node adds a detection header to the packets of the service flow to be tested, and performs a fixed counting period. Alternately change the packet loss staining flag value in the detection head; S2 Periodic Synchronization and Counting: After recognizing the detection head, the transmission and decapsulation nodes in the path automatically enable the detection function for the service flow under test. The transmission and decapsulation nodes begin the first counting cycle based on the time when the packet loss flag is first detected. Within the first counting cycle, the start time of the local counting cycle is dynamically calibrated based on the first change in the packet loss flag value. If no change in the packet loss flag value is detected within the first counting cycle, the start time of the counting cycle is taken as the time when the first change in the packet loss flag value is detected. Thereafter, the counting cycle begins at... The counting period is used to count and timestamp messages with different packet loss coloring values. S3 Detection Data Reporting: The encapsulation node, transmission node, and decapsulation node periodically report statistical information to the central collector. The reporting time is: the encapsulation node in each counting cycle. At the end, the detection data is reported to the collector; the transmission node and decapsulation node do not report during the first counting cycle, and report in each counting cycle after calibration. At each time point, the detection data is reported to the data collector, among which... The transmission node and the decapsulation node reset the counter and timestamp corresponding to the previous counting cycle after reporting. S4 Detector Header Removal: After completing local statistics and information reporting, the decapsulation node removes the detector header from the message, restoring the original message format and ensuring transparency to upper-layer applications; S5 Data Aggregation and Intelligent Sequence Reconstruction: The collector receives detection data reported by encapsulation nodes, transmission nodes, and decapsulation nodes, reconstructs the continuous counting sequence of the service under test flowing through each node, and calculates the packet loss rate by comparing the counting sequences of adjacent nodes; the data aggregation and intelligent sequence reconstruction specifically includes: the collector receives data reported by the nodes and performs the following processing: S5.1 Sequence Generation: For the same service flow to be tested, each node, including the encapsulation node, transmission node and decapsulation node, is arranged into a time-ordered counting sequence according to the start timestamp in the reported data. S5.2 Mobility Compensation and Sequence Correction: Interruption identification: The collector compares the counting sequence obtained by S5.1 in the order of network topology; if it finds that the counting sequence of the downstream node M is suddenly interrupted in time, that is, its end time is earlier than the end time of the counting sequence of the upstream node M-1, then the switching judgment is initiated. Switchover Decision: In the data reported by subsequent transmission nodes and decapsulation nodes, find a new counting sequence Q whose start timestamp is "near" the end timestamp of node M's counting sequence; the decision criteria include: time difference. Is it less than the threshold? Its value And whether the number of cycles matches; if they match, it is determined that the service flow under test has switched from node M to the new node to which the counting sequence Q belongs; if they do not match, it is determined that no switch has occurred but packet loss has occurred in this hop and the next hop has been entered for forwarding, and the found counting sequence belongs to the transmission node of the subsequent forwarding hop; Misalignment correction: The counting sequence of node M is concatenated with the counting sequence Q; if two adjacent counting periods have the same coloring value, their counting values are merged and the time span is merged; if the coloring values are different, they are retained as two independent counting periods. Iterative splicing: Repeat this process until all the segmented counting sequences generated by the switching are spliced into a complete, time-continuous jump-by-jump counting sequence; S6 packet loss rate calculation: The collector performs accurate calculations based on the corrected and complete hop-by-hop counting sequence.
2. The method for detecting packet loss in mobile networks using alternating coloring according to claim 1, characterized in that, The periodic synchronization and counting described in step S2 specifically includes: S2.1 Initialization: Create two counters, C0 and C1, and corresponding timestamp recording units for the service flow under test; S2.2 Periodic Synchronization: The transmission node and the decapsulation node begin the first counting cycle based on the time when the coloring identifier of the service flow under test is first identified; within the first counting cycle: If a 0 / 1 transition is detected in the packet loss coloring flag, the transition moment is immediately used as the starting point of a new counting cycle to achieve precise synchronization with the coloring rhythm of the encapsulation node. If no packet loss indicator value change is detected, the time when the packet loss indicator value change is first detected is taken as the starting point of the cycle. S2.3 Continuous Periodic Counting: After synchronization is completed, the transmission node and the decapsulation node enter a stable counting state; the duration of each counting period is T; the transmission node and the decapsulation node accumulate the message count into the corresponding counters C0 and C1 according to the coloring value of the message coloring flag bit, i.e., 0 or 1, and continuously update the end timestamp of the current period, i.e. the arrival time of the last message. S2.4 Resource Release: If the values of the two counters in the current counting period remain unchanged at the end of the continuous period counting, it is determined that the forwarding of the service flow to be tested by the current node has ended, and the maintenance of the detection information of the service flow to be tested is stopped.
3. The method for detecting packet loss in mobile networks using alternating coloring according to claim 1, characterized in that, The detection data reporting in step S3 specifically includes the following: The encapsulation node reports: period T, packet loss coloring flag value for this period, total number of packets sent in this period, and timestamp of the first packet in this period; the transmission node and decapsulation node report: The packet loss coloring flag value of the previous complete counting cycle; The start and end timestamps of the previous complete counting cycle; From the start of the previous counting cycle to the time of this report The total number of messages with this coloring value received so far.
4. The method for detecting packet loss in mobile networks using alternating coloring according to claim 1, characterized in that, The packet loss rate calculation in step S5 specifically includes: S6.1 Hop-by-hop packet loss rate: For two adjacent nodes A and B, in any identical counting period, the packet loss rate = (A node's transmit count - B node's receive count) / A node's transmit count; S6.2 End-to-end packet loss rate: The total count of packet loss between the encapsulation node and the final decapsulation node within the same time interval.
Citation Information
Patent Citations
Data transmission quality detection method and system, network equipment and storage medium
CN112702218A
Message marking method and device based on stream detection
CN119484350A