A method, device and storage medium for measuring packet loss during flow

By using alternating staining periods and extended time values ​​in non-staining measurement nodes, the dependence of packet loss measurement on high-precision clock synchronization is solved, and accurate packet loss rate statistics are achieved under low-precision clock synchronization conditions, ensuring the quality and reliability of packet loss measurement.

CN118316835BActive Publication Date: 2025-12-02INSPUR COMM TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410368916.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-03-28
Publication Date
2025-12-02
Estimated Expiration
2044-03-28

AI Technical Summary

Technical Problem

Existing methods for measuring packet loss during streaming rely on high-precision clock synchronization, which leads to network overhead and measurement inaccuracies.

Method used

By acquiring the alternating coloring period and extended time value, the non-coloring measurement node advances or delays the extended time based on the alternating coloring period to form a statistical time, counts the number of colored and uncolored messages, and reduces the dependence on clock synchronization accuracy.

Benefits of technology

It enables accurate packet loss rate statistics under low clock synchronization accuracy, reduces reliance on high-precision clock synchronization, and ensures the quality and accuracy of packet loss measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118316835B_ABST
    Figure CN118316835B_ABST
Patent Text Reader

Abstract

This invention provides a method, device, and storage medium for packet loss measurement during streaming, relating to the field of packet loss measurement technology. The method includes: acquiring an alternating coloring period and acquiring an extended time value; based on the extended time value, advancing and / or delaying the extended time value on the basis of the alternating coloring period to form a statistical time; acquiring service packets; and statistically analyzing the coloring markers in the service packets based on the alternating coloring period and the statistical time to obtain packet loss measurement information. By enabling non-coloring measurement nodes to extend the alternating coloring period based on the extended time to form a statistical time, the time for statistical analysis of service packets is widened. Furthermore, due to the alternating coloring and non-coloring of service packets, even with low clock synchronization accuracy, it is possible to completely statistically analyze service packets within both the coloring and non-coloring periods. This helps reduce dependence on clock synchronization accuracy while ensuring the reliability of the statistics, thus guaranteeing the quality and accuracy of packet loss measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of packet loss measurement technology, and in particular to a method, device and storage medium for measuring packet loss during flow. Background Technology

[0002] With the rapid development of network technology, higher demands have been placed on network quality. To assess network quality, two main methods are commonly used: active measurement and flow-based measurement. Active measurement measures packet loss by simulating service packets; however, the sampling granularity cannot accurately simulate real-world service scenarios and can burden the network. Flow-based measurement measures data by adding coloring markers to actual service packets; however, existing flow-based measurement methods rely on high-precision clock synchronization mechanisms between measurement nodes, resulting in significant time synchronization costs.

[0003] Therefore, how to reduce the dependence of the flow-following method on high-precision clock synchronization and ensure the quality and accuracy of packet loss measurement is an urgent problem to be solved. Summary of the Invention

[0004] This invention provides a method, device, and storage medium for measuring packet loss during streaming, in order to solve the defect in existing technologies where packet loss measurement during streaming relies on high-precision clock synchronization.

[0005] This invention provides a method for measuring packet loss during flow, comprising:

[0006] Obtain the alternating staining period and the extended time value. The alternating staining period represents the time during which a message is alternately stained and unstained.

[0007] Based on the extended time value, the extended time value is advanced and / or delayed on the basis of the alternating staining cycle to form a statistical time;

[0008] Obtain a service message, wherein the service message includes a coloring mark, the coloring mark indicating whether the service message has been colored;

[0009] Based on the alternating coloring cycle and statistical time, the coloring markers in the service messages are statistically analyzed to obtain packet loss measurement information.

[0010] According to a method for measuring packet loss during flow provided by the present invention, the step of forming a statistical time by advancing and / or delaying the extended time value based on the alternating staining cycle, based on the extended time value, includes:

[0011] Periodically acquire clock synchronization information;

[0012] Based on the clock synchronization information and the local clock, the extended time value is determined to be advanced and / or delayed based on the alternating staining cycle, forming a statistical time.

[0013] According to a method for measuring packet loss during flow provided by the present invention, the step of determining, based on the clock synchronization information and the local clock, an extended time value that is advanced and / or delayed based on the alternating coloring cycle to form a statistical time includes:

