WO2016049872A1 - Device and method for measuring network packet loss - Google Patents

Device and method for measuring network packet loss Download PDF

Info

Publication number
WO2016049872A1
WO2016049872A1 PCT/CN2014/087981 CN2014087981W WO2016049872A1 WO 2016049872 A1 WO2016049872 A1 WO 2016049872A1 CN 2014087981 W CN2014087981 W CN 2014087981W WO 2016049872 A1 WO2016049872 A1 WO 2016049872A1
Authority
WO
WIPO (PCT)
Prior art keywords
packet
service
time slice
slice identifier
counting result
Prior art date
Application number
PCT/CN2014/087981
Other languages
French (fr)
Chinese (zh)
Inventor
汤红山
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN201480023982.4A priority Critical patent/CN105765911B/en
Priority to PCT/CN2014/087981 priority patent/WO2016049872A1/en
Publication of WO2016049872A1 publication Critical patent/WO2016049872A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • the present invention relates to the field of network transmission, and in particular, to a device and method for measuring network packet loss.
  • a packet loss rate which is a ratio of the total number of lost packets to the total number of transmitted packets.
  • a method for measuring a packet loss rate is provided in the prior art.
  • the sending end counts the sent service packets carrying the data information, and periodically inserts the forward direction between the service packets.
  • the monitoring (Forward Monitoring, FM for short) frame the FM frame carries the counting result A of the sent service packet, and the receiving end counts the received service packet and updates the counting result B in real time.
  • the count result B is read in the FM frame, and the count result B and the count result A carried in the FM frame are encapsulated into a Backward Reporting (BR) frame and returned to the transmitting end, and the transmitting end carries according to the BR frame.
  • the two count results are used to calculate the packet loss rate.
  • the inventor has found that at least the following problems exist in the prior art: there are multiple optional routing nodes between the transmitting end and the receiving end, so that there are multiple transmission paths in the transmission network, and the service packets are hashed to multiple transmission paths.
  • the transmission and the FM frame are also transmitted on one of the transmission paths.
  • the order of the FM frame and the service packet arriving at the receiving end cannot be determined due to the transmission distance of each transmission path and the inconsistent transmission traffic. For example, the FM frame sent later is first.
  • the service packet is sent to the receiving end first, resulting in out of order.
  • the receiving end extracts the counting result B when receiving the FM frame, the counting result B does not include the service message that arrives later or the service message that has been sent after the previous arrival, that is, the counting result. B cannot accurately reflect the number of service packets actually received by the receiving end, and the transmitting end calculates the error of the packet loss rate according to the counting result B carried in the BR frame.
  • the embodiment of the invention provides a device and a method for measuring network packet loss, which can solve the problem that the packet loss rate calculated in the prior art has an error.
  • the present invention provides a network packet loss measuring apparatus, where the apparatus is applied to a transmitting end, the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end.
  • the device includes:
  • a memory for storing a set of service messages
  • a processor configured to divide the service packet set in time series according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
  • a transmitter configured to send the subset of the service packets to the receiving end in sequence
  • the processor is further configured to count the service packets that have been sent with the same time slice identifier
  • the first counting result is obtained, and after the preset duration, the test packet is sent to the receiving end, where the test packet carries the current service packet subset.
  • a slice identifier where the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, where the preset duration is greater than the service packet subset at the sending end and the receiving end.
  • a receiver configured to receive a response packet that is sent by the receiving end, where the response packet carries the second counting result, where the second counting result is used to indicate that the receiving end receives the test packet,
  • the number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried by the test packet;
  • the processor is further configured to calculate a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • the processor is further configured to add the allocated time slice identifier to a preset field in a packet header of the service packet.
  • the processor is further configured to encapsulate a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
  • the processor is further configured to insert at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-sequence test packet And the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the sending the out-of-sequence test packet;
  • the transmitter is further configured to send the service packet subset to the receiving end, and each service packet subset includes at least one out of order test packet;
  • the receiver is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message.
  • the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
  • the processor is further configured to determine, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packet in the service packet subset is out of order.
  • test packets sent by the transmitter are sent by the sending end to the receiving end through the same path;
  • the test packet sent by the transmitter is a forward control frame
  • the response message received by the receiver is a backward report frame.
  • the present invention also provides a measuring device for network packet loss, which is applied to The receiving end is located in a data transmission system, the system is provided with a transmitting end and the receiving end, and the device comprises:
  • a receiver configured to receive a service packet sent by the sender, where the service packet carries a time slice identifier
  • a memory for storing the received service message
  • a processor configured to count the received service packets with the same time slice identifier
  • the receiver is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
  • the processor is further configured to obtain a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end carries the test packet and is carried by the test packet.
  • the time slice identifies the count result of the service packet corresponding to the time slice;
  • a transmitter configured to send a response packet to the sending end, where the response packet carries the obtained second counting result.
  • the preset field in the packet header of the service packet received by the receiver is added with the time slice identifier
  • the processor is further configured to count the received service packets having the same time slice identifier.
  • the service packet received by the receiver is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
  • the processor is further configured to count the received service packets having the same time slice identifier.
  • the receiver is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
  • the processor is further configured to acquire a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the received out of order message The number of service packets having the same time slice identifier as the out-of-order test packet;
  • the transmitter is further configured to feed back an out-of-order response message to the sending end, where the out-of-order response message carries the acquired fourth counting result.
  • test packets received by the receiver are sent by the sending end to the receiving end through the same path;
  • the test message received by the receiver is a forward control frame
  • the response message sent by the transmitter is a backward report frame.
  • the present invention further provides a measuring device for network packet loss, the device is applied to a transmitting end, and the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end.
  • the device includes:
  • a dividing unit configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
  • An allocating unit configured to allocate different time slice identifiers for the adjacent subset of at least two service packets obtained by dividing the unit;
  • An adding unit configured to add a time slice identifier allocated by the allocation unit to a service packet in each service packet subset obtained by dividing the unit;
  • a sending unit configured to sequentially send, to the receiving end, a subset of the service packets added by the adding unit to the time slice identifier
  • a counting unit configured to count a service packet that has been sent by the sending unit and has the same time slice identifier
  • An obtaining unit configured to obtain a first counting result from the counting unit when the current service packet subset is sent, where the first counting result is a time slice identifier of the current service packet subset Corresponding counting result, the preset duration is greater than a transmission duration of the service packet subset between the transmitting end and the receiving end;
  • the sending unit is further configured to send a test packet to the receiving end after the preset duration, where the test packet carries a time slice identifier of the current service packet subset;
  • the receiving unit is configured to receive a response packet that is sent by the receiving end, where the response packet carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test packet
  • the number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried by the test packet;
  • a processing unit configured to calculate, according to the first counting result obtained by the acquiring unit and the second counting result received by the receiving unit, a packet loss rate of the service packet subset.
  • the adding unit is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
  • the adding unit is further configured to add a protocol packet header to the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet in which the service packet is located.
  • the device further includes: an insertion unit, configured to insert at least one out-of-order test packet in the service packet subset obtained by dividing the unit, where the out-of-order test packet carries a time slice identifier of the service packet subset
  • the out-of-order test packet is used to instruct the obtaining unit to obtain a third counting result from the counting unit, where the third counting result is sent before the sending the out-of-sequence test message, and the out-of-order
  • the time slice identifier of the test packet corresponds to the counting result
  • the sending unit is further configured to sequentially send the service message subset to the receiving end, where each service packet subset includes at least one out of order test message inserted by the inserting unit;
  • the receiving unit is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message
  • the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-sequence test packet when the out-of-sequence test packet is received;
  • the processing unit is further configured to determine, according to the first counting result, the third counting result, and the second counting result and the fourth counting result received by the receiving unit, the service report Whether the service packets in the text group are out of order.
  • test packets sent by the sending unit are sent by the sending end to the receiving end through the same path;
  • the test packet sent by the sending unit is a forward control frame
  • the response message received by the receiving unit is a backward report frame.
  • the present invention further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end.
  • the device includes:
  • a receiving unit configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier
  • a counting unit configured to count the received service packets having the same time slice identifier
  • the receiving unit is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
  • An obtaining unit configured to obtain a second counting result corresponding to the time slice identifier from the counting unit, where the second counting result is used to indicate that the receiving end receives the test packet, and the test report
  • the time slice carried in the text identifies the counting result of the corresponding service packet
  • a sending unit configured to send a response packet to the sending end, where the response packet carries the second counting result obtained by the acquiring unit.
  • the preset field in the packet header of the service packet received by the receiving unit is added with the time Inter-slice identification
  • the counting unit is further configured to count, by the receiving unit, a service packet having the same time slice identifier.
  • the service packet received by the receiving unit is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
  • the counting unit is further configured to count, by the receiving unit, the service packets having the same time slice identifier.
  • the receiving unit is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
  • the obtaining unit is further configured to: obtain, by the counting unit, a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that when the out-of-order test packet is received, The number of service packets received by the receiving end that have the same time slice identifier as the out-of-order test packet;
  • the sending unit is further configured to: feed the out-of-order response message to the sending end, where the out-of-order response message carries the fourth counting result obtained by the acquiring unit.
  • test packets received by the receiving unit are sent by the sending end to the receiving end through the same path;
  • the test message received by the receiving unit is a forward control frame
  • the response message sent by the sending unit is a backward report frame.
  • the present invention further provides a method for measuring network packet loss, the method being applied to a data transmission system, where the system is provided with a transmitting end and a receiving end, and the method includes:
  • the sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, and each of the service packet subsets is one of the service packet sets. Part, all the service message subsets form the service message set;
  • the transmitting end allocates different time slice identifiers for the adjacent at least two service packet subsets, and adds the allocated time slice identifier to the service packets in each service packet subset;
  • the sending end counts the service packets that have been sent with the same time slice identifier
  • the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset.
  • the time slice identifier, the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the service packet subset at the sending end and the The length of transmission between the receiving ends;
  • the sending end receives the response message replied by the receiving end, where the response message carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test message
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • the sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • Adding the allocated time slice identifier to the service packet in each service packet subset includes:
  • the allocated time slice identifier is added to a preset field in the packet header of the service packet.
  • Adding the allocated time slice identifiers to the service packets in each service packet subset including:
  • Encapsulating a protocol packet header for the service packet where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
  • the method further includes:
  • the sending end inserts at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate acquisition.
  • a third counting result where the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the out-of-sequence test packet is sent;
  • each service packet subset includes at least one out of order test packet
  • the sending end receives the out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message,
  • the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
  • the sending end determines, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packets in the service packet subset are out of order.
  • test packets are sent by the sending end to the receiving end through the same path;
  • the test message is a forward control frame
  • the response message is a backward report frame.
  • the present invention further provides a method for measuring network packet loss, the method being applied to a data transmission system, where the data transmission system is provided with a transmitting end and a receiving end, and the method includes:
  • the receiving end counts the received service packets with the same time slice identifier
  • the receiving end receives the test packet sent by the sending end, where the test packet carries the time slice identifier
  • the second counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the test packet when the receiving end receives the test packet;
  • the receiving end sends a response packet to the sending end, where the response packet carries the obtained second counting result.
  • the counting of the service packets that have received the same time slice identifier includes:
  • the received service packets having the same time slice identifier are counted.
  • the counting of the service packets that have received the same time slice identifier includes:
  • the service packet is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
  • the received service packets having the same time slice identifier are counted.
  • the method further includes:
  • the receiving end acquires a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the mess when receiving the out-of-order test packet
  • the receiving end feeds the out-of-order response message to the sending end, where the out-of-order response message carries the obtained fourth counting result.
  • test packets are sent by the sending end to the receiving end through the same path;
  • the test message is a forward control frame
  • the response message is a backward report frame.
  • the present invention provides a plurality of services by dividing a service packet into a time slice, compared with a case where a test packet and a service packet are out of order in the prior art.
  • the packet subset is assigned a different time slice identifier for the service packet subset.
  • the test packet also carries the corresponding time slice identifier, and the delay test packet is sent.
  • the delay time is greater than the service packet subset.
  • the transmission time between the terminal and the receiving end can ensure that the test packet is sent to the receiving end when the test packet is sent, so that the test packet and the service packet are out of order at the receiving end.
  • the present invention can accurately calculate the packet loss rate on the premise that there is a disorder of the test packet and the service packet.
  • serial processing There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines.
  • the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder.
  • the number of packets is large.
  • the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified.
  • the solution obtains the service packet by dividing the service packet into a time slice, and delays the sending of the test packet corresponding to the service packet subset.
  • the delay time is greater than the service packet.
  • the transmission time of the subset can avoid the out-of-order of test packets and service packets, and thus can accurately calculate the packet loss rate.
  • This solution does not need to be implemented by modifying the existing hardware structure, which can reduce the implementation cost.
  • FIG. 1 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure
  • FIG. 2 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present invention.
  • FIG. 3 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure
  • FIG. 4 is a schematic structural diagram of a device for measuring packet loss on a network according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of a method for measuring network packet loss according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of time slice division of service packets according to an embodiment of the present disclosure.
  • FIG. 8 is a flowchart of a method for measuring network packet loss in a three-layer network according to an embodiment of the present disclosure
  • FIG. 9 is a schematic diagram of dividing a time slice according to a highest bit of an Identification field according to an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of a highest two-bit split time slice according to an Identification field according to an embodiment of the present invention.
  • FIG. 11 is a flowchart of a method for measuring network packet loss in a three-layer network according to an embodiment of the present invention.
  • FIG. 12 is a flowchart of a method for measuring out-of-order service packets according to an embodiment of the present invention.
  • FIG. 13 is a schematic structural diagram of a packet collection including an out-of-order test packet according to an embodiment of the present disclosure
  • FIG. 14 is a flowchart of a method for measuring network packet loss according to an embodiment of the present invention.
  • FIG. 15 is a flowchart of a method for measuring out-of-order service packets according to an embodiment of the present invention.
  • the embodiment provides a measuring device for network packet loss, and the device is applied to a transmitting end, where the receiving end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end.
  • the apparatus includes a memory 101, a processor 102, a transmitter 103, and a receiver 104. Also shown in FIG. 1 is a bus 105 that is coupled, connected by a bus 105, and that communicates with each other. among them:
  • the memory 101 is configured to store a service message set.
  • the processor 102 is configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service message subsets, and each of the service packet subsets is the service packet set. And a part of all the service packet subsets form the service packet set;
  • the transmitter 103 is configured to send a subset of service packets to the receiving end in sequence
  • the processor 102 is further configured to count the service packets that have been sent with the same time slice identifier
  • the first counting result is obtained, and after the preset duration, the test packet is sent to the receiving end, and the test packet carries the time slice identifier of the current service packet subset.
  • the result of the counting is the counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the transmitting end and the receiving end;
  • the receiver 104 is configured to receive a response packet that is sent by the receiving end, where the response packet carries a second counting result, where the second counting result is used to indicate that the receiving end receives the test packet, and the receiving end has received The number of service packets identified by the same time slice.
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • the processor 102 is further configured to calculate a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • the present embodiment uses the processor to divide the service packet into time slices.
  • a subset of service packets, and different time slice identifiers are assigned to the service packet subsets.
  • the test packets also carry corresponding time slice identifiers, and the transmitter delays the transmission of test packets, and the delay time is greater than the service packet.
  • the transmission time between the sender and the receiver can ensure that the test packets are sent to the receiver when the test packet is sent, so that the test packets and service packets of the receiver are out of order.
  • the device for packet loss of the network provided in this embodiment can accurately calculate the packet loss rate.
  • serial processing There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines.
  • the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder.
  • the number of packets is large.
  • the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified.
  • the service packet is divided into time segments by the processor to obtain a subset of the service packet; the transmitter delays the sending of the test packet corresponding to the subset of the service packet, and the delay time is If the transmission time of the service packet is greater than the transmission time of the service packet, the network packet loss device of the embodiment can accurately calculate the packet loss rate without modifying the existing hardware structure. Can reduce implementation costs.
  • the processor 102 is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
  • the processor 102 is further configured to encapsulate a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of the service packet subset in which the service packet is located.
  • the processor 102 is further configured to insert at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate Obtaining a third counting result, where the third counting result is a counting result corresponding to the time slice identifier of the out-of-order test packet sent before the out-of-sequence test packet is sent.
  • the transmitter 103 is further configured to sequentially send a subset of service packets to the receiving end, where each service packet subset includes at least one out-of-order test packet.
  • the receiver 104 is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, where the fourth counting result is used. Indicates that the receiving end has received the same time as the out-of-order test packet when receiving the out-of-order test packet. Number of service packets identified by the slice.
  • the processor 102 is further configured to determine, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packets in the service packet subset are out of order.
  • test packets sent by the transmitter 103 are sent by the transmitting end to the receiving end through the same path;
  • the test message sent by the transmitter 103 is a forward control frame
  • the response message received by the receiver 104 is a backward report frame.
  • the processor 102 in the embodiment of the present invention may be a processor or a collective name of multiple processing elements.
  • the processor 102 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention.
  • An integrated circuit such as one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
  • the memory 101 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or the like. And the memory 101 may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • RAM random access memory
  • non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • the bus 105 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 1, but it does not mean that there is only one bus or one type of bus.
  • the embodiment of the invention further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end.
  • the apparatus includes a receiver 201, a memory 202, a processor 203, and a transmitter 204. Also shown in FIG. 2 is a bus 205, the receiver 201, the memory 202, the processor 203, and the transmitter. 204 are connected by bus 205 and complete communication with each other. among them:
  • the receiver 201 is configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier
  • the storage 202 is configured to store the received service message.
  • the processor 203 is configured to count the received service packets with the same time slice identifier.
  • the receiver 201 is further configured to receive a test packet sent by the sending end, where the test packet carries a time slice identifier
  • the processor 203 is further configured to obtain a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate a service corresponding to the time slice identifier carried in the test packet when the receiving end receives the test packet The result of counting the message;
  • the transmitter 204 is configured to send a response packet to the sending end, where the response packet carries the obtained second counting result.
  • the device for measuring the packet loss of the network provided by the embodiment of the present invention has the same service with the same time slice identifier as the processor in this embodiment, compared with the case where the test packet and the service packet are out of order in the prior art.
  • the packet is accumulated and the test packet received by the receiver is delayed in the reception of the corresponding service packet. This prevents the out-of-order situation of the test packet and the service packet.
  • the test packet and the service packet do not exist. Under the premise of out-of-order, when the receiver receives the test message, it can instruct the processor to extract the correct second counting result, thereby facilitating the sender to accurately calculate the packet loss according to the correct first counting result and the second counting result. rate.
  • the preset field in the packet header of the service packet received by the receiver 201 is added with a time slice identifier.
  • the processor 203 is further configured to count the received service packets having the same time slice identifier.
  • the service packet received by the receiver 201 is encapsulated with a protocol packet header, where the protocol packet header is a time slice identifier of the service packet;
  • the processor 203 is further configured to calculate the received service packet with the same time slice identifier. number.
  • the receiver 201 is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries a time slice identifier.
  • the processor 203 is further configured to obtain a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that when the out-of-sequence test packet is received, the receiving end has received the same as the out-of-order test packet. Number of service packets identified by the time slice.
  • the transmitter 204 is further configured to feed back the out-of-order response message to the sending end, where the out-of-order response message carries the obtained fourth counting result.
  • test packets received by the receiver 201 are sent from the transmitting end to the receiving end through the same path.
  • the test message received by the receiver 201 is a forward control frame.
  • the response message sent by the transmitter 204 is a backward report frame.
  • the processor 203 in the embodiment of the present invention may be a processor or a collective name of multiple processing elements.
  • the processor may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention.
  • An integrated circuit such as one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
  • the memory 202 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or the like. And the memory may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • RAM random access memory
  • non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
  • the bus 205 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus.
  • ISA Industry Standard Architecture
  • PCI Peripheral Component
  • EISA Extended Industry Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only in Figure 2 It is indicated by a thick line, but does not mean that there is only one bus or one type of bus.
  • the embodiment further provides a measuring device for network packet loss, the device is applied to a transmitting end, and the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end, as shown in FIG.
  • the device includes: a dividing unit 301, configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service packet subsets, and each service packet subset is a service packet set. As part of the total service message subset, the service message set is formed.
  • the allocating unit 302 is configured to allocate different time slice identifiers to the adjacent subset of at least two service packets obtained by the dividing unit 301.
  • the adding unit 303 is configured to add a time slice identifier allocated by the allocating unit 302 to the service packet in each service packet subset obtained by the dividing unit 301.
  • the sending unit 304 is configured to sequentially send, to the receiving end, a service packet subset that is added by the adding unit 303 with a time slice identifier, and the service packet subset is divided by the dividing unit 301.
  • the counting unit 305 is configured to count the service packets that have been sent by the sending unit 304 and have the same time slice identifier.
  • the obtaining unit 306 is configured to: when the current service packet subset is sent, obtain the first counting result from the counting unit 305, where the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset.
  • the preset duration is greater than the transmission duration between the sender and the receiver of the service packet subset.
  • the sending unit 304 is further configured to send a test packet to the receiving end after the preset duration, where the test packet carries a time slice identifier of the current service packet subset.
  • the receiving unit 307 is configured to receive a response packet that is sent by the receiving end, where the response packet carries a second counting result, where the second counting result is used to indicate that the receiving end receives the test packet, and the receiving end has received the The number of service packets with the same time slice identifier.
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • the processing unit 308 is configured to calculate a packet loss rate of the service packet subset according to the first counting result obtained by the obtaining unit 306 and the second counting result received by the receiving unit 307.
  • the measurement device for network packet loss provided by this embodiment, and the test message and industry exist in the prior art Compared with the case of the out-of-order of the message, the embodiment obtains a plurality of service message subsets by dividing the service packet into time slices, and the allocation unit allocates different time slice identifiers for the service message subset.
  • the test packet carries the corresponding time slice identifier, and the sending unit delays the transmission of the test packet.
  • the delay time is greater than the transmission time between the sender and the receiver of the service packet subset, which ensures that the test packet is sent.
  • the service packets corresponding to the service packets have arrived at the receiving end, and the device can avoid the out-of-order situation of the test packets and the service packets.
  • the device does not exist in the out-of-order of the test packets and service packets.
  • the packet loss rate can be accurately calculated.
  • the solution mainly processes a message by serial processing, so-called serial processing is
  • serial processing is There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines.
  • the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder.
  • the number of packets is large.
  • the device divides the service packet into a time slice by the dividing unit to obtain a subset of the service packet, and the sending unit delays sending the test packet corresponding to the service packet subset, and the delay time is greater than
  • the transmission time of the service packet subset can avoid the out-of-order of the test packet and the service packet, and can accurately calculate the packet loss rate.
  • the device does not need to be implemented by modifying the existing hardware structure, thereby reducing the implementation cost.
  • the adding unit 303 is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
  • the adding unit 303 is further configured to add a protocol packet header to the service packet, where the protocol packet header is a time slice identifier of the service packet subset in which the service packet is located.
  • the apparatus further includes: an insertion unit 401, configured to insert at least one out-of-order test packet in the service packet subset obtained by the dividing unit 301, where the out-of-order test packet carries the service packet
  • the time slice identifier of the subset, the out-of-order test message is used to instruct the obtaining unit 306 to obtain the third counting result from the counting unit 305, and the third counting result is before sending the out-of-order test packet.
  • the sending unit 304 is further configured to sequentially send the foregoing service message subset to the receiving end, where each service message subset includes at least one out-of-order test packet inserted by the inserting unit 401.
  • the receiving unit 307 is further configured to receive, by the receiving end, an out-of-order response message, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, where the fourth counting result is used. Indicates the number of service packets received by the receiving end that have the same time slice identifier as the out-of-sequence test packet when the out-of-order test packet is received.
  • the processing unit 308 is further configured to determine, according to the first counting result, the third counting result, and the second counting result and the fourth counting result received by the receiving unit 307, whether the service packet in the service packet subset is There is a disorder.
  • All test packets sent by the sending unit 304 pass through the same path from the transmitting end to the receiving end.
  • the test message sent by the sending unit 304 is a forward control frame.
  • the response message received by the receiving unit 307 is a backward report frame.
  • the embodiment further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end, as shown in FIG. , the device includes:
  • the receiving unit 501 is configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier.
  • the counting unit 502 is configured to count the service packets that have been received by the receiving unit 501 and have the same time slice identifier.
  • the receiving unit 501 is further configured to receive a test packet sent by the sending end, where the test packet carries a time slice identifier.
  • the obtaining unit 503 is configured to obtain, according to the test packet received by the receiving unit 501, a second counting result corresponding to the time slice identifier of the test packet, and the second counting result is used to indicate that the receiving end receives the test.
  • the service corresponding to the time slice identifier carried in the test packet when the packet is received The result of counting the message.
  • the sending unit 504 is configured to send a response packet to the sending end, where the response packet carries the second counting result obtained by the obtaining unit 503.
  • the preset field in the packet header of the service packet received by the receiving unit 501 is added with a time slice identifier
  • the counting unit 502 is further configured to count the service packets received by the receiving unit 501 with the same time slice identifier.
  • the service packet received by the receiving unit 501 is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet.
  • the counting unit 502 is further configured to count the service packets received by the receiving unit 501 with the same time slice identifier.
  • the receiving unit 501 is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier.
  • the obtaining unit 503 is further configured to obtain, from the counting unit 502, a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received and out of order when the out of order test message is received.
  • the test packet has the number of service packets identified by the same time slice.
  • the sending unit 504 is further configured to: feed the out-of-order response message to the sending end, where the out-of-order response message carries the fourth counting result obtained by the obtaining unit 503.
  • test packets received by the receiving unit 501 are sent by the transmitting end to the receiving end through the same path.
  • the test message received by the receiving unit 501 is a forward control frame.
  • the response message sent by the sending unit 504 is a backward report frame.
  • the device for measuring network packet loss provided by the embodiment of the present invention is applied to the receiving end.
  • the counter of the receiving end of the present invention has only the same pair.
  • the service packets identified by the time slice are cumulatively counted, and the test packets received by the receiving unit are delayed in the reception of the corresponding service packets, which can avoid the out-of-order situation of the test packets and the service packets.
  • the test report is received.
  • the text acquisition unit can obtain the correct second counting result from the counting unit, thereby facilitating the transmitting end to accurately calculate the packet loss rate according to the correct first counting result and the second counting result.
  • the embodiment provides a method for measuring network packet loss.
  • the method is applied to a data transmission system.
  • the system is provided with a transmitting end and a receiving end.
  • the method includes :
  • S601 The sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subset constitutes the set of service messages.
  • the number of service packets transmitted in the network is large, and service packets are transmitted almost every moment. If it is desired to calculate the packet loss rate of a service packet in a long period of time, the present invention considers that it is preferable to divide the longer period into a plurality of small periods. In this way, by dividing the time period statistics, the number of lost packets and the packet loss rate in each time period can be obtained, and the packet loss situation is specifically located in a certain time period; or the number of packet loss in different time segments can be correspondingly The operation results in the total number of lost packets and the total packet loss rate.
  • the transmitting end first performs time slice division of the service packet according to the preset time slice length, and the service packet included in each time slice.
  • a subset of the service packets is formed, and the number of lost packets is calculated for each service packet in the subset of the service packets obtained after the division.
  • the number of service packet subsets is not less than two, and all service packet subsets form the foregoing service packet set.
  • each service packet subset corresponds to a test packet.
  • the length of the preset time slice can be selected according to actual needs.
  • the preset time slice is 20 ms in length.
  • S602 The sender allocates different time slice identifiers for the at least two adjacent service packet subsets, and adds the allocated time slice identifier to the service packets in each service packet subset.
  • the sender distinguishes the service packet subset by using the time slice identifier. More specifically, the time slice identifier of the service packet in the same service packet subset is the same, and different service packets are used. The time slice identifier of the service packets in the set is different.
  • the time slice identifier may be a packet encapsulation format or a certain identifier bit in the packet header of the packet; the corresponding method may be implemented in a Layer 2 network or in a Layer 3 network. .
  • the time slice identifier when the time slice identifier is allocated, under the premise that the preset time slice length is reasonably selected and the test packet transmission time is reasonably set, only the adjacent two service packet subsets need to be assigned different time slice identifiers. There is no need to ensure that the time slice identifiers of all service packet subsets are different from each other. For example, when the time slice identifier includes two time slice identifiers a and b, the time slice identifier a may be allocated for the service packet subset 1, the time slice identifier b is allocated for the service packet subset 2, and the service packet subset 3 is allocated time. The slice identifier a, the service packet subset 4 allocates the time slice identifier b, and sequentially cycles.
  • the time slice identifier when the time slice identifier includes the time slice identifiers a, b, and c, the time slice identifier a, the service packet subset 2, the time slice identifier b, and the service report may be allocated to the service packet subset 1 Text subset 3 assigns a time slice identifier c or a, and so on.
  • the time slice identifier when the time slice identifier is allocated, it is only necessary to ensure that the time slice identifiers of the adjacent service packet subsets are different, and the service packets with the same time slice identifier can be accumulated, and the current service packet subset is performed. When the number of service packets is calculated, the current cumulative result is subtracted from the previous accumulated result to obtain the result of counting the service packets of the current service packet subset.
  • S603 The transmitting end sequentially sends the foregoing service message subset to the receiving end.
  • the sending end After the time slice identifier is added to each service packet, the sending end sends the service packet with the time slice identifier added to the receiving end.
  • S604 The sender counts the service packets that have been sent with the same time slice identifier.
  • the sending end is provided with a counter, and each service packet is sent for counting, and the service packets with the same time slice identifier are cumulatively counted.
  • the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset.
  • the slice identifier, the first count result is a count result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the current service packet subset between the sender and the receiver.
  • the sender After the current service packet subset is sent, the sender needs to save the first count result locally. Or the first counting result is carried in the test packet, and the first counting result is a counting result of all service packets having the same time slice identifier as the current service packet subset, and thus the first counting result may be some
  • the result of counting the service packets of a subset of service packets may also be the cumulative count result of a subset of service packets having the same time slice identifier.
  • Each of the service packet subsets has a test packet, and the test packet carries a time slice identifier of the current service packet subset, and is used by the receiving end according to the test packet after receiving the test packet.
  • the time slice identifier extracts a counting result of the service packet corresponding to the time slice identifier.
  • the time slice identifier of the test packet and the time slice identifier of the corresponding service packet subset may be identical or different. As long as the identifier of the test packet is associated with the identifier of the service packet subset, the receiving end may The service packet corresponding to the test packet is identified according to the corresponding relationship.
  • the test packet is delayed in the transmission of the service packet subset.
  • the delay time is a preset duration, and the preset duration is greater than the transmission duration between the sender and the receiver of the current service packet subset, that is, the preset is set.
  • the purpose of the duration is to ensure that the service packet corresponding to the test packet that has been sent by the sender sends the test packet to the receiver. Therefore, the setting of the preset duration is related to the complexity of the transmission network, whether it is multipath, the distance between the transmitting end and the receiving end, and the like. The more complex the network, the more multipath conditions, the farther the distance between the transmitting end and the receiving end, the corresponding preset time should be set longer.
  • the service packet is time-divided by inserting a test packet between the service packets, and the service packet cannot be distinguished from the same time slice or different time.
  • the test packet is sent, the accumulated result of all the service packets sent before the test packet is extracted.
  • the counting result of all received service packets is extracted based on the arrival time of the test packet, and the extracted counting result is not guaranteed to be the correct counting result.
  • this embodiment adds that the service packets of the adjacent at least two time slices (the time slice corresponds to the service message subset) are separately identified, so that the time slice is not dependent on the time slice.
  • the time node of the test packet is sent to ensure that the receiving end can identify that the service packet is from a different time slice according to the time slice identifier.
  • the test packet transmission time can be set reasonably and accurately. Calculate the packet loss rate.
  • the exemplary embodiment provides a method for time slice division of service packets, as shown in FIG. 7 .
  • the abscissa axis is a time axis, and the time is divided into multiple time slices according to 60 ms, and each time slice corresponds to a subset of service packets, and the time slice of 0-60 ms in the figure corresponds to a subset of service packets.
  • 71, 60ms-120ms time slice corresponds to the service message subset 72, each service message subset includes a plurality of service messages 711, and the periodically inserted test message delays the transmission of the corresponding service message subset.
  • the test packet 712 corresponding to the service packet subset 71 is sent at 110 ms, and the delay time is 50 ms.
  • the service packet subset and the test packet correspond to each other by the same time slice identifier.
  • the sending end receives the response message sent by the receiving end, and the response message carries the second counting result, where the second counting result is used to indicate that the receiving end has received the same time when receiving the test message.
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • the receiving end is provided with a counter, and each time a service packet is received, the service packet is counted once, and the service packets with the same time slice identifier are cumulatively counted.
  • the receiving end When receiving the test packet from the sending end, the receiving end obtains the second counting result according to the time slice identifier carried in the test packet, and returns the second counting result to the sending end by sending the response packet; specifically, The second count result indicates the number of service packets that have been received by the receiving end and have the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • the response packet returned by the receiving end to the sending end also carries the first counting result.
  • S607 The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • the calculation of the packet loss rate in a subset of service packets is: the number of lost service packets/the number of service packets sent by the sender.
  • the number of lost service packets is generally represented by the difference between the number of service packets sent by the sender and the number of service packets received by the receiver.
  • the method The first counting result corresponds to the number of service packets sent by the sending end; the second counting result corresponds to the number of service packets received by the receiving end; the difference between the two indicates the number of lost packets, according to the number of lost packets. And the first counting result is further calculated to obtain a packet loss rate.
  • the transmitting end is the party that initiates the data transmission
  • the receiving end is a passive side with respect to the transmitting end, and the transmitting end can adjust the data transmission rate or adjust the data transmission path according to the obtained packet loss rate, and the packet loss rate is sent.
  • the end has a greater meaning, so the packet loss rate is generally calculated by the transmitting end for subsequent adjustment processing.
  • the calculation of the packet loss rate can also be performed at the receiving end.
  • the test packet sent by the sending end carries the current first counting result of the sending end, and after receiving the second counting result, the receiving end performs the calculation of the packet loss rate according to the first counting result and the second counting result, and then calculates The obtained packet loss rate is carried in the response packet and returned to the sender.
  • the present invention provides a plurality of services by dividing a service packet into a time slice, compared with a case where a test packet and a service packet are out of order in the prior art.
  • the packet subset is assigned a different time slice identifier for the service packet subset.
  • the test packet also carries the corresponding time slice identifier, and the delay test packet is sent.
  • the delay time is greater than the service packet subset.
  • the transmission time between the terminal and the receiving end can ensure that the test packet is sent to the receiving end when the test packet is sent, so that the test packet and the service packet are out of order at the receiving end.
  • the present invention can accurately calculate the packet loss rate on the premise that there is a disorder of the test packet and the service packet.
  • the method can be applied to various application scenarios such as multipath transmission and CPU multi-core processing.
  • the solution mainly performs the message processing by serial processing.
  • the so-called serial processing is that there are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines.
  • the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder.
  • the number of packets is large.
  • the scheme can accurately calculate the packet loss rate
  • the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified. In turn, the cost is higher.
  • the solution obtains the service packet by dividing the service packet into a time slice, and delays the sending of the test packet corresponding to the service packet subset. The delay time is greater than the service packet.
  • the transmission time of the subset can avoid the out-of-order of test packets and service packets, and thus can accurately calculate the packet loss rate.
  • This solution does not need to be implemented by modifying the existing hardware structure, which can reduce the implementation cost.
  • the embodiment further provides a method for measuring network packet loss, which is applied to a three-layer network, as shown in FIG. 8, the method includes:
  • S801 The sending end divides the service packet set in time according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subsets form a collection of business messages.
  • S802 The sender allocates different time slice identifiers for the at least two adjacent service packet subsets, and adds the allocated time slice identifier to the preset field in the packet header of the service packet.
  • the time slice is identified as some identifier bits in the packet header of the service packet; the receiving end can implement the identification of the received service packet in the Layer 3 network.
  • the packet header of the IP packet transmitted at the network layer includes a 4-bit version (Version) number, a 4-bit header length (Internet Header Length, IHL), and an 8-bit service type (Type). Of Service), Total Length of 16bits, Identification of 16bits, Flags of 3bits, Fragmentation Offset of 13bits, Time To Live (TTL) of 8bits, Protocol for 8bits, Header Checksum for 16bits, Source Address for 32bits, Destination Address for 32bits, Options for 16bits, Padding for 16bits And other fields.
  • the data in the figure is used to represent the useful information in binary representation carried in the message.
  • an identification field is used to mark the current data packet as the first fragment.
  • the lifetime time (TTL) value is automatically decremented by 1 every 1 ms or a gateway, until it is reduced to 0, indicating that the network is unreachable.
  • TTL time to live
  • the data packet will pass through a certain network node according to the calculated routing path, and then the transmitting end arrives at the receiving end.
  • the value of the time to live (TTL) is automatically decremented by one after each routing node. In general, the number of routing nodes in the network is up to about 20.
  • the preset field may be an Identification field or a time-to-live TTL field in the packet header.
  • the Identification field as an example, you can distinguish different time slices by setting the highest bit of the Identification field alternately to 0 or 1.
  • the highest bit of the Identification field of all service packets in time slice 1 is 0, and the highest bit of the Identification field of all service packets in time slice 2 is 1, and all service packets in time slice 3
  • the highest bit of the Identification field is 0, and the highest bit of the Identification field of all service messages in time slice 4 is 1, and the loop is repeated.
  • the highest bit of the identification field is the time slice identifier of each service packet, and the time slice identifier of the service packet in the same service packet subset is the same.
  • the highest two digits of the Identification field may be respectively set to 00, 01, 10, and 11 to distinguish the adjacent four service packet subsets, and the highest two digits of the Identification field are time. Slice identification.
  • the TTL setting can be the same as the setting of the Identification field.
  • the above identification field or the TTL time field setting of the method does not affect the normal transmission of the message. Specifically, when the highest bit of the Identification field changes, it can still be used to indicate the number of fragments.
  • the TTL value ranges from 0 to 127, that is, the maximum number of packets allowed by the sender to reach the receiver through 128 network nodes, so that the maximum number of nodes in the existing network can still be met.
  • the TTL value ranges from 128 to 255. That is, the maximum number of packets allowed by the sender to reach the receiver through 128 network nodes can still meet the requirements of the existing network.
  • the preset field may also be another field in the packet header that does not affect the normal transmission of the packet, and the method for identifying the corresponding time slice may also be derived according to the foregoing, and is not repeatedly described in this embodiment.
  • S803 The sending end sequentially sends the foregoing service message subset to the receiving end.
  • S804 The sender counts the service packets that have been sent with the same time slice identifier.
  • the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset.
  • the slice identifier, the first count result is a count result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the sender end and the receiver end.
  • both the test packet and the service packet have the packet header shown in Table 1.
  • the test packet does not carry useful data information; and the test packet and the test packet are The port numbers used for service packets are not the same.
  • the receiving end can identify the port number information in the packet header.
  • the received packet is a test packet or a service packet.
  • the port number used for the service packet is a specific port number specified in the protocol, such as port 80 and port 21, and the port number used for the test packet is 65020.
  • the port number used for the test message can also be set to other port numbers that do not conflict with the port number specified in the protocol.
  • the test packet also carries a time slice identifier corresponding to the service packet subset.
  • the test packet also has the above-mentioned packet header. Therefore, the time slice identifier corresponding to the test packet can be determined by setting the value of the preset field, and the setting method can refer to the setting method of the time slice identifier of the service packet.
  • the time slice identifier of the test packet may be the same as the time slice identifier of the corresponding service packet subset. For example, the time slice identifier of a certain service packet subset is the highest digit of the Identification field, and the corresponding test packet is corresponding. The time slice identifier is also the highest bit of the Identification field.
  • the identifier carried in the test packet may be other identifiers, and may not be consistent with the time slice identifier of the current service packet subset. As long as the identifier of the test packet has a corresponding relationship with the identifier of the service packet subset, the receiving end may be corresponding according to the corresponding identifier. The relationship identifies its corresponding service message. For example, if the time slice identifier of the current service packet subset is the highest bit of the Identification field, the identifier of the corresponding test packet can be set to the highest bit of the TTL. The receiving end may identify the service packet corresponding to the test packet according to the determined relationship between the value of the highest TTL and the value of the highest bit of the Identification field.
  • the packets transmitted in the Layer 3 network carry the active IP address, the destination IP address, the protocol type, the source port, and the destination port.
  • the same type of service packets have the same source IP address and destination IP address.
  • the protocol type is different from the source port and the destination port. Therefore, when multipath is available on the network, the source IP address, destination IP address, protocol type, source port, and destination port of each packet are calculated. Different hash values are then hashed to different transmission paths (PATHs), and the source IP address, destination IP address, protocol type, source port, and destination port of all test packets are the same.
  • the calculated hash value is also the same, and all test packets pass the same path from the sender to the receiver.
  • the multipath is for service packets, that is, different service packets have multiple paths to be selected from the transmitting end to the receiving end; All test packets can only be sent from the sender to the receiver through the same path. Therefore, there is no out-of-order situation between the test message and the test message. That is, when a test packet arrives at the receiving end, the extracted receiving end's counting result matches the counting result carried in the test packet.
  • the sending end receives the response message sent by the receiving end, and the response message carries the second counting result.
  • the second counting result is used to indicate that the receiving end has received the same time when receiving the test message.
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • S807 The transmitting end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • the first count result obtained by the sender is the accumulated sent all the same time slices.
  • the number of the identified service packets is the same.
  • the second count result extracted by the receiving end is the accumulated number of received service packets with the same time slice identifier.
  • the calculation of the packet loss rate can be referred to the following example.
  • the number of lost packets of the service packet subset corresponding to the time slice 3 is calculated as:
  • Time_slice_3_: Droper_Counter (Time_slice_3_Sender_Counter-Time_slice_1_Sender_Counter)-(Time_slice_3_Reciever_Counter-Time_slice_1_Reciever_Counter).
  • the time_slice_3_Sender_Counter is the first count result corresponding to the third test message
  • the time_slice_1_Sender_Counter is the first count result corresponding to the first test message, and the two are subtracted to obtain the corresponding subset of the service message.
  • Time_slice_3_Reciever_Counter is the second count result corresponding to the third test packet
  • Time_slice_1_Reciever_Counter is the second count result corresponding to the first test packet.
  • the number of service packets received by the receiving end corresponding to the subset of the service packets.
  • Time_slice_3_Droper_Counter indicates the number of lost packets in the subset of service packets.
  • the packet loss rate of the subset of service packets corresponding to time slice 3 is calculated as:
  • Time_slice_3_Droper_ratio Time_slice_3_Droper_Counter/(Time_sl ice_3_Sender_Counter-Time_slice_1_Sender_Counter).
  • the ratio of the result of the packet loss calculation to the total number of service packets sent can obtain the packet loss rate of the service packet subset, that is, Time_slice_3_Droper_ratio.
  • the number of lost packets and the packet loss rate in the time slice 4 can be obtained by the first counting result and the second counting result corresponding to the time slice 2 and the time slice 4.
  • the packet loss monitoring of the packet can be performed in real time in this embodiment.
  • the total number of lost packets can be calculated by calculating the number of lost packets in each time slice separately, and then calculate the transmission within each time slice separately.
  • the number of service packets is accumulated to obtain the total total number of transmissions, and the ratio of the total number of lost packets to the total number of transmissions is the packet loss rate.
  • Table 2 in the following table lists the statistical results of the number of lost packets obtained by the method provided in this embodiment.
  • the time is divided into multiple time slices according to 10 ms, and each time slice corresponds to a subset of service packets, and the time of the subset of the service packets.
  • the slice is identified as the highest bit of Identification, that is, 0 or 1. From the table, it can be seen that the time slice identifier is alternately 0 or 1.
  • the test packet corresponding to each service packet subset is delayed by 6 ms.
  • the transmission completion time of the service packet subset 1 corresponding to the time slice 1 is 10 ms, and the test packet 1 transmission time is 16 ms. It can be seen that the test packets corresponding to other time slices are delayed by 6 ms.
  • the first count result 1255 obtained by the sender is the cumulative result of the service packet whose current time slice identifier is 0.
  • the receiving end feeds back the response message 1 when receiving the test message 1, and the second counting result obtained when the response message 1 is sent is 1255, and the service corresponding to the time slice 1 is obtained from the first counting result and the second counting result. There is no packet loss of service packets in the subset of messages.
  • the first counting result 1323 corresponding to the test packet 2 and the second counting result 1243 corresponding to the response packet are compared with the second counting result 1243 corresponding to the response packet, and packet loss occurs in the service packet subset corresponding to the time slice 2 .
  • both the transmitting end and the receiving end perform cumulative counting on service packets having the same time slice identifier.
  • the embodiment further provides a method for measuring network packet loss, and the method is applied to a Layer 2 network, as shown in FIG.
  • the method includes:
  • the sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subsets form a collection of business messages.
  • the sender is a service packet encapsulation protocol packet header, and the protocol packet header is a service packet.
  • the time slice identifier in the subset of service messages.
  • the sender can use three different protocols respectively.
  • the service packets of the different service packet subsets are encapsulated, and the service packets of the same service packet are encapsulated in the same format.
  • the receiver can use different protocol packet headers to different service packet subsets. Service packets are distinguished.
  • Ethernet II protocol IEEE802.3/IEEE802.2LLC or IEEE802.3/IEEE802.2LLC/SNAP can refer to the prior art.
  • the service packets may be encapsulated by using different VLAN IDs or VLAN priority identifiers in each time slice, so as to divide the service packets into time slices.
  • S1103 The sending end sequentially sends the service message subset to the receiving end.
  • S1104 The sender counts the service packets that have been sent with the same time slice identifier.
  • the sender obtains the first counting result, and sends a test packet to the receiving end after the preset duration, and the test packet carries the time slice identifier of the current service packet subset.
  • the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the transmitting end and the receiving end.
  • the sending end receives the response message sent by the receiving end, and the response message carries the second counting result.
  • the second counting result is used to indicate that the receiving end has received the same time when receiving the test message.
  • the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
  • S1107 The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  • the double-end packet loss measurement method in the Y.1731 protocol is a packet loss measurement method applied to a Layer 2 network.
  • the packets transmitted in the Layer 2 network carry the active MAC address, the destination MAC address, and the VLAN ID.
  • the same type of service packets carry the same source MAC address and the same VLAN ID, but the destination MAC address is not.
  • the sender performs hash calculation on the source MAC address, destination MAC address, and VLAN ID of the service packet to obtain different HASH values and then hashes them to different physical transmission paths in the TRUNK group, and the test packet is derived from the source.
  • the MAC address, destination MAC address, and VLAN ID are the same.
  • the resulting HASH value is a fixed value. Therefore, test packets can only be hashed to a fixed transmission path. Therefore, similar to the Layer 3 network, there are also out-of-order situations of test packets and service packets in the Layer 2 network.
  • the method for encapsulating service packets by using different encapsulation formats or using different VLAN IDs or VLAN priority identifiers in the present embodiment can solve the double-ended packet loss in the TRUNK networking mode of the Y.1731 protocol. Measurements are prone to out-of-order problems that result in inaccurate measurements.
  • the embodiment further provides a method for measuring the out-of-order of service packets, where the method includes:
  • the sender inserts at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate that the third count result is obtained.
  • the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the out-of-sequence test packet is sent.
  • the out-of-order test packet 1301 is inserted into the divided service packet subset to perform the service packet subset.
  • Out-of-order test usually for a subset of service packets corresponding to a smaller time slice, generally contains fewer service packets, and the unit of the time slice itself is small, so only one out-of-order test message is inserted in order to save bandwidth.
  • the service packet subset corresponding to the larger time slice generally contains more service packets. Therefore, in order to accurately measure the out-of-order of service packets in real time, multiple out-of-order tests can be inserted in the service packet subset.
  • Message 1301. The number of out-of-order test packets can take into account bandwidth and real-time requirements for out-of-order service packets.
  • the out-of-order test packet is a service packet
  • the number of service packets that have been sent before the out-of-order test packet (service packet) is sent is three, and the receiver receives the service packet. If the number of service packets received in the text is two, the service packets are out of order. Therefore, the out-of-order test message is distinguished from the service message to characterize the occurrence of out-of-order in the network transmission process.
  • the out-of-order test packet is also a test packet, and the purpose is to instruct the sender to obtain the third count result before transmitting, and instruct the receiver to extract the fourth count result when reaching the receiver.
  • the third counting result may be saved locally by the sending end or may be carried in the out-of-sequence test message; the setting method of the time slice identifier of the out-of-order test packet is the same as the test packet, and the method is not described here.
  • S1202 The sending end sends a subset of service packets to the receiving end, and each service packet subset includes at least one out-of-order test packet.
  • the service packet subset includes, in addition to the service packet with the same time slice identifier, an inserted out-of-order test packet that also has a corresponding time slice identifier.
  • the sending end receives the out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, and the fourth counting result is used to indicate the receiving The number of service packets received by the receiving end with the same time slice identifier as the out-of-sequence test packet.
  • the out-of-order response packet carries the third counting result when returned by the receiving end to the sending end.
  • the sending end determines, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packet in the service packet subset is out of order.
  • the obtaining of the first counting result and the second counting result may refer to the methods provided in FIG. 6 to FIG.
  • the network packet degree of the service packet in the time slice can be calculated.
  • the transmission count 1 of the service packet obtained at the time of sending the packet 1 in the time slice 1 is 32;
  • the service packet receiving count 1 is 30, and the counting result is carried in the out-of-order response message 1.
  • the transmission count 2 of the service packet obtained at the transmission time of the test packet 2 sent by the delay time slice 1 is 45;
  • the service packet receiving count 2 is 45, and the counting result is carried in the response packet 2.
  • the instance 2 is calculated as follows:
  • the transmission count 1 of the service packet obtained at the time of sending the packet 1 in the time slice 1 is 32;
  • the service packet receiving count 1 is 35, and the counting result is carried in the out-of-order response packet 1.
  • the transmission count 2 of the service packet obtained at the transmission time of the test packet 2 sent by the delay time slice 1 is 45;
  • the service packet receiving count 2 is 45, and the counting result is carried in the response packet 2.
  • the out-of-order measurement of other time slices is analogous.
  • a business message out of sequence can be obtained for a long period of time.
  • test packets in this embodiment are sent by the sender through the same path. Receiving end.
  • test message in this embodiment is a forward control frame; the response message is a backward report frame.
  • the specific structure of the forward control frame and the backward report frame can be referred to the prior art.
  • the method for measuring the out-of-order order of the service packet provided by the embodiment of the present invention can further determine whether there is an out-of-order situation on the premise that the packet loss rate can be accurately calculated.
  • the present invention further provides a method for measuring network packet loss, which is applied to a data transmission system, where the data transmission system is provided with a transmitting end and a receiving end. As shown in FIG. 14, the method includes:
  • the receiving end receives the service packet sent by the sending end, and the service packet carries a time slice identifier.
  • the sender sends a time slice to the service packet.
  • the service packet carries a time slice identifier to indicate the time slice to which the service packet belongs.
  • the service packets in the slice at the same time have the same time slice identifier.
  • the receiving end When the receiving end receives the service packet, the receiving end decapsulates the service packet, identifies the time slice identifier of the preset field in the packet header (the Layer 3 network), or distinguishes whether the service packet is classified according to the Ethernet encapsulation format. Have the same time slice identification (layer 2 network).
  • S1402 The receiving end counts the received service packets with the same time slice identifier.
  • the receiving end is provided with a counter, and counts the received service packets, and accumulates the service packets with the same time slice identifier.
  • counting the received service packets with the same time slice identifier includes:
  • the preset field in the packet header of the service packet is added with a time slice identifier.
  • the method of adding a time slice identifier to the preset field can refer to the sender.
  • counting the received service packets with the same time slice identifier includes:
  • a service packet encapsulates a protocol packet header, and the protocol packet header is a time slice identifier of the service packet.
  • the receiving end receives the test packet sent by the sending end, where the test packet carries a time slice identifier.
  • the receiving end obtains a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end receives the test packet, and the service packet corresponding to the time slice identifier carried in the test packet is received by the receiving end. Count the results.
  • S1405 The receiving end sends a response packet to the sending end, where the response packet carries the obtained second counting result.
  • the method for measuring the network packet loss provided by the embodiment of the present invention is compared with the case where the test packet and the service packet are out of order in the prior art, and the receiving end of the present invention only performs the service packet with the same time slice identifier. Cumulative counting, and the received test packets are delayed in the reception of the corresponding service packets, which can avoid the out-of-order situation of the test packets and the service packets. Then, when the test message is received, the correct second counting result can be extracted, so that the sending end can accurately calculate the packet loss rate according to the correct first counting result and the second counting result.
  • the method further includes:
  • the receiving end receives the out-of-order test packet sent by the sending end, and the out-of-order test packet carries a time slice identifier.
  • the receiving end acquires a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end receives the out-of-order test packet, and the receiving end has received the same time as the out-of-order test packet. Number of service packets identified by the slice.
  • test message is a forward control frame; the response message is a backward report frame.
  • the receiving end returns the corresponding out-of-order response message to the transmitting end after receiving the out-of-order test packet of the transmitting end.
  • the fourth counting result of the service packet with the same time slice identifier carried in the out-of-order response packet is extracted when the out-of-order response packet is returned, so as to facilitate the sending end according to the second counting result, the fourth counting result, and the sending.
  • the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. .
  • the technical solution of the present invention which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer.
  • a hard disk or optical disk, etc. includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.