[0014] Based on the clock synchronization information, determine whether the local clock is greater than the synchronization clock;

[0015] When the local clock is greater than or equal to the synchronous clock, the extended time value is delayed based on the alternating coloring cycle to form the statistical time;

[0016] When the local clock is less than the synchronous clock, the extended time value is advanced and delayed based on the alternating coloring cycle to form the statistical time.

[0017] According to a method for measuring packet loss during a flow provided by the present invention, the step of statistically analyzing the coloring markers in the service packets based on the alternating coloring cycle and statistical time to obtain packet loss measurement information includes:

[0018] Based on the alternating staining cycle, the staining cycle time and the non-staining cycle time are determined, and the staining cycle time and the non-staining cycle time are arranged alternately.

[0019] Based on the staining cycle time and the statistical time, the staining cycle statistical time is determined, and based on the non-staining cycle time and the statistical time, the non-staining cycle statistical time is determined.

[0020] Based on the staining cycle statistical time and the staining mark, the number of stained service packets and the corresponding total traffic are counted. Based on the non-staining cycle statistical time and the staining mark, the number of unstained service packets and the corresponding total traffic are counted to obtain packet loss measurement information.

[0021] There is an overlap between the statistical time of the staining cycle and the statistical time of the non-staining cycle.

[0022] According to the method for measuring packet loss during flow provided by the present invention, the range of the extended time value is from a first time value to a second time value, the first time value is equal to the sum of the accuracy of the synchronization clock and the link delay, and the second time value is equal to half of the alternating coloring cycle.

[0023] According to the method for measuring packet loss in a flow according to the present invention, the method further includes: increasing the extended time value when the link delay is greater than the extended time value, and sending a modification period request to increase the alternating coloring period when the extended time value is greater than half of the alternating coloring period.

[0024] This invention also provides a method for measuring packet loss during flow, applied to a coloring packet loss measurement system, the coloring packet loss measurement system including coloring nodes and non-coloring measurement nodes, including:

[0025] The staining node obtains the alternating staining cycle;

[0026] The coloring node acquires the service message and modifies the coloring mark of the service message according to the alternating coloring cycle;

[0027] The colored node forwards the service message;

[0028] The unstained measurement node performs one of the above-described methods for measuring packet loss during flow.

[0029] The method for measuring packet loss during flow according to the present invention further includes:

[0030] The staining node acquires the extended time value, and in a unidirectional measurement scenario, the alternating staining cycle is shifted backward by the extended time value.

[0031] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement a packet loss measurement method as described above.

[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a packet loss measurement method as described above.

[0033] The present invention provides a method, device, and storage medium for packet loss measurement, which has at least the following beneficial effects: Non-coloring measurement nodes acquire the alternating coloring period to know the time period during which coloring nodes alternately color and uncolor service packets, facilitating subsequent measurement and statistics of service packets based on the alternating coloring period. Non-coloring measurement nodes acquire and, based on the extended time value, extend the time earlier, later, or both, on the basis of the alternating coloring period to form a statistical time. The statistical time is then used to statistically analyze service packets according to the alternating coloring period, obtaining information such as the number of coloring and uncoloring packets, thus forming packet loss measurement information. In this way, by enabling non-coloring measurement nodes to extend the alternating coloring period based on the extended time to form a statistical time, the time for statistical analysis of service packets is widened. Furthermore, because service packets are alternately colored and uncolored, even with low clock synchronization accuracy, it is possible to completely statistically analyze service packets within the coloring and uncoloring periods, which helps reduce dependence on clock synchronization accuracy and ensures the reliability of the statistics, i.e., ensuring the quality and accuracy of packet loss measurement. Attached Figure Description

[0034] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0035] Figure 1 This is one of the flowcharts of a method for measuring packet loss during flow provided by the present invention;

[0036] Figure 2 This is the second flowchart of a method for measuring packet loss during flow provided by the present invention;

[0037] Figure 3 This is the third flowchart of a method for measuring packet loss during flow provided by the present invention;

[0038] Figure 4 This is the fourth flowchart of a method for measuring packet loss during flow provided by the present invention;

[0039] Figure 5 This is a statistical time diagram under clock synchronization in a packet loss measurement method provided by the present invention;

[0040] Figure 6 This is a statistical time diagram of a packet loss measurement method provided by the present invention under the condition of clock lag;

[0041] Figure 7This is a statistical time diagram of a packet loss measurement method provided by the present invention under the condition of clock lead;

[0042] Figure 8 This is a statistical time diagram of the alternating staining cycle in a packet loss measurement method provided by the present invention;

[0043] Figure 9 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0045] Alternating labeling is a technique used to measure network performance metrics such as packet loss rate, latency, and jitter. Coloring nodes alternately insert different coloring tags into service packets in the data stream to indicate whether a service packet has been colored. Then, non-coloring measurement nodes, i.e., the receiving end, calculate network performance metrics based on the coloring tags in the arriving service packets to reflect network quality.

[0046] The coloring node colors the service packets according to the alternating coloring period T. Let's say the colored packet is packet A. In the next alternating coloring period T, the service packet is not colored. Let's say the uncolored packet is packet B. Based on this, a round of packets A and a round of packets B will be generated alternately. The non-coloring measurement node counts information such as the number of packets A and the number of packets B according to the alternating coloring period T, and can calculate information such as packet loss rate and latency.

[0047] In the existing alternating labeling method, high-precision clock synchronization is required between the stained nodes and the non-stained measurement nodes to ensure the synchronization of the alternating labeling period T. Otherwise, when there is a large clock synchronization difference, the non-stained measurement nodes will count some packets A or some packets B in the next alternating labeling period T during the statistics, resulting in inaccurate statistics and low packet loss measurement accuracy.

[0048] The following is combined with Figures 1-8 This invention describes a method for measuring packet loss during flow, applied to uncolored measurement nodes, comprising:

[0049] S100: Obtain the alternating staining period and obtain the extended time value, wherein the alternating staining period represents the time during which the message is alternately stained and unstained;

[0050] S200: Based on the extended time value, advance the extended time value and / or delay the extended time value on the basis of the alternating staining cycle to form a statistical time;

[0051] S300: Obtain a service message, wherein the service message includes a coloring mark, and the coloring mark indicates whether the service message has been colored;

[0052] S400: Based on the alternating coloring cycle and statistical time, perform statistics on the coloring marks in the service message to obtain packet loss measurement information.

[0053] Non-coloring measurement nodes acquire the alternating coloring period to determine the time interval during which coloring nodes alternately color and uncolor service packets. This facilitates subsequent measurement and statistics of service packets based on the alternating coloring period. Non-coloring measurement nodes acquire and, based on the extended time value, either advance or delay the extended time, or both, create a statistical time based on the alternating coloring period. Using this statistical time, they then analyze service packets according to the alternating coloring period to obtain information such as the number of coloring and uncoloring packets, thus generating packet loss measurement information.

[0054] In this way, by extending the alternating coloring cycle according to the extended time of the non-colored measurement node, a statistical time is formed, which widens the time for statistical business messages. At the same time, since the business messages are alternately colored and uncolored, even if the clock synchronization accuracy is low, the business messages during the colored and uncolored time can be completely counted. This helps to reduce the dependence on the accuracy of clock synchronization and ensures the reliability of the statistics, that is, to ensure the quality and accuracy of packet loss measurement.

[0055] For ease of understanding, please refer to Figure 8 As one embodiment of the present invention, let the alternation staining cycle be T, and the extension time value be T / 3. Based on the alternation staining cycle T, advance T / 3 and delay T / 3 to extend the original T, forming a statistical time T / 3+T+T / 3. That is, start the statistics of the message in advance by T / 3, continue the original statistical time of T, and then delay the statistics by T / 3 to complete the measurement cycle.

[0056] In some embodiments of the present invention, the alternating coloring period can be a time period of 1 second, 10 seconds, 30 seconds, 1 minute, 5 minutes, etc. The alternating coloring period can originate from a coloring node, a unified control node, or data input, etc., and the extended time value can originate from the same control node or data input, etc. The service packet can be an IPv6 packet, conforming to the basic format of RFC9343 "IPv6 Application of the Alternate-Marking Method," and can be extended. Packet loss measurement and statistics are based on the coloring mark L in the IPv6 packet for identification and detection.