Abstract

The present invention relates to the field of network transmission. Provided are a device and method for measuring network packet loss, so as to solve the problem in the prior art that an error occurs in a calculated packet loss rate. The method comprises: dividing a service packet set in time sequence according to a preset time slice duration; allocating different time slice identifiers for at least two adjacent service packet subsets, and adding the allocated time slice identifiers for service packets in each service packet subset; sequentially sending the service packet subsets to a receiving end; counting the sent service packets that have the same time slice identifiers; if the current service packet subsets are sent, obtaining a first counting result, and sending a test packet to the receiving end after a preset duration; receiving a response packet returned by the receiving end, the response packet carrying a second counting result; and calculating a packet loss rate of the service packet subsets according to the first counting result and the second counting result. The present invention is applied to a data transmission process.

Description

一种网络丢包的测量装置及方法Measuring device and method for network packet loss 技术领域Technical field
本发明涉及网络传输领域,尤其涉及一种网络丢包的测量装置及方法。The present invention relates to the field of network transmission, and in particular, to a device and method for measuring network packet loss.
背景技术Background technique
现有网络中进行数据传输时,数据在网络中是被分成多个数据包传输的。由于数据包过大或者网络传输性能较差等原因,在数据包的传输过程中,经常出现部分数据包被丢失的现象,这种现象又被称为网络丢包。通常,通过丢包率来描述网络丢包情况,所述丢包率指已丢失数据包总数与已发送数据包总数的比值。When data is transmitted in an existing network, data is transmitted into multiple packets in the network. Due to the large data packet or poor network transmission performance, some data packets are often lost during the transmission of data packets. This phenomenon is also called network packet loss. Generally, the network packet loss situation is described by a packet loss rate, which is a ratio of the total number of lost packets to the total number of transmitted packets.
现有技术中提供了一种丢包率的测量方法,在该方法的实现过程中,发送端对发送的携带有数据信息的业务报文进行计数,且在业务报文之间定时***前向监控(Forward Monitoring,简称FM)帧,FM帧携带有发送端统计的已发送的业务报文的计数结果A;接收端对接收到的业务报文进行计数并实时更新计数结果B,在收到FM帧时读取计数结果B,并将计数结果B以及FM帧中携带的计数结果A封装到后向报告(Backward Reporting,简称BR)帧中返回给发送端,发送端根据BR帧中携带的两个计数结果进行丢包率的计算。A method for measuring a packet loss rate is provided in the prior art. In the implementation process of the method, the sending end counts the sent service packets carrying the data information, and periodically inserts the forward direction between the service packets. The monitoring (Forward Monitoring, FM for short) frame, the FM frame carries the counting result A of the sent service packet, and the receiving end counts the received service packet and updates the counting result B in real time. The count result B is read in the FM frame, and the count result B and the count result A carried in the FM frame are encapsulated into a Backward Reporting (BR) frame and returned to the transmitting end, and the transmitting end carries according to the BR frame. The two count results are used to calculate the packet loss rate.
发明人发现现有技术至少存在如下问题:发送端与接收端之间存在多个可选的路由节点,因而传输网络中存在多种传输路径,则业务报文散列到多个传输路径上进行传输,FM帧也在其中的一条传输路径上进行传输,由于各个传输路径的传输距离、传输流量不一致等原因,FM帧与业务报文到达接收端的顺序无法确定,例如在后发出的FM帧先于在先发出业务报文到达接收端,导致乱序。此时,由于接收端在接收到FM帧时才会提取计数结果B,因而计数结果B不包括在后到达的业务报文或者已包括在后发送且在先到达的业务报文,即计数结果B不能够准确反映接收端实际接收到的业务报文数,进而发送端根据BR帧中携带的计数结果B计算丢包率存在误差。 The inventor has found that at least the following problems exist in the prior art: there are multiple optional routing nodes between the transmitting end and the receiving end, so that there are multiple transmission paths in the transmission network, and the service packets are hashed to multiple transmission paths. The transmission and the FM frame are also transmitted on one of the transmission paths. The order of the FM frame and the service packet arriving at the receiving end cannot be determined due to the transmission distance of each transmission path and the inconsistent transmission traffic. For example, the FM frame sent later is first. The service packet is sent to the receiving end first, resulting in out of order. At this time, since the receiving end extracts the counting result B when receiving the FM frame, the counting result B does not include the service message that arrives later or the service message that has been sent after the previous arrival, that is, the counting result. B cannot accurately reflect the number of service packets actually received by the receiving end, and the transmitting end calculates the error of the packet loss rate according to the counting result B carried in the BR frame.
发明内容Summary of the invention
本发明实施例提供一种网络丢包的测量装置及方法,能够解决现有技术中计算得到的丢包率存在误差的问题。The embodiment of the invention provides a device and a method for measuring network packet loss, which can solve the problem that the packet loss rate calculated in the prior art has an error.
为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:
第一方面,本发明提供了一种网络丢包的测量装置,该装置应用于发送端,所述发送端位于一种数据传输***,所述***设置有所述发送端和所述接收端,该装置包括:In a first aspect, the present invention provides a network packet loss measuring apparatus, where the apparatus is applied to a transmitting end, the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end. The device includes:
存储器,用于存储业务报文集合;a memory for storing a set of service messages;
处理器,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;a processor, configured to divide the service packet set in time series according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识;Allocating different time slice identifiers to the adjacent at least two service packet subsets, and adding the allocated time slice identifiers to the service packets in each service packet subset;
发射器,用于向接收端依次发送所述业务报文子集;a transmitter, configured to send the subset of the service packets to the receiving end in sequence;
所述处理器,还用于对已发送的具有相同时间片标识的业务报文进行计数;The processor is further configured to count the service packets that have been sent with the same time slice identifier;
当当前业务报文子集发送完毕时,获取第一计数结果,在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识,所述第一计数结果为所述当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;When the current service packet subset is sent, the first counting result is obtained, and after the preset duration, the test packet is sent to the receiving end, where the test packet carries the current service packet subset. a slice identifier, where the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, where the preset duration is greater than the service packet subset at the sending end and the receiving end The length of transmission between;
接收器,用于接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同;a receiver, configured to receive a response packet that is sent by the receiving end, where the response packet carries the second counting result, where the second counting result is used to indicate that the receiving end receives the test packet, The number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried by the test packet;
所述处理器,还用于根据所述第一计数结果和所述第二计数结果计算所述业务报文子集的丢包率。 The processor is further configured to calculate a packet loss rate of the service packet subset according to the first counting result and the second counting result.
结合第一方面,在第一方面的第一种实现方式中,In conjunction with the first aspect, in a first implementation of the first aspect,
所述处理器,还用于在业务报文的报文头中的预设字段添加已分配的所述时间片标识。The processor is further configured to add the allocated time slice identifier to a preset field in a packet header of the service packet.
结合第一方面,在第一方面的第二种实现方式中,In conjunction with the first aspect, in a second implementation of the first aspect,
所述处理器,还用于为所述业务报文封装协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。The processor is further configured to encapsulate a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
结合第一方面或者第一方面的第一种、第二种实现方式,在第一方面的第三种实现方式中,In combination with the first aspect or the first and second implementation manners of the first aspect, in a third implementation manner of the first aspect,
所述处理器,还用于在业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;The processor is further configured to insert at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-sequence test packet And the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the sending the out-of-sequence test packet;
所述发射器,还用于向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括至少一个所述乱序测试报文;The transmitter is further configured to send the service packet subset to the receiving end, and each service packet subset includes at least one out of order test packet;
所述接收器,还用于接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiver is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message. As a result, the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
所述处理器,还用于根据所述第一计数结果、第二计数结果、第三计数结果和所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processor is further configured to determine, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packet in the service packet subset is out of order.
结合第一方面或者第一方面的第一种、第二种、第三种实现方式,在第一方面的第四种实现方式中,In combination with the first aspect, or the first, second, and third implementation manners of the first aspect, in a fourth implementation manner of the first aspect,
所述发射器发送的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets sent by the transmitter are sent by the sending end to the receiving end through the same path;
所述发射器发送的所述测试报文为前向控制帧;The test packet sent by the transmitter is a forward control frame;
所述接收器接收的所述响应报文为后向报告帧。The response message received by the receiver is a backward report frame.
第二方面,本发明还提供了一种网络丢包的测量装置,该装置应用于接 收端,接收端位于一种数据传输***中,该***设置有发送端和上述接收端,该装置包括:In a second aspect, the present invention also provides a measuring device for network packet loss, which is applied to The receiving end is located in a data transmission system, the system is provided with a transmitting end and the receiving end, and the device comprises:
接收器,用于接收发送端发送的业务报文,所述业务报文携带有时间片标识;a receiver, configured to receive a service packet sent by the sender, where the service packet carries a time slice identifier;
存储器,用于存储已接收的业务报文;a memory for storing the received service message;
处理器,用于对已接收到的具有相同的时间片标识的业务报文进行计数;a processor, configured to count the received service packets with the same time slice identifier;
所述接收器,还用于接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiver is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
所述处理器,还用于获取与所述时间片标识对应的第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;The processor is further configured to obtain a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end carries the test packet and is carried by the test packet. The time slice identifies the count result of the service packet corresponding to the time slice;
发射器,用于向所述发送端发送响应报文,所述响应报文中携带有获取的所述第二计数结果。And a transmitter, configured to send a response packet to the sending end, where the response packet carries the obtained second counting result.
结合第二方面,在第二方面的第一种实现方式中,In conjunction with the second aspect, in a first implementation of the second aspect,
所述接收器接收的所述业务报文的报文头中的预设字段添加有所述时间片标识;The preset field in the packet header of the service packet received by the receiver is added with the time slice identifier;
所述处理器,还用于对已接收的具有相同的所述时间片标识的业务报文进行计数。The processor is further configured to count the received service packets having the same time slice identifier.
结合第二方面,在第二方面的第二种实现方式中,In conjunction with the second aspect, in a second implementation of the second aspect,
所述接收器接收的所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识;The service packet received by the receiver is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
所述处理器,还用于对已接收的具有相同的所述时间片标识的业务报文进行计数。The processor is further configured to count the received service packets having the same time slice identifier.
结合第二方面或者第二方面的第一种、第二种实现方式,在第二方面的第三种实现方式中,With reference to the second aspect or the first and second implementation manners of the second aspect, in a third implementation manner of the second aspect,
所述接收器,还用于接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识; The receiver is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
所述处理器,还用于获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The processor is further configured to acquire a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the received out of order message The number of service packets having the same time slice identifier as the out-of-order test packet;
所述发射器,还用于向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取的所述第四计数结果。The transmitter is further configured to feed back an out-of-order response message to the sending end, where the out-of-order response message carries the acquired fourth counting result.
结合第二方面,或者第二方面的第一种、第二种、第三种实现方式,在第二方面的第四种实现方式中,With reference to the second aspect, or the first, second, and third implementation manners of the second aspect, in the fourth implementation manner of the second aspect,
所述接收器接收的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets received by the receiver are sent by the sending end to the receiving end through the same path;
所述接收器接收的所述测试报文为前向控制帧;The test message received by the receiver is a forward control frame;
所述发射器发送的所述响应报文为后向报告帧。The response message sent by the transmitter is a backward report frame.
第三方面,本发明还提供了一种网络丢包的测量装置,所述装置应用于发送端,所述发送端位于一种数据传输***中,所述***设置有所述发送端和接收端,所述装置包括:In a third aspect, the present invention further provides a measuring device for network packet loss, the device is applied to a transmitting end, and the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end. The device includes:
划分单元,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;a dividing unit, configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
分配单元,用于为划分单元划分得到的相邻的至少两个业务报文子集分配不同的时间片标识;An allocating unit, configured to allocate different time slice identifiers for the adjacent subset of at least two service packets obtained by dividing the unit;
添加单元,用于为划分单元划分得到的每个业务报文子集中的业务报文添加所述分配单元分配的时间片标识;An adding unit, configured to add a time slice identifier allocated by the allocation unit to a service packet in each service packet subset obtained by dividing the unit;
发送单元,用于向接收端依次发送由所述添加单元添加了时间片标识的业务报文子集;a sending unit, configured to sequentially send, to the receiving end, a subset of the service packets added by the adding unit to the time slice identifier;
计数单元,用于对发送单元已发送的具有相同时间片标识的业务报文进行计数;a counting unit, configured to count a service packet that has been sent by the sending unit and has the same time slice identifier;
获取单元,用于在当前业务报文子集发送完毕时,从所述计数单元中获取第一计数结果,所述第一计数结果为所述当前业务报文子集的时间片标识 对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;An obtaining unit, configured to obtain a first counting result from the counting unit when the current service packet subset is sent, where the first counting result is a time slice identifier of the current service packet subset Corresponding counting result, the preset duration is greater than a transmission duration of the service packet subset between the transmitting end and the receiving end;
所述发送单元,还用于在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识;The sending unit is further configured to send a test packet to the receiving end after the preset duration, where the test packet carries a time slice identifier of the current service packet subset;
所述接收单元,用于接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同;The receiving unit is configured to receive a response packet that is sent by the receiving end, where the response packet carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test packet The number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried by the test packet;
处理单元,用于根据所述获取单元获取的第一计数结果和所述接收单元接收的所述第二计数结果计算所述业务报文子集的丢包率。And a processing unit, configured to calculate, according to the first counting result obtained by the acquiring unit and the second counting result received by the receiving unit, a packet loss rate of the service packet subset.
结合第三方面,在第三方面的第一种实现方式中,In conjunction with the third aspect, in a first implementation of the third aspect,
所述添加单元,还用于在业务报文的报文头中的预设字段添加已分配的所述时间片标识。The adding unit is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
结合第三方面,在第三方面的第二种实现方式中,In conjunction with the third aspect, in a second implementation of the third aspect,
所述添加单元,还用于为所述业务报文添加协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。The adding unit is further configured to add a protocol packet header to the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet in which the service packet is located.
结合第三方面或者第三方面的第一种、第二种实现方式,在第三方面的第三种实现方式中,With reference to the third aspect or the first and second implementation manners of the third aspect, in a third implementation manner of the third aspect,
所述装置还包括:***单元,用于在划分单元划分得到的业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取单元从所述计数单元中获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;The device further includes: an insertion unit, configured to insert at least one out-of-order test packet in the service packet subset obtained by dividing the unit, where the out-of-order test packet carries a time slice identifier of the service packet subset The out-of-order test packet is used to instruct the obtaining unit to obtain a third counting result from the counting unit, where the third counting result is sent before the sending the out-of-sequence test message, and the out-of-order The time slice identifier of the test packet corresponds to the counting result;
所述发送单元,还用于向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括所述***单元***的至少一个所述乱序测试报文;The sending unit is further configured to sequentially send the service message subset to the receiving end, where each service packet subset includes at least one out of order test message inserted by the inserting unit;
所述接收单元,还用于接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果, 所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiving unit is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message As a result, The fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-sequence test packet when the out-of-sequence test packet is received;
所述处理单元,还用于根据所述获取单元获取的所述第一计数结果、第三计数结果和所述接收单元接收的所述第二计数结果、所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processing unit is further configured to determine, according to the first counting result, the third counting result, and the second counting result and the fourth counting result received by the receiving unit, the service report Whether the service packets in the text group are out of order.
结合第三方面或者第三方面的第一种、第二种、第三种实现方式,在第三方面的第四种实现方式中,With reference to the third aspect, or the first, second, and third implementation manners of the third aspect, in a fourth implementation manner of the third aspect,
所述发送单元发送的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets sent by the sending unit are sent by the sending end to the receiving end through the same path;
所述发送单元发送的所述测试报文为前向控制帧;The test packet sent by the sending unit is a forward control frame;
所述接收单元接收的所述响应报文为后向报告帧。The response message received by the receiving unit is a backward report frame.
第四方面,本发明还提供了一种网络丢包的测量装置,所述装置应用于接收端,所述接收端位于一种数据传输***中,所述***设置有发送端和所述接收端,所述装置包括:In a fourth aspect, the present invention further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end. The device includes:
接收单元,用于接收发送端发送的业务报文,所述业务报文携带有时间片标识;a receiving unit, configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier;
计数单元,用于对已接收到的具有相同的时间片标识的业务报文进行计数;a counting unit, configured to count the received service packets having the same time slice identifier;
所述接收单元,还用于接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiving unit is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
获取单元,用于从所述计数单元中获取与所述时间片标识对应的第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;An obtaining unit, configured to obtain a second counting result corresponding to the time slice identifier from the counting unit, where the second counting result is used to indicate that the receiving end receives the test packet, and the test report The time slice carried in the text identifies the counting result of the corresponding service packet;
发送单元,用于向所述发送端发送响应报文,所述响应报文中携带有所述获取单元获取的所述第二计数结果。And a sending unit, configured to send a response packet to the sending end, where the response packet carries the second counting result obtained by the acquiring unit.
结合第四方面,在第四方面的一种实现方式中,With reference to the fourth aspect, in an implementation manner of the fourth aspect,
所述接收单元接收的所述业务报文的报文头中的预设字段添加有所述时 间片标识;The preset field in the packet header of the service packet received by the receiving unit is added with the time Inter-slice identification;
所述计数单元,还用于对所述接收单元接收的具有相同的所述时间片标识的业务报文进行计数。The counting unit is further configured to count, by the receiving unit, a service packet having the same time slice identifier.
结合第四方面,在第四方面的第二种实现方式中,With reference to the fourth aspect, in a second implementation manner of the fourth aspect,
所述接收单元接收的所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识;The service packet received by the receiving unit is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
所述计数单元,还用于对接收单元接收的具有相同的所述时间片标识的业务报文进行计数。The counting unit is further configured to count, by the receiving unit, the service packets having the same time slice identifier.
结合第四方面或者第四方面的第一种、第二种实现方式,在第四方面的第三种实现方式中,With reference to the fourth aspect or the first and second implementation manners of the fourth aspect, in a third implementation manner of the fourth aspect,
所述接收单元,还用于接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识;The receiving unit is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
所述获取单元,还用于从所述计数单元中获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The obtaining unit is further configured to: obtain, by the counting unit, a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that when the out-of-order test packet is received, The number of service packets received by the receiving end that have the same time slice identifier as the out-of-order test packet;
所述发送单元,还用于向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取单元获取的所述第四计数结果。The sending unit is further configured to: feed the out-of-order response message to the sending end, where the out-of-order response message carries the fourth counting result obtained by the acquiring unit.
结合第四方面,或者第四方面的第一种、第二种、第三种实现方式,在第四方面的第四种实现方式中,With reference to the fourth aspect, or the first, second, and third implementation manners of the fourth aspect, in a fourth implementation manner of the fourth aspect,
所述接收单元接收的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets received by the receiving unit are sent by the sending end to the receiving end through the same path;
所述接收单元接收的所述测试报文为前向控制帧;The test message received by the receiving unit is a forward control frame;
所述发送单元发送的所述响应报文为后向报告帧。The response message sent by the sending unit is a backward report frame.
第五方面,本发明还提供了一种网络丢包的测量方法,所述方法应用于一种数据传输***,所述***设置有发送端和接收端,所述方法包括:In a fifth aspect, the present invention further provides a method for measuring network packet loss, the method being applied to a data transmission system, where the system is provided with a transmitting end and a receiving end, and the method includes:
所述发送端根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一 部分,全部所述业务报文子集组成所述业务报文集合;The sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, and each of the service packet subsets is one of the service packet sets. Part, all the service message subsets form the service message set;
所述发送端为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识;The transmitting end allocates different time slice identifiers for the adjacent at least two service packet subsets, and adds the allocated time slice identifier to the service packets in each service packet subset;
所述发送端向所述接收端依次发送所述业务报文子集;Sending, by the sending end, the subset of the service packets to the receiving end;
所述发送端对已发送的具有相同时间片标识的业务报文进行计数;The sending end counts the service packets that have been sent with the same time slice identifier;
若当前业务报文子集发送完毕,发送端则获取第一计数结果,在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识,所述第一计数结果为所述当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;If the current service packet subset is sent, the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset. The time slice identifier, the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the service packet subset at the sending end and the The length of transmission between the receiving ends;
所述发送端接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同;The sending end receives the response message replied by the receiving end, where the response message carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test message The number of service packets that have been received by the receiving end and have the same time slice identifier. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
所述发送端根据所述第一计数结果和所述第二计数结果计算所述业务报文子集的丢包率。The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
结合第五方面,在第五方面的第一种实现方式中,In conjunction with the fifth aspect, in a first implementation of the fifth aspect,
所述为每个业务报文子集中的业务报文添加所分配的时间片标识,包括:Adding the allocated time slice identifier to the service packet in each service packet subset includes:
在业务报文的报文头中的预设字段添加已分配的所述时间片标识。The allocated time slice identifier is added to a preset field in the packet header of the service packet.
结合第五方面,在第五方面的第二种实现方式中,With reference to the fifth aspect, in a second implementation manner of the fifth aspect,
所述分别为每个业务报文子集中的业务报文添加所分配的时间片标识,包括:Adding the allocated time slice identifiers to the service packets in each service packet subset, including:
为所述业务报文封装协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。Encapsulating a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
结合第五方面或者第五方面的第一种、第二种实现方式,在第五方面的第三种实现方式中,With reference to the fifth aspect or the first and second implementation manners of the fifth aspect, in a third implementation manner of the fifth aspect,
所述方法还包括: The method further includes:
所述发送端在业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;The sending end inserts at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate acquisition. a third counting result, where the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the out-of-sequence test packet is sent;
所述向接收端依次发送所述业务报文子集,包括:Sending the subset of the service packets to the receiving end in sequence, including:
向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括至少一个所述乱序测试报文;And transmitting, to the receiving end, the service packet subset, where each service packet subset includes at least one out of order test packet;
所述发送端接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The sending end receives the out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, The fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
所述发送端根据所述第一计数结果、第二计数结果、第三计数结果和所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The sending end determines, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packets in the service packet subset are out of order.
结合第五方面或者第五方面的第一种、第二种、第三种实现方式,在第五方面的第四种实现方式中,With reference to the fifth aspect, or the first, second, and third implementation manners of the fifth aspect, in a fourth implementation manner of the fifth aspect,
所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets are sent by the sending end to the receiving end through the same path;
所述测试报文为前向控制帧;The test message is a forward control frame;
所述响应报文为后向报告帧。The response message is a backward report frame.
第六方面,本发明还提供了一种网络丢包的测量方法,所述方法应用于一种数据传输***,所述数据传输***设置有发送端和接收端,所述方法包括:In a sixth aspect, the present invention further provides a method for measuring network packet loss, the method being applied to a data transmission system, where the data transmission system is provided with a transmitting end and a receiving end, and the method includes:
所述接收端接收发送端发送的业务报文,所述业务报文携带有时间片标识;Receiving, by the receiving end, a service packet sent by the sending end, where the service packet carries a time slice identifier;
所述接收端对已接收到的具有相同的时间片标识的业务报文进行计数;The receiving end counts the received service packets with the same time slice identifier;
所述接收端接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiving end receives the test packet sent by the sending end, where the test packet carries the time slice identifier;
所述接收端获取与所述时间片标识对应的第二计数结果,所述第二计数 结果用于表示接收端收到所述测试报文时,所述接收端已接收到的与所述测试报文具有相同时间片标识的业务报文数量;Receiving, by the receiving end, a second counting result corresponding to the time slice identifier, the second counting The result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the test packet when the receiving end receives the test packet;
所述接收端向所述发送端发送响应报文,所述响应报文中携带有获取的所述第二计数结果。The receiving end sends a response packet to the sending end, where the response packet carries the obtained second counting result.
结合第六方面,在第六方面的第一种实现方式中,In conjunction with the sixth aspect, in a first implementation of the sixth aspect,
所述对已接收到的具有相同的时间片标识的业务报文进行计数,包括:The counting of the service packets that have received the same time slice identifier includes:
所述业务报文的报文头中的预设字段添加有所述时间片标识;Adding the time slice identifier to a preset field in a packet header of the service packet;
对已接收的具有相同的所述时间片标识的业务报文进行计数。The received service packets having the same time slice identifier are counted.
结合第六方面,在第六方面的第二种实现方式中,With reference to the sixth aspect, in a second implementation manner of the sixth aspect,
所述对已接收到的具有相同的时间片标识的业务报文进行计数,包括:The counting of the service packets that have received the same time slice identifier includes:
所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识;The service packet is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
对已接收的具有相同的所述时间片标识的业务报文进行计数。The received service packets having the same time slice identifier are counted.
结合第六方面,或者第六方面的第一种、第二种、第三种实现方式,在第六方面的第四种实现方式中,With reference to the sixth aspect, or the first, second, and third implementation manners of the sixth aspect, in a fourth implementation manner of the sixth aspect,
所述方法还包括:The method further includes:
所述接收端接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识;Receiving, by the receiving end, the out-of-sequence test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
所述接收端获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiving end acquires a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the mess when receiving the out-of-order test packet The number of service packets with the same time slice identifier in the sequence test packet;
所述接收端向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取的所述第四计数结果。The receiving end feeds the out-of-order response message to the sending end, where the out-of-order response message carries the obtained fourth counting result.
结合第六方面,或者第六方面的第一种、第二种、第三种、第四种实现方式,在第六方面的第五种实现方式中,With reference to the sixth aspect, or the first, second, third, and fourth implementation manners of the sixth aspect, in a fifth implementation manner of the sixth aspect,
所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets are sent by the sending end to the receiving end through the same path;
所述测试报文为前向控制帧; The test message is a forward control frame;
所述响应报文为后向报告帧。The response message is a backward report frame.
本发明提供的网络丢包的测量装置及方法,与现有技术中存在测试报文和业务报文的乱序的情况相比,本发明通过将业务报文进行时间片的划分得到多个业务报文子集,并为业务报文子集分配不同的时间片标识,测试报文也携带有相应的时间片标识,延迟测试报文的发送,延迟的时间大于业务报文子集的在发送端与接收端之间的传输时间,能够保证测试报文发送时,与之对应的业务报文均已到达接收端,进而能够避免接收端的测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,本发明能够准确计算得到丢包率。此外,现有技术中还存在一种能够避免报文传输的乱序进而准确计算丢包率的方案,该方案主要是通过串行处理的方式对报文进行处理,所谓串行处理,是与网络中存在多条传输路径,多条传输路径像多条流水线一样对传输的报文并行处理相对应的。具体而言,串行处理是指网络中只存在一条传输路径,所有报文均通过该传输路径由发送端达到接收端,那么报文必然依次到达接收端,不存在乱序的情况。然而实际网络中,报文的数量较多,采用此方案虽然能准确计算丢包率,但是对硬件的处理性能等要求较高,且消耗的资源较多,因而需要对现有硬件进行改造,进而实现成本较高。与该方案相比,本方案通过将业务报文进行时间片的划分,得到业务报文子集,并延迟与该业务报文子集对应的测试报文的发送,延迟的时间大于业务报文子集的传输时间,能够避免测试报文和业务报文的乱序,进而能够准确计算丢包率,本方案无需通过改造现有硬件结构的方式实现,能够降低实现成本。The present invention provides a plurality of services by dividing a service packet into a time slice, compared with a case where a test packet and a service packet are out of order in the prior art. The packet subset is assigned a different time slice identifier for the service packet subset. The test packet also carries the corresponding time slice identifier, and the delay test packet is sent. The delay time is greater than the service packet subset. The transmission time between the terminal and the receiving end can ensure that the test packet is sent to the receiving end when the test packet is sent, so that the test packet and the service packet are out of order at the receiving end. The present invention can accurately calculate the packet loss rate on the premise that there is a disorder of the test packet and the service packet. In addition, in the prior art, there is also a scheme capable of avoiding out-of-order transmission of message and accurately calculating a packet loss rate. The solution mainly processes a message by serial processing, so-called serial processing is There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines. Specifically, the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder. However, in actual networks, the number of packets is large. Although the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified. In turn, the cost is higher. Compared with the solution, the solution obtains the service packet by dividing the service packet into a time slice, and delays the sending of the test packet corresponding to the service packet subset. The delay time is greater than the service packet. The transmission time of the subset can avoid the out-of-order of test packets and service packets, and thus can accurately calculate the packet loss rate. This solution does not need to be implemented by modifying the existing hardware structure, which can reduce the implementation cost.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本发明实施例提供的一种网络丢包的测量装置的结构示意图; FIG. 1 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure;
图2为本发明实施例提供的一种网络丢包的测量装置的结构示意图;2 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present invention;
图3为本发明实施例提供的一种网络丢包的测量装置的结构示意图;FIG. 3 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure;
图4为本发明实施例提供的一种网络丢包的测量装置的结构示意图;4 is a schematic structural diagram of a device for measuring packet loss on a network according to an embodiment of the present invention;
图5为本发明实施例提供的一种网络丢包的测量装置的结构示意图;FIG. 5 is a schematic structural diagram of a network packet loss measuring apparatus according to an embodiment of the present disclosure;
图6为本发明实施例提供的一种网络丢包的测量方法的流程图;FIG. 6 is a flowchart of a method for measuring network packet loss according to an embodiment of the present invention;
图7为本发明实施例提供的一种对业务报文进行时间片划分的示意图;FIG. 7 is a schematic diagram of time slice division of service packets according to an embodiment of the present disclosure;
图8为本发明实施例提供的一种网络丢包的测量方法应用在三层网络中的流程图;FIG. 8 is a flowchart of a method for measuring network packet loss in a three-layer network according to an embodiment of the present disclosure;
图9为本发明实施例提供的根据Identification字段的最高位划分时间片的示意图;FIG. 9 is a schematic diagram of dividing a time slice according to a highest bit of an Identification field according to an embodiment of the present invention;
图10为本发明实施例提供的根据Identification字段的最高两位划分时间片的示意图;10 is a schematic diagram of a highest two-bit split time slice according to an Identification field according to an embodiment of the present invention;
图11为本发明实施例提供的一种网络丢包的测量方法应用在三层网络中的流程图;FIG. 11 is a flowchart of a method for measuring network packet loss in a three-layer network according to an embodiment of the present invention;
图12为本发明实施例提供的一种业务报文乱序的测量方法的流程图;FIG. 12 is a flowchart of a method for measuring out-of-order service packets according to an embodiment of the present invention;
图13为本发明实施例提供的一种包含有乱序测试报文的报文集合结构示意图;FIG. 13 is a schematic structural diagram of a packet collection including an out-of-order test packet according to an embodiment of the present disclosure;
图14为本发明实施例提供的一种网络丢包的测量方法的流程图;FIG. 14 is a flowchart of a method for measuring network packet loss according to an embodiment of the present invention;
图15为本发明实施例提供的一种业务报文乱序的测量方法的流程图。FIG. 15 is a flowchart of a method for measuring out-of-order service packets according to an embodiment of the present invention.
具体实施方式detailed description
下面将结合本实施例中的附图,对本实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the present embodiment will be clearly and completely described in the following with reference to the drawings in the embodiments. It is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
本实施例提供了一种网络丢包的测量装置,该装置应用于发送端,该接收端位于一种数据传输***中,该***设置有所述发送端和所述接收端。如图1所示,该装置包括存储器101、处理器102、发射器103和接收器104, 图1中还示出了总线105,该存储器101、处理器102、发射器103和接收器104通过总线105连接并完成相互间的通信。其中:The embodiment provides a measuring device for network packet loss, and the device is applied to a transmitting end, where the receiving end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end. As shown in FIG. 1, the apparatus includes a memory 101, a processor 102, a transmitter 103, and a receiver 104. Also shown in FIG. 1 is a bus 105 that is coupled, connected by a bus 105, and that communicates with each other. among them:
存储器101,用于存储业务报文集合。The memory 101 is configured to store a service message set.
处理器102,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;The processor 102 is configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service message subsets, and each of the service packet subsets is the service packet set. And a part of all the service packet subsets form the service packet set;
为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识。Allocating different time slice identifiers to the adjacent at least two service packet subsets, and adding the allocated time slice identifiers to the service packets in each service packet subset.
发射器103,用于向接收端依次发送业务报文子集;The transmitter 103 is configured to send a subset of service packets to the receiving end in sequence;
处理器102,还用于对已发送的具有相同时间片标识的业务报文进行计数;The processor 102 is further configured to count the service packets that have been sent with the same time slice identifier;
当当前业务报文子集发送完毕时,获取第一计数结果,在预设时长后向所述接收端发送测试报文,测试报文中携带有当前业务报文子集的时间片标识,第一计数结果为当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;When the current service packet subset is sent, the first counting result is obtained, and after the preset duration, the test packet is sent to the receiving end, and the test packet carries the time slice identifier of the current service packet subset. The result of the counting is the counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the transmitting end and the receiving end;
接收器104,用于接收所述接收端回复的响应报文,响应报文携带有第二计数结果,第二计数结果用于表示接收端收到测试报文时,接收端已接收到的具有相同时间片标识的业务报文数量,业务报文的时间片标识与测试报文携带的时间片标识相同;The receiver 104 is configured to receive a response packet that is sent by the receiving end, where the response packet carries a second counting result, where the second counting result is used to indicate that the receiving end receives the test packet, and the receiving end has received The number of service packets identified by the same time slice. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
处理器102,还用于根据第一计数结果和第二计数结果计算业务报文子集的丢包率。The processor 102 is further configured to calculate a packet loss rate of the service packet subset according to the first counting result and the second counting result.
本实施例提供的网络丢包的测量装置,与现有技术中存在测试报文和业务报文的乱序的情况相比,本实施例通过处理器将业务报文进行时间片的划分得到多个业务报文子集,并为业务报文子集分配不同的时间片标识,测试报文也携带有相应的时间片标识,发射器延迟测试报文的发送,延迟的时间大于业务报文子集的在发送端与接收端之间的传输时间,能够保证测试报文发送时,与之对应的业务报文均已到达接收端,进而能够避免接收端的测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下, 本实施例提供的网络丢包的装置能够准确计算得到丢包率。此外,现有技术中还存在一种能够避免报文传输的乱序进而准确计算丢包率的方案,该方案主要是通过串行处理的方式对报文进行处理,所谓串行处理,是与网络中存在多条传输路径,多条传输路径像多条流水线一样对传输的报文并行处理相对应的。具体而言,串行处理是指网络中只存在一条传输路径,所有报文均通过该传输路径由发送端达到接收端,那么报文必然依次到达接收端,不存在乱序的情况。然而实际网络中,报文的数量较多,采用此方案虽然能准确计算丢包率,但是对硬件的处理性能等要求较高,且消耗的资源较多,因而需要对现有硬件进行改造,进而实现成本较高。与该方案相比,本实施例通过处理器将业务报文进行时间片的划分,得到业务报文子集;发射器延迟与该业务报文子集对应的测试报文的发送,延迟的时间大于业务报文子集的传输时间,能够避免测试报文和业务报文的乱序,进而本实施例提供的网络丢包装置能够准确计算丢包率,无需通过改造现有硬件结构的方式实现,能够降低实现成本。Compared with the case where the test packet and the service packet are out of order in the prior art, the present embodiment uses the processor to divide the service packet into time slices. A subset of service packets, and different time slice identifiers are assigned to the service packet subsets. The test packets also carry corresponding time slice identifiers, and the transmitter delays the transmission of test packets, and the delay time is greater than the service packet. The transmission time between the sender and the receiver can ensure that the test packets are sent to the receiver when the test packet is sent, so that the test packets and service packets of the receiver are out of order. In the case that there is no out-of-order of test packets and service packets, The device for packet loss of the network provided in this embodiment can accurately calculate the packet loss rate. In addition, in the prior art, there is also a scheme capable of avoiding out-of-order transmission of message and accurately calculating a packet loss rate. The solution mainly processes a message by serial processing, so-called serial processing is There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines. Specifically, the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder. However, in actual networks, the number of packets is large. Although the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified. In turn, the cost is higher. Compared with the solution, in this embodiment, the service packet is divided into time segments by the processor to obtain a subset of the service packet; the transmitter delays the sending of the test packet corresponding to the subset of the service packet, and the delay time is If the transmission time of the service packet is greater than the transmission time of the service packet, the network packet loss device of the embodiment can accurately calculate the packet loss rate without modifying the existing hardware structure. Can reduce implementation costs.
进一步的,处理器102,还用于在业务报文的报文头中的预设字段添加已分配的时间片标识。Further, the processor 102 is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
进一步的,处理器102,还用于为业务报文封装协议报文头,该协议报文头为业务报文所在业务报文子集的时间片标识。Further, the processor 102 is further configured to encapsulate a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of the service packet subset in which the service packet is located.
进一步的,处理器102,还用于在业务报文子集中***至少一个乱序测试报文,乱序测试报文携带有业务报文子集的时间片标识,该乱序测试报文用于指示获取第三计数结果,该第三计数结果为发送乱序测试报文前,已发送的与乱序测试报文的时间片标识对应的计数结果。Further, the processor 102 is further configured to insert at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate Obtaining a third counting result, where the third counting result is a counting result corresponding to the time slice identifier of the out-of-order test packet sent before the out-of-sequence test packet is sent.
发射器103,还用于向接收端依次发送业务报文子集,每个业务报文子集中包括至少一个乱序测试报文。The transmitter 103 is further configured to sequentially send a subset of service packets to the receiving end, where each service packet subset includes at least one out-of-order test packet.
接收器104,还用于接收接收端反馈的乱序响应报文,乱序响应报文中携带有接收端在接收到乱序测试报文时的第四计数结果,该第四计数结果用于表示收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间 片标识的业务报文数量。The receiver 104 is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, where the fourth counting result is used. Indicates that the receiving end has received the same time as the out-of-order test packet when receiving the out-of-order test packet. Number of service packets identified by the slice.
处理器102,还用于根据第一计数结果、第二计数结果、第三计数结果和第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processor 102 is further configured to determine, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packets in the service packet subset are out of order.
发射器103发送的所有所述测试报文均通过相同的路径由发送端到达接收端;All the test packets sent by the transmitter 103 are sent by the transmitting end to the receiving end through the same path;
发射器103发送的所述测试报文为前向控制帧;The test message sent by the transmitter 103 is a forward control frame;
接收器104接收的所述响应报文为后向报告帧。The response message received by the receiver 104 is a backward report frame.
需要说明的是,本发明实施例所述的处理器102可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器102可以是中央处理器(Central Processing Unit,简称CPU),也可以是特定集成电路(Application Specific Integrated Circuit,简称ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signal processor,简称DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,简称FPGA)。It should be noted that the processor 102 in the embodiment of the present invention may be a processor or a collective name of multiple processing elements. For example, the processor 102 may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. An integrated circuit, such as one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
存储器101可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码等。且存储器101可以包括随机存储器(RAM),也可以包括非易失性存储器(non-volatile memory),例如磁盘存储器,闪存(Flash)等。The memory 101 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or the like. And the memory 101 may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
总线105可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图1中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 105 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 1, but it does not mean that there is only one bus or one type of bus.
本发明实施例还提供了一种网络丢包的测量装置,该装置应用于接收端,所述接收端位于一种数据传输***中,该***设置有发送端和所述接收端。如图2所示,该装置包括接收器201、存储器202、处理器203和发射器204,图2中还示出了总线205,该接收器201、存储器202、处理器203和发射器 204通过总线205连接并完成相互间的通信。其中:The embodiment of the invention further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end. As shown in FIG. 2, the apparatus includes a receiver 201, a memory 202, a processor 203, and a transmitter 204. Also shown in FIG. 2 is a bus 205, the receiver 201, the memory 202, the processor 203, and the transmitter. 204 are connected by bus 205 and complete communication with each other. among them:
接收器201,用于接收发送端发送的业务报文,所述业务报文携带有时间片标识;The receiver 201 is configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier;
存储器202,用于存储接收的业务报文;The storage 202 is configured to store the received service message.
处理器203,用于对已接收到的具有相同的时间片标识的业务报文进行计数;The processor 203 is configured to count the received service packets with the same time slice identifier.
接收器201,还用于接收发送端发送的测试报文,测试报文中携带有时间片标识;The receiver 201 is further configured to receive a test packet sent by the sending end, where the test packet carries a time slice identifier;
处理器203,还用于获取与时间片标识对应的第二计数结果,该第二计数结果用于表示接收端收到测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;The processor 203 is further configured to obtain a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate a service corresponding to the time slice identifier carried in the test packet when the receiving end receives the test packet The result of counting the message;
发射器204,用于向发送端发送响应报文,该响应报文中携带有获取的第二计数结果。The transmitter 204 is configured to send a response packet to the sending end, where the response packet carries the obtained second counting result.
本发明实施例提供的网络丢包的测量装置,与现有技术中存在测试报文和业务报文的乱序的情况相比,本实施例中的处理器仅对具有相同时间片标识的业务报文进行累积计数,且接收器接收的测试报文延迟于其所对应的业务报文的接收,能够避免测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,在接收器接收到测试报文时能够指示处理器提取正确的第二计数结果,进而方便发送端能够根据正确的第一计数结果和第二计数结果准确计算得到丢包率。The device for measuring the packet loss of the network provided by the embodiment of the present invention has the same service with the same time slice identifier as the processor in this embodiment, compared with the case where the test packet and the service packet are out of order in the prior art. The packet is accumulated and the test packet received by the receiver is delayed in the reception of the corresponding service packet. This prevents the out-of-order situation of the test packet and the service packet. The test packet and the service packet do not exist. Under the premise of out-of-order, when the receiver receives the test message, it can instruct the processor to extract the correct second counting result, thereby facilitating the sender to accurately calculate the packet loss according to the correct first counting result and the second counting result. rate.
进一步的,接收器201接收的业务报文的报文头中的预设字段添加有时间片标识。Further, the preset field in the packet header of the service packet received by the receiver 201 is added with a time slice identifier.
处理器203,还用于对已接收的具有相同的时间片标识的业务报文进行计数。The processor 203 is further configured to count the received service packets having the same time slice identifier.
进一步的,接收器201接收的业务报文封装有协议报文头,该协议报文头为业务报文的时间片标识;Further, the service packet received by the receiver 201 is encapsulated with a protocol packet header, where the protocol packet header is a time slice identifier of the service packet;
处理器203,还用于对已接收的具有相同的时间片标识的业务报文进行计 数。The processor 203 is further configured to calculate the received service packet with the same time slice identifier. number.
进一步的,接收器201,还用于接收发送端发送的乱序测试报文,该乱序测试报文携带有时间片标识。Further, the receiver 201 is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries a time slice identifier.
处理器203,还用于获取与时间片标识对应的第四计数结果,该第四计数结果用于表示收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间片标识的业务报文数量。The processor 203 is further configured to obtain a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that when the out-of-sequence test packet is received, the receiving end has received the same as the out-of-order test packet. Number of service packets identified by the time slice.
发射器204,还用于向发送端反馈乱序响应报文,该乱序响应报文携带有获取的第四计数结果。The transmitter 204 is further configured to feed back the out-of-order response message to the sending end, where the out-of-order response message carries the obtained fourth counting result.
进一步的,接收器201接收的所有测试报文均通过相同的路径由发送端到达接收端。Further, all the test packets received by the receiver 201 are sent from the transmitting end to the receiving end through the same path.
接收器201接收的测试报文为前向控制帧。The test message received by the receiver 201 is a forward control frame.
发射器204发送的响应报文为后向报告帧。The response message sent by the transmitter 204 is a backward report frame.
需要说明的是,本发明实施例所述的处理器203可以是一个处理器,也可以是多个处理元件的统称。例如,该处理器可以是中央处理器(Central Processing Unit,简称CPU),也可以是特定集成电路(Application Specific Integrated Circuit,简称ASIC),或者是被配置成实施本发明实施例的一个或多个集成电路,例如:一个或多个微处理器(digital signal processor,简称DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array,简称FPGA)。It should be noted that the processor 203 in the embodiment of the present invention may be a processor or a collective name of multiple processing elements. For example, the processor may be a central processing unit (CPU), or may be an application specific integrated circuit (ASIC), or one or more configured to implement the embodiments of the present invention. An integrated circuit, such as one or more digital signal processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs).
存储器202可以是一个存储装置,也可以是多个存储元件的统称,且用于存储可执行程序代码等。且存储器可以包括随机存储器(RAM),也可以包括非易失性存储器(non-volatile memory),例如磁盘存储器,闪存(Flash)等。The memory 202 may be a storage device or a collective name of a plurality of storage elements, and is used to store executable program code or the like. And the memory may include random access memory (RAM), and may also include non-volatile memory such as a magnetic disk memory, a flash memory, or the like.
总线205可以是工业标准体系结构(Industry Standard Architecture,ISA)总线、外部设备互连(Peripheral Component,PCI)总线或扩展工业标准体系结构(Extended Industry Standard Architecture,EISA)总线等。该总线可以分为地址总线、数据总线、控制总线等。为便于表示,图2中仅 用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The bus 205 may be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only in Figure 2 It is indicated by a thick line, but does not mean that there is only one bus or one type of bus.
本实施例还提供了一种网络丢包的测量装置,该装置应用于发送端,该发送端位于一种数据传输***中,该***设置有所述发送端和接收端,如图3所示,该装置包括:划分单元301,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个业务报文子集为业务报文集合的一部分,全部业务报文子集组成所述业务报文集合。The embodiment further provides a measuring device for network packet loss, the device is applied to a transmitting end, and the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end, as shown in FIG. The device includes: a dividing unit 301, configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service packet subsets, and each service packet subset is a service packet set. As part of the total service message subset, the service message set is formed.
分配单元302,用于为划分单元301划分得到的相邻的至少两个业务报文子集分配不同的时间片标识。The allocating unit 302 is configured to allocate different time slice identifiers to the adjacent subset of at least two service packets obtained by the dividing unit 301.
添加单元303,用于为划分单元301划分得到的每个业务报文子集中的业务报文添加分配单元302分配的时间片标识。The adding unit 303 is configured to add a time slice identifier allocated by the allocating unit 302 to the service packet in each service packet subset obtained by the dividing unit 301.
发送单元304,用于向接收端依次发送由所述添加单元303添加了时间片标识的业务报文子集,该业务报文子集由上述划分单元301划分得到。The sending unit 304 is configured to sequentially send, to the receiving end, a service packet subset that is added by the adding unit 303 with a time slice identifier, and the service packet subset is divided by the dividing unit 301.
计数单元305,用于对发送单元304已发送的具有相同时间片标识的业务报文进行计数。The counting unit 305 is configured to count the service packets that have been sent by the sending unit 304 and have the same time slice identifier.
获取单元306,用于在当前业务报文子集发送完毕时,从计数单元305中获取第一计数结果,该第一计数结果为当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于业务报文子集在发送端与接收端之间的传输时长。The obtaining unit 306 is configured to: when the current service packet subset is sent, obtain the first counting result from the counting unit 305, where the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset. The preset duration is greater than the transmission duration between the sender and the receiver of the service packet subset.
发送单元304,还用于在预设时长后向接收端发送测试报文,该测试报文中携带有当前业务报文子集的时间片标识。The sending unit 304 is further configured to send a test packet to the receiving end after the preset duration, where the test packet carries a time slice identifier of the current service packet subset.
接收单元307,用于接收所述接收端回复的响应报文,该响应报文携带有第二计数结果,该第二计数结果用于表示接收端收到测试报文时,接收端已接收到的具有相同时间片标识的业务报文数量,业务报文的时间片标识与测试报文携带的时间片标识相同。The receiving unit 307 is configured to receive a response packet that is sent by the receiving end, where the response packet carries a second counting result, where the second counting result is used to indicate that the receiving end receives the test packet, and the receiving end has received the The number of service packets with the same time slice identifier. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
处理单元308,用于根据获取单元306获取的第一计数结果和接收单元307接收的第二计数结果计算业务报文子集的丢包率。The processing unit 308 is configured to calculate a packet loss rate of the service packet subset according to the first counting result obtained by the obtaining unit 306 and the second counting result received by the receiving unit 307.
本实施例提供的网络丢包的测量装置,与现有技术中存在测试报文和业 务报文的乱序的情况相比,本实施例通过划分单元将业务报文进行时间片的划分得到多个业务报文子集,分配单元为业务报文子集分配不同的时间片标识,测试报文也携带有相应的时间片标识,发送单元延迟测试报文的发送,延迟的时间大于业务报文子集的在发送端与接收端之间的传输时间,能够保证测试报文发送时,与之对应的业务报文均已到达接收端,进而能够避免接收端的测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,本装置能够准确计算得到丢包率。此外,现有技术中还存在一种能够避免报文传输的乱序进而准确计算丢包率的方案,该方案主要是通过串行处理的方式对报文进行处理,所谓串行处理,是与网络中存在多条传输路径,多条传输路径像多条流水线一样对传输的报文并行处理相对应的。具体而言,串行处理是指网络中只存在一条传输路径,所有报文均通过该传输路径由发送端达到接收端,那么报文必然依次到达接收端,不存在乱序的情况。然而实际网络中,报文的数量较多,采用此方案虽然能准确计算丢包率,但是对硬件的处理性能等要求较高,且消耗的资源较多,因而需要对现有硬件进行改造,进而实现成本较高。与该方案相比,本装置通过划分单元将业务报文进行时间片的划分,得到业务报文子集,发送单元延迟与该业务报文子集对应的测试报文的发送,延迟的时间大于业务报文子集的传输时间,能够避免测试报文和业务报文的乱序,进而能够准确计算丢包率,本装置无需通过改造现有硬件结构的方式实现,能够降低实现成本。The measurement device for network packet loss provided by this embodiment, and the test message and industry exist in the prior art Compared with the case of the out-of-order of the message, the embodiment obtains a plurality of service message subsets by dividing the service packet into time slices, and the allocation unit allocates different time slice identifiers for the service message subset. The test packet carries the corresponding time slice identifier, and the sending unit delays the transmission of the test packet. The delay time is greater than the transmission time between the sender and the receiver of the service packet subset, which ensures that the test packet is sent. The service packets corresponding to the service packets have arrived at the receiving end, and the device can avoid the out-of-order situation of the test packets and the service packets. The device does not exist in the out-of-order of the test packets and service packets. The packet loss rate can be accurately calculated. In addition, in the prior art, there is also a scheme capable of avoiding out-of-order transmission of message and accurately calculating a packet loss rate. The solution mainly processes a message by serial processing, so-called serial processing is There are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines. Specifically, the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder. However, in actual networks, the number of packets is large. Although the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified. In turn, the cost is higher. Compared with the solution, the device divides the service packet into a time slice by the dividing unit to obtain a subset of the service packet, and the sending unit delays sending the test packet corresponding to the service packet subset, and the delay time is greater than The transmission time of the service packet subset can avoid the out-of-order of the test packet and the service packet, and can accurately calculate the packet loss rate. The device does not need to be implemented by modifying the existing hardware structure, thereby reducing the implementation cost.
进一步的,添加单元303,还用于在业务报文的报文头中的预设字段添加已分配的所述时间片标识。Further, the adding unit 303 is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
进一步的,添加单元303,还用于为业务报文添加协议报文头,该协议报文头为业务报文所在业务报文子集的时间片标识。Further, the adding unit 303 is further configured to add a protocol packet header to the service packet, where the protocol packet header is a time slice identifier of the service packet subset in which the service packet is located.
进一步的,如图4所示,该装置还包括:***单元401,用于在划分单元301得到的业务报文子集中***至少一个乱序测试报文,该乱序测试报文携带有业务报文子集的时间片标识,该乱序测试报文用于指示获取单元306从计数单元305中获取第三计数结果,第三计数结果为发送乱序测试报文前,已 发送的与乱序测试报文的时间片标识对应的计数结果。Further, as shown in FIG. 4, the apparatus further includes: an insertion unit 401, configured to insert at least one out-of-order test packet in the service packet subset obtained by the dividing unit 301, where the out-of-order test packet carries the service packet The time slice identifier of the subset, the out-of-order test message is used to instruct the obtaining unit 306 to obtain the third counting result from the counting unit 305, and the third counting result is before sending the out-of-order test packet. The count result sent corresponding to the time slice identifier of the out-of-order test packet.
发送单元304,还用于向接收端依次发送上述业务报文子集,每个业务报文子集中包括***单元401***的至少一个乱序测试报文。The sending unit 304 is further configured to sequentially send the foregoing service message subset to the receiving end, where each service message subset includes at least one out-of-order test packet inserted by the inserting unit 401.
接收单元307,还用于接收端反馈的乱序响应报文,该乱序响应报文中携带有接收端在接收到乱序测试报文时的第四计数结果,该第四计数结果用于表示收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间片标识的业务报文数量。The receiving unit 307 is further configured to receive, by the receiving end, an out-of-order response message, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, where the fourth counting result is used. Indicates the number of service packets received by the receiving end that have the same time slice identifier as the out-of-sequence test packet when the out-of-order test packet is received.
处理单元308,还用于根据获取单元306获取的所述第一计数结果、第三计数结果和接收单元307接收的第二计数结果、第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processing unit 308 is further configured to determine, according to the first counting result, the third counting result, and the second counting result and the fourth counting result received by the receiving unit 307, whether the service packet in the service packet subset is There is a disorder.
进一步的,further,
发送单元304发送的所有测试报文均通过相同的路径由发送端到达接收端。All test packets sent by the sending unit 304 pass through the same path from the transmitting end to the receiving end.
发送单元304发送的测试报文为前向控制帧。The test message sent by the sending unit 304 is a forward control frame.
接收单元307接收的响应报文为后向报告帧。The response message received by the receiving unit 307 is a backward report frame.
本实施例还提供了一种网络丢包的测量装置,该装置应用于接收端,该接收端位于一种数据传输***中,该***设置有发送端和所述接收端,如图5所示,该装置包括:The embodiment further provides a measuring device for network packet loss, the device is applied to a receiving end, and the receiving end is located in a data transmission system, and the system is provided with a transmitting end and the receiving end, as shown in FIG. , the device includes:
接收单元501,用于接收发送端发送的业务报文,该业务报文携带有时间片标识。The receiving unit 501 is configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier.
计数单元502,用于对接收单元501已接收到的具有相同的时间片标识的业务报文进行计数.The counting unit 502 is configured to count the service packets that have been received by the receiving unit 501 and have the same time slice identifier.
接收单元501,还用于接收发送端发送的测试报文,该测试报文中携带有时间片标识。The receiving unit 501 is further configured to receive a test packet sent by the sending end, where the test packet carries a time slice identifier.
获取单元503,用于根据接收单元501接收的测试报文,从计数单元502中获取与测试报文的时间片标识对应的第二计数结果,该第二计数结果用于表示接收端收到测试报文时,与所述测试报文携带的时间片标识对应的业务 报文的计数结果。The obtaining unit 503 is configured to obtain, according to the test packet received by the receiving unit 501, a second counting result corresponding to the time slice identifier of the test packet, and the second counting result is used to indicate that the receiving end receives the test. The service corresponding to the time slice identifier carried in the test packet when the packet is received The result of counting the message.
发送单元504,用于向发送端发送响应报文,该响应报文中携带有获取单元503获取的第二计数结果。The sending unit 504 is configured to send a response packet to the sending end, where the response packet carries the second counting result obtained by the obtaining unit 503.
进一步的,接收单元501接收的业务报文的报文头中的预设字段添加有时间片标识;Further, the preset field in the packet header of the service packet received by the receiving unit 501 is added with a time slice identifier;
计数单元502,还用于对接收单元501接收的具有相同的时间片标识的业务报文进行计数。The counting unit 502 is further configured to count the service packets received by the receiving unit 501 with the same time slice identifier.
进一步的,接收单元501接收的业务报文封装有协议报文头,该协议报文头为所述业务报文的时间片标识。Further, the service packet received by the receiving unit 501 is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet.
计数单元502,还用于对接收单元501接收的具有相同的时间片标识的业务报文进行计数。The counting unit 502 is further configured to count the service packets received by the receiving unit 501 with the same time slice identifier.
进一步的,接收单元501,还用于接收发送端发送的乱序测试报文,该乱序测试报文携带有所述时间片标识。Further, the receiving unit 501 is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier.
获取单元503,还用于从计数单元502中获取与时间片标识对应的第四计数结果,该第四计数结果用于表示收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间片标识的业务报文数量。The obtaining unit 503 is further configured to obtain, from the counting unit 502, a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received and out of order when the out of order test message is received. The test packet has the number of service packets identified by the same time slice.
发送单元504,还用于向发送端反馈乱序响应报文,该乱序响应报文携带有获取单元503获取的第四计数结果。The sending unit 504 is further configured to: feed the out-of-order response message to the sending end, where the out-of-order response message carries the fourth counting result obtained by the obtaining unit 503.
进一步的,该接收单元501接收的所有测试报文均通过相同的路径由所述发送端到达所述接收端。Further, all test packets received by the receiving unit 501 are sent by the transmitting end to the receiving end through the same path.
该接收单元501接收的测试报文为前向控制帧。The test message received by the receiving unit 501 is a forward control frame.
发送单元504发送的所述响应报文为后向报告帧。The response message sent by the sending unit 504 is a backward report frame.
本发明实施例提供的网络丢包的测量装置,该装置应用于接收端,与现有技术中存在测试报文和业务报文的乱序的情况相比,本发明接收端的计数器仅对具有相同时间片标识的业务报文进行累积计数,且接收单元接收的测试报文延迟于其所对应的业务报文的接收,能够避免测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,在接收到测试报 文时获取单元能够从计数单元获取正确的第二计数结果,进而方便发送端能够根据正确的第一计数结果和第二计数结果准确计算得到丢包率。The device for measuring network packet loss provided by the embodiment of the present invention is applied to the receiving end. Compared with the case where the test packet and the service packet are out of order in the prior art, the counter of the receiving end of the present invention has only the same pair. The service packets identified by the time slice are cumulatively counted, and the test packets received by the receiving unit are delayed in the reception of the corresponding service packets, which can avoid the out-of-order situation of the test packets and the service packets. Under the premise of the disorder of the text and the service message, the test report is received. The text acquisition unit can obtain the correct second counting result from the counting unit, thereby facilitating the transmitting end to accurately calculate the packet loss rate according to the correct first counting result and the second counting result.
为了准确计算丢包率,本实施例提供了一种网络丢包的测量方法,该方法应用于一种数据传输***,该***设置有发送端和接收端,如图6所示,该方法包括:In order to accurately calculate the packet loss rate, the embodiment provides a method for measuring network packet loss. The method is applied to a data transmission system. The system is provided with a transmitting end and a receiving end. As shown in FIG. 6, the method includes :
S601:发送端根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个业务报文子集为业务报文集合的一部分,全部业务报文子集组成所述业务报文集合。S601: The sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subset constitutes the set of service messages.
一般而言,在网络中进行传输的业务报文,数量较多,几乎每时每刻都有业务报文的传输。若想计算一个较长时间段内的业务报文的丢包率,本发明认为较为可取的方法是将该较长时间段分成多个小的时间段。这样,通过分时间段统计,既可以得到每一时间段的丢包数和丢包率,将丢包情况具体定位在某一时间段;也可以通过对不同时间段的丢包数进行相应的运算得到总的丢包数以及总的丢包率。依据上述思想,在进行丢包率的计算时,本实施例中,发送端首先根据预设时间片长度在时序上对业务报文进行时间片的划分,每一个时间片内包含的业务报文组成业务报文子集,再分别对划分后得到的每一个业务报文子集内的业务报文进行丢包数的计算。其中,业务报文子集的个数不少于两个,所有的业务报文子集组成上述业务报文集合。为了实现分别对划分后的每一个业务报文子集内的业务报文进行丢包数的统计,每一个业务报文子集都对应有测试报文。而预设时间片长度越长,则时间片的个数越少,业务报文子集的个数越少,相应的所需测试报文的个数越少,开销越小,测试报文所占的带宽越少,但丢包数的定位不够准确。因而预设时间片的长度的选取可根据实际需要而定。可选的,该预设时间片长度为20ms。In general, the number of service packets transmitted in the network is large, and service packets are transmitted almost every moment. If it is desired to calculate the packet loss rate of a service packet in a long period of time, the present invention considers that it is preferable to divide the longer period into a plurality of small periods. In this way, by dividing the time period statistics, the number of lost packets and the packet loss rate in each time period can be obtained, and the packet loss situation is specifically located in a certain time period; or the number of packet loss in different time segments can be correspondingly The operation results in the total number of lost packets and the total packet loss rate. According to the above idea, in the calculation of the packet loss rate, in this embodiment, the transmitting end first performs time slice division of the service packet according to the preset time slice length, and the service packet included in each time slice. A subset of the service packets is formed, and the number of lost packets is calculated for each service packet in the subset of the service packets obtained after the division. The number of service packet subsets is not less than two, and all service packet subsets form the foregoing service packet set. In order to implement statistics on the number of packet loss of the service packets in each of the divided service packets, each service packet subset corresponds to a test packet. The longer the preset time slice is, the smaller the number of time slices is, and the smaller the number of service packets is, the smaller the number of corresponding test packets is, and the smaller the overhead is. The smaller the bandwidth, but the number of lost packets is not accurate enough. Therefore, the length of the preset time slice can be selected according to actual needs. Optionally, the preset time slice is 20 ms in length.
S602:发送端为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识。S602: The sender allocates different time slice identifiers for the at least two adjacent service packet subsets, and adds the allocated time slice identifier to the service packets in each service packet subset.
本实施例中,发送端通过时间片标识对业务报文子集进行区分,更具体的说,同一业务报文子集内的业务报文的时间片标识相同,不同业务报文子 集内的业务报文的时间片标识不同。该时间片标识既可以为报文的封装格式,也可以为报文的报文头中的某些标识位;相应的本方法既可以在二层网络中实现;也可以在三层网络中实现。In this embodiment, the sender distinguishes the service packet subset by using the time slice identifier. More specifically, the time slice identifier of the service packet in the same service packet subset is the same, and different service packets are used. The time slice identifier of the service packets in the set is different. The time slice identifier may be a packet encapsulation format or a certain identifier bit in the packet header of the packet; the corresponding method may be implemented in a Layer 2 network or in a Layer 3 network. .
此外,在分配时间片标识时,在合理选取预设时间片长度以及合理设置测试报文的发送时间的前提下,只需为相邻的两个业务报文子集分配不同的时间片标识,无需保证所有的业务报文子集的时间片标识均互不相同。例如:时间片标识包括a和b两种时间片标识时,可以为业务报文子集1分配时间片标识a、业务报文子集2分配时间片标识b、业务报文子集3分配时间片标识a、业务报文子集4分配时间片标识b,依次循环。再如,时间片标识包括时间片标识a、b和c三种时间片标识时,可以为业务报文子集1分配时间片标识a、业务报文子集2分配时间片标识b,业务报文子集3分配时间片标识c或a,以此类推。本实施例中分配时间片标识时,只需保证相邻的业务报文子集的时间片标识不同即可,具有相同的时间片标识的业务报文可以累积,进行当前业务报文子集的业务报文数量计算时只需将当前累积结果与前一累计结果相减便可得到当前业务报文子集的业务报文的计数结果。In addition, when the time slice identifier is allocated, under the premise that the preset time slice length is reasonably selected and the test packet transmission time is reasonably set, only the adjacent two service packet subsets need to be assigned different time slice identifiers. There is no need to ensure that the time slice identifiers of all service packet subsets are different from each other. For example, when the time slice identifier includes two time slice identifiers a and b, the time slice identifier a may be allocated for the service packet subset 1, the time slice identifier b is allocated for the service packet subset 2, and the service packet subset 3 is allocated time. The slice identifier a, the service packet subset 4 allocates the time slice identifier b, and sequentially cycles. For example, when the time slice identifier includes the time slice identifiers a, b, and c, the time slice identifier a, the service packet subset 2, the time slice identifier b, and the service report may be allocated to the service packet subset 1 Text subset 3 assigns a time slice identifier c or a, and so on. In this embodiment, when the time slice identifier is allocated, it is only necessary to ensure that the time slice identifiers of the adjacent service packet subsets are different, and the service packets with the same time slice identifier can be accumulated, and the current service packet subset is performed. When the number of service packets is calculated, the current cumulative result is subtracted from the previous accumulated result to obtain the result of counting the service packets of the current service packet subset.
S603:发送端向接收端依次发送上述业务报文子集。S603: The transmitting end sequentially sends the foregoing service message subset to the receiving end.
在为每个业务报文添加了时间片标识后,发送端向接收端依次发送添加了时间片标识的业务报文。After the time slice identifier is added to each service packet, the sending end sends the service packet with the time slice identifier added to the receiving end.
S604:发送端对已发送的具有相同时间片标识的业务报文进行计数。S604: The sender counts the service packets that have been sent with the same time slice identifier.
发送端设有计数器,每发送一个业务报文进行一次计数,对具有相同时间片标识的业务报文进行累积计数。The sending end is provided with a counter, and each service packet is sent for counting, and the service packets with the same time slice identifier are cumulatively counted.
S605:若当前业务报文子集发送完毕,则发送端获取第一计数结果,并在预设时长后向接收端发送测试报文,该测试报文中携带有当前业务报文子集的时间片标识,该第一计数结果为当前业务报文子集的时间片标识对应的计数结果,预设时长大于当前业务报文子集在所述发送端与所述接收端之间的传输时长。S605: If the current service packet subset is sent, the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset. The slice identifier, the first count result is a count result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the current service packet subset between the sender and the receiver.
在当前业务报文子集发送完毕后,发送端需要本地保存第一计数结果, 或者将该第一计数结果携带在测试报文中,该第一计数结果为对所有与当前业务报文子集具有相同时间片标识的业务报文的计数结果,因而第一计数结果可能为某一业务报文子集的业务报文的计数结果,也可能为某几个具有相同时间片标识的业务报文子集的累积计数结果。After the current service packet subset is sent, the sender needs to save the first count result locally. Or the first counting result is carried in the test packet, and the first counting result is a counting result of all service packets having the same time slice identifier as the current service packet subset, and thus the first counting result may be some The result of counting the service packets of a subset of service packets may also be the cumulative count result of a subset of service packets having the same time slice identifier.
每一个业务报文子集都对应有一个测试报文,测试报文中携带有当前业务报文子集的时间片标识,以用于接收端在接收到测试报文后,根据测试报文的时间片标识提取与该时间片标识对应的业务报文的计数结果。测试报文的时间片标识和与其对应的业务报文子集的时间片标识可以完全相同,也可以不相同,只要测试报文的标识与业务报文子集的标识存在对应关系,接收端可根据该对应关系识别出测试报文对应的业务报文即可。Each of the service packet subsets has a test packet, and the test packet carries a time slice identifier of the current service packet subset, and is used by the receiving end according to the test packet after receiving the test packet. The time slice identifier extracts a counting result of the service packet corresponding to the time slice identifier. The time slice identifier of the test packet and the time slice identifier of the corresponding service packet subset may be identical or different. As long as the identifier of the test packet is associated with the identifier of the service packet subset, the receiving end may The service packet corresponding to the test packet is identified according to the corresponding relationship.
测试报文延迟于业务报文子集的发送,该延迟的时间为预设时长,预设时长大于当前业务报文子集在发送端与接收端之间的传输时长,也即设定预设时长的目的是保证发送端发送测试报文时,已发送的与该测试报文相对应的业务报文无论采用哪条路径均已到达接收端。因而,预设时长的设定与传输网络的复杂程度、是否多径、发送端与接收端的距离等因素有关。网络越复杂,多径情况越多,发送端与接收端的距离越远,则相应的应将预设时长设定的较长。The test packet is delayed in the transmission of the service packet subset. The delay time is a preset duration, and the preset duration is greater than the transmission duration between the sender and the receiver of the current service packet subset, that is, the preset is set. The purpose of the duration is to ensure that the service packet corresponding to the test packet that has been sent by the sender sends the test packet to the receiver. Therefore, the setting of the preset duration is related to the complexity of the transmission network, whether it is multipath, the distance between the transmitting end and the receiving end, and the like. The more complex the network, the more multipath conditions, the farther the distance between the transmitting end and the receiving end, the corresponding preset time should be set longer.
现有技术中,在发送端通过在业务报文之间***测试报文对业务报文进行时间片的划分,仅仅从业务报文本身来看,无法区分业务报文来自同一时间片或不同时间片;在发送测试报文时,提取该测试报文之前的已发送的所有业务报文的累计结果。在接收端,以测试报文的到达时间为基准提取所有已接收的业务报文的计数结果,并不能保证提取的计数结果为正确的计数结果。In the prior art, the service packet is time-divided by inserting a test packet between the service packets, and the service packet cannot be distinguished from the same time slice or different time. When the test packet is sent, the accumulated result of all the service packets sent before the test packet is extracted. At the receiving end, the counting result of all received service packets is extracted based on the arrival time of the test packet, and the extracted counting result is not guaranteed to be the correct counting result.
与现有技术不同的是,本实施例增加了对相邻的至少两个时间片(时间片对应于业务报文子集)的业务报文分别进行标识,从而使得时间片的划分不依赖于发送测试报文的时间节点,保证接收端能够根据时间片标识识别业务报文来自于不同的时间片。进而可以合理设置测试报文的发送时间,准确 计算丢包率。Different from the prior art, this embodiment adds that the service packets of the adjacent at least two time slices (the time slice corresponds to the service message subset) are separately identified, so that the time slice is not dependent on the time slice. The time node of the test packet is sent to ensure that the receiving end can identify that the service packet is from a different time slice according to the time slice identifier. In turn, the test packet transmission time can be set reasonably and accurately. Calculate the packet loss rate.
为了更清楚的对本实施例提供的网络丢包的方法进行描述,示例性的,本实施例提供了一种对业务报文进行时间片划分的方法,如图7所示。其中,横坐标轴为时间轴,将时间按照60ms划分为多个时间片,每个时间片对应于一个业务报文子集,如图中的0-60ms的时间片对应于业务报文子集71,60ms-120ms的时间片对应于业务报文子集72,每个业务报文子集中包括多个业务报文711,周期性***的测试报文延迟与其对应的业务报文子集的发送,如图中与业务报文子集71对应的测试报文712于110ms时刻发送,延迟的时间为50ms,业务报文子集与测试报文通过具有相同的时间片标识进行对应。For a more detailed description of the method for network packet loss provided by the embodiment, the exemplary embodiment provides a method for time slice division of service packets, as shown in FIG. 7 . The abscissa axis is a time axis, and the time is divided into multiple time slices according to 60 ms, and each time slice corresponds to a subset of service packets, and the time slice of 0-60 ms in the figure corresponds to a subset of service packets. 71, 60ms-120ms time slice corresponds to the service message subset 72, each service message subset includes a plurality of service messages 711, and the periodically inserted test message delays the transmission of the corresponding service message subset. The test packet 712 corresponding to the service packet subset 71 is sent at 110 ms, and the delay time is 50 ms. The service packet subset and the test packet correspond to each other by the same time slice identifier.
S606:发送端接收所述接收端回复的响应报文,响应报文携带有第二计数结果,第二计数结果用于表示接收端收到测试报文时,接收端已接收到的具有相同时间片标识的业务报文数量,业务报文的时间片标识与测试报文携带的时间片标识相同。S606: The sending end receives the response message sent by the receiving end, and the response message carries the second counting result, where the second counting result is used to indicate that the receiving end has received the same time when receiving the test message. The number of service packets identified by the slice. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
接收端设置有计数器,每接收一个业务报文进行一次计数,对具有相同时间片标识的业务报文进行累积计数。The receiving end is provided with a counter, and each time a service packet is received, the service packet is counted once, and the service packets with the same time slice identifier are cumulatively counted.
接收端在收到发送端的测试报文时,根据测试报文中携带的时间片标识,获取第二计数结果,并通过发送响应报文将该第二计数结果返回至发送端;具体地说,该第二计数结果表示,接收端已接收的具有相同时间片标识的业务报文的数量,且业务报文的时间片标识与测试报文携带的时间片标识相同。When receiving the test packet from the sending end, the receiving end obtains the second counting result according to the time slice identifier carried in the test packet, and returns the second counting result to the sending end by sending the response packet; specifically, The second count result indicates the number of service packets that have been received by the receiving end and have the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
此外,可选的,若发送端发送的测试报文中携带有第一计数结果,则接收端向发送端返回的响应报文中也携带有第一计数结果。In addition, optionally, if the test packet sent by the sending end carries the first counting result, the response packet returned by the receiving end to the sending end also carries the first counting result.
S607:发送端根据第一计数结果和第二计数结果计算业务报文子集的丢包率。S607: The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
对某一业务报文子集内的丢包率的计算为:丢失的业务报文的数量/发送端发送的业务报文的数量。其中,丢失的业务报文的数量一般用发送端发送的业务报文的数量与接收端接收的业务报文的数量的差值来表示。本方法 中,第一计数结果对应于发送端发送的业务报文的数量;第二计数结果对应于接收端接收的业务报文的数量;则二者的差值则表示丢包数,根据丢包数以及第一计数结果进一步计算得到丢包率。The calculation of the packet loss rate in a subset of service packets is: the number of lost service packets/the number of service packets sent by the sender. The number of lost service packets is generally represented by the difference between the number of service packets sent by the sender and the number of service packets received by the receiver. The method The first counting result corresponds to the number of service packets sent by the sending end; the second counting result corresponds to the number of service packets received by the receiving end; the difference between the two indicates the number of lost packets, according to the number of lost packets. And the first counting result is further calculated to obtain a packet loss rate.
由于发送端是发起数据传输的一方,接收端相对于发送端来说是被动的一方,发送端可以根据得到的丢包率调整数据传输的速率或者调整数据传输的路径等,丢包率对发送端具有较大的意义,因而丢包率一般由发送端进行计算以便于后续的调整处理。Since the transmitting end is the party that initiates the data transmission, the receiving end is a passive side with respect to the transmitting end, and the transmitting end can adjust the data transmission rate or adjust the data transmission path according to the obtained packet loss rate, and the packet loss rate is sent. The end has a greater meaning, so the packet loss rate is generally calculated by the transmitting end for subsequent adjustment processing.
此外,该丢包率的计算也可以在接收端进行。发送端发送的测试报文中携带有发送端的当前的第一计数结果,接收端在提取了第二计数结果后,根据第一计数结果和第二计数结果进行丢包率的计算,然后将计算得到的丢包率携带在响应报文中返回至发送端。In addition, the calculation of the packet loss rate can also be performed at the receiving end. The test packet sent by the sending end carries the current first counting result of the sending end, and after receiving the second counting result, the receiving end performs the calculation of the packet loss rate according to the first counting result and the second counting result, and then calculates The obtained packet loss rate is carried in the response packet and returned to the sender.
在现有的网络传输中,除了背景技术中提到的网络中存在多条传输路径的场景外;在报文处理中,还存在另外一种乱序场景,即现在CPU进行业务处理时,基本上都是多核(core)并行处理,即使在传输没有乱序的情况下,由于CPU内部多个核进行业务处理时,各个核的处理速度不一致,也会导致FM帧和业务报文之间的乱序,导致BR帧提取的业务报文计数结果并不准确,进而导致丢包率的计算不准确。In the existing network transmission, in addition to the scenario in which multiple transmission paths exist in the network mentioned in the background art, there is another out-of-order scenario in the packet processing, that is, when the CPU performs service processing, the basic All of them are multi-core (core) parallel processing. Even if the transmission is not out of order, the processing speed of each core is inconsistent due to the inconsistency of the processing of the cores. In an out-of-order manner, the result of counting the service packets extracted by the BR frame is inaccurate, which leads to inaccurate calculation of the packet loss rate.
本发明提供的网络丢包的测量装置及方法,与现有技术中存在测试报文和业务报文的乱序的情况相比,本发明通过将业务报文进行时间片的划分得到多个业务报文子集,并为业务报文子集分配不同的时间片标识,测试报文也携带有相应的时间片标识,延迟测试报文的发送,延迟的时间大于业务报文子集的在发送端与接收端之间的传输时间,能够保证测试报文发送时,与之对应的业务报文均已到达接收端,进而能够避免接收端的测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,本发明能够准确计算得到丢包率。因而本方法能够应用于多径传输以及CPU多核处理等多种应用场景。此外,现有技术中还存在一种能够避免报文传输的乱序进而准确计算丢包率的方案,该方案主要是通过串行处理的方式对报文进行处 理,所谓串行处理,是与网络中存在多条传输路径,多条传输路径像多条流水线一样对传输的报文并行处理相对应的。具体而言,串行处理是指网络中只存在一条传输路径,所有报文均通过该传输路径由发送端达到接收端,那么报文必然依次到达接收端,不存在乱序的情况。然而实际网络中,报文的数量较多,采用此方案虽然能准确计算丢包率,但是对硬件的处理性能等要求较高,且消耗的资源较多,因而需要对现有硬件进行改造,进而实现成本较高。与该方案相比,本方案通过将业务报文进行时间片的划分,得到业务报文子集,并延迟与该业务报文子集对应的测试报文的发送,延迟的时间大于业务报文子集的传输时间,能够避免测试报文和业务报文的乱序,进而能够准确计算丢包率,本方案无需通过改造现有硬件结构的方式实现,能够降低实现成本。The present invention provides a plurality of services by dividing a service packet into a time slice, compared with a case where a test packet and a service packet are out of order in the prior art. The packet subset is assigned a different time slice identifier for the service packet subset. The test packet also carries the corresponding time slice identifier, and the delay test packet is sent. The delay time is greater than the service packet subset. The transmission time between the terminal and the receiving end can ensure that the test packet is sent to the receiving end when the test packet is sent, so that the test packet and the service packet are out of order at the receiving end. The present invention can accurately calculate the packet loss rate on the premise that there is a disorder of the test packet and the service packet. Therefore, the method can be applied to various application scenarios such as multipath transmission and CPU multi-core processing. In addition, in the prior art, there is also a solution that can avoid the out-of-order of message transmission and accurately calculate the packet loss rate. The solution mainly performs the message processing by serial processing. The so-called serial processing is that there are multiple transmission paths in the network, and multiple transmission paths correspond to the parallel processing of transmitted messages like multiple pipelines. Specifically, the serial processing means that only one transmission path exists in the network, and all the packets pass through the transmission path from the transmitting end to the receiving end, and then the message must arrive at the receiving end in turn, and there is no disorder. However, in actual networks, the number of packets is large. Although the scheme can accurately calculate the packet loss rate, the processing performance of the hardware is relatively high, and the resources consumed are large. Therefore, the existing hardware needs to be modified. In turn, the cost is higher. Compared with the solution, the solution obtains the service packet by dividing the service packet into a time slice, and delays the sending of the test packet corresponding to the service packet subset. The delay time is greater than the service packet. The transmission time of the subset can avoid the out-of-order of test packets and service packets, and thus can accurately calculate the packet loss rate. This solution does not need to be implemented by modifying the existing hardware structure, which can reduce the implementation cost.
进一步的,作为图6所示方法的细化,本实施例还提供了一种网络丢包的测量方法,该方法应用于三层网络,如图8所示,该方法包括:Further, as a refinement of the method shown in FIG. 6, the embodiment further provides a method for measuring network packet loss, which is applied to a three-layer network, as shown in FIG. 8, the method includes:
S801:发送端根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个业务报文子集为业务报文集合的一部分,全部业务报文子集组成业务报文集合。S801: The sending end divides the service packet set in time according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subsets form a collection of business messages.
S802:发送端为相邻的至少两个业务报文子集分配不同的时间片标识,在业务报文的报文头中的预设字段添加已分配的该时间片标识。S802: The sender allocates different time slice identifiers for the at least two adjacent service packet subsets, and adds the allocated time slice identifier to the preset field in the packet header of the service packet.
在该实现方式中,时间片标识为业务报文的报文头中的某些标识位;接收端可在三层网络中实现对已接收的业务报文的识别。In this implementation manner, the time slice is identified as some identifier bits in the packet header of the service packet; the receiving end can implement the identification of the received service packet in the Layer 3 network.
表一Table I
Figure PCTCN2014087981-appb-000001
Figure PCTCN2014087981-appb-000001
Figure PCTCN2014087981-appb-000002
Figure PCTCN2014087981-appb-000002
如表一所示,在网络层传输的IP报文的报文头包括4位(bit)的版本(Version)号、4bits的报头长度(Internet Header Length,简称IHL)、8bits的服务类型(Type of Service)、16bits的总长度(Total Length)、16bits的标识(Identification)、3bits的标志(Flags)、13bits的片偏移(Fragmentation Offset)、8bits的生存时间(Time To Live,简称TTL)、8bits的协议(Protocol)、16bits的首部校验和(Header Checksum)、32bits的源地址(Source Address)、32bits的目的地址(Destination Address)、16bits的可选项(Options)、16bits的填充(Padding)等字段。除去报文头外,图中的数据(Data)用于表示报文携带的以二进制表示的有用信息。As shown in Table 1, the packet header of the IP packet transmitted at the network layer includes a 4-bit version (Version) number, a 4-bit header length (Internet Header Length, IHL), and an 8-bit service type (Type). Of Service), Total Length of 16bits, Identification of 16bits, Flags of 3bits, Fragmentation Offset of 13bits, Time To Live (TTL) of 8bits, Protocol for 8bits, Header Checksum for 16bits, Source Address for 32bits, Destination Address for 32bits, Options for 16bits, Padding for 16bits And other fields. In addition to the message header, the data in the figure is used to represent the useful information in binary representation carried in the message.
其中,当数据信息较大而进行分片传输时,标识(Identification)字段用于标记当前数据包为第几个分片。Wherein, when the data information is large and the fragment transmission is performed, an identification field is used to mark the current data packet as the first fragment.
在每经过1ms或者一个网关时,生存时间(TTL)的值自动减1,直至减为0时,表示网络不可达。或者,数据包在传输过程中会按照计算出来的路由路径经过一定的网络节点后由发送端到达接收端,每经过一个路由节点,生存时间(TTL)的值自动减1。一般而言,网络中的路由节点数最大为20左右。The lifetime time (TTL) value is automatically decremented by 1 every 1 ms or a gateway, until it is reduced to 0, indicating that the network is unreachable. Alternatively, during the transmission process, the data packet will pass through a certain network node according to the calculated routing path, and then the transmitting end arrives at the receiving end. The value of the time to live (TTL) is automatically decremented by one after each routing node. In general, the number of routing nodes in the network is up to about 20.
报文头中各个字段的具体含义及作用可参考现有技术,本实施例不再赘述。The specific meanings and functions of the fields in the packet header can be referred to the prior art, and are not described in this embodiment.
本实施例中,该预设字段可以为报文头中的Identification字段或者存活时间TTL字段。具体的,以Identification字段为例,可以通过将Identification字段的最高位交替设置为0或1来区分不同的时间片,如图 9所示,时间片1中的所有业务报文的Identification字段的最高位为0,则时间片2中的所有业务报文的Identification字段的最高位为1,时间片3中的所有业务报文的Identification字段的最高位为0,时间片4中的所有业务报文的Identification字段的最高位为1,依次循环。其中,Identification字段的最高位即为每个业务报文的时间片标识,同一业务报文子集内的业务报文的时间片标识相同。进一步的,如图10所示,还可以通过Identification字段的最高两位分别设置为00、01、10、11来区分相邻的四个业务报文子集,Identification字段的最高两位即为时间片标识。同理,TTL的设置可采用与Identification字段的设置相同的方法。In this embodiment, the preset field may be an Identification field or a time-to-live TTL field in the packet header. Specifically, taking the Identification field as an example, you can distinguish different time slices by setting the highest bit of the Identification field alternately to 0 or 1. As shown in Figure 9, the highest bit of the Identification field of all service packets in time slice 1 is 0, and the highest bit of the Identification field of all service packets in time slice 2 is 1, and all service packets in time slice 3 The highest bit of the Identification field is 0, and the highest bit of the Identification field of all service messages in time slice 4 is 1, and the loop is repeated. The highest bit of the identification field is the time slice identifier of each service packet, and the time slice identifier of the service packet in the same service packet subset is the same. Further, as shown in FIG. 10, the highest two digits of the Identification field may be respectively set to 00, 01, 10, and 11 to distinguish the adjacent four service packet subsets, and the highest two digits of the Identification field are time. Slice identification. Similarly, the TTL setting can be the same as the setting of the Identification field.
本方法的上述Identification字段或者存活时间TTL字段的设置,不会影响报文的正常传输。具体的说,当Identification字段的最高位发生改变时,仍然可以用于表示分片的个数。当TTL的最高位设置为0时,TTL的取值范围为0-127,即最多允许报文由发送端经过128个网络节点达到接收端,因而仍能满足现有网络的节点最多时的要求;当TTL的最高位设置为1时,TTL的取值范围为128-255,即最多允许报文由发送端经过128个网络节点达到接收端,也仍能满足现有网络的要求。The above identification field or the TTL time field setting of the method does not affect the normal transmission of the message. Specifically, when the highest bit of the Identification field changes, it can still be used to indicate the number of fragments. When the highest bit of the TTL is set to 0, the TTL value ranges from 0 to 127, that is, the maximum number of packets allowed by the sender to reach the receiver through 128 network nodes, so that the maximum number of nodes in the existing network can still be met. When the highest bit of the TTL is set to 1, the TTL value ranges from 128 to 255. That is, the maximum number of packets allowed by the sender to reach the receiver through 128 network nodes can still meet the requirements of the existing network.
当然,该预设字段还可以为报文头中不影响报文正常传输的其他字段,其对应的时间片的标识方法也可根据上文推导得到,本实施例不再赘述。Certainly, the preset field may also be another field in the packet header that does not affect the normal transmission of the packet, and the method for identifying the corresponding time slice may also be derived according to the foregoing, and is not repeatedly described in this embodiment.
S803:发送端向接收端依次发送上述业务报文子集。S803: The sending end sequentially sends the foregoing service message subset to the receiving end.
S804:发送端对已发送的具有相同时间片标识的业务报文进行计数。S804: The sender counts the service packets that have been sent with the same time slice identifier.
S805:若当前业务报文子集发送完毕,则发送端获取第一计数结果,并在预设时长后向接收端发送测试报文,该测试报文中携带有当前业务报文子集的时间片标识,该第一计数结果为当前业务报文子集的时间片标识对应的计数结果,预设时长大于业务报文子集在发送端与接收端之间的传输时长。S805: If the current service packet subset is sent, the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset. The slice identifier, the first count result is a count result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the sender end and the receiver end.
本方法中,测试报文与业务报文均具备表一所示的报文头,与用于传输数据的业务报文不同的是,测试报文并不携带有用数据信息;且测试报文与业务报文所用的端口号并不相同。接收端可根据报文头中的端口号信息识别 接收的报文为测试报文还是业务报文,如业务报文采用的端口号为协议中明确规定的特定端口号,如80端口、21端口等,而测试报文采用的端口号为65020,测试报文采用的端口号也可设定为与协议中明确规定的端口号不冲突的其他端口号。In this method, both the test packet and the service packet have the packet header shown in Table 1. Unlike the service packet used for transmitting data, the test packet does not carry useful data information; and the test packet and the test packet are The port numbers used for service packets are not the same. The receiving end can identify the port number information in the packet header. The received packet is a test packet or a service packet. For example, the port number used for the service packet is a specific port number specified in the protocol, such as port 80 and port 21, and the port number used for the test packet is 65020. The port number used for the test message can also be set to other port numbers that do not conflict with the port number specified in the protocol.
此外为了保证接收端提取正确的计数结果,测试报文中也携带有与业务报文子集对应的时间片标识。由于测试报文也具备上述报文头,因而也可以通过设定预设字段的值来确定测试报文对应的时间片标识,其设定方法可参考业务报文的时间片标识的设定方法,测试报文的时间片标识可以和与其对应的业务报文子集的时间片标识相同,如某一业务报文子集的时间片标识为Identification字段的最高位,与之对应的测试报文的时间片标识也为Identification字段的最高位。In addition, in order to ensure that the receiving end extracts the correct counting result, the test packet also carries a time slice identifier corresponding to the service packet subset. The test packet also has the above-mentioned packet header. Therefore, the time slice identifier corresponding to the test packet can be determined by setting the value of the preset field, and the setting method can refer to the setting method of the time slice identifier of the service packet. The time slice identifier of the test packet may be the same as the time slice identifier of the corresponding service packet subset. For example, the time slice identifier of a certain service packet subset is the highest digit of the Identification field, and the corresponding test packet is corresponding. The time slice identifier is also the highest bit of the Identification field.
测试报文携带的标识可以为其他标识,不一定与当前业务报文子集的时间片标识一致,只要测试报文的标识与业务报文子集的标识存在对应关系,接收端可根据该对应关系识别出其对应的业务报文即可。例如当前业务报文子集的时间片标识为Identification字段的最高位,则可将与之对应的测试报文的标识设置为TTL的最高位。接收端可根据TTL最高位的值与Identification字段的最高位的值的确定关系识别出该测试报文对应的业务报文。The identifier carried in the test packet may be other identifiers, and may not be consistent with the time slice identifier of the current service packet subset. As long as the identifier of the test packet has a corresponding relationship with the identifier of the service packet subset, the receiving end may be corresponding according to the corresponding identifier. The relationship identifies its corresponding service message. For example, if the time slice identifier of the current service packet subset is the highest bit of the Identification field, the identifier of the corresponding test packet can be set to the highest bit of the TTL. The receiving end may identify the service packet corresponding to the test packet according to the determined relationship between the value of the highest TTL and the value of the highest bit of the Identification field.
此外,需要说明的是,在三层网络中传输的报文都携带有源IP地址、目的IP地址、协议类型、源端口、目的端口,同类业务报文具备相同的源IP地址、目的IP地址、协议类型,但源端口、目的端口不相同,因而当网络中存在多径时,为了实现流量均衡,将各个报文源IP地址、目的IP地址、协议类型、源端口、目的端口进行运算得到不同的哈希值,然后将各个业务报文散列到不同的传输路径(PATH)上,而所有测试报文的源IP地址、目的IP地址、协议类型、源端口、目的端口均相同,因而计算得到的哈希值也相同,所有的测试报文均通过相同的路径由发送端达到接收端。因而该多径针对的是业务报文,即不同的业务报文有多条可供选择的路径由发送端到达接收端; 而所有的测试报文均只能通过相同的路径依次由发送端到达接收端。因而不存在测试报文与测试报文的乱序情况。也即,某一测试报文到达接收端时,提取的接收端的计数结果与测试报文中携带的计数结果是相匹配的。In addition, it should be noted that the packets transmitted in the Layer 3 network carry the active IP address, the destination IP address, the protocol type, the source port, and the destination port. The same type of service packets have the same source IP address and destination IP address. The protocol type is different from the source port and the destination port. Therefore, when multipath is available on the network, the source IP address, destination IP address, protocol type, source port, and destination port of each packet are calculated. Different hash values are then hashed to different transmission paths (PATHs), and the source IP address, destination IP address, protocol type, source port, and destination port of all test packets are the same. The calculated hash value is also the same, and all test packets pass the same path from the sender to the receiver. Therefore, the multipath is for service packets, that is, different service packets have multiple paths to be selected from the transmitting end to the receiving end; All test packets can only be sent from the sender to the receiver through the same path. Therefore, there is no out-of-order situation between the test message and the test message. That is, when a test packet arrives at the receiving end, the extracted receiving end's counting result matches the counting result carried in the test packet.
S806:发送端接收所述接收端回复的响应报文,响应报文携带有第二计数结果,第二计数结果用于表示接收端收到测试报文时,接收端已接收到的具有相同时间片标识的业务报文数量,业务报文的时间片标识与测试报文携带的时间片标识相同。S806: The sending end receives the response message sent by the receiving end, and the response message carries the second counting result. The second counting result is used to indicate that the receiving end has received the same time when receiving the test message. The number of service packets identified by the slice. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
S807:发送端根据第一计数结果和第二计数结果计算业务报文子集的丢包率。S807: The transmitting end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
当采用Identification字段的最高位进行时间片标识时,由于间隔的两个业务报文子集对应的时间片标识相同,因而发送端得到的第一计数结果为累积的已发送的所有具有相同时间片标识的业务报文的数量,同理,接收端提取的第二计数结果为累积的已接收的所有具有相同时间片标识的业务报文的数量,由此丢包率的计算可参考下例。When the time slice identifier is used for the highest bit of the Identification field, since the time slice identifiers corresponding to the two subsets of the service packets are the same, the first count result obtained by the sender is the accumulated sent all the same time slices. The number of the identified service packets is the same. The second count result extracted by the receiving end is the accumulated number of received service packets with the same time slice identifier. The calculation of the packet loss rate can be referred to the following example.
例如时间片3对应的业务报文子集的丢包数的计算为:For example, the number of lost packets of the service packet subset corresponding to the time slice 3 is calculated as:
Time_slice_3_:Droper_Counter=(Time_slice_3_Sender_Counter-Time_slice_1_Sender_Counter)-(Time_slice_3_Reciever_Counter-Time_slice_1_Reciever_Counter)。其中,Time_slice_3_Sender_Counter为发送第三个测试报文时对应的第一计数结果,Time_slice_1_Sender_Counter为发送第一个测试报文时对应的第一计数结果,两者相减得到的是该业务报文子集对应的发送端发送的业务报文数;Time_slice_3_Reciever_Counter为发送第三个测试报文时对应的第二计数结果,Time_slice_1_Reciever_Counter为发送第一个测试报文时对应的第二计数结果,两者相减得到的是该业务报文子集对应的接收端接收的业务报文数。Time_slice_3_Droper_Counter表示该业务报文子集的丢包数。Time_slice_3_: Droper_Counter=(Time_slice_3_Sender_Counter-Time_slice_1_Sender_Counter)-(Time_slice_3_Reciever_Counter-Time_slice_1_Reciever_Counter). The time_slice_3_Sender_Counter is the first count result corresponding to the third test message, and the time_slice_1_Sender_Counter is the first count result corresponding to the first test message, and the two are subtracted to obtain the corresponding subset of the service message. The number of service packets sent by the sender; Time_slice_3_Reciever_Counter is the second count result corresponding to the third test packet, and Time_slice_1_Reciever_Counter is the second count result corresponding to the first test packet. The number of service packets received by the receiving end corresponding to the subset of the service packets. Time_slice_3_Droper_Counter indicates the number of lost packets in the subset of service packets.
时间片3对应的业务报文子集的丢包率的计算为:The packet loss rate of the subset of service packets corresponding to time slice 3 is calculated as:
Time_slice_3_Droper_ratio=Time_slice_3_Droper_Counter/(Time_sl  ice_3_Sender_Counter-Time_slice_1_Sender_Counter)。Time_slice_3_Droper_ratio=Time_slice_3_Droper_Counter/(Time_sl ice_3_Sender_Counter-Time_slice_1_Sender_Counter).
其中,由上述丢包数计算得到的结果与发送的业务报文的总数的比值,便可得到该业务报文子集的丢包率即Time_slice_3_Droper_ratio。The ratio of the result of the packet loss calculation to the total number of service packets sent can obtain the packet loss rate of the service packet subset, that is, Time_slice_3_Droper_ratio.
同理可以通过时间片2和时间片4对应的第一计数结果和第二计数结果得到时间片4内的丢包数和丢包率。Similarly, the number of lost packets and the packet loss rate in the time slice 4 can be obtained by the first counting result and the second counting result corresponding to the time slice 2 and the time slice 4.
其他时间片内业务报文的丢包计数可参考上述例子,因此本实施例可以实时进行报文的丢包监测。For the packet loss count of the intra-chip service packet, refer to the above example. Therefore, the packet loss monitoring of the packet can be performed in real time in this embodiment.
如果要计算多个时间片内的丢包数和丢包率,可以通过分别计算每一个时间片内的丢包数进行累加得到总的丢包数,再通过分别计算每一个时间片内的发送的业务报文的数量进行累加得到总的总的发送数,进而总的丢包数与总的发送数的比值得到丢包率。If you want to calculate the number of lost packets and the packet loss rate in multiple time slices, you can calculate the total number of lost packets by calculating the number of lost packets in each time slice separately, and then calculate the transmission within each time slice separately. The number of service packets is accumulated to obtain the total total number of transmissions, and the ratio of the total number of lost packets to the total number of transmissions is the packet loss rate.
作为图8所示方法的实际应用,下表表二列出了采用本实施例提供的方法得到的丢包数的统计结果。As a practical application of the method shown in FIG. 8, Table 2 in the following table lists the statistical results of the number of lost packets obtained by the method provided in this embodiment.
表二Table II
Figure PCTCN2014087981-appb-000003
Figure PCTCN2014087981-appb-000003
Figure PCTCN2014087981-appb-000004
Figure PCTCN2014087981-appb-000004
从表二中可以看到,在本实施例的一种应用场景中,将时间按照10ms划分为多个时间片,每个时间片对应于业务报文子集,该业务报文子集的时间片标识为Identification的最高位,即0或1,从表中可看到时间片标识交替为0或1。每个业务报文子集对应的测试报文延迟6ms发送,如表中,时间片1对应的业务报文子集1的发送完毕时刻为10ms,测试报文1的发送时刻为16ms,同理可看到其他时间片对应的测试报文均延迟6ms发送。测试报文1发送时刻,发送端获取的第一计数结果1255即为当前时间片标识为0的业务报文的累计结果。接收端在收到测试报文1时反馈响应报文1,发送响应报文1时获取的第二计数结果为1255,由第一计数结果和第二计数结果得知,时间片1对应的业务报文子集内并无业务报文的丢包发生。It can be seen from Table 2 that in an application scenario of this embodiment, the time is divided into multiple time slices according to 10 ms, and each time slice corresponds to a subset of service packets, and the time of the subset of the service packets. The slice is identified as the highest bit of Identification, that is, 0 or 1. From the table, it can be seen that the time slice identifier is alternately 0 or 1. The test packet corresponding to each service packet subset is delayed by 6 ms. In the table, the transmission completion time of the service packet subset 1 corresponding to the time slice 1 is 10 ms, and the test packet 1 transmission time is 16 ms. It can be seen that the test packets corresponding to other time slices are delayed by 6 ms. When the test packet 1 is sent, the first count result 1255 obtained by the sender is the cumulative result of the service packet whose current time slice identifier is 0. The receiving end feeds back the response message 1 when receiving the test message 1, and the second counting result obtained when the response message 1 is sent is 1255, and the service corresponding to the time slice 1 is obtained from the first counting result and the second counting result. There is no packet loss of service packets in the subset of messages.
同理,可以看到测试报文2对应的第一计数结果1323和响应报文对应的第二计数结果1243相比,时间片2对应的业务报文子集内有业务报文的丢包发生。Similarly, it can be seen that the first counting result 1323 corresponding to the test packet 2 and the second counting result 1243 corresponding to the response packet are compared with the second counting result 1243 corresponding to the response packet, and packet loss occurs in the service packet subset corresponding to the time slice 2 .
此外,从表中还可以读出,发送端和接收端均对具有相同时间片标识的业务报文进行累积计数。In addition, it can be read from the table, and both the transmitting end and the receiving end perform cumulative counting on service packets having the same time slice identifier.
从表二的测量过程来看,用于测量某个时间片内业务报文丢包情况的测试报文和业务报文有一段足够的时间延迟,因此不会导致测试报文和业务报文间有乱序发生,丢包测量的结果是准确的可信的,不会因为网络复杂,业务报文路径多而导致丢包测量不准确,可以应用在网络传输中存在多径或者CPU多核等多种网络场景下的丢包测量。From the measurement process in Table 2, there is a sufficient time delay between the test packet and the service packet used to measure the packet loss of the service packet in a certain time slice. Therefore, the test packet and the service packet are not caused. In the case of out-of-order, the result of the packet loss measurement is accurate and reliable. It is not because the network is complex and the service packet path is too large, resulting in inaccurate packet loss measurement. It can be applied to multipath or multi-core in the network transmission. Packet loss measurement in a network scenario.
进一步的,作为图6所示方法的细化,图8所示方法的补充,本实施例还提供了一种网络丢包的测量方法,该方法应用于二层网络,如图11所示,该方法包括:Further, as a refinement of the method shown in FIG. 6, the method shown in FIG. 8 is added. The embodiment further provides a method for measuring network packet loss, and the method is applied to a Layer 2 network, as shown in FIG. The method includes:
S1101:发送端根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个业务报文子集为业务报文集合的一部分,全部业务报文子集组成业务报文集合。S1101: The sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, each service packet subset is part of the service packet set, and all service packets are The subsets form a collection of business messages.
S1102:发送端为业务报文封装协议报文头,该协议报文头为业务报文所 在业务报文子集的时间片标识。S1102: The sender is a service packet encapsulation protocol packet header, and the protocol packet header is a service packet. The time slice identifier in the subset of service messages.
在二层网络进行数据封装时,可兼容EthernetII协议,IEEE802.3/IEEE802.2LLC或者IEEE802.3/IEEE802.2LLC/SNAP三种协议的封装格式,因而发送端可以采用三种不同的协议分别对相邻的不同业务报文子集的业务报文进行封装,同一业务报文子集内的业务报文的封装格式相同,接收端可根据不同的协议报文头对不同业务报文子集的业务报文进行区分。When the data is encapsulated in the Layer 2 network, it can be compatible with the encapsulation format of the Ethernet II protocol, IEEE802.3/IEEE802.2LLC or IEEE802.3/IEEE802.2LLC/SNAP. Therefore, the sender can use three different protocols respectively. The service packets of the different service packet subsets are encapsulated, and the service packets of the same service packet are encapsulated in the same format. The receiver can use different protocol packet headers to different service packet subsets. Service packets are distinguished.
EthernetII协议,IEEE802.3/IEEE802.2LLC或者IEEE802.3/IEEE802.2LLC/SNAP三种协议的封装格式可参考现有技术。The encapsulation format of the Ethernet II protocol, IEEE802.3/IEEE802.2LLC or IEEE802.3/IEEE802.2LLC/SNAP can refer to the prior art.
此外,在本实施例的其他实现方式中,也可以在各时间片内进行交替采用不同的VLAN ID或VLAN优先级标识对业务报文进行封装,从而达到对业务报文进行时间片的划分。In addition, in other implementation manners of the embodiment, the service packets may be encapsulated by using different VLAN IDs or VLAN priority identifiers in each time slice, so as to divide the service packets into time slices.
S1103:发送端向所述接收端依次发送所述业务报文子集。S1103: The sending end sequentially sends the service message subset to the receiving end.
S1104:发送端对已发送的具有相同时间片标识的业务报文进行计数。S1104: The sender counts the service packets that have been sent with the same time slice identifier.
S1105:若当前业务报文子集发送完毕,则发送端获取第一计数结果,在预设时长后向接收端发送测试报文,测试报文中携带有当前业务报文子集的时间片标识,第一计数结果为当前业务报文子集的时间片标识对应的计数结果,预设时长大于业务报文子集在发送端与接收端之间的传输时长。S1105: If the current service packet subset is sent, the sender obtains the first counting result, and sends a test packet to the receiving end after the preset duration, and the test packet carries the time slice identifier of the current service packet subset. The first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the transmission duration of the service packet subset between the transmitting end and the receiving end.
S1106:发送端接收所述接收端回复的响应报文,响应报文携带有第二计数结果,第二计数结果用于表示接收端收到测试报文时,接收端已接收到的具有相同时间片标识的业务报文数量,业务报文的时间片标识与测试报文携带的时间片标识相同。S1106: The sending end receives the response message sent by the receiving end, and the response message carries the second counting result. The second counting result is used to indicate that the receiving end has received the same time when receiving the test message. The number of service packets identified by the slice. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
S1107:发送端根据第一计数结果和第二计数结果计算业务报文子集的丢包率。S1107: The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
Y.1731协议中双端丢包测量方法是一种应用于二层网络的丢包测量方法,在TRUNK组网模式下,数据包在网络中也存在多径传输的情况。具体而言,在二层网络中传输的报文中携带有源MAC地址、目的MAC地址和VLAN ID;其中同类业务报文携带有相同的源MAC地址和VLAN ID相同,而目的MAC地址不 同;发送端通过将业务报文的源MAC地址、目的MAC地址和VLAN ID进行哈希计算得到不同的HASH值然后散列到TRUNK组下不同的物理传输路径上,而测试报文由于其源MAC地址、目的MAC地址和VLAN ID均相同,由此得到的HASH值为固定值,因而测试报文也只能散列到一个固定的传输路径上。因而类似于三层网络,二层网络中也存在测试报文和业务报文的乱序情况。The double-end packet loss measurement method in the Y.1731 protocol is a packet loss measurement method applied to a Layer 2 network. In the TRUNK networking mode, there are also multipath transmissions of data packets in the network. Specifically, the packets transmitted in the Layer 2 network carry the active MAC address, the destination MAC address, and the VLAN ID. The same type of service packets carry the same source MAC address and the same VLAN ID, but the destination MAC address is not. Similarly, the sender performs hash calculation on the source MAC address, destination MAC address, and VLAN ID of the service packet to obtain different HASH values and then hashes them to different physical transmission paths in the TRUNK group, and the test packet is derived from the source. The MAC address, destination MAC address, and VLAN ID are the same. The resulting HASH value is a fixed value. Therefore, test packets can only be hashed to a fixed transmission path. Therefore, similar to the Layer 3 network, there are also out-of-order situations of test packets and service packets in the Layer 2 network.
因而,本实施例提供的采用不同的封装格式进行封装或者采用不同的VLAN ID或VLAN优先级标识对业务报文进行封装的方法能够解决Y.1731协议在TRUNK组网模式下进行双端丢包测量容易乱序导致测量不准确的问题。Therefore, the method for encapsulating service packets by using different encapsulation formats or using different VLAN IDs or VLAN priority identifiers in the present embodiment can solve the double-ended packet loss in the TRUNK networking mode of the Y.1731 protocol. Measurements are prone to out-of-order problems that result in inaccurate measurements.
进一步的,作为图6至图11所示方法的补充,如图12所示,本实施例还提供了一种业务报文乱序的测量方法,该方法包括:Further, as a supplement to the method shown in FIG. 6 to FIG. 11 , as shown in FIG. 12 , the embodiment further provides a method for measuring the out-of-order of service packets, where the method includes:
S1201:发送端在业务报文子集中***至少一个乱序测试报文,该乱序测试报文携带有业务报文子集的时间片标识,乱序测试报文用于指示获取第三计数结果,该第三计数结果为发送乱序测试报文前,已发送的与乱序测试报文的时间片标识对应的计数结果。S1201: The sender inserts at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate that the third count result is obtained. The third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the out-of-sequence test packet is sent.
如图13所示,在图7的由时间片的划分得到业务报文子集的基础上,在已划分好的业务报文子集中***乱序测试报文1301以对该业务报文子集进行乱序测试,通常对于较小的时间片对应的业务报文子集,一般包含的业务报文较少,时间片本身的单位就很小,因而为了节约带宽仅***一个乱序测试报文即可;对于较大的时间片对应的业务报文子集,一般包含的业务报文较多,因而为了准确的实时测量业务报文的乱序,可在业务报文子集中***多个乱序测试报文1301。乱序测试报文的数量可综合考虑带宽和对业务报文乱序的实时性需求。As shown in FIG. 13, on the basis of the service packet subset obtained by the time slice division of FIG. 7, the out-of-order test packet 1301 is inserted into the divided service packet subset to perform the service packet subset. Out-of-order test, usually for a subset of service packets corresponding to a smaller time slice, generally contains fewer service packets, and the unit of the time slice itself is small, so only one out-of-order test message is inserted in order to save bandwidth. The service packet subset corresponding to the larger time slice generally contains more service packets. Therefore, in order to accurately measure the out-of-order of service packets in real time, multiple out-of-order tests can be inserted in the service packet subset. Message 1301. The number of out-of-order test packets can take into account bandwidth and real-time requirements for out-of-order service packets.
若要实现对某一时间段内的业务报文是否存在乱序进行测量,可通过***某一测试报文,通过测试报文发送时的发送端的计数结果和测试报文到达接收端时接收端的计数结果是否一致来确认业务报文是否乱序;若一致,则不存在乱序;否则,存在乱序。此处所指的乱序,尽管有可能是乱序测试报文和业务报文存在乱序,而将乱序测试报文抽离后,各个业务报文之间并无 乱序,但根据该计数结果的对比,仍能得到网络传输会带来乱序这一定性结论,这一结论可进一步的由将该乱序测试报文替换为业务报文来考虑,若该乱序测试报文为业务报文,则在发送端时,该乱序测试报文(业务报文)发送前已发送的业务报文数为3个,而在接收端时,接收该业务报文时已接收的业务报文数为2个,则表明业务报文出现了乱序。因而用乱序测试报文区别于业务报文来表征网络传输过程中会发生乱序这一情况。To measure whether the service packets in a certain period of time are out of order, you can insert a test packet to pass the test result of the sender and the test packet when the test packet is sent to the receiver. Whether the result of the counting is consistent to confirm whether the service packets are out of order; if they are consistent, there is no out-of-order; otherwise, there is an out-of-order. The out-of-order referred to here, although there may be an out-of-order test message and a service message out of order, and the out-of-order test message is extracted, there is no service message between Out of order, but according to the comparison of the counting results, the conclusion that the network transmission will bring out the disorder can still be obtained. This conclusion can be further considered by replacing the out-of-order test message with the service message. When the out-of-order test packet is a service packet, the number of service packets that have been sent before the out-of-order test packet (service packet) is sent is three, and the receiver receives the service packet. If the number of service packets received in the text is two, the service packets are out of order. Therefore, the out-of-order test message is distinguished from the service message to characterize the occurrence of out-of-order in the network transmission process.
该乱序测试报文也是一种测试报文,其目的为在发送端发送前指示发送端获取第三计数结果,且在到达接收端时指示接收端提取第四计数结果。该第三计数结果既可以由发送端本地保存,也可以携带在乱序测试报文中;该乱序测试报文的时间片标识的设置方法同测试报文,本方法不再赘述。The out-of-order test packet is also a test packet, and the purpose is to instruct the sender to obtain the third count result before transmitting, and instruct the receiver to extract the fourth count result when reaching the receiver. The third counting result may be saved locally by the sending end or may be carried in the out-of-sequence test message; the setting method of the time slice identifier of the out-of-order test packet is the same as the test packet, and the method is not described here.
则向接收端依次发送上述业务报文子集,包括:Sending the foregoing subset of service packets to the receiving end, including:
S1202:发送端向接收端依次发送业务报文子集,每个业务报文子集中包括至少一个乱序测试报文。S1202: The sending end sends a subset of service packets to the receiving end, and each service packet subset includes at least one out-of-order test packet.
业务报文子集除了包括具有相同时间片标识的业务报文外,还包括了已***的也具有对应的时间片标识的乱序测试报文。The service packet subset includes, in addition to the service packet with the same time slice identifier, an inserted out-of-order test packet that also has a corresponding time slice identifier.
S1203:发送端接收所述接收端反馈的乱序响应报文,乱序响应报文中携带有接收端在接收到乱序测试报文时的第四计数结果,第四计数结果用于表示收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间片标识的业务报文数量。S1203: The sending end receives the out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, and the fourth counting result is used to indicate the receiving The number of service packets received by the receiving end with the same time slice identifier as the out-of-sequence test packet.
可选的,若乱序测试报文中携带有第三计数结果,则乱序响应报文在由接收端返回至发送端时也携带有该第三计数结果。Optionally, if the out-of-order test packet carries the third counting result, the out-of-order response packet carries the third counting result when returned by the receiving end to the sending end.
S1204:发送端根据第一计数结果、第二计数结果、第三计数结果和第四计数结果,确定业务报文子集中的业务报文是否存在乱序。S1204: The sending end determines, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packet in the service packet subset is out of order.
其中,第一计数结果和第二计数结果的获取可参考图6至图11提供的方法。The obtaining of the first counting result and the second counting result may refer to the methods provided in FIG. 6 to FIG.
当接收到接收端回复的响应报文和乱序响应报文时,便可对此时间片内的业务报文进行网络乱序程度计算。 When receiving the response packet and the out-of-order response packet replied by the receiving end, the network packet degree of the service packet in the time slice can be calculated.
示例性的,业务报文子集中的业务报文是否乱序计算实例1如下:Exemplarily, whether the service packets in the service packet subset are out of order are calculated as follows:
假定对于第一个时间片前面收发计数为0。Assume that the count before and after the first time slice is 0.
时间片1内乱序测试报文1发送时刻得到的业务报文的发送计数1为32;The transmission count 1 of the service packet obtained at the time of sending the packet 1 in the time slice 1 is 32;
接收端收到该乱序测试报文1时提取的业务报文接收计数1为30,该计数结果携带在乱序响应报文1中。When the receiving end receives the out-of-order test packet 1, the service packet receiving count 1 is 30, and the counting result is carried in the out-of-order response message 1.
延迟时间片1发送的测试报文2发送时刻得到的业务报文的发送计数2为45;The transmission count 2 of the service packet obtained at the transmission time of the test packet 2 sent by the delay time slice 1 is 45;
接收端收到该测试报文2时提取的业务报文接收计数2为45,该计数结果携带在响应报文2中。When the receiving end receives the test packet 2, the service packet receiving count 2 is 45, and the counting result is carried in the response packet 2.
根据发送计数1和接收计数1的计数结果可初步认为该时间片内有丢包,然而根据发送计数2和接收计数2的对比结果得知,该时间片内实际上无丢包情况,只是有乱序的情况。According to the counting result of the transmission count 1 and the reception count 1, it can be preliminarily considered that there is a packet loss in the time slice. However, according to the comparison result of the transmission count 2 and the reception count 2, it is known that there is actually no packet loss in the time slice, but only Out of order.
示例性的,业务报文子集中的业务报文是否乱序计算实例2如下:Exemplarily, if the service packets in the service packet subset are out of order, the instance 2 is calculated as follows:
假定对于第一个时间片前面收发计数为0。Assume that the count before and after the first time slice is 0.
时间片1内乱序测试报文1发送时刻得到的业务报文的发送计数1为32;The transmission count 1 of the service packet obtained at the time of sending the packet 1 in the time slice 1 is 32;
接收端收到该乱序测试报文1时提取的业务报文接收计数1为35,该计数结果携带在乱序响应报文1中。When the receiving end receives the out-of-order test packet 1, the service packet receiving count 1 is 35, and the counting result is carried in the out-of-order response packet 1.
延迟时间片1发送的测试报文2发送时刻得到的业务报文的发送计数2为45;The transmission count 2 of the service packet obtained at the transmission time of the test packet 2 sent by the delay time slice 1 is 45;
接收端收到该测试报文2时提取的业务报文接收计数2为45,该计数结果携带在响应报文2中。When the receiving end receives the test packet 2, the service packet receiving count 2 is 45, and the counting result is carried in the response packet 2.
根据发送计数1和接收计数1的计数结果可初步认为该时间片内有多包,然而根据发送计数2和接收计数2的对比结果得知,该时间片内实际上无多包情况,只是有乱序的情况。According to the counting result of the transmission count 1 and the reception count 1, it can be preliminarily considered that there are many packets in the time slice. However, according to the comparison result of the transmission count 2 and the reception count 2, it is known that there is actually no multi-package situation in the time slice, but there is only Out of order.
其他时间片的乱序测量依上类推。通过对不同时间片内收发报文计数进行乱序计算,便可以获得一个较长时间段的业务报文乱序情况。The out-of-order measurement of other time slices is analogous. By performing out-of-order calculation on the number of received and sent packets in different time slices, a business message out of sequence can be obtained for a long period of time.
进一步的,本实施例中的所有测试报文均通过相同的路径由发送端到达 接收端。Further, all test packets in this embodiment are sent by the sender through the same path. Receiving end.
进一步的,本实施例中的测试报文为前向控制帧;响应报文为后向报告帧。前向控制帧和后向报告帧的具体结构可参考现有技术。Further, the test message in this embodiment is a forward control frame; the response message is a backward report frame. The specific structure of the forward control frame and the backward report frame can be referred to the prior art.
本发明实施例提供的业务报文乱序的测量方法,在能够准确计算丢包率的前提下,能进一步确定是否有乱序的情况。The method for measuring the out-of-order order of the service packet provided by the embodiment of the present invention can further determine whether there is an out-of-order situation on the premise that the packet loss rate can be accurately calculated.
进一步的,本发明还提供了一种网络丢包的测量方法,该方法应用于一种数据传输***,该数据传输***设置有发送端和接收端,如图14所示,该方法包括:Further, the present invention further provides a method for measuring network packet loss, which is applied to a data transmission system, where the data transmission system is provided with a transmitting end and a receiving end. As shown in FIG. 14, the method includes:
S1401:接收端接收发送端发送的业务报文,业务报文携带有时间片标识。S1401: The receiving end receives the service packet sent by the sending end, and the service packet carries a time slice identifier.
发送端对业务报文进行了时间片的划分,为了表示业务报文所属的时间片,业务报文携带有时间片标识。同一时间片内的业务报文具有相同的时间片标识。The sender sends a time slice to the service packet. The service packet carries a time slice identifier to indicate the time slice to which the service packet belongs. The service packets in the slice at the same time have the same time slice identifier.
接收端在接收到业务报文时,通过对业务报文进行解封装,识别其报文头中的预设字段的时间片标识(三层网络)或者根据以太网的封装格式区分业务报文是否具有相同的时间片标识(二层网络)。When the receiving end receives the service packet, the receiving end decapsulates the service packet, identifies the time slice identifier of the preset field in the packet header (the Layer 3 network), or distinguishes whether the service packet is classified according to the Ethernet encapsulation format. Have the same time slice identification (layer 2 network).
S1402:接收端对已接收到的具有相同的时间片标识的业务报文进行计数。S1402: The receiving end counts the received service packets with the same time slice identifier.
接收端设置有计数器,对接收到的业务报文进行计数,对具有相同时间片标识的业务报文进行累积计数。The receiving end is provided with a counter, and counts the received service packets, and accumulates the service packets with the same time slice identifier.
进一步的,对已接收到的具有相同的时间片标识的业务报文进行计数包括:Further, counting the received service packets with the same time slice identifier includes:
业务报文的报文头中的预设字段添加有时间片标识。The preset field in the packet header of the service packet is added with a time slice identifier.
该预设字段添加时间片标识的方法可参考发送端。The method of adding a time slice identifier to the preset field can refer to the sender.
对已接收的具有相同的时间片标识的业务报文进行计数。Counts the received service packets with the same time slice identifier.
进一步的,对已接收到的具有相同的时间片标识的业务报文进行计数包括:Further, counting the received service packets with the same time slice identifier includes:
业务报文封装有协议报文头,协议报文头为业务报文的时间片标识。A service packet encapsulates a protocol packet header, and the protocol packet header is a time slice identifier of the service packet.
对已接收的具有相同的时间片标识的业务报文进行计数。 Counts the received service packets with the same time slice identifier.
S1403:接收端接收发送端发送的测试报文,该测试报文中携带有时间片标识。S1403: The receiving end receives the test packet sent by the sending end, where the test packet carries a time slice identifier.
S1404:接收端获取与时间片标识对应的第二计数结果,该第二计数结果用于表示接收端收到测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果。S1404: The receiving end obtains a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end receives the test packet, and the service packet corresponding to the time slice identifier carried in the test packet is received by the receiving end. Count the results.
S1405:接收端向发送端发送响应报文,响应报文中携带有获取的第二计数结果。S1405: The receiving end sends a response packet to the sending end, where the response packet carries the obtained second counting result.
本发明实施例提供的网络丢包的测量方法,与现有技术中存在测试报文和业务报文的乱序的情况相比,本发明接收端仅对具有相同时间片标识的业务报文进行累积计数,且接收的测试报文延迟于其所对应的业务报文的接收,能够避免测试报文和业务报文的乱序情况,在不存在测试报文和业务报文的乱序的前提下,再接收到测试报文时能够提取正确的第二计数结果,进而方便发送端能够根据正确的第一计数结果和第二计数结果准确计算得到丢包率。The method for measuring the network packet loss provided by the embodiment of the present invention is compared with the case where the test packet and the service packet are out of order in the prior art, and the receiving end of the present invention only performs the service packet with the same time slice identifier. Cumulative counting, and the received test packets are delayed in the reception of the corresponding service packets, which can avoid the out-of-order situation of the test packets and the service packets. Then, when the test message is received, the correct second counting result can be extracted, so that the sending end can accurately calculate the packet loss rate according to the correct first counting result and the second counting result.
进一步的,作为图14所示方法的补充,如图15所示,该方法还包括:Further, as a supplement to the method shown in FIG. 14, as shown in FIG. 15, the method further includes:
S1501:接收端接收发送端发送的乱序测试报文,乱序测试报文携带有时间片标识。S1501: The receiving end receives the out-of-order test packet sent by the sending end, and the out-of-order test packet carries a time slice identifier.
S1502:接收端获取与时间片标识对应的第四计数结果,该第四计数结果用于表示接收端收到乱序测试报文时,接收端已接收到的与乱序测试报文具有相同时间片标识的业务报文数量。S1502: The receiving end acquires a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end receives the out-of-order test packet, and the receiving end has received the same time as the out-of-order test packet. Number of service packets identified by the slice.
S1503:接收端向发送端反馈乱序响应报文,乱序响应报文携带有获取的第四计数结果。S1503: The receiving end feeds the out-of-order response message to the sending end, and the out-of-order response message carries the obtained fourth counting result.
进一步的,该测试报文为前向控制帧;该响应报文为后向报告帧。Further, the test message is a forward control frame; the response message is a backward report frame.
在图14所示的方法的基础上,即在接收端返回第二计数结果的基础上,接收端在收到发送端的乱序测试报文后,向发送端返回对应的乱序响应报文,并在返回乱序响应报文时提取与该乱序响应报文携带的时间片标识相同的业务报文的第四计数结果,以方便发送端根据该第二计数结果、第四计数结果以及发送端获取的第一计数结果和第三计数结果判断网络中是否存在乱序。 On the basis of the method shown in FIG. 14, that is, on the basis that the receiving end returns the second counting result, the receiving end returns the corresponding out-of-order response message to the transmitting end after receiving the out-of-order test packet of the transmitting end. And the fourth counting result of the service packet with the same time slice identifier carried in the out-of-order response packet is extracted when the out-of-order response packet is returned, so as to facilitate the sending end according to the second counting result, the fourth counting result, and the sending The first counting result obtained by the terminal and the third counting result determine whether there is disorder in the network.
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本发明可借助软件加必需的通用硬件的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘,硬盘或光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by means of software plus necessary general hardware, and of course, by hardware, but in many cases, the former is a better implementation. . Based on the understanding, the technical solution of the present invention, which is essential or contributes to the prior art, can be embodied in the form of a software product stored in a readable storage medium, such as a floppy disk of a computer. A hard disk or optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention.
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应所述以权利要求的保护范围为准。 The above is only a specific embodiment of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily think of changes or substitutions within the technical scope of the present invention. It should be covered by the scope of the present invention. Therefore, the scope of the invention should be determined by the scope of the claims.

Claims (30)

  1. 一种网络丢包的测量装置,所述装置应用于发送端,所述发送端位于一种数据传输***,所述***设置有所述发送端和所述接收端,其特征在于,所述装置包括:A measuring device for network packet loss, the device is applied to a transmitting end, the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end, wherein the device is characterized in that the device include:
    存储器,用于存储业务报文集合;a memory for storing a set of service messages;
    处理器,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;a processor, configured to divide the service packet set in time series according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
    为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识;Allocating different time slice identifiers to the adjacent at least two service packet subsets, and adding the allocated time slice identifiers to the service packets in each service packet subset;
    发射器,用于向所述接收端依次发送所述业务报文子集;a transmitter, configured to send the service message subset to the receiving end in sequence;
    所述处理器,还用于对已发送的具有相同时间片标识的业务报文进行计数;The processor is further configured to count the service packets that have been sent with the same time slice identifier;
    当当前业务报文子集发送完毕时,获取第一计数结果,在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识,所述第一计数结果为所述当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;When the current service packet subset is sent, the first counting result is obtained, and after the preset duration, the test packet is sent to the receiving end, where the test packet carries the current service packet subset. a slice identifier, where the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, where the preset duration is greater than the service packet subset at the sending end and the receiving end The length of transmission between;
    接收器,用于接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示所述接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同;a receiver, configured to receive a response packet that is sent by the receiving end, where the response packet carries the second counting result, where the second counting result is used to indicate that the receiving end receives the test packet The number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried by the test packet;
    所述处理器,还用于根据所述第一计数结果和所述第二计数结果计算所述业务报文子集的丢包率。The processor is further configured to calculate a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  2. 根据权利要求1所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to claim 1, wherein:
    所述处理器,还用于在业务报文的报文头中的预设字段添加已分配的所述时间片标识。The processor is further configured to add the allocated time slice identifier to a preset field in a packet header of the service packet.
  3. 根据权利要求1所述的网络丢包的测量装置,其特征在于, The apparatus for measuring packet loss of a network according to claim 1, wherein:
    所述处理器,还用于为所述业务报文封装协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。The processor is further configured to encapsulate a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
  4. 根据权利要求1至3任一项所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to any one of claims 1 to 3, characterized in that
    所述处理器,还用于在业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;The processor is further configured to insert at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-sequence test packet And the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the sending the out-of-sequence test packet;
    所述发射器,还用于向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括至少一个所述乱序测试报文;The transmitter is further configured to send the service packet subset to the receiving end, and each service packet subset includes at least one out of order test packet;
    所述接收器,还用于接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiver is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message. As a result, the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
    所述处理器,还用于根据所述第一计数结果、第二计数结果、第三计数结果和所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processor is further configured to determine, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packet in the service packet subset is out of order.
  5. 根据权利要求1至4任一项所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to any one of claims 1 to 4, characterized in that
    所述发射器发送的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets sent by the transmitter are sent by the sending end to the receiving end through the same path;
    所述发射器发送的所述测试报文为前向控制帧;The test packet sent by the transmitter is a forward control frame;
    所述接收器接收的所述响应报文为后向报告帧。The response message received by the receiver is a backward report frame.
  6. 一种网络丢包的测量装置,所述装置应用于接收端,所述接收端位于一种数据传输***中,所述***设置有发送端和所述接收端,其特征在于,所述装置包括:A measuring device for network packet loss, the device being applied to a receiving end, the receiving end being located in a data transmission system, the system being provided with a transmitting end and the receiving end, wherein the device comprises :
    接收器,用于接收所述发送端发送的业务报文,所述业务报文携带有时间片标识;a receiver, configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier;
    存储器,用于存储接收的业务报文;a memory for storing the received service message;
    处理器,用于对已接收到的具有相同的时间片标识的业务报文进行计数; a processor, configured to count the received service packets with the same time slice identifier;
    所述接收器,还用于接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiver is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
    所述处理器,还用于获取与所述时间片标识对应的第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;The processor is further configured to obtain a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end carries the test packet and is carried by the test packet. The time slice identifies the count result of the service packet corresponding to the time slice;
    发射器,用于向所述发送端发送响应报文,所述响应报文中携带有获取的所述第二计数结果。And a transmitter, configured to send a response packet to the sending end, where the response packet carries the obtained second counting result.
  7. 根据权利要求6所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to claim 6, wherein:
    所述接收器接收的所述业务报文的报文头中的预设字段添加有所述时间片标识;The preset field in the packet header of the service packet received by the receiver is added with the time slice identifier;
    所述处理器,还用于对已接收的具有相同的所述时间片标识的业务报文进行计数。The processor is further configured to count the received service packets having the same time slice identifier.
  8. 根据权利要求6所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to claim 6, wherein:
    所述接收器接收的所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识;The service packet received by the receiver is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
    所述处理器,还用于对已接收的具有相同的所述时间片标识的业务报文进行计数。The processor is further configured to count the received service packets having the same time slice identifier.
  9. 根据权利要求6至8任一项所述的网络丢包的测量装置,其特征在于,A network packet loss measuring apparatus according to any one of claims 6 to 8, wherein
    所述接收器,还用于接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识;The receiver is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
    所述处理器,还用于获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The processor is further configured to acquire a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the received out of order message The number of service packets having the same time slice identifier as the out-of-order test packet;
    所述发射器,还用于向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取的所述第四计数结果。The transmitter is further configured to feed back an out-of-order response message to the sending end, where the out-of-order response message carries the acquired fourth counting result.
  10. 根据权利要求6至9任一项所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to any one of claims 6 to 9, wherein
    所述接收器接收的所有所述测试报文均通过相同的路径由所述发送端到达 所述接收端;All the test packets received by the receiver are reached by the sender through the same path. The receiving end;
    所述接收器接收的所述测试报文为前向控制帧;The test message received by the receiver is a forward control frame;
    所述发射器发送的所述响应报文为后向报告帧。The response message sent by the transmitter is a backward report frame.
  11. 一种网络丢包的测量装置,所述装置应用于发送端,所述发送端位于一种数据传输***中,所述***设置有所述发送端和接收端,其特征在于,所述装置包括:A measuring device for network packet loss, the device is applied to a transmitting end, the transmitting end is located in a data transmission system, and the system is provided with the transmitting end and the receiving end, wherein the device comprises :
    划分单元,用于根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;a dividing unit, configured to divide the service packet set in time according to the preset time slice length, to obtain at least two service message subsets, each of the service packet subsets being part of the service packet set All the service message subsets form the service message set;
    分配单元,用于为划分单元划分得到的相邻的至少两个业务报文子集分配不同的时间片标识;An allocating unit, configured to allocate different time slice identifiers for the adjacent subset of at least two service packets obtained by dividing the unit;
    添加单元,用于为划分单元划分得到的每个业务报文子集中的业务报文添加所述分配单元分配的时间片标识;An adding unit, configured to add a time slice identifier allocated by the allocation unit to a service packet in each service packet subset obtained by dividing the unit;
    发送单元,用于向所述接收端依次发送由所述添加单元添加了时间片标识的业务报文子集;a sending unit, configured to sequentially send, to the receiving end, a subset of service packets that are added by the adding unit with a time slice identifier;
    计数单元,用于对发送单元已发送的具有相同时间片标识的业务报文进行计数;a counting unit, configured to count a service packet that has been sent by the sending unit and has the same time slice identifier;
    获取单元,用于在当前业务报文子集发送完毕时,从所述计数单元中获取第一计数结果,所述第一计数结果为所述当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端之间的传输时长;An obtaining unit, configured to obtain a first counting result from the counting unit when the current service packet subset is sent, where the first counting result is a count corresponding to the time slice identifier of the current service packet subset As a result, the preset duration is greater than the transmission duration of the service packet subset between the transmitting end and the receiving end;
    所述发送单元,还用于在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识;The sending unit is further configured to send a test packet to the receiving end after the preset duration, where the test packet carries a time slice identifier of the current service packet subset;
    所述接收单元,用于接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示所述接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同; The receiving unit is configured to receive a response message that is sent by the receiving end, where the response message carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test The number of service packets received by the receiving end with the same time slice identifier, and the time slice identifier of the service packet is the same as the time slice identifier carried in the test packet;
    处理单元,用于根据所述获取单元获取的第一计数结果和所述接收单元接收的所述第二计数结果计算所述业务报文子集的丢包率。And a processing unit, configured to calculate, according to the first counting result obtained by the acquiring unit and the second counting result received by the receiving unit, a packet loss rate of the service packet subset.
  12. 根据权利要求11所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to claim 11, wherein:
    所述添加单元,还用于在业务报文的报文头中的预设字段添加已分配的所述时间片标识。The adding unit is further configured to add the allocated time slice identifier in a preset field in a packet header of the service packet.
  13. 根据权利要求11所述的网络丢包的测量装置,其特征在于,所述添加单元,还用于为所述业务报文添加协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。The apparatus for measuring network packet loss according to claim 11, wherein the adding unit is further configured to add a protocol packet header to the service packet, where the protocol packet header is the service packet. The time slice identifier of the subset of service packets.
  14. 根据权利要求11至13任一项所述的网络丢包的测量装置,其特征在于,所述装置还包括:The device for measuring network packet loss according to any one of claims 11 to 13, wherein the device further comprises:
    ***单元,用于在划分单元划分得到的业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取单元从所述计数单元中获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;An insertion unit, configured to insert at least one out-of-order test packet in the service packet subset obtained by dividing the unit, the out-of-order test packet carrying a time slice identifier of the service packet subset, the out-of-order test The message is used to instruct the obtaining unit to obtain a third counting result from the counting unit, where the third counting result is a time slice of the sent out-of-sequence test message sent before the out-of-sequence test message is sent. Identify the corresponding count result;
    所述发送单元,还用于向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括所述***单元***的至少一个所述乱序测试报文;The sending unit is further configured to sequentially send the service message subset to the receiving end, where each service packet subset includes at least one out of order test message inserted by the inserting unit;
    所述接收单元,还用于接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiving unit is further configured to receive an out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth count when the receiving end receives the out-of-order test message As a result, the fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
    所述处理单元,还用于根据所述获取单元获取的所述第一计数结果、第三计数结果和所述接收单元接收的所述第二计数结果、所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The processing unit is further configured to determine, according to the first counting result, the third counting result, and the second counting result and the fourth counting result received by the receiving unit, the service report Whether the service packets in the text group are out of order.
  15. 根据权利要求11至14任一项所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to any one of claims 11 to 14, wherein
    所述发送单元发送的所有所述测试报文均通过相同的路径由所述发送端到 达所述接收端;All the test packets sent by the sending unit pass through the same path from the sending end to the sending end Reaching the receiving end;
    所述发送单元发送的所述测试报文为前向控制帧;The test packet sent by the sending unit is a forward control frame;
    所述接收单元接收的所述响应报文为后向报告帧。The response message received by the receiving unit is a backward report frame.
  16. 一种网络丢包的测量装置,所述装置应用于接收端,所述接收端位于一种数据传输***中,所述***设置有发送端和所述接收端,其特征在于,所述装置包括:A measuring device for network packet loss, the device being applied to a receiving end, the receiving end being located in a data transmission system, the system being provided with a transmitting end and the receiving end, wherein the device comprises :
    接收单元,用于接收发送端发送的业务报文,所述业务报文携带有时间片标识;a receiving unit, configured to receive a service packet sent by the sending end, where the service packet carries a time slice identifier;
    计数单元,用于对已接收到的具有相同的时间片标识的业务报文进行计数;a counting unit, configured to count the received service packets having the same time slice identifier;
    所述接收单元,还用于接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiving unit is further configured to receive a test packet sent by the sending end, where the test packet carries the time slice identifier;
    获取单元,用于从所述计数单元中获取与所述时间片标识对应的第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;An obtaining unit, configured to obtain a second counting result corresponding to the time slice identifier from the counting unit, where the second counting result is used to indicate that the receiving end receives the test packet, and the test report The time slice carried in the text identifies the counting result of the corresponding service packet;
    发送单元,用于向所述发送端发送响应报文,所述响应报文中携带有所述获取单元获取的所述第二计数结果。And a sending unit, configured to send a response packet to the sending end, where the response packet carries the second counting result obtained by the acquiring unit.
  17. 根据权利要求16所述的网络丢包的测量装置,其特征在于,A network packet loss measuring apparatus according to claim 16, wherein:
    所述接收单元接收的所述业务报文的报文头中的预设字段添加有所述时间片标识;The preset field in the packet header of the service packet received by the receiving unit is added with the time slice identifier;
    所述计数单元,还用于对所述接收单元接收的具有相同的所述时间片标识的业务报文进行计数。The counting unit is further configured to count, by the receiving unit, a service packet having the same time slice identifier.
  18. 根据权利要求16所述的网络丢包的测量装置,其特征在于,A network packet loss measuring apparatus according to claim 16, wherein:
    所述接收单元接收的所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识;The service packet received by the receiving unit is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
    所述计数单元,还用于对接收单元接收的具有相同的所述时间片标识的业务报文进行计数。The counting unit is further configured to count, by the receiving unit, the service packets having the same time slice identifier.
  19. 根据权利要求16至18任一项所述的网络丢包的测量装置,其特征在 于,A network packet loss measuring apparatus according to any one of claims 16 to 18, characterized in that to,
    所述接收单元,还用于接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识;The receiving unit is further configured to receive the out-of-order test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
    所述获取单元,还用于从所述计数单元中获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The obtaining unit is further configured to: obtain, by the counting unit, a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that when the out-of-order test packet is received, The number of service packets received by the receiving end that have the same time slice identifier as the out-of-order test packet;
    所述发送单元,还用于向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取单元获取的所述第四计数结果。The sending unit is further configured to: feed the out-of-order response message to the sending end, where the out-of-order response message carries the fourth counting result obtained by the acquiring unit.
  20. 根据权利要求16至19任一项所述的网络丢包的测量装置,其特征在于,The apparatus for measuring packet loss of a network according to any one of claims 16 to 19, characterized in that
    所述接收单元接收的所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets received by the receiving unit are sent by the sending end to the receiving end through the same path;
    所述接收单元接收的所述测试报文为前向控制帧;The test message received by the receiving unit is a forward control frame;
    所述发送单元发送的所述响应报文为后向报告帧。The response message sent by the sending unit is a backward report frame.
  21. 一种网络丢包的测量方法,所述方法应用于一种数据传输***,所述***设置有发送端和接收端,其特征在于,所述方法包括:A method for measuring network packet loss, the method is applied to a data transmission system, where the system is provided with a transmitting end and a receiving end, wherein the method includes:
    所述发送端根据预设时间片长度在时序上对业务报文集合进行划分,得到至少两个业务报文子集,每个所述业务报文子集为所述业务报文集合的一部分,全部所述业务报文子集组成所述业务报文集合;The sending end divides the service packet set in time series according to the preset time slice length, and obtains at least two service packet subsets, each of the service packet subsets being part of the service packet set. All the service message subsets form the service message set;
    所述发送端为相邻的至少两个业务报文子集分配不同的时间片标识,为每个业务报文子集中的业务报文添加所分配的时间片标识;The transmitting end allocates different time slice identifiers for the adjacent at least two service packet subsets, and adds the allocated time slice identifier to the service packets in each service packet subset;
    所述发送端向所述接收端依次发送所述业务报文子集;Sending, by the sending end, the subset of the service packets to the receiving end;
    所述发送端对已发送的具有相同时间片标识的业务报文进行计数;The sending end counts the service packets that have been sent with the same time slice identifier;
    若当前业务报文子集发送完毕,则发送端获取第一计数结果,在预设时长后向所述接收端发送测试报文,所述测试报文中携带有所述当前业务报文子集的时间片标识,所述第一计数结果为所述当前业务报文子集的时间片标识对应的计数结果,所述预设时长大于所述业务报文子集在所述发送端与所述接收端 之间的传输时长;If the current service packet subset is sent, the sending end obtains the first counting result, and sends a test packet to the receiving end after the preset time length, where the test packet carries the current service packet subset. The time slice identifier, the first counting result is a counting result corresponding to the time slice identifier of the current service packet subset, and the preset duration is greater than the service packet subset at the sending end and the Receiving end The length of transmission between;
    所述发送端接收所述接收端回复的响应报文,所述响应报文携带有所述第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,所述接收端已接收到的具有相同时间片标识的业务报文数量,所述业务报文的时间片标识与所述测试报文携带的时间片标识相同;The sending end receives the response message replied by the receiving end, where the response message carries the second counting result, and the second counting result is used to indicate that the receiving end receives the test message The number of service packets that have been received by the receiving end and have the same time slice identifier. The time slice identifier of the service packet is the same as the time slice identifier carried in the test packet.
    所述发送端根据所述第一计数结果和所述第二计数结果计算所述业务报文子集的丢包率。The sending end calculates a packet loss rate of the service packet subset according to the first counting result and the second counting result.
  22. 根据权利要求21所述的网络丢包的测量方法,其特征在于,所述为每个业务报文子集中的业务报文添加所分配的时间片标识,包括:The method for measuring network packet loss according to claim 21, wherein the adding the allocated time slice identifier to the service packet in each service packet subset includes:
    在业务报文的报文头中的预设字段添加已分配的时间片标识。Add the assigned time slice identifier to the preset field in the packet header of the service packet.
  23. 根据权利要求21所述的网络丢包的测量方法,其特征在于,所述为每个业务报文子集中的业务报文添加所分配的时间片标识,包括:The method for measuring network packet loss according to claim 21, wherein the adding the allocated time slice identifier to the service packet in each service packet subset includes:
    为所述业务报文封装协议报文头,所述协议报文头为所述业务报文所在业务报文子集的时间片标识。Encapsulating a protocol packet header for the service packet, where the protocol packet header is a time slice identifier of a subset of the service packet where the service packet is located.
  24. 根据权利要求21至23任一项所述的网络丢包的测量方法,其特征在于,所述方法还包括:The method for measuring network packet loss according to any one of claims 21 to 23, wherein the method further comprises:
    所述发送端在业务报文子集中***至少一个乱序测试报文,所述乱序测试报文携带有所述业务报文子集的时间片标识,所述乱序测试报文用于指示获取第三计数结果,所述第三计数结果为发送所述乱序测试报文前,已发送的与所述乱序测试报文的时间片标识对应的计数结果;The sending end inserts at least one out-of-order test packet in the service packet subset, where the out-of-order test packet carries a time slice identifier of the service packet subset, and the out-of-order test packet is used to indicate acquisition. a third counting result, where the third counting result is a counting result that is sent corresponding to the time slice identifier of the out-of-order test packet before the out-of-sequence test packet is sent;
    所述向接收端依次发送所述业务报文子集,包括:Sending the subset of the service packets to the receiving end in sequence, including:
    向所述接收端依次发送所述业务报文子集,每个业务报文子集中包括至少一个所述乱序测试报文;And transmitting, to the receiving end, the service packet subset, where each service packet subset includes at least one out of order test packet;
    所述发送端接收所述接收端反馈的乱序响应报文,所述乱序响应报文中携带有所述接收端在接收到所述乱序测试报文时的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量; The sending end receives the out-of-order response message fed back by the receiving end, where the out-of-order response message carries a fourth counting result when the receiving end receives the out-of-order test message, The fourth counting result is used to indicate the number of service packets that have been received by the receiving end and have the same time slice identifier as the out-of-order test packet when the out-of-sequence test packet is received;
    所述发送端根据所述第一计数结果、第二计数结果、第三计数结果和所述第四计数结果,确定业务报文子集中的业务报文是否存在乱序。The sending end determines, according to the first counting result, the second counting result, the third counting result, and the fourth counting result, whether the service packets in the service packet subset are out of order.
  25. 根据权利要求21至24任一项所述的网络丢包的测量方法,其特征在于,The method for measuring network packet loss according to any one of claims 21 to 24, characterized in that
    所有的所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets are sent by the sending end to the receiving end through the same path;
    所述测试报文为前向控制帧;The test message is a forward control frame;
    所述响应报文为后向报告帧。The response message is a backward report frame.
  26. 一种网络丢包的测量方法,所述方法应用于一种数据传输***,所述数据传输***设置有发送端和接收端,其特征在于,所述方法包括:A method for measuring network packet loss, the method is applied to a data transmission system, where the data transmission system is provided with a transmitting end and a receiving end, wherein the method includes:
    所述接收端接收所述发送端发送的业务报文,所述业务报文携带有时间片标识;Receiving, by the receiving end, the service packet sent by the sending end, where the service packet carries a time slice identifier;
    所述接收端对已接收到的具有相同的时间片标识的业务报文进行计数;The receiving end counts the received service packets with the same time slice identifier;
    所述接收端接收发送端发送的测试报文,所述测试报文中携带有所述时间片标识;The receiving end receives the test packet sent by the sending end, where the test packet carries the time slice identifier;
    所述接收端获取与所述时间片标识对应的第二计数结果,所述第二计数结果用于表示接收端收到所述测试报文时,与所述测试报文携带的时间片标识对应的业务报文的计数结果;The receiving end acquires a second counting result corresponding to the time slice identifier, where the second counting result is used to indicate that the receiving end receives the test packet, and corresponds to the time slice identifier carried in the test packet. Counting results of business messages;
    所述接收端向所述发送端发送响应报文,所述响应报文中携带有获取的所述第二计数结果。The receiving end sends a response packet to the sending end, where the response packet carries the obtained second counting result.
  27. 根据权利要求26所述的网络丢包的测量方法,其特征在于,所述对已接收到的具有相同的时间片标识的业务报文进行计数,包括:The method for measuring a network packet loss according to claim 26, wherein the counting of the received service packets having the same time slice identifier includes:
    所述业务报文的报文头中的预设字段添加有所述时间片标识;Adding the time slice identifier to a preset field in a packet header of the service packet;
    对已接收的具有相同的所述时间片标识的业务报文进行计数。The received service packets having the same time slice identifier are counted.
  28. 根据权利要求26所述的网络丢包的测量方法,其特征在于,所述对已接收到的具有相同的时间片标识的业务报文进行计数,包括:The method for measuring a network packet loss according to claim 26, wherein the counting of the received service packets having the same time slice identifier includes:
    所述业务报文封装有协议报文头,所述协议报文头为所述业务报文的时间片标识; The service packet is encapsulated with a protocol packet header, and the protocol packet header is a time slice identifier of the service packet;
    对已接收的具有相同的所述时间片标识的业务报文进行计数。The received service packets having the same time slice identifier are counted.
  29. 根据权利要求26至28任一项所述的网络丢包的测量方法,其特征在于,所述方法还包括:The method for measuring network packet loss according to any one of claims 26 to 28, wherein the method further comprises:
    所述接收端接收所述发送端发送的乱序测试报文,所述乱序测试报文携带有所述时间片标识;Receiving, by the receiving end, the out-of-sequence test packet sent by the sending end, where the out-of-order test packet carries the time slice identifier;
    所述接收端获取与所述时间片标识对应的第四计数结果,所述第四计数结果用于表示收到所述乱序测试报文时,所述接收端已接收到的与所述乱序测试报文具有相同时间片标识的业务报文数量;The receiving end acquires a fourth counting result corresponding to the time slice identifier, where the fourth counting result is used to indicate that the receiving end has received the mess when receiving the out-of-order test packet The number of service packets with the same time slice identifier in the sequence test packet;
    所述接收端向所述发送端反馈乱序响应报文,所述乱序响应报文携带有获取的所述第四计数结果。The receiving end feeds the out-of-order response message to the sending end, where the out-of-order response message carries the obtained fourth counting result.
  30. 根据权利要求26至29任一项所述的网络丢包的测量方法,其特征在于,The method for measuring network packet loss according to any one of claims 26 to 29, characterized in that
    所有所述测试报文均通过相同的路径由所述发送端到达所述接收端;All the test packets are sent by the sending end to the receiving end through the same path;
    所述测试报文为前向控制帧;The test message is a forward control frame;
    所述响应报文为后向报告帧。 The response message is a backward report frame.