[0057] refer to Figure 2 In some embodiments of the method for measuring packet loss during flow according to the present invention, step S200 includes:

[0058] S210: Periodically acquire clock synchronization information;

[0059] S220: Based on the clock synchronization information and the local clock, determine the extended time value to be advanced and / or delayed based on the alternating staining cycle to form a statistical time.

[0060] The system periodically acquires clock synchronization information to adjust the local clock and achieve clock synchronization. At the same time, based on the clock synchronization information, it can determine whether the local clock is ahead or behind the synchronization clock. According to the comparison results, it can determine the bias of the local clock, that is, whether it is biased towards being ahead or behind. Based on this, it expands the statistical time based on the alternating coloring period to make the statistical time more in line with the requirements.

[0061] Clock synchronization information can come from a common synchronization clock source shared with the colored nodes, or it can be selected from the clock of one of the multiple colored nodes or non-colored measurement nodes as the synchronization clock. Clock synchronization can be achieved through NTP (Network Time Protocol).

[0062] refer to Figure 3 In some embodiments of the method for measuring packet loss during flow according to the present invention, step S220 includes:

[0063] S221: Based on the clock synchronization information, determine whether the local clock is greater than the synchronization clock;

[0064] S222: When the local clock is greater than or equal to the synchronous clock, the extended time value is delayed based on the alternating coloring cycle to form the statistical time;

[0065] S223: When the local clock is less than the synchronous clock, the extended time value is advanced and delayed based on the alternating coloring cycle to form the statistical time.

[0066] refer to Figure 5 and 7 If the local clock of a non-colored measurement node is greater than or equal to the synchronous clock, meaning the local clock is ahead of or synchronized with the synchronous clock, then in the case where the local clock is ahead of the synchronous clock, statistical analysis of service packets based on the alternating coloring cycle may end prematurely. Figure 7 (Message 10 is not within the coloring cycle time). For cases synchronized with a synchronous clock, the statistics may end prematurely due to link latency. Figure 5 (Message 10 is not within the coloring cycle time). Therefore, the extended time value is delayed based on the alternating coloring cycle, so that the statistical time extends beyond the original time period to ensure that the business messages corresponding to the alternating coloring cycle can be received and statistically analyzed completely.

[0067] refer to Figure 6 When the local clock of a non-colored measurement node is less than the synchronization clock (i.e., the local clock lags behind the synchronization clock), a T-period message forwarded from a colored node may be received by a non-colored measurement node. Because the local clock lags behind, it is therefore classified as a T-1 period, i.e., the previous period. Figure 6 (Message 1 is outside the coloring cycle period). To address this, by simultaneously advancing and delaying the extended time value based on the alternating coloring cycle, it is possible to ensure complete statistics of business messages corresponding to the alternating coloring cycle.

[0068] In some embodiments of the packet loss measurement method of the present invention, step S223 may further include: when the link delay is greater than or equal to the accuracy of the synchronization clock, the extended time value is delayed based on the alternating coloring period to form the statistical time;

[0069] When the link delay is less than the accuracy of the synchronization clock, the extended time value is advanced and the extended time value is delayed based on the alternating coloring cycle to form the statistical time.

[0070] The link delay is obtained by statistically estimating the historical link delay; the accuracy of the synchronization clock is obtained by statistically estimating the historical clock synchronization data.

[0071] When the local clock lags behind, the impact of link delay can be further considered before determining the processing steps for obtaining the statistical time. When the link delay is greater than the synchronization clock precision, even if the local clock is behind, the service packets will lag behind the local clock by a larger margin due to the link delay. Therefore, in this case, the statistical time is formed by delaying and extending the time value. When the link delay is less than the synchronization clock precision, that is, the link delay is within the error range of the clock precision, there are two situations due to the clock precision error: the link delay is greater than the clock lag margin, and the link delay is less than the clock lag margin. In this case, in order to ensure that the service packets can be statistically analyzed completely, the time value is extended in advance and the extended time value is delayed to ensure that the service packets corresponding to the alternating coloring period are statistically analyzed completely.