PCT/CN2014/087981 2014-09-30 2014-09-30 Device and method for measuring network packet loss WO2016049872A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201480023982.4A CN105765911B (en) 2014-09-30 2014-09-30 A kind of measuring device and method of Network Packet Loss
PCT/CN2014/087981 WO2016049872A1 (en) 2014-09-30 2014-09-30 Device and method for measuring network packet loss

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/087981 WO2016049872A1 (en) 2014-09-30 2014-09-30 Device and method for measuring network packet loss

Publications (1)

Publication Number Publication Date
WO2016049872A1 true WO2016049872A1 (en) 2016-04-07

Family

ID=55629299

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/087981 WO2016049872A1 (en) 2014-09-30 2014-09-30 Device and method for measuring network packet loss

Country Status (2)

Country Link
CN (1) CN105765911B (en)
WO (1) WO2016049872A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108834213A (en) * 2018-04-04 2018-11-16 西安电子科技大学 Low downlink delays communication means and system in a kind of Internet of Things
CN108964955A (en) * 2017-05-23 2018-12-07 中兴通讯股份有限公司 A kind of loss Trap message lookup method and Network Management System and a kind of SNMP agent
WO2019228318A1 (en) * 2018-05-28 2019-12-05 华为技术有限公司 Message processing method and device
CN111447110A (en) * 2020-03-24 2020-07-24 北京润科通用技术有限公司 Data monitoring method and system
CN111953979A (en) * 2020-07-16 2020-11-17 西安万像电子科技有限公司 Image processing method and device
CN112583659A (en) * 2020-11-24 2021-03-30 视联动力信息技术股份有限公司 Method and device for detecting network state of video network, terminal equipment and storage medium
CN112737874A (en) * 2020-12-23 2021-04-30 新华三技术有限公司 Packet loss statistics realization method and device for message
CN113055128A (en) * 2021-03-28 2021-06-29 杭州迪普信息技术有限公司 Method and device for testing decoding correctness of signaling message
CN114844804A (en) * 2022-06-01 2022-08-02 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106375158B (en) * 2016-10-25 2019-09-13 华为技术有限公司 A kind of method for detecting packet loss, the network equipment and system
CN107547300B (en) * 2017-06-16 2020-05-12 新华三技术有限公司 Network quality detection method and device
CN108965058B (en) * 2018-07-26 2021-03-02 北京奇艺世纪科技有限公司 Method and system for detecting terminal network performance
CN111786859A (en) * 2020-07-17 2020-10-16 中国联合网络通信集团有限公司 Packet loss detection method, device and storage medium
CN114301811A (en) * 2020-09-23 2022-04-08 ***通信有限公司研究院 Information processing method and device and tunnel endpoint network element
CN114567541A (en) * 2020-11-27 2022-05-31 中兴通讯股份有限公司 Pre-activation detection method, electronic equipment and computer readable storage medium
CN114244739A (en) * 2021-12-21 2022-03-25 苏州盛科通信股份有限公司 Method, device and storage medium for improving message statistical accuracy

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800679A (en) * 2010-03-10 2010-08-11 华为技术有限公司 Message packet loss detection method and system
CN102984018A (en) * 2011-09-02 2013-03-20 华为技术有限公司 Method, device and system for Ethernet packet loss measurement
WO2013066679A1 (en) * 2011-11-04 2013-05-10 Interdigital Patent Holdings, Inc. Methods, apparatus and systems for minimization of drive tests (mdt) based on qos verifications

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007024161A1 (en) * 2005-08-23 2007-03-01 Telefonaktiebolaget L M Ericsson (Publ) Method and arrangement for measuring transmission quality in a packet mode communication network
CN100356740C (en) * 2005-12-12 2007-12-19 史文勇 System and method for conducting comprehensive measurement and association analysis to time delay and drop
CN102215144B (en) * 2011-05-17 2016-06-29 中兴通讯股份有限公司 The measuring method of packet loss and system
CN102904775B (en) * 2012-09-29 2015-04-29 华为技术有限公司 Method, apparatus and system for measuring network packet loss

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101800679A (en) * 2010-03-10 2010-08-11 华为技术有限公司 Message packet loss detection method and system
CN102984018A (en) * 2011-09-02 2013-03-20 华为技术有限公司 Method, device and system for Ethernet packet loss measurement
WO2013066679A1 (en) * 2011-11-04 2013-05-10 Interdigital Patent Holdings, Inc. Methods, apparatus and systems for minimization of drive tests (mdt) based on qos verifications

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108964955A (en) * 2017-05-23 2018-12-07 中兴通讯股份有限公司 A kind of loss Trap message lookup method and Network Management System and a kind of SNMP agent
CN108834213B (en) * 2018-04-04 2022-04-22 西安电子科技大学 Low-downlink delay communication method and system in Internet of things
CN108834213A (en) * 2018-04-04 2018-11-16 西安电子科技大学 Low downlink delays communication means and system in a kind of Internet of Things
WO2019228318A1 (en) * 2018-05-28 2019-12-05 华为技术有限公司 Message processing method and device
US11722407B2 (en) 2018-05-28 2023-08-08 Huawei Technologies Co., Ltd. Packet processing method and apparatus
CN111447110A (en) * 2020-03-24 2020-07-24 北京润科通用技术有限公司 Data monitoring method and system
CN111953979A (en) * 2020-07-16 2020-11-17 西安万像电子科技有限公司 Image processing method and device
CN112583659A (en) * 2020-11-24 2021-03-30 视联动力信息技术股份有限公司 Method and device for detecting network state of video network, terminal equipment and storage medium
CN112737874A (en) * 2020-12-23 2021-04-30 新华三技术有限公司 Packet loss statistics realization method and device for message
CN112737874B (en) * 2020-12-23 2022-08-30 新华三技术有限公司 Packet loss statistics realization method and device for message
CN113055128B (en) * 2021-03-28 2022-06-24 杭州迪普信息技术有限公司 Method and device for testing decoding correctness of signaling message
CN113055128A (en) * 2021-03-28 2021-06-29 杭州迪普信息技术有限公司 Method and device for testing decoding correctness of signaling message
CN114844804A (en) * 2022-06-01 2022-08-02 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium
CN114844804B (en) * 2022-06-01 2023-07-25 重庆奥普泰通信技术有限公司 Network measurement method, system, electronic device and computer readable storage medium