[0072] It should be further clarified that for non-colored measurement nodes where the local clock is greater than the synchronization clock, the extension time value will still be delayed if the link delay is considered. Therefore, when the local clock leads the synchronization clock, there is no need to further determine the relationship between the link delay and the accuracy of the synchronization clock. In other words, the effect of link delay only causes a delay in the extension time value. If a delay in the extension time value is already necessary, there is no need to determine this based on the link delay. Only when the local clock lags behind the synchronization clock and an earlier extension time value is required, is it necessary to further determine whether an earlier extension time value is needed based on the relationship between the link delay and the accuracy of the synchronization clock.

[0073] It should be noted that the uncolored measurement nodes may be in a mesh structure. An uncolored measurement node may obtain service messages from two or more nodes, and the transmission direction of service messages between nodes may be unidirectional or bidirectional, making the transmission environment between nodes quite complex.

[0074] Therefore, in some embodiments of the present invention, the alternating staining cycle can be extended by an earlier time value and extended by a later time value to form a statistical time, without needing to determine it based on the comparison result between the clock synchronization information and the local clock. That is, for all cases, the alternating staining cycle is extended by an earlier time value and extended by a later time value to form a statistical time.

[0075] refer to Figure 4 In some embodiments of the method for measuring packet loss during flow according to the present invention, step S400 includes:

[0076] S410: Determine the staining cycle time and the non-staining cycle time according to the alternating staining cycle, wherein the staining cycle time and the non-staining cycle time are arranged alternately;

[0077] S420: Determine the staining cycle statistical time based on the staining cycle time and the statistical time; determine the non-staining cycle statistical time based on the non-staining cycle time and the statistical time.

[0078] S430: Based on the staining cycle statistical time and the staining mark, count the number of stained service packets and the corresponding total traffic; based on the non-stained cycle statistical time and the staining mark, count the number of unstained service packets and the corresponding total traffic, and obtain packet loss measurement information.

[0079] There is an overlap between the statistical time of the staining cycle and the statistical time of the non-staining cycle.

[0080] The staining cycle time and the non-staining cycle time are arranged alternately. The non-staining measurement nodes, with both the staining and non-staining cycle times remaining constant, are extended according to the statistical time. There is overlap between the extended time values ​​(early extension, delayed extension, and adjacent staining or non-staining cycle times), such as... Figure 8 As shown. Based on the extended statistical time, statistics are performed on the corresponding business packets. Specifically, within the statistical time corresponding to the coloring cycle time, the number of coloring business packets and the corresponding total traffic are counted; within the statistical time corresponding to the non-coloring cycle time, the number of non-coloring business packets and the corresponding total traffic are counted. Based on the statistical results, packet loss measurement information is generated.

[0081] It is understandable that by extending the time value in advance and delaying the extension of the time value to form the statistical time, although the statistical time is the same, the types of business messages counted in adjacent statistical times are different. For example, in period T, the statistical time is for colored business messages, and only colored business messages are counted in the corresponding statistical time. Uncolored messages obtained in the statistical time are not counted. Conversely, in period T+1, when counting uncolored business messages, only uncolored business messages are counted in the corresponding statistical time.

[0082] It is important to emphasize that extending the statistical time based on the alternating coloring cycle does not change the statistical results, i.e., it does not affect the accuracy of packet loss measurement. Due to alternating coloring, the colored service packets A and the uncolored service packets B are roughly distributed in segments. For example, the service packets sent by the colored nodes within three alternating coloring cycles might be in the pattern AAAAABBBBBAAAAA. During the period when the statistics are performed on the uncolored service packets B, i.e., the uncolored period, if the alternating coloring cycle is not extended, with high synchronization clock accuracy, the service packets in the BBBBB segment can be accurately obtained for statistics, resulting in a statistical result of 5 uncolored service packets B. However, after extending the alternating coloring cycle in this invention, the corresponding obtained service packet segment is ABBBBBA, and the statistical result is still 5 uncolored service packets B, i.e., the statistical result remains unchanged. Therefore, utilizing the characteristics of alternating coloring, extending the statistical time based on the alternating coloring cycle does not change the statistical results and can ensure the accuracy of packet loss measurement.