Also Published As

Publication number Publication date
CN105765911A (en) 2016-07-13
CN105765911B (en) 2019-04-19

Similar Documents

Publication Publication Date Title
WO2016049872A1 (en) Device and method for measuring network packet loss
CN101523825B (en) Flow control method, transmitting terminal device used in same, receiving terminal device and packet transfer system
JP2020519098A (en) Link group configuration method and device
TWI242946B (en) Wireless packet communication apparatus and method
US20180331955A1 (en) Service Traffic Allocation Method and Apparatus
US9059916B2 (en) Apparatus and method for transmitting packets in a communication system
US20150195169A1 (en) Method, Device, and System for Measuring Network Packet Loss
US20120188873A1 (en) Communication system, communication method, receiving apparatus, and transmitting apparatus
EP3522465A1 (en) Service data transmission method, device and system, and storage medium
CN113328902B (en) Network performance detection method and device and network equipment
WO2017031816A1 (en) Data transmission method, relevant device and system
CN110943933A (en) Method, device and system for realizing data transmission
US11153207B2 (en) Data link layer-based communication method, device, and system
WO2018036173A1 (en) Network load balancing method, device and system
CN108521343A (en) A kind of processing method and processing device of OAM message
CN114430386A (en) Method and related device for detecting multicast service flow
CN110943935A (en) Method, device and system for realizing data transmission
CN110944358A (en) Data transmission method and device
WO2021147377A1 (en) Multicast packet detection method, network device, and system
CN115955447B (en) Data transmission method, switch and switch system
CN115002008B (en) Method, device, equipment and storage medium for measuring network delay
CN107579804B (en) Method and system for filtering repeated data
EP3051919B1 (en) Device and method for wireless communication used in wireless ad hoc network
WO2021078061A1 (en) Data transmission quality measurement method, forwarding device and readable storage medium
WO2017140076A1 (en) Data transmission method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 14903192

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14903192

Country of ref document: EP

Kind code of ref document: A1