[0083] In some embodiments of the packet loss measurement method of the present invention, the range of the extended time value is from a first time value to a second time value, wherein the first time value is equal to the sum of the accuracy of the synchronization clock and the link delay, and the second time value is equal to half of the alternating coloring period.

[0084] The first time value is the minimum value within the extended time value range, obtained by summing the accuracy of the synchronization clock and the link delay. Delaying the extended time value ensures complete acquisition and statistical analysis of service packets affected by synchronization clock accuracy and link delay. Conversely, advancing the extended time value ensures accurate statistical analysis of service packets mistakenly attributed to the previous cycle due to synchronization clock accuracy issues. The second time value is the maximum value within the extended time value range. Since an extended time value greater than half the alternating coloring cycle can cause interference between cycles statistically analyzing the same type of service packets, leading to duplicate statistics and inaccurate packet loss measurements, the extended time value must be less than half the alternating coloring cycle. This determination of the extended time value range ensures that the extended time value meets the requirements.

[0085] The accuracy of the synchronization clock and the link delay can both be estimated by statistically analyzing historical data of the link.

[0086] In some embodiments of the packet loss measurement method of the present invention, the method further includes: increasing the extended time value when the link delay is greater than the extended time value, and sending a modification period request to increase the alternating coloring period when the extended time value is greater than half of the alternating coloring period.

[0087] When the link delay is greater than the extended time value, the extended time value needs to be increased to ensure coverage of service packets affected by the link delay. When the extended time value is greater than half of the alternating coloring period, the alternating coloring period needs to be increased to ensure that the extended time value is less than half of the alternating coloring period in order to avoid interference between periods that statistically analyze the same type of service packets.

[0088] In some embodiments of the present invention, the link delay can be obtained by statistical estimation based on information such as timestamps in the service packets. Non-colored measurement nodes can send a modification period request to colored nodes to increase the alternation coloring period; or they can send a modification period request to the unified control node.

[0089] This invention also provides a method for measuring packet loss during flow, applied to a coloring packet loss measurement system, the coloring packet loss measurement system including coloring nodes and non-coloring measurement nodes, including:

[0090] The staining node obtains the alternating staining cycle;

[0091] The coloring node acquires the service message and modifies the coloring mark of the service message according to the alternating coloring cycle;

[0092] The colored node forwards the service message;

[0093] The unstained measurement node performs one of the above-described methods for measuring packet loss during flow.

[0094] Coloring nodes, based on the alternating coloring cycle, either color or leave uncolored the acquired service packets, and then forward the service packets as needed. Non-coloring measurement nodes acquire and, based on the extended time value, extend the time earlier, later, or both, on top of the alternating coloring cycle to form a statistical time. Using this statistical time, they statistically analyze the service packets according to the alternating coloring cycle, obtaining information such as the number of colored and uncolored packets, thus forming packet loss measurement information. In this way, by having non-coloring measurement nodes extend the alternating coloring cycle based on the extended time to form a statistical time, the time for statistical analysis of service packets is widened. Furthermore, because service packets are alternately colored and uncolored, even with lower clock synchronization accuracy, it is possible to completely analyze service packets within both colored and uncolored time periods. This helps reduce dependence on clock synchronization accuracy while ensuring the reliability of the statistics, thereby guaranteeing the quality and accuracy of packet loss measurement.

[0095] In some embodiments of the packet loss measurement method of the present invention, the coloring node obtains the extended time value, and in a unidirectional measurement scenario, the alternating coloring cycle is shifted backward by the extended time value.

[0096] In unidirectional measurement scenarios, where data transmission between colored nodes and non-colored measurement nodes is unidirectional, the alternating coloring cycle of the colored nodes is shifted backward and extended by a time value. This means that while maintaining the duration of the alternating coloring cycle, the overall time value is shifted backward, ensuring that the clock of the colored node lags behind and the local clock of the non-colored measurement node advances. In this case, the non-colored measurement node only needs to process the extended time value later to obtain the required statistical time, without needing to process the extended time value in advance. This simplifies the processing complexity of the non-colored node and eliminates the need to consider link delay for judgment. The non-colored measurement node maintains the processing of the extended time value later.

[0097] It is important to emphasize that in the staining node, the shift of the alternating staining cycle to extend the time value is a movement of the whole on the time axis. The duration of each alternating staining cycle remains unchanged, and there is no overlap in the time period between adjacent alternating staining cycles. This is different from the processing in the non-staining measurement node, where the statistical time is formed by extending based on the alternating staining cycle.

[0098] Figure 9 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 9 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840. The processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions from the memory 830 to execute the aforementioned method for measuring packet loss during data flow.

[0099] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0100] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform a packet loss measurement method provided by the methods described above.

[0101] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0102] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for measuring packet loss during flow, characterized in that, include: Obtain the alternating staining period and the extended time value. The alternating staining period represents the time during which a message is alternately stained and unstained. Based on the extended time value, the extended time value is advanced and / or delayed on the basis of the alternating staining cycle to form a statistical time; Obtain a service message, wherein the service message includes a coloring mark, the coloring mark indicating whether the service message has been colored; Based on the alternating coloring cycle and statistical time, the coloring marks in the service messages are statistically analyzed to obtain packet loss measurement information; When the link delay is greater than the extended time value, the extended time value is increased; when the extended time value is greater than half of the alternating coloring period, a modification period request is sent to increase the alternating coloring period. The step of statistically analyzing the coloring markers in the service message based on the alternating coloring cycle and statistical time to obtain packet loss measurement information includes: Based on the alternating staining cycle, the staining cycle time and the non-staining cycle time are determined, and the staining cycle time and the non-staining cycle time are arranged alternately. Based on the staining cycle time and the statistical time, the staining cycle statistical time is determined, and based on the non-staining cycle time and the statistical time, the non-staining cycle statistical time is determined. Based on the staining cycle statistical time and the staining mark, the number of stained service packets and the corresponding total traffic are counted. Based on the non-staining cycle statistical time and the staining mark, the number of unstained service packets and the corresponding total traffic are counted to obtain packet loss measurement information. There is an overlap between the statistical time of the staining cycle and the statistical time of the non-staining cycle.

2. The method for measuring packet loss during flow according to claim 1, characterized in that, The step of advancing and / or delaying the extended time value based on the alternating staining cycle to form a statistical time includes: Periodically acquire clock synchronization information; Based on the clock synchronization information and the local clock, the extended time value is determined to be advanced and / or delayed based on the alternating staining cycle, forming a statistical time.

3. The method for measuring packet loss during flow according to claim 2, characterized in that, The step of determining, based on the clock synchronization information and the local clock, to advance and / or delay the extended time value on the basis of the alternating staining cycle to form a statistical time includes: Based on the clock synchronization information, determine whether the local clock is greater than the synchronization clock; When the local clock is greater than or equal to the synchronous clock, the extended time value is delayed based on the alternating coloring cycle to form the statistical time; When the local clock is less than the synchronous clock, the extended time value is advanced and delayed based on the alternating coloring cycle to form the statistical time.

4. The method for measuring packet loss during flow according to claim 3, characterized in that, The extended time value ranges from a first time value to a second time value. The first time value is equal to the sum of the accuracy of the synchronization clock and the link delay, and the second time value is equal to half of the alternating coloring cycle.

5. A method for measuring packet loss during flow, characterized in that, This is applied to a coloring-based packet loss measurement system, which includes coloring nodes and non-coloring measurement nodes, including: The staining node obtains the alternating staining cycle; The coloring node acquires the service message and modifies the coloring mark of the service message according to the alternating coloring cycle; The colored node forwards the service message; The unstained measurement node performs a packet loss measurement method as described in any one of claims 1 to 4.

6. The method for measuring packet loss during flow according to claim 5, characterized in that, Also includes: The staining node acquires the extended time value, and in a unidirectional measurement scenario, the alternating staining cycle is shifted backward by the extended time value.

7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements a packet loss measurement method as described in any one of claims 1 to 4.

8. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements a packet loss measurement method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Network quality detection method and device

    CN107547300A

  • Network performance measurement method and device, communication equipment and storage medium

    CN115499335A