WO2021117171A1 - データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム - Google Patents

データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム Download PDF

Info

Publication number
WO2021117171A1
WO2021117171A1 PCT/JP2019/048557 JP2019048557W WO2021117171A1 WO 2021117171 A1 WO2021117171 A1 WO 2021117171A1 JP 2019048557 W JP2019048557 W JP 2019048557W WO 2021117171 A1 WO2021117171 A1 WO 2021117171A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
sequence number
ring buffer
section
monitoring
Prior art date
Application number
PCT/JP2019/048557
Other languages
English (en)
French (fr)
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 PCT/JP2019/048557 priority Critical patent/WO2021117171A1/ja
Priority to JP2021563521A priority patent/JP7197026B2/ja
Priority to US17/783,540 priority patent/US20230009530A1/en
Publication of WO2021117171A1 publication Critical patent/WO2021117171A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/34Flow control; Congestion control ensuring sequence integrity, e.g. using sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1628List acknowledgements, i.e. the acknowledgement message consisting of a list of identifiers, e.g. of sequence numbers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/901Buffering arrangements using storage descriptor, e.g. read or write pointers

Definitions

  • the present invention relates to a data order correction method for counting the number of lost data in a data order correction method for rearranging received data with sequence numbers in order of sequence number.
  • packets that arrive in random order on the receiving side are temporarily stored in an order correction buffer, and the order information (usually) stored in the packet header is stored. Sort the packets in the correct order based on the sequence number) and then play the original audio or video.
  • the audio or video playback is temporarily stopped in order to wait for the arrival of the packet with a large delay, or the packet with a very large delay is discarded. Dropouts occur in audio and video.
  • the terminal that transmits the packet adds the transmission time information to the transmission packet and transmits the packet, and the packet monitoring device records the reception time of the packet taken out by the network tap or the like. , Read the transmission time information from the arrived packet, obtain the delay of each packet from the difference between the reception time and the transmission time, and observe the fluctuation of the delay.
  • Patent Document 2 packet jitter is observed without using transmission time information.
  • the packet interval is calculated by arranging the received packets in order (order correction) and calculating the packet arrival interval for the packets that are periodically generated and given the sequence number. Observe the fluctuation of.
  • the ring buffer is divided into a plurality of storage areas, two or more consecutive storage areas are defined as monitoring sections, and the transmitted data is set. It is stored in a predetermined storage area, it monitors whether the data required for reassembly is stored in the monitoring section, and when the data required for reassembly is available in the monitoring section, it is called and the storage area where the data is stored. When is behind the monitoring section, the monitoring section is moved so that the end of the monitoring section is the storage area for storing this data.
  • Patent Document 1 it is necessary to match the time information standard, for example, the unit of time, between the terminal that transmits the packet and the packet monitoring device.
  • Patent Document 2 since it is assumed that a plurality of received data are concatenated to reassemble the original large data, a sufficiently large ring buffer having a storage area for all sequence numbers is used. , Read from the ring buffer when the data required for reassembly is available in the monitoring section.
  • the storage for writing data based on the remainder obtained by dividing the sequence number by the number of storage areas in the ring buffer. It is conceivable to determine the area, read it from the ring buffer when the data near the beginning is complete, and reuse the vacant storage area for subsequent data with the same surplus.
  • the data that should be recorded at the beginning of the ring buffer does not arrive, if a certain condition is satisfied and it is determined that the data is lost, the beginning position of the ring buffer is advanced without waiting for the arrival of the data.
  • the fixed condition is, for example, when the number of stored packets reaches a predetermined number, when the order information of the arrival time information of the received packets is not within the receiving section, or when the predetermined time elapses. Since the number of times the arrival interval could not be calculated due to data loss or a large delay (number of data loss times) is also important information that can be used as a guide for communication quality, it is necessary to aggregate not only the arrival interval but also the number of data loss times. If the start position of the ring buffer is moved one by one after stopping waiting for the arrival of data, the number of data losses can be accurately totaled, and the total with the totaled result of the arrival interval is the transmitted packet. Is the total number of.
  • the present invention has been made to solve such a problem, and even when the number of storage areas of the ring buffer is limited, the received data can be accurately sorted in order of the sequence number and the lost data can be sorted. It is an object of the present invention to provide a data order correction method capable of accurately totaling the number of.
  • a data order correction method in which data with order information is temporarily stored in a ring buffer and the order is corrected, and the ring buffer stores a predetermined number of data corresponding to the order information.
  • a ring buffer including a monitoring section having an area and consisting of one or two or more consecutive sequence numbers, and the beginning or second sequence number of the monitoring section as the first sequence number, including the beginning of the monitoring section.
  • a receiving section having a sequence number after the number of storage areas of the data as the last sequence number is provided, and when the sequence number of the received data is within the reception section, the sequence number of the received data is stored in the ring buffer storage area.
  • the received data is located at the position of the storage area corresponding to the value determined based on the surplus obtained by dividing the sequence number of the received data by the number of storage areas of the ring buffer.
  • the monitoring section and the receiving section before and after determining the monitoring section and the receiving section. It includes a step of correcting the number of times of data loss according to the amount of movement of.
  • the packet monitoring device of the present invention includes an arrival time information adding unit that adds arrival time information to a received packet whose sequence information is included in the header, and an arrival time information adding unit in the header of the received packet.
  • the order of the monitored packets is corrected by any of the methods 1 to 6 based on the monitoring target extraction unit that extracts the monitored packets based on the information and the order information in the header of the monitored packets. Then, the arrival time information of two packets in which the order information is continuous is output, and when the two packets in which the order information is continuous are not aligned even if the storage limit of the ring buffer is exceeded, it is determined that packet loss has occurred.
  • the packet order correction unit that advances the head position of the ring buffer and counts up the number of packet loss occurrences, and the packet interval calculation unit that obtains the packet interval from the difference between the arrival times of two packets in which the order information is continuous.
  • a histogram based on the frequency distribution of the packet interval, the statistical information storage unit that stores the number of times the packet loss has occurred, the frequency distribution of the packet interval stored in the statistical information storage unit, and the number of times the packet loss has occurred. It is provided with a visualization unit that is displayed as.
  • the data order correction device of the present invention is a data order correction device that temporarily stores data with order information in a ring buffer and corrects the order.
  • a monitoring section having a predetermined number of storage areas corresponding to information and consisting of one or two or more consecutive sequence numbers, and the first or second sequence number of the monitoring section is set as the first sequence number.
  • a receiving section is provided in which the sequence number after the number of storage areas of the ring buffer including the beginning of the monitoring section is the last sequence number, and the sequence number of the received data is divided by the number of storage areas of the ring buffer based on the surplus.
  • the acceptance / rejection determination unit that determines whether the determined value is within the acceptance section, and when the sequence number of the received data is within the acceptance section, the sequence number of the received data is stored in the storage area of the ring buffer.
  • the monitoring when data is written to the ring buffer writing unit that writes the received data to the position of the storage area corresponding to the value determined based on the surplus divided by the number and all of the monitoring sections.
  • a ring buffer read unit that reads all the data in the section, and a monitor that updates the first sequence number and the last sequence number of the monitoring section and the receiving section, respectively, within the range of the number of sequence numbers in the monitoring section.
  • the section / acceptance section management unit is provided, and the early monitoring section / acceptance section management unit stores the sequence number of the received data in the ring buffer storage area when the number of data stored in the ring buffer is 0.
  • the received data is written in the position of the storage area corresponding to the value determined based on the surplus divided by the number, the received data is set as the head of the monitoring section, and the head of the monitoring section is associated with the received data.
  • the first sequence number and the last sequence number of the monitoring section and the receiving section are determined, and even if one or more of the monitoring sections are empty, if a predetermined determination condition is satisfied, the ring is used.
  • the first sequence number and the last sequence number of the monitoring section and the receiving section are updated one after the other, and the number of data losses is incremented. If the data received in the state where the number of data stored in the ring buffer is 0 is not the first received data, it depends on the movement amount of the monitoring section and the receiving section before and after determining the first sequence number. The number of data losses is corrected.
  • the data order correction program of the present invention is a data order correction program for executing a data order correction method for temporarily storing data with order information in a ring buffer and performing order correction. Therefore, the ring buffer includes a predetermined number of storage areas corresponding to order information, and has a monitoring section consisting of one or two or more consecutive sequence numbers, and the first or second sequence of the monitoring section. A receiving section is provided in which the number is the first sequence number and the sequence number after the number of storage areas of the ring buffer including the beginning of the monitoring section is the last sequence number, and the sequence number of the received data is within the acceptance section.
  • the received data is written in the position of the storage area corresponding to the value determined in the above-mentioned manner, the received data is set as the head of the monitoring section, and the monitoring section and the receiving section are associated with the head of the monitoring section. If the step of determining the first sequence number and the last sequence number of each of the above and even if one or more of the monitoring sections are empty, if a predetermined determination condition is satisfied, the storage limit of the ring buffer is set. A step of determining that an excessive data loss has occurred, updating the first sequence number and the last sequence number of each of the monitoring section and the receiving section after one, and incrementing the number of data losses, and the ring. If the data received when the number of data stored in the buffer is 0 is not the first received data, the data loss depends on the amount of movement of the monitoring section and the receiving section before and after determining the first sequence number. Have the computer perform the steps to correct the number of times.
  • the received data is accurately sorted in order of the sequence number, and the number of lost data is also accurately aggregated. It becomes possible to provide a data order correction method capable of this.
  • FIG. 1 is a configuration example of a packet format according to the present embodiment.
  • FIG. 2 is a diagram showing a configuration example of the packet monitoring device according to the present embodiment.
  • FIG. 3 is a diagram showing a configuration example of a ring buffer according to the present embodiment.
  • FIG. 4 is a diagram showing a configuration example of the data order correction device according to the present embodiment.
  • FIG. 5 is a configuration example of a computer for realizing the data order correction device and the like according to the present embodiment.
  • FIG. 6A is a diagram showing an example of an operation flowchart of the data order correction method according to the first embodiment.
  • FIG. 6B is a diagram showing an example of an operation flowchart of the process when the number of stored packets is 0 according to the first embodiment.
  • FIG. 7 is a diagram for explaining an initial state of the ring ring buffer according to the first embodiment.
  • FIG. 8 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 9 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 10 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 11 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 12 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 13 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 14 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 15 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 16 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 17 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 18 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 19 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 20 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 21 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 22 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 23 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 24 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 25 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 26 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 27 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 28 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 29 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 30 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 31 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 32 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 33 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 34 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 35 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 36 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 37 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 38 is a diagram for explaining the operation of the ring ring buffer according to the first embodiment.
  • FIG. 39A is a diagram showing an example of an operation flowchart of the data order correction method according to the second embodiment.
  • FIG. 39B is a diagram showing an example of an operation flowchart of the process when the number of stored packets is 0 according to the second embodiment.
  • FIG. 40 is a diagram showing an example of an operation flowchart of the data loss number correction processing according to the second embodiment.
  • FIG. 41 is a diagram for explaining an initial state of the ring ring buffer according to the second embodiment.
  • FIG. 42 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 43 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 44 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 45 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 46 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 47 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 48 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 49 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 50 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 51 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 52 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 53 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 54 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 55 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 56 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 57 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 58 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 59 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 60 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 61 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 62 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 63 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 64 is a diagram for explaining the operation of the ring ring buffer according to the second embodiment.
  • FIG. 65 is a configuration example of a conventional ring buffer.
  • FIG. 1 is a configuration example of the format of the RTP packet that is the target of the order correction in the first embodiment.
  • a sequence number (SequenceNumer, 16-bit width with a range of 0 to 65535) indicating the order in which the packets are generated is stored, and a sequence of a plurality of RTP packets sent in the same call is stored.
  • the number is configured to start at a random value at the start of the call, increase by 1 until the end of the call, and then return to 0 after 65535. Therefore, the sequence numbers of the RTP packets immediately after generation are serial numbers at equal intervals in time.
  • FIG. 2 is a configuration example of the packet monitoring device according to the present embodiment.
  • the packet monitoring device 1 in the present embodiment adds arrival time information to the PHY unit 10, the MAC unit 20, and the received packet that perform processing of the physical layer (PHY) and the data link layer (MAC) on the received packet.
  • the arrival time information adding unit 30, the monitored target extraction unit 40 that extracts the monitored packets of the same flow containing the order information in the header based on the information in the packet header, and the monitored target packet 40 in the header of the monitored packet.
  • a packet order correction unit 50 that corrects the order of monitored packets based on the information (sequence number in FIG. 1) and outputs arrival time information of two packets having continuous order information, and two continuous sequence information.
  • the statistical information storage unit 70 that stores the packet arrival interval, and the frequency distribution for each packet arrival interval stored in the statistical information storage unit 70. It also includes a visualization unit 80 that is displayed as a histogram.
  • the arrival time information adding unit 30 adds arrival time information to the packet taken out by performing the processing of the physical layer (PHY) and the data link layer (MAC) on the received packet.
  • Examples of means for giving time information include a method of inserting or overwriting in a header, a method of running in parallel with a packet and transferring it to a subsequent block, and the like.
  • the monitoring target extraction unit 40 extracts the packet to be monitored based on the information in each header of the packet. For example, the source address and destination address of the packet header and the destination port number in the UDP header are inspected, and packets that match the values registered as monitoring targets are extracted as monitoring target packets, and packet order correction is performed. Send to the department.
  • the packet order correction unit 50 corrects the order of the monitored packets based on the sequence number extracted from the header of the monitored packet, and sends the arrival time information of two or more packets having consecutive sequence numbers to the packet interval calculation unit 60. Output. Further, in order to count and correct the number of data loss detected in the order correction, the number of increase / decrease in the number of data loss is output to the statistical information storage unit 70.
  • the configuration of the packet order correction unit and the packet order correction method will be described in detail in the configuration and operation example of the packet order correction unit 50 described later.
  • the packet interval calculation unit 60 obtains the packet time interval from the difference between the arrival times of the two consecutive packets. .. By subtracting the arrival time of the packet whose sequence number is earlier from the arrival time of the packet whose sequence number is later, it is possible to determine not only the time interval of the packets but also whether or not the order of the packets is reversed.
  • the statistical information storage unit 70 stores the frequency distribution of the packet interval obtained by the packet interval calculation unit 60. In addition, the increase / decrease in the number of data losses obtained by the packet order correction unit 50 is aggregated and stored.
  • the visualization unit 80 displays the frequency distribution of the packet intervals stored in the statistical information storage unit 70 as a histogram.
  • FIG. 3 is a configuration example of the ring buffer according to the present embodiment.
  • the ring buffer of this configuration example includes a predetermined number of storage areas corresponding to order information, one or two or more consecutive sequence numbers are set as monitoring sections, and the head or second sequence number of the monitoring section is set as a monitoring section.
  • a receiving section is provided in which the sequence number at the beginning is set and the sequence number immediately before the sequence number at the beginning of the monitoring section is the sequence number at the end.
  • the position corresponding to the sequence number in which the ring buffer goes around from the sequence number at the beginning of the monitoring section is the end of the acceptance section.
  • the beginning and the end of the monitoring section and the receiving section are represented by sequence numbers and managed. If the width and interval between the monitoring section and the receiving section are constant, at least one of the four types of sequence numbers shown in FIG. 3 can be known from the other three types of sequence numbers. It suffices to manage one type of sequence number.
  • the sequence number of the received data is the sequence number in the receiving section, and if it is in the receiving section, the received data is stored in the storage area corresponding to the sequence number of the received data. Is written. On the other hand, if the sequence number of the received data is outside the receiving section, the received data is discarded.
  • the monitoring section and the receiving section are moved by increasing the sequence number at the beginning and the sequence number at the end of each. For example, when the number of sequence numbers of the monitoring section is 2, the monitoring section and the receiving section are moved to the back by one storage area, or the monitoring section and the receiving section are moved to the back by two storage areas. ..
  • FIG. 4 is a configuration example of the packet order correction unit 50 according to the present embodiment.
  • the packet order correction unit 50 is a function unit that temporarily stores data with order information in a ring buffer and corrects the order.
  • the packet order correction unit 50 includes an acceptance / rejection determination unit 51 that determines whether the order information of the received data is within the acceptance section, and the order information of the received data is within the acceptance section.
  • the ring buffer writing unit 52 that writes the received data to the ring buffer 55 at the position of the storage area corresponding to the order information of the received data, and the monitoring when the data is written to all of the monitoring sections. It is composed of a ring buffer reading unit 53 that reads out all the data in the section from the ring buffer 55, and a monitoring section / receiving section management unit 54 that manages the monitoring section and the receiving section and moves them as needed.
  • the PHY unit 10 the MAC unit 20, the arrival time information adding unit 30, the monitoring target extraction unit 40, the packet order correction unit 50, the packet interval calculation unit 60, and the statistical information storage unit
  • the 70 can be realized as hardware on a NIC (Network Interface Card).
  • the visualization unit 80 can be realized by a computer, visualization software installed on the computer, and a display connected to the computer.
  • the arrival time information adding unit 30, the monitoring target extraction unit 40, the packet order correction unit 50, the packet interval calculation unit 60, the statistical information storage unit 70, and the visualization unit 80 CPU (Central Processing Unit), storage device and external interface (hereinafter, external I / F), and a program that controls these hardware resources.
  • CPU Central Processing Unit
  • external I / F storage device and external interface
  • the computer 100 includes a CPU 200, a storage device 300, and an external I / F 400, which are connected to each other via an I / O interface 500.
  • a program such as a data order correction program for realizing the operation of the packet monitoring device 1 of the present embodiment, and data such as received data, arrival time information of received data, monitoring section, and receiving section are stored in the storage device 300.
  • Other computers that send and receive signals to and from each other are connected to the external I / F 400.
  • the CPU 200 executes the process described in the present embodiment according to the data order correction program or the like stored in the storage device 300. Further, the processing program may be configured to be recorded on a computer-readable recording medium.
  • FIG. 6A is an example of an operation flowchart of the data order correction method according to the present embodiment.
  • the number of stored packets is larger than 0 (S3), and the sequence number of the received data is within the receiving section (S5), the sequence number of the received data is stored in the storage area of the ring buffer.
  • the step (S6) of writing the received data to the position of the storage area corresponding to the value determined based on the surplus divided by the number and currentizing the number of stored packets, and the data are written in all of the monitoring sections.
  • the transition to S9 is performed, the first sequence number and the last sequence number of the monitoring section and the receiving section are updated, and the stored packets are currentized. If the data is not received in S2, the transition to S7 is performed, and S2 ⁇ S7 ⁇ S8 ⁇ S9 ⁇ S10 ⁇ S2 is repeated until the serial number data is interrupted or new data is received.
  • the process proceeds to S4 and the process when the number of stored packets shown in FIG. 6B is 0 is performed.
  • the received sequence number as the beginning of the monitoring section, the end of the monitoring section, the beginning and end of the receiving section, and the earliest beginning sequence number described later are determined (S4-1, S4-2) and received.
  • S4-1, S4-2 the received sequence number as the beginning of the monitoring section, the end of the monitoring section, the beginning and end of the receiving section, and the earliest beginning sequence number described later are determined (S4-1, S4-2) and received.
  • the data is the first received packet (S4-3)
  • the transition to S6 occurs. If it is not the first received packet (S4-3), the result of subtracting the immediately preceding first sequence number from the determined first sequence number is added to the number of data losses to correct the number of data losses (S4-4).
  • the number of data losses is incremented (S12) to transition to S9, and if no data is written in all of the monitoring sections in S7, the transition to S10 is performed. If the number of stored packets is equal to or greater than the threshold value in S10, the number of data losses is incremented (S11) to transition to S9, and S10 and S9 are repeated until the number of stored packets becomes less than the threshold value.
  • the number of sequence numbers of the monitoring section is 2, and the first sequence number and the last sequence number of the monitoring section and the receiving section are updated after one, and the monitoring section and the receiving section are updated. Will be described as an example in the case where is moved back by one.
  • FIG. 7 is a diagram showing an initial state of the ring buffer in the present embodiment.
  • the ring buffer of FIG. 7 has 128 storage areas, and is configured to store 128 packets of arrival time information and arrival flags of received packets.
  • the storage area in which the first packet is stored becomes the head of the monitoring section, and two consecutive sequence numbers from the storage area become the monitoring section.
  • the second sequence number of the monitoring section is set at the beginning of the receiving section, and the sequence number after 126 (128-width of the monitoring section) from the sequence number at the beginning of the monitoring section is set at the end of the receiving section.
  • the storage area corresponding to the sequence number immediately before the sequence number at the beginning of the monitoring section is the end of the acceptance section.
  • the packet to be sequence-corrected is the RTP packet described in FIG. 1, and the sequence numbers 0 to 65535 in the RTP header correspond to the sequence numbers. Since the ring buffer has only 128 packets of storage area while there are 65535 sequence numbers, the arrival time information of each packet and the address of the storage area where the arrival flag is stored are determined by mod (sequential number, 128). Then, the threshold number of stored packets in the ring buffer is set to 120 packets as an example. The storage area in which the packet received in the initial state is stored becomes the beginning of the monitoring section, and the order number at the beginning and the order number at the end of each of the monitoring section and the receiving section are determined corresponding to the beginning of the monitoring section.
  • the packet order correction unit 50 holds the first sequence number and the last sequence number of the monitoring section and the receiving section, the earliest first sequence number, and the number of stored packets in a register or the like, and these information are the arrival time information. It is updated as needed when writing or reading.
  • the earliest first sequence number means the "earliest" sequence number when the sequence numbers of all packets received after the start of packet monitoring are compared.
  • sequence number 101 is received, the "first” remains sequence number 100, and when sequence number 99 is received next, "first" is sequence number 100. It changes to the sequence number 99 before.
  • sequence number starts from a random value and increases by 1, and returns to 0 after 65535. Therefore, when comparing sequence numbers 65535 and 0, sequence number 65535 comes before.
  • sequence number goes around with 65536 packets, it is necessary to take measures when implementing it. For example, after "a certain amount of time” has passed since the first packet was received, it is unlikely that a packet with a sequence number earlier than the "earliest first sequence number” at that time will arrive. It is not necessary to execute the process of "offset the amount that the head sequence number of the acceptance section moves before the earliest lead sequence number" as described in FIG. 31 to be described later.
  • the start position of the ring buffer is advanced one position backward without waiting for the arrival of data, and the increment of the number of data losses is statistically calculated.
  • the certain condition is that the number of stored packets reaches a predetermined number, the order information of the arrival time information of the received packets is not within the receiving section, and the predetermined time elapses.
  • the statistical information storage unit 70 aggregates and stores the number of data losses according to the increase / decrease in the number of data losses input from the packet order correction unit 50.
  • the arrival flag of address 2 in the storage area becomes 1
  • the sequence number at the beginning of the acceptance section becomes "3", which is one after the sequence number "2” at the beginning of the monitoring section.
  • the sequence number at the end of the acceptance section is "129", which is 126 (128-2) after the sequence number 3 at the beginning. Since the number of storage areas for which the arrival flag is 1 is 1, the number of stored packets is 1. Since it is the first received packet, the earliest first sequence number is "3", which is the same as the first sequence number of the received section.
  • the first sequence number and the last sequence number of the monitoring section are updated to (3, 4), which is one number after (2, 3) in FIG. 10, and the first sequence number of the acceptance section. And the sequence number at the end is updated to the next number (4,130), and the monitoring section and the receiving section are moving.
  • the arrival flag of the storage area (address 2) outside the monitoring section is set, and the number of stored packets is reduced by 1 to 2.
  • the arrival time information T_2 and T_3 read from the ring buffer are transferred to the packet interval calculation unit, and the packet interval calculation unit calculates the packet interval (T_3-T_2) of the serial number packet.
  • FIG. 12 shows a state after performing the same reading operation as in FIG. 11 because all the data (arrival time information T_3, T_4) are prepared in the monitoring section in the state of FIG.
  • FIG. 14 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each because the number of stored packets reaches the threshold value 120 in FIG. 13 and it is determined that the data is lost.
  • the first sequence number and the last sequence number of the monitoring section are updated to (5, 6), which is one number after (4, 5) in FIG. 13, and the first sequence number and the last sequence number of the acceptance section are changed. It is updated to the next number (6, 132), and the monitoring section and the receiving section have moved. Since the arrival flag of the storage area (address 4) outside the monitoring section is in the raised state in FIG. 13, the arrival flag of the address 4 is lowered, and the number of stored packets is also decremented by 1 to 119. The number of data losses is incremented, and the number of data losses becomes 1.
  • the reading process from the monitoring section is not executed, and the monitoring section and the receiving section are not moved, but the storage packet is stored as in FIG. Since the number threshold value of 120 has been reached, the monitoring section and the receiving section are moved by the operation when the number of stored packets reaches the threshold value, which is the same as in FIG.
  • FIG. 16 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and it is determined that the data is lost.
  • the arrival flag of the storage area (address 5) outside the monitoring section was lowered in the state shown in FIG. 15, this arrival flag is held in the lowered state, and the number of stored packets is not changed. The number of data losses is incremented, and the number of data losses becomes 2.
  • the first sequence number and the last sequence number of the acceptance section are (126, 252).
  • the ring buffer is determined to be data loss and the monitoring section and the acceptance section are moved by one later without writing or reading. It is in a state.
  • the first sequence number and the last sequence number of the monitoring section are updated to (126, 127), which is one number after (125, 126), and the first sequence number and the last sequence number of the acceptance section are one. It is updated to the later number (127, 253), and the monitoring section and the receiving section have moved.
  • the arrival flag of the storage area (address 125) outside the monitoring section is set, and the number of stored packets is also decremented by 1 to 0. That is, it becomes the same as the initial state.
  • the number of data losses is incremented, and the number of data losses becomes 3.
  • the seven packets of sequence numbers 126 to 132 have not arrived and data loss has occurred seven times, so it is necessary to correct the number of data losses. Since the sequence number at the beginning of the acceptance section has moved from 127 to 134 by "+7”, the number of data losses is corrected by "+7", and the number of data losses becomes 10.
  • the current value of the earliest first sequence number in the state of FIG. 18 before receiving the packet is "3"
  • the determined first sequence number is "134”
  • "3" is the previous number. Therefore, the earliest first sequence number in FIG. 19 continues to be "3".
  • 121 sets of serial number packets are read from the ring buffer out of a total of 132 packets of sequence numbers 2 to 133 considered to have been output from the source, and the arrival interval is calculated. It has been aggregated.
  • FIG. 20 shows the state of the ring buffer after the operation when the packet of the sequence number 132 outside the acceptance section arrives in the state of FIG. 19 and the packet outside the acceptance section is received as in FIG. ..
  • the number of data losses is incremented so that the number of data losses becomes 11.
  • FIG. 23 shows a state after performing the same reading operation as in FIG. 11 because all the data (arrival time information T_130, T_131) are prepared in the monitoring section in the state of FIG. 22.
  • FIG. 25 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and it is determined that the data is lost.
  • the arrival flag of T_131 is lowered and the number of stored packets is reduced by 1 to 119.
  • the number of data losses is incremented so that the number of data losses becomes 8.
  • FIG. 27 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each of the monitoring section and the receiving section, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and the data loss is determined in FIG.
  • the arrival flag of the storage area (address 4) outside the monitoring section is held in the state of being lowered from the state of FIG. 26, and the number of stored packets remains 120 and is not changed.
  • the number of data losses is incremented so that the number of data losses becomes 9.
  • FIG. 28 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and it is determined that the data is lost.
  • the arrival flag of the storage area (address 5) outside the monitoring section is held in the state of being lowered from the state of FIG. 27, and the number of stored packets remains 120 and is not changed.
  • the number of data losses is incremented so that the number of data losses becomes 10.
  • FIG. 29 shows the state of the ring buffer after repeated reading as in FIG. 17, since the arrival time information T_135 to T_253 are prepared in the state of FIG. 28.
  • 241 sets of serial number packets are read from the ring buffer out of a total of 252 packets of sequence numbers 2 to 253 considered to have been output from the source, and the arrival interval is calculated. It has been aggregated.
  • FIG. 30 shows the state of the ring buffer after the operation when the packet of the sequence number 1 outside the acceptance section arrives in the state of FIG. 12 and the packet outside the acceptance section is received as in FIG. ..
  • the number of data losses is incremented so that the number of data losses becomes 1.
  • the head sequence number of the acceptance section becomes "0", which is three before the earliest head sequence number "3" in FIG. 30.
  • the current value of the earliest first sequence number in the state of FIG. 30 before receiving the packet is "3”
  • the determined first sequence number is "0”
  • "0" is the previous number. Therefore, the earliest first sequence number in FIG. 31 is "0".
  • the data loss of these three packets is calculated after FIG. 31. If you aggregate, the same packet will be aggregated twice. In order to avoid double counting, it is necessary to correct the number of data losses in the sections of sequence numbers 2 to 4 in the same manner as in FIG. On the other hand, for the three packets of sequence numbers 65535 and 0 to 1, the data loss or arrival interval should be totaled for the first time after FIG. 31, so the first sequence number of the received section is three before the earliest first sequence number. It is not necessary to correct the number of data losses due to the movement to.
  • the first sequence number of the acceptance section has moved from 6 to 0 by "-6", but the amount that the first sequence number of the acceptance section has moved "3" before the earliest first sequence number is offset. Then, the number of data losses is corrected by "-6 + 3", and the number of data losses becomes -2. The number of data losses temporarily becomes a negative value, but since the three packets of sequence numbers 2 to 4 that arrived in the past are always aggregated as data loss after FIG. 31, the total number of data losses is finally obtained. Is the correct value. Since the first sequence number of the acceptance section has become "0", the earliest first sequence number is updated from "3" to "0".
  • FIG. 33 shows a state after performing the same reading operation as in FIG. 11 because all the data (arrival time information T_65535, T_0) are prepared in the monitoring section in the state of FIG. 32.
  • FIG. 35 shows the state of the ring buffer in which the monitoring section and the receiving section are moved by one after each, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and it is determined that the data is lost. Since the arrival flag of the storage area (address 0) outside the monitoring section is in the raised state in FIG. 34, the arrival flag of address 0 is lowered, and the number of stored packets is also decremented by 1 to 119.
  • FIG. 38 shows the state of the ring buffer after being repeatedly read in the same manner as in FIG. 17 because the arrival time information T_135 to T_253 are prepared in the state of FIG. 37.
  • the arrival time information of the head data of the monitoring section is compared with the current time, and the current time exceeds a certain time from the arrival time. If so, the monitoring section and the receiving section may be moved one step later.
  • the arrival time information of the data closest to the beginning of the second and subsequent data of the monitoring section may be used. Even if the data in the monitoring section is lost, by forcibly moving the monitoring section and the receiving section, if the data in the subsequent monitoring section is available, the data can be read from the ring buffer.
  • ⁇ Method of determining whether the data is the first received data> Whether or not the data received when the number of saved packets 0 is the first received data is determined by, for example, after a certain period of time has passed since the last data was received, all the arrival flags of the ring buffer are lowered to 0 and the monitoring section is determined. Update the start sequence number and end sequence number of the received section and the number of saved packets to 0, and determine the data received when the start sequence number, end sequence number, and number of saved packets are all 0 as the first received data. It may be.
  • the arrival flags of the ring buffer are all set to 0, and the start sequence number and end sequence number of the monitoring section and the reception section, and the end sequence number, and ,
  • the number of saved packets may be updated to 0, and the data received when the first sequence number, the last sequence number, and the number of saved packets are all 0 may be determined as the first received data.
  • ⁇ Effect of the first embodiment> when the data is gathered in the monitoring section having the width of two sequence numbers, all the data in the monitoring section is read out, and the monitoring section and the receiving section are moved one step later. , It becomes possible to perform the process of extracting the serial number packet from the packets arriving in no particular order and calculating the packet interval in real time. By determining the storage area to write data to by the remainder obtained by dividing the sequence number by the number of storage areas in the ring buffer, even if the number of storage areas in the ring buffer is limited and the storage areas for all sequence numbers cannot be implemented. Order correction is possible.
  • the beginning and the end of the monitoring section and the receiving section are managed by the sequence number instead of the position (address) of the storage area. Therefore, the sequence number is stored in the ring buffer storage area. Even if the surplus divided by the number is the same as the data already stored in the ring buffer but the data with different sequence numbers arrives, it is possible to prevent the malfunction of arranging the data in the wrong order.
  • the order can be controlled as long as the ring buffer is within the range of the sequence number width in which data can be stored, that is, within the range from the beginning of the monitoring section to the end of the receiving section.
  • the monitoring section and the receiving section are moved one step later, or .
  • the monitoring section and the receiving section are moved to one after the data closest to the beginning or the beginning. Even if the data in the monitoring section is lost, the data can be read from the ring buffer if the monitoring section and the receiving section are forcibly moved and the data in the subsequent monitoring section are available.
  • the number of data losses is corrected by the amount that the head sequence number moves, thereby avoiding count omissions and double counts. Can be done.
  • the head sequence number of the acceptance section moves forward
  • the head sequence number once moved is updated one by one by data reading or data loss without correcting all at once.
  • the number of data losses is deducted once to correct the data loss.
  • the number of data losses is decremented and corrected. This is because the same sequence number as the data read for calculating the arrival interval after the sequence correction has been determined to be data loss in the past, and the number of data losses corresponding to that amount is deducted once.
  • the number of data losses is not incremented for correction. This is because if the data loss is determined in the past, the data loss is not counted twice, and if the data is read in the past, it has already been counted as the frequency distribution of the packet interval.
  • FIG. 39A is an example of an operation flowchart of the data order correction method according to the present embodiment.
  • FIG. 39B is a diagram showing an example of an operation flowchart of the process when the number of stored packets is 0 according to the second embodiment.
  • FIG. 40 is a diagram showing an example of an operation flowchart of the data loss number correction processing according to the second embodiment.
  • a register for holding a sequential correction start sequence number and a sequential correction end sequence number is provided, and data loss occurs only when the start sequence number of the receiving section is the sequential correction start sequence number to the sequential correction end sequence number.
  • the points for correcting the number of times (S4-9, S4-10, S9-1, S9-2) are different.
  • FIG. 41 is a diagram showing an initial state of the ring buffer in the present embodiment.
  • the difference from FIG. 7 is that a register or the like for holding the sequential correction start sequence number and the sequential correction end sequence number has been added.
  • the sequential correction start sequence number is updated to the earliest first sequence number when the start sequence number of the acceptance section moves after the sequential correction start sequence number.
  • the sequential correction end sequence number is the last sequence number in which the start sequence number of the acceptance section has been updated so far. The number of data losses is corrected only when the start sequence number of the acceptance section is the sequential correction start sequence number to the sequential correction end sequence number.
  • the difference from FIG. 8 is that the sequential correction start sequence number and the sequential correction end sequence number are updated to the start sequence number “3” of the acceptance section.
  • FIG. 43 shows the state of the ring buffer after the packet arrives after the state of FIG. 42 as in FIGS. 9 to 18.
  • the packet of sequence number 5 outside the receiving section arrived, it was determined that the data was lost, and the monitoring section and the receiving section were moved by one after each, and the number of stored packets became 0.
  • the difference from FIG. 18 is that the sequential correction end sequence number becomes "127" as a result of updating the sequential correction end sequence number later in accordance with the later update of the start sequence number of the acceptance section.
  • FIG. 45 shows the state of the ring buffer after the operation when the packet of the sequence number 132 outside the receiving section arrives in the state of FIG. 44 and the packet outside the receiving section is received. It differs from FIG. 20 in that the sequential correction end sequence number is updated to the start sequence number “135” of the acceptance section.
  • FIG. 48 is a state after the read operation is performed because all the data (arrival time information T_130, T_131) are prepared in the monitoring section in the state of FIG. 47. Until the start sequence number becomes the sequential correction end sequence number, the number of data losses is deducted one by one each time the data is moved, and the data loss is corrected by decrementing the number of data losses. Different from.
  • FIG. 50 shows a state of a ring buffer in which the monitoring section and the receiving section are moved by one after each because the number of stored packets reaches the threshold value 120 in FIG. 49 and it is determined that the data is lost.
  • the arrival flag of T_131 is lowered and the number of stored packets is reduced by 1 to 119. It differs from FIG. 25 in that the amount of data loss determined to be incremented and the amount decremented for correction are offset, and the number of data losses does not change.
  • FIG. 52 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each of the monitoring section and the receiving section, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and the data loss is determined in FIG. It differs from FIG. 27 in that the amount of data loss determined to be incremented and the amount decremented for correction are offset, and the number of data losses does not change.
  • FIG. 53 shows a state of the ring buffer in which the monitoring section and the receiving section are moved by one after each of the monitoring section and the receiving section, as in FIG. 14, because the number of stored packets reaches the threshold value 120 and the data loss is determined in FIG. It differs from FIG. 28 in that the amount of data loss determined to be incremented and the amount decremented for correction are offset, and the number of data losses does not change.
  • the start sequence number is updated after one and becomes the same as the sequential correction end sequence number "135", and the number of data losses becomes "10" which is the same as in FIG. 28 when the data loss is collectively corrected. After that, it is not necessary to correct the number of data losses.
  • FIG. 54 shows the state of the ring buffer after repeated reading because the arrival time information T_135 to T_253 are prepared in the state of FIG. 53.
  • 241 sets of serial number packets are read from the ring buffer out of a total of 252 packets of sequence numbers 2 to 253 considered to have been output from the source, and the arrival interval is calculated. It has been aggregated.
  • FIG. 55 shows the time when the packet of sequence number 1 outside the acceptance section finally arrives after the packet arrives in the same manner as in FIGS. 8 to 12 after the state of FIG. 41, and the packet outside the acceptance section is received. This is the state of the ring buffer after the operation is performed.
  • the difference from FIG. 30 is that the sequential correction end sequence number becomes "6" as a result of updating the sequential correction end sequence number later in accordance with the later update of the start sequence number of the acceptance section.
  • the current value of the earliest first sequence number in the state of FIG. 55 before receiving the packet is "3"
  • the determined first sequence number is "0”
  • "0" is the previous number. Therefore, the earliest first sequence number in FIG. 56 is "0".
  • FIG. 58 shows the state after the read operation is performed because all the data (arrival time information T_65535, T_0) are prepared in the monitoring section in the state of FIG. 57. Since the data loss count is not corrected except when the start sequence number is between the sequential correction start sequence number and the sequential correction end sequence number, the data loss count does not change as in FIG. 33.
  • FIG. 60 shows the state of the ring buffer in which the monitoring section and the receiving section are moved by one after each because the number of stored packets reaches the threshold value 120 and the data loss is determined in FIG. 59. Since the data loss count is not corrected except when the start sequence number is between the sequential correction start sequence number and the sequential correction end sequence number, the data loss count is incremented as in FIG. 35.
  • FIG. 62 shows the state of the ring buffer after the number of stored packets reaches the threshold value 120 in FIG. 61 and it is determined that the data is lost, so that the monitoring section and the receiving section are each moved by one later. Since the data loss count is not corrected except when the start sequence number is between the sequential correction start sequence number and the sequential correction end sequence number, the data loss count is incremented. Since the start sequence number is "3", which is the same as the sequential correction start sequence number, after that, until the start sequence number becomes the sequential correction end sequence number, the number of data losses is set to 1 each time the data is moved one step later. It will be corrected by subtracting it one by one.
  • FIG. 63 shows the state of the ring buffer after the operation of moving the monitoring section and the receiving section by one after each of the monitoring section and the receiving section is performed three more times because the number of stored packets reaches the threshold value 120 in FIG. 62 and it is determined that the data is lost.
  • the start sequence number is between the sequential correction start sequence number and the sequential correction end sequence number (sequential correction start sequence number (3) ⁇ start sequence number ⁇ sequential correction end sequence number (6))
  • the data loss count is corrected. I do. It differs from FIG. 37 in that the amount of data loss determined to be incremented and the amount decremented for correction are offset, and the number of data losses does not change. Further, since the first sequence number is later than the sequential correction start sequence number, the sequential correction start sequence number is updated to the earliest first sequence number.
  • start sequence number was updated after three and became the same as the sequential correction end sequence number "6", and the number of data losses became the same "3" as in FIG. 37 when collectively corrected. After that, it is not necessary to correct the number of data losses.
  • FIG. 64 shows the state of the ring buffer after repeated reading in the same manner as in FIG. 17, since the arrival time information T_135 to T_253 are prepared in the state of FIG. 63.
  • 122 sets of serial number packets are read from the ring buffer out of a total of 126 packets of sequence numbers 65535 and 0 to 124, which are considered to have been output from the source, and the arrival interval is set. Calculated and aggregated.
  • 1 Packet monitoring device, 10 ... PHY unit, 20 ... MAC unit, 30 ... Arrival time information addition unit, 40 ... Monitoring target extraction unit, 50 ... Packet order correction unit, 51 ... Acceptance / rejection determination unit, 52 ... Ring buffer document Incorporation unit, 53 ... Ring buffer reading unit, 54 ... Monitoring section / acceptance section management unit, 55 ... Ring buffer, 60 ... Packet interval calculation unit, 70 ... Statistical information storage unit, 80 ... Visualization unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

リングバッファは、順序情報に対応する所定の数の記憶領域を備え、1個または連続する2個以上の順序番号からなる監視区間と、監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え(S1)、受信したデータ(S2)の順序番号が受入区間内であった場合(S5)に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する記憶領域の位置に、受信したデータを書き込むステップ(S6)と、監視区間の全てにデータが書き込まれている場合に、監視区間内の全てのデータを読み出すステップ(S7、S8)と、監視区間の順序番号数の範囲内で、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新するステップ(S9)とを含み、さらに、データロス回数をカウントするステップ(S11、S12)と、データロス回数を補正するステップ(S4-4)を含む。リングバッファの記憶領域数に制約がある場合においても、受信したデータを順序番号順に正確に並べ替えるとともに、失われたデータの数も正確に集計することが可能なデータ順序補正方法を提供することができる。

Description

データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム
 本発明は、受信した順序番号付のデータを順序番号順に並べ替えるデータ順序補正方法において、失われたデータの個数をカウントするデータ順序補正方法に関する。
 音声や映像を一定周期で符号化しパケット化して送信する通信方式では、受信側で順不同に到着したパケットを順序補正用バッファに一時保存して、パケットのヘッダに格納されている順序情報(通常は順序番号)に基づいてパケットを正しい順序に並べ替えてから、元の音声や映像を再生する。
 ここで、伝送経路で加わる遅延の揺らぎ(ジッタ)があまりにも大きいと、遅延が大きいパケットの到着を待つために音声や映像の再生が一時的に止まったり、遅延が非常に大きいパケットが廃棄されて音声や映像にドロップアウトが発生する。通信事業者からは、ジッタの発生箇所を特定する目的で、通信経路に挿入したネットワークタップ等でネットワーク信号を分岐して取り出し、パケットのジッタを測定したいという要望がある。
 特許文献1に記載の遅延測定方法では、パケットを送信する端末は、送信パケットに送信時刻情報を付加して送信し、パケット監視装置は、ネットワークタップ等で取り出したパケットの受信時刻を記録するとともに、到着したパケットから送信時刻情報を読み出して、受信時刻と送信時刻の差分から各パケットの遅延を求め、遅延の揺らぎを観測する。
 一方、特許文献2では、送信時刻情報を用いずにパケットのジッタを観測する。特許文献2では、周期的に生成され順序番号を付与されたパケットを対象として、受け取ったパケットを順番に整理(順序補正)してパケットの到着間隔を算出した結果を集計することで、パケット間隔の揺らぎを観測する。
 特許文献3に記載の順序補正方法では、図65に示すように、リングバッファを複数の記憶領域に区切っておき、連続する2つ以上の記憶領域を監視区間として定め、送られてきたデータを所定の記憶領域に格納し、再組立に必要なデータが監視区間に格納されているか否かを監視し、再組立に必要なデータが監視区間に揃ったらそれらを呼び出し、データを格納した記憶領域が監視区間よりも後ろである場合に、監視区間の最後尾がこのデータを格納した記憶領域になるように監視区間を移動させる。
特許第5479793号公報 特許第5625992号公報 特開2009-171157号公報
 特許文献1では、パケットを送信する端末とパケット監視装置の間で、時刻情報の規格、例えば、時刻の単位を合せる必要がある。一方、特許文献2では、受信した複数のデータを連結して元の大きなデータを再組立することを想定しているため、全順序番号分の記憶領域を持つ十分大きなサイズのリングバッファを用いて、再組立に必要なデータが監視区間に揃ったらリングバッファから読み出す。
 ここで、リングバッファの記憶領域数に制約があって全順序番号分の記憶領域を実装できない時は、例えば、順序番号をリングバッファの記憶領域数で割った剰余に基づいてデータを書込む記憶領域を決定し、先頭付近のデータが揃ったらリングバッファから読み出して、空いた記憶領域を余剰が同じ後続のデータ用に使い回すことが考えられる。リングバッファの先頭に記録されるはずのデータが到着しない時は、一定の条件を満たしてデータロスと判定されたらデータの到着を待たずにリングバッファの先頭位置を後ろに進める。
 一定の条件とは、例えば、保存パケット数が所定の数に達した場合、受信したパケットの到着時刻情報の順序情報が受入区間内でなかった場合、所定の時間が経過した場合、である。データの損失や大幅な遅延のために到着間隔を算出できなかった回数(データロス回数)も通信品質の目安となる重要な情報なので、到着間隔だけでなくデータロス回数も集計する必要がある。データの到着を待つのを止めた時にリングバッファの先頭位置を後に1つずつ移動させる場合はデータロス回数を正確に集計することができ、到着間隔の集計結果との合計が、送出されたパケットの総数となる。
 しかしながら、リングバッファが空になった後に到着したデータを先頭としてリングバッファに格納した時は、空になった時の先頭よりも新しい先頭が後の順序番号である場合に、その間の順序番号のデータが到着していないことがデータロス回数として記録されず、データロス回数を少なく集計してしまう、という問題がある。一方、空になった時の先頭よりも新しい先頭が前の順序番号である場合は、その間の順序番号のデータは到着間隔またはデータロス回数の集計結果に二重に集計されてしまう、という問題がある。
 本発明は、このような課題を解決するためになされたものであり、リングバッファの記憶領域数に制約がある場合においても、受信したデータを順序番号順に正確に並べ替えるとともに、失われたデータの数も正確に集計することが可能なデータ順序補正方法を提供することを目的とする。
 上述したような課題を解決するために、順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正方法であって、前記リングバッファは、順序情報に対応する所定の数の記憶領域を備え、1個または連続する2個以上の順序番号からなる監視区間と、前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、受信したデータの順序番号が前記受入区間内であった場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むステップと、前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すステップと、前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新するステップと、前記リングバッファに記憶されているデータの個数が0の場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定するステップと、前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントするステップと、前記リングバッファに記憶されているデータの個数が0の状態において、受信したデータが初回受信データでない場合は、前記受信したデータを前記監視区間の先頭として前記監視区間及び前記受入区間を決定した後に、前記監視区間及び前記受入区間を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正するステップとを含む。
 上述したような課題を解決するために、本発明のパケット監視装置は、ヘッダ内に順序情報が含まれる受信パケットに到着時刻情報を付与する到着時刻情報付与部と、前記受信パケットのヘッダ内の情報に基づいて、監視対象パケットを抽出する監視対象抽出部と、監視対象パケットのヘッダ内の前記順序情報に基づいて、請求項1~6のいずれかの方法で前記監視対象パケットの順序を補正し、前記順序情報が連続する2つのパケットの到着時刻情報を出力するとともに、前記リングバッファの記憶限度を超えても前記順序情報が連続する2つのパケットが揃わない時にパケットロス発生と判定して、前記リングバッファの先頭位置を進めてパケットロス発生回数をカウントアップするパケット順序補正部と、前記順序情報が連続する2つのパケットの到着時刻の差からパケット間隔を求めるパケット間隔計算部と、前記パケット間隔の度数分布、および前記パケットロス発生回数を記憶する統計情報記憶部と、前記統計情報記憶部に記憶されている前記パケット間隔の度数分布、および、前記パケットロス発生回数に基づいて、ヒストグラムとして表示する可視化部とを備える。
 上述したような課題を解決するために、本発明のデータ順序補正装置は、順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正装置であって、前記リングバッファは、順序情報に対応する所定の数の記憶領域を備え、1個または連続する2個以上の順序番号からなる監視区間と、前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値が前記受入区間内であるかを判断する受入可否判断部と、受信したデータの順序番号が前記受入区間内であった場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むリングバッファ書込部と、前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すリングバッファ読出部と、前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新する監視区間/受入区間管理部とを備え、前期監視区間/受入区間管理部は、前記リングバッファに記憶されているデータの個数が0の場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定し、前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントし、前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでない場合は、前記先頭の順序番号を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正する。
 上述したような課題を解決するために、本発明のデータ順序補正プログラムは、順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正方法を実行するためのデータ順序補正プログラムであって、前記リングバッファは、順序情報に対応する所定の数の記憶領域を備え、1個または連続する2個以上の順序番号からなる監視区間と、前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、受信したデータの順序番号が前記受入区間内であった場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むステップと、前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すステップと、前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新するステップと、前記リングバッファに記憶されているデータの個数が0の場合に、受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定するステップと、前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントするステップと、前記リングバッファに記憶されているデータの個数が0の時に受信したデータが初回受信データでない場合は、前記先頭の順序番号を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正するステップとをコンピュータに実行させる。
 以上説明したように、本発明によれば、リングバッファの記憶領域数に制約がある場合においても、受信したデータを順序番号順に正確に並べ替えるとともに、失われたデータの数も正確に集計することが可能なデータ順序補正方法を提供することが可能となる。
図1は、本実施の形態に係るパケットフォーマットの構成例である。 図2は、本実施の形態に係るパケット監視装置の構成例を示す図である。 図3は、本実施の形態に係るリングバッファの構成例を示す図である。 図4は、本実施の形態に係るデータ順序補正装置の構成例を示す図である。 図5は、本実施の形態に係るデータ順序補正装置等を実現するためのコンピュータの構成例である。 図6Aは、第1の実施の形態に係るデータ順序補正方法の動作フローチャートの例を示す図である。 図6Bは、第1の実施の形態に係るパケット保存数0の時の処理の動作フローチャートの例を示す図である。 図7は、第1の実施の形態に係るリングリングバッファの初期状態を説明するための図である。 図8は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図9は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図10は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図11は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図12は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図13は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図14は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図15は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図16は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図17は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図18は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図19は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図20は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図21は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図22は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図23は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図24は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図25は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図26は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図27は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図28は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図29は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図30は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図31は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図32は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図33は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図34は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図35は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図36は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図37は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図38は、第1の実施の形態に係るリングリングバッファの動作を説明するための図である。 図39Aは、第2の実施の形態に係るデータ順序補正方法の動作フローチャートの例を示す図である。 図39Bは、第2の実施の形態に係るパケット保存数0の時の処理の動作フローチャートの例を示す図である。 図40は、第2の実施の形態に係るデータロス回数の補正処理の動作フローチャートの例を示す図である。 図41は、第2の実施の形態に係るリングリングバッファの初期状態を説明するための図である。 図42は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図43は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図44は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図45は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図46は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図47は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図48は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図49は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図50は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図51は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図52は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図53は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図54は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図55は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図56は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図57は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図58は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図59は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図60は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図61は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図62は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図63は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図64は、第2の実施の形態に係るリングリングバッファの動作を説明するための図である。 図65は、従来のリングバッファの構成例である。
 以下、本発明の実施の形態を図面に基づいて詳細に説明する。本発明は、以下に説明する実施の形態に限定されるものではない。
<第1の実施の形態>
 本発明の実施の形態では、IP電話の通話において、G.711等の音声コーデック方式で音声データを等間隔で符号化してRTP(Real-time Transport Protocol)パケットに格納して送信されたパケットを順序補正の対象とする場合を例として説明する。なお、本発明の適用の対象は、以下に説明するパケットの構成に限定されるものではない。
 図1は、第1の実施の形態における順序補正の対象であるRTPパケットのフォーマットの構成例である。RTPパケットのRTPヘッダには、パケットの生成された順序を示すシーケンス番号(SequenceNumber、16ビット幅で範囲は、0~65535)が格納されており、同一通話で送出される複数のRTPパケットのシーケンス番号は、通話開始時にランダムな値から始まって通話終了まで1ずつ増加し、65535の次は0に戻るように構成されている。そのため、生成直後のRTPパケットは、時間的に等間隔で、シーケンス番号が連番である。
 一方、伝送後のRTPパケットは、伝送路での遅延がパケット毎に一定ではないため、時間的に等間隔で到着せず、さらには、シーケンス番号の順番通りにパケットが到着しない場合もある。通信経路に設置したネットワークタップ等でネットワーク信号を分岐して取り出して、パケット監視装置で連番RTPパケットの到着間隔を求めて、横軸がパケット到着間隔のヒストグラムに表示することで、パケット間のジッタを監視することができる。図2は、本実施の形態に係るパケット監視装置の構成例である。
<パケット監視装置>
 本実施の形態におけるパケット監視装置1は、受信したパケットに対して物理レイヤ(PHY)とデータリンクレイヤ(MAC)の処理を行うPHY部10、MAC部20、受信パケットに到着時刻情報を付与する到着時刻情報付与部30と、パケットのヘッダ内の情報に基づいて、ヘッダ内に順序情報が含まれる同一フローの監視対象パケットを抽出する監視対象抽出部40と、監視対象パケットのヘッダ内の順序情報(図1のシーケンス番号)に基づいて、監視対象パケットの順序を補正し、順序情報が連続する2つのパケットの到着時刻情報を出力するパケット順序補正部50と、順序情報が連続する2つのパケットの到着時刻の差からパケット間隔を求めるパケット間隔計算部60と、パケット到着間隔を記憶する統計情報記憶部70と、統計情報記憶部70に記憶されているパケット到着間隔毎の度数分布に基づいて、ヒストグラムとして表示する可視化部80とを備える。
<到着時刻情報付与部>
 到着時刻情報付与部30は、受信したパケットに対して物理レイヤ(PHY)とデータリンクレイヤ(MAC)の処理を行うことにより取り出されたパケットに、到着時刻情報を付与する。時刻情報を付与する手段の例としては、ヘッダに挿入または上書する方法、あるいは、パケットと並走して後段ブロックへ転送する方法、等がある。
<監視対象抽出部>
 監視対象抽出部40は、パケットの各ヘッダ内の情報に基づいて、監視対象とするパケットを抽出する。例えば、パケットのヘッダの送信元アドレスと宛先アドレス、および、UDPヘッダ内の宛先ポート番号を検査して、監視対象として登録されている値と一致するパケットを監視対象パケットとして抽出し、パケット順序補正部に送信する。
<パケット順序補正部>
 パケット順序補正部50は、監視対象パケットのヘッダから抽出した順序番号に基づいて監視対象パケットの順序を補正し、順序番号が連続する2つ以上のパケットの到着時刻情報をパケット間隔計算部60へ出力する。また、順序補正において検出したデータロス回数の計数と補正を行うために、データロス回数の増減数を統計情報記憶部70へ出力する。パケット順序補正部の構成とパケット順序補正方法については、後述のパケット順序補正部50の構成と動作例において詳細に説明する。
<パケット間隔計算部>
 パケット間隔計算部60は、パケット順序補正部50から順序番号が連続する2つ以上のパケットの到着時刻情報が入力されると、2つの連続するパケットの到着時刻の差からパケットの時間間隔を求める。順序番号が後のパケットの到着時刻から、順序番号が前のパケットの到着時刻を減算すれば、パケットの時間間隔だけでなく、パケットの順序が逆転しているかどうかも判定することができる。
<統計情報記憶部>
 統計情報記憶部70では、パケット間隔計算部60で求めたパケット間隔の度数分布を記憶する。また、パケット順序補正部50で求めたデータロス回数の増減数を集計して記憶する。
<可視化部>
 可視化部80では、統計情報記憶部70に記憶されているパケット間隔の度数分布をヒストグラムとして表示する。
<リングバッファの構成>
 図3は、本実施の形態に係るリングバッファの構成例である。本構成例のリングバッファは、順序情報に対応する所定の数の記憶領域を備え、1個または連続する2個以上の順序番号を監視区間とし、監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、監視区間の先頭の順序番号の1つ前の順序番号を末尾の順序番号とする受入区間を備える。監視区間の先頭の順序番号からリングバッファが一周した順序番号に対応する位置が受入区間の末尾となる。図65の従来のリングバッファと異なり、本発明の実施の形態では、監視区間と受入区間の先頭と末尾を順序番号で表して管理する。なお、監視区間と受入区間の幅や間隔が一定の場合は、図3に記載の4種類の順序番号のいずれか1種類から他の3種類の順序番号を知ることができるので、少なくともいずれか1種類の順序番号を管理していればよい。
 本実施の形態に係るリングバッファでは、受信したデータの順序番号が受入区間内の順序番号であるか判断し、受入区間内の場合に、受信したデータの順序番号に対応する記憶領域に受信データが書き込まれる。一方、受信したデータの順序番号が受入区間外の場合は、受信データは廃棄される。
 上記動作を繰り返して行い、監視区間内に全てのデータが書き込まれている場合に、監視区間内の全てのデータを読み出すとともに、監視区間の順序番号数の範囲内で、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を増加させて、監視区間及び受入区間を移動させる。例えば、監視区間の順序番号数が2の場合には、監視区間及び受入区間を記憶領域の1つ分後ろに移動させ、あるいは、監視区間及び受入区間を記憶領域の2つ分後ろに移動させる。
<パケット順序補正部の構成>
 図4は、本実施の形態に係るパケット順序補正部50の構成例である。パケット順序補正部50は、順序情報付のデータをリングバッファに一時保存して順序補正する機能部である。
 図4に示すように、パケット順序補正部50は、受信したデータの順序情報が受入区間内であるかを判断する受入可否判断部51と、受信したデータの順序情報が受入区間内であった場合に、受信したデータの順序情報に対応する記憶領域の位置に、受信したデータをリングバッファ55に書き込むリングバッファ書込部52と、監視区間の全てにデータが書き込まれている場合に、監視区間内の全てのデータをリングバッファ55から読み出すリングバッファ読出部53と、監視区間と受入区間を管理し、必要に応じて移動させる監視区間/受入区間管理部54とから構成されている。
 本実施の形態におけるパケット監視装置1の一例として、PHY部10、MAC部20、到着時刻情報付与部30、監視対象抽出部40、パケット順序補正部50、パケット間隔計算部60、統計情報記憶部70は、NIC(Network Interface Card)上にハードウェアとして実現することができる。可視化部80は、コンピュータ、コンピュータにインストールした可視化ソフトウェア、および、コンピュータに接続したディスプレイによって実現することができる。
 本実施の形態におけるパケット監視装置1の別の例として、到着時刻情報付与部30、監視対象抽出部40、パケット順序補正部50、パケット間隔計算部60、統計情報記憶部70、可視化部80は、CPU(Central Processing Unit)、記憶装置及び外部インタフェース(以下、外部I/F)を備えたコンピュータと、これらのハードウェア資源を制御するプログラムによって実現することができる。このようなコンピュータの構成例を図5に示す。
 コンピュータ100は、CPU200と、記憶装置300と、外部I/F400とを備えており、それらがI/Oインタフェース500を介して互いに接続されている。本実施の形態のパケット監視装置1の動作を実現するためのデータ順序補正プログラム等のプログラムや、受信データ、受信データの到着時刻情報、監視区間、受入区間等のデータは記憶装置300に格納され、外部I/F400には、互いに信号を送受信する他のコンピュータが接続される。CPU200は、記憶装置300に格納されたデータ順序補正プログラム等に従って本実施の形態で説明した処理を実行する。また、この処理プログラムをコンピュータ読み取り可能な記録媒体に記録するように構成してもよい。
<パケット順序補正部の動作例>
 図6Aは、本実施の形態に係るデータ順序補正方法の動作フローチャートの一例である。本実施の形態に係るデータ順序補正方法では、監視区間および受入区間を初期設定してパケット保存数=0にしておく(S1)。データを受信したら(S2)、保存パケット数が0より大きく(S3)、受信したデータの順序番号が受入区間内であった場合に(S5)、受信したデータの順序番号をリングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する記憶領域の位置に、受信したデータを書き込み、保存パケット数を現行化するステップ(S6)と、監視区間の全てにデータが書き込まれている場合に(S7)、監視区間内の全てのデータを読み出すステップ(S8)と、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を更新し、保存パケットを現行化するステップ(S9)とを含む。パケット保存数が閾値より小さい場合には、S2に遷移してデータを受信し、上記動作を繰り返す。ここで、順序番号の更新とは、順序番号を1つ後ろに移動することを意味する。
 パケット保存数が閾値に達した場合には、S9に遷移して監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を更新し、保存パケットを現行化する。S2でデータを受信しない場合はS7に遷移し、連番のデータが途切れるか新しいデータを受信するまでS2→S7→S8→S9→S10→S2を繰り返す。
 S3で保存パケット数が0の場合には、S4に遷移し、図6Bに示すパケット保存数0の時の処理を行う。受信した順序番号を監視区間の先頭として、それに合わせて監視区間の末尾、受入区間の先頭と末尾、および後述する最も前の先頭順序番号を決定し(S4-1、S4-2)、受信したデータが初回受信パケットの場合(S4-3)は、S6に遷移する。初回受信パケットでない場合(S4-3)は、決定した先頭順序番号から直前の先頭順序番号を減算した結果をデータロス回数に加算してデータロス回数を補正する(S4-4)。
 S5で受入区間外の場合には、データロス回数をインクリメント(S12)してS9に遷移し、S7で監視区間の全てにデータが書き込まれていない場合には、S10に遷移する。S10でパケット保存数が閾値以上の場合は、データロス回数をインクリメント(S11)してS9に遷移し、パケット保存数が閾値未満になるまでS10とS9を繰り返す。
 尚、第1の実施の形態では、監視区間の順序番号数が2で、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新して、監視区間及び受入区間を1つ分後ろに移動させる場合を例として説明する。
<初期状態からの動作>
 図7は、本実施の形態におけるリングバッファの初期状態を表す図である。図7のリングバッファは記憶領域数が128で、受信パケットの到着時刻情報と到着フラグを128パケット分記憶できるように構成されている。図7において、先頭パケットが格納される記憶領域が監視区間の先頭となり、そこから連続する2つの順序番号が監視区間となる。監視区間の2つ目の順序番号を受入区間の先頭とし、監視区間の先頭の順序番号から126(128-監視区間の幅)個後の順序番号を受入区間の末尾とする。この場合、監視区間の先頭の順序番号の一つ前の順序番号に対応する記憶領域が受入区間の末尾となる。
 順序補正の対象となるパケットは、図1で説明したRTPパケットであり、RTPヘッダ内の0~65535のシーケンス番号が順序番号に相当する。順序番号が65535個あるのに対してリングバッファの記憶領域が128パケット分しかないので、各パケットの到着時刻情報と到着フラグの格納先の記憶領域のアドレスをmod(順序番号,128)により決定し、リングバッファの保存パケット数の閾値を一例として120パケットとする。初期状態に受信したパケットが格納された記憶領域が監視区間の先頭となり、監視区間の先頭に対応させて、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号が決定される。
 パケット順序補正部50は、監視区間および受入区間の先頭の順序番号と末尾の順序番号、最も前の先頭順序番号、および、保存パケット数をレジスタ等に保持し、これらの情報は、到着時刻情報の書込や読出の際に必要に応じて随時更新される。最も前の先頭順序番号とは、パケット監視開始以降に受信した全てのパケットの順序番号を比較した時の「最も前」の順序番号を意味する。1個目に順序番号100のパケットを受信し、次に順序番号101を受信したら「最も前」は順序番号100のままで、その次に順序番号99を受信したら「最も前」は順序番号100よりも前の順序番号99に変わる。
 また、RTPパケットにおいては、順序番号はランダムな値から始まって1ずつ増加し、65535の次は0に戻るため、順序番号65535と0を比較すると順序番号65535の方が前になる。ただし、パケット65536個で順序番号が一周するので、実装する際には対処が必要になる。例えば、最初のパケット受信から「ある程度の長時間」が経過したら、その時点での「最も前の先頭順序番号」よりも更に前の順序番号のパケットが到着する可能性は低いため、以後は、後述する図31の説明にあるような「受入区間の先頭順序番号が最も前の先頭順序番号よりも前に移動した分を相殺」する処理を実行しなければよい。IP電話の場合、パケット送信間隔が20msとすると順序番号が一周するまでに20ms×65536=21.85分かかるので、「ある程度の長時間」を10分(21.85分の約1/2)程度にすればよい。
 また、監視区間のデータが揃わない時に、一定の条件を満たしてデータロスと判定されたらデータの到着を待たずにリングバッファの先頭位置を1つ後ろに進めて、データロス回数のインクリメントを統計情報記憶部70に通知する。一定の条件とは、保存パケット数が所定の数に達した場合、受信したパケットの到着時刻情報の順序情報が受入区間内でなかった場合、所定の時間が経過した場合、である。統計情報記憶部70は、パケット順序補正部50から入力されるデータロス回数の増減数に従って、データロス回数を集計して記憶する。
<書き込み動作>
 図8は、図7に示した保存パケット数=0の初期状態において順序番号=2であるパケットが到着して、その到着時刻情報T_2を書き込んだ後のリングバッファの状態である。順序番号2に対応する記憶領域のアドレス2(=mod(2,128))にT_2が書き込まれて、これにより順序番号「2」が監視区間の先頭となる。アドレス2にT_2が書き込まれると、記憶領域のアドレス2の到着フラグが1となり、受入区間の先頭の順序番号は、監視区間の先頭の順序番号「2」の1つ後の「3」となり、受入区間の末尾の順序番号は、先頭の順序番号3から126(128-2)個後の「129」となる。到着フラグが1である記憶領域の数は1なので、保存パケット数は1となる。初回受信パケットなので、最も前の先頭順序番号は、受入区間の先頭の順序番号と同じ「3」となる。
 図9は、図8の状態において順序番号=4であるパケットが到着して、その到着時刻情報T_4を書き込んだ後のリングバッファの状態である。図8の受入区間の先頭順序番号3から末尾順序番号129に対して、受信パケットの順序番号4は受入区間内なので、順序番号4に対応する記憶領域のアドレス4(=mod(4,128))にT_4を格納するとともに、アドレス4の到着フラグを1とし、保存パケット数を1増やして2とする。図9の状態では、監視区間の全てにデータが書き込まれていないので、監視区間からの読み出し処理は実行されず、監視区間および受入区間の移動も行われない。
 図10は、図9の状態において受入区間内の順序番号=3であるパケットが到着して、図9と同様に書き込み動作を行った後のリングバッファの状態である。
<読み出し動作>
 図11では、図10の状態で監視区間内に全てのデータ(到着時刻情報T_2、T_3)が揃ったので、監視区間内の全てのデータをリングバッファから読み出す処理が実行される。監視区間からの読み出し処理が実行されたことに応じて、監視区間及び受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新して、監視区間と受入区間がそれぞれ後に1つ移動させた状態となる。本図では、次の順序番号4のパケットとの間隔を計算するため、到着時刻情報T_2、T_3を読み出した後も、監視区間の順序番号3のデータT_3は残される。
 図11では、監視区間の先頭の順序番号と末尾の順序番号は、図10の(2、3)から1つ後の番号である(3、4)に更新され、受入区間の先頭の順序番号と末尾の順序番号は、1つ後の番号である(4、130)に更新され、監視区間および受入区間が移動している。監視区間から外れた記憶領域(アドレス2)の到着フラグは下され、保存パケット数は1減って2となる。リングバッファから読み出された到着時刻情報T_2、T_3は、パケット間隔計算部に転送され、パケット間隔計算部は、連番パケットのパケット間隔(T_3-T_2)を計算する。
 図12は、図11の状態で監視区間内に全てのデータ(到着時刻情報T_3、T_4)が揃ったので、図11と同様の読み出し動作を行った後の状態である。
<保存パケット数が閾値に達した時の動作>
 図13は、図12の状態の後に順序番号=5のパケットは到着せずに、受入区間内の順序番号=6~124の119個のパケットが到着して、それらの到着時刻情報T_6~T_124を書き込んだ後のリングバッファの状態である。監視区間内のデータはT_4のみであり、監視区間の全てにデータが書き込まれていないので、監視区間からのデータの読み出しは行われず、監視区間と受入区間の移動も行われず、監視区間と受入区間の先頭と末尾の順序番号は、図12と同じである。一方、保存パケット数は、119増えて120となり、保存パケット数の閾値120に達している。
 図14は、図13において保存パケット数が閾値120に達してデータロスと判定したため、監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。監視区間の先頭の順序番号と末尾の順序番号は、図13の(4、5)から1つ後の番号である(5、6)に更新され、受入区間の先頭順序番号と末尾順序番号は、1つ後の番号(6、132)に更新され、監視区間および受入区間が移動した状態である。監視区間から外れた記憶領域(アドレス4)の到着フラグは、図13では上がった状態であるので、アドレス4の到着フラグは下され、保存パケット数も1減らされて119となる。データロス回数はインクリメントされて、データロス回数は1になる。
 図15は、図14において受入区間内の順序番号=125のパケットが到着して、図9と同様に書き込み動作を行った後のリングバッファの状態である。図15の状態では、監視区間の全てにデータが書き込まれていないので、監視区間からの読み出し処理は実行されず、監視区間および受入区間の移動も行われないが、図13と同様に保存パケット数の閾値120に達したので、この後に図14と同様の保存パケット数が閾値に達した時の動作によって監視区間及び受入区間の移動が行われる。
 図16は、図15で保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。ただし、監視区間から外れた記憶領域(アドレス5)の到着フラグは図15の状態で下りていたので、この到着フラグは下りた状態で保持され、保存パケット数も変更されない。データロス回数はインクリメントされて、データロス回数は2になる。
 本発明では、連番データが揃わない状態で到着間隔を算出せずに監視区間と受入区間を強制的に移動させた時をデータロスとしてカウントするため、未到着が順序番号=5のパケットが1個だけであっても、順序番号=4と順序番号=5、および、順序番号=5と順序番号=6の2組の連番データが揃わず、データロス回数が2回になる。
 図17は、図16の状態で到着時刻情報T_6~T_125が揃ったので、監視区間内のデータ(T_i、T_i+1)をリングバッファから読み出して監視区間と受入区間をそれぞれ後に1つ移動させる図11と同様の読み出し動作を、監視区間内のデータが揃わなくなるまで繰り返した後のリングバッファの状態である(i=6,7,…,124)。最後にアドレス124、125のT_124とT_125がリングバッファから読み出されて、アドレス125のT_125のみが残った状態となり、アドレス125の到着フラグのみが1となり、保存パケット数=1になっている。監視区間の先頭の順序番号と末尾の順序番号は、(125、126)であり、受入区間の先頭の順序番号と末尾の順序番号は、(126、252)となっている。
<受入区間外のパケットを受信した時の動作>
 図18は、受入区間の先頭の順序番号と末尾の順序番号が(126、252)である。図17の状態において、受入区間外の順序番号5のパケットが到着した場合に、データロスと判定して書込みや読出を行わずに監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。監視区間の先頭の順序番号と末尾の順序番号は、(125、126)から1つ後の番号である(126、127)に更新され、受入区間の先頭順序番号と末尾順序番号は、1つ後の番号(127、253)に更新され、監視区間および受入区間が移動した状態である。監視区間から外れた記憶領域(アドレス125)の到着フラグは下され、保存パケット数も1減らされて、0となる。すなわち、初期状態と同様になる。データロス回数はインクリメントされて、データロス回数は3になる。
 本発明では、連番データが揃わない状態で到着間隔を算出せずに監視区間と受入区間を強制的に移動させた時をデータロスとしてカウントするため、順序番号=125と順序番号=126の1組の連番データが揃わないまま到着間隔を算出せずに監視区間と受入区間を強制的に移動させると、データロス回数が1増えて3回になる。
<保存パケット数=0の時に初回受信でないパケットを受信して監視区間と受入区間が後ろに移動した時の動作>
 図19は、図18に示した保存パケット数=0の状態において順序番号133であるパケットが到着して、図8と同様の初期状態からの動作を行った後のリングバッファの状態である。
 初回受信データでなければ、順序番号126~132の7個のパケットが未着でデータロスが7回発生していることになるので、データロス回数を補正する必要がある。受入区間の先頭の順序番号が127から134に「+7」移動しているので、データロス回数を「+7」補正して、データロス回数が10になる。
 パケット受信前である図18の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「134」で、「3」のほうが前の番号である。よって、図19において最も前の先頭順序番号は、引き続き「3」となる。
 図8~図19の間に、送信元から出力されたと考えられる順序番号2~133の合計132個のパケットのうち、121組の連番パケットがリングバッファから読み出されて到着間隔を算出・集計されている。一方、図19においてデータロス回数は10、保存パケット数は1、である。これらの合計は121+10+1=132で、送信元から出力されたと考えられるパケットの個数と一致することから、データロス回数が補正により正しく集計されていることがわかる。
 図20は、図19の状態において受入区間外の順序番号132のパケットが到着して、図18と同様の受入区間外のパケットを受信した時の動作を行った後のリングバッファの状態である。データロス回数はインクリメントされて、データロス回数が11になる。
<保存パケット数=0の時に初回受信でないパケットを受信して監視区間と受入区間が前に移動した時の動作>
 図21は、図20に示した保存パケット数=0の状態において順序番号130であるパケットが到着して、図8と同様の初期状態からの動作を行った後のリングバッファの状態である。
 順序番号130~133の4個のパケットは図19でデータロスとして集計されているので、図21以降にデータロスまたは到着間隔を集計すると同一パケットを二重に集計してしまう。二重カウントを回避するために、先頭の順序番号が前に移動した分だけ、データロス回数を補正する必要がある。受入区間の先頭の順序番号が135から131に「-4」移動しているので、データロス回数を「-4」補正して、データロス回数が7になる。
 パケット受信前である図20の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「131」で、「3」のほうが前の番号である。よって、図21において最も前の先頭順序番号は、引き続き「3」となる。
 図22は、図21において受入区間内の順序番号=131のパケットが到着して、その到着時刻情報T_131を書き込んだ後のリングバッファの状態である。図9と同様に、監視区間及び受入区間の先頭順序番号と末尾順序番号は変化せず、保存パケット数が1増えて2となる。
 図23は、図22の状態で監視区間内に全てのデータ(到着時刻情報T_130、T_131)が揃ったので、図11と同様の読み出し動作を行った後の状態である。
 図24は、図23の状態の後に順序番号=134~252の118個のパケットが到着して、それらの到着時刻情報T_134~T_252を書き込んだ後のリングバッファの状態である。図13と同様に、監視区間にデータが揃っていないので、監視区間と受入区間の先頭と末尾の順序番号は変化しない。保存パケット数は、119増えて120となり、保存パケット数の閾値120に達している。
 図25は、図24において保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。T_131の到着フラグが下りて保存パケット数が1減って119となる。データロス回数はインクリメントされて、データロス回数が8になる。
 図26は、図25の状態の後に順序番号=253のパケットが到着して、その到着時刻情報T_253を書き込んだ後のリングバッファの状態である。図24と同様に、監視区間と受入区間の先頭と末尾の順序番号は変化しない。保存パケット数は、1増えて120となり、保存パケット数の閾値120に達している。
 図27は、図26において保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。監視区間から外れた記憶領域(アドレス4)の到着フラグは図26の状態から下りた状態で保持されて保存パケット数は120のまま変更されない。データロス回数はインクリメントされて、データロス回数が9になる。
 図28は、図27において保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。監視区間から外れた記憶領域(アドレス5)の到着フラグは図27の状態から下りた状態で保持されて保存パケット数は120のまま変更されない。データロス回数はインクリメントされて、データロス回数が10になる。
 図29は、図28の状態で到着時刻情報T_135~T_253が揃ったので、図17と同様に繰り返し読み出した後のリングバッファの状態である。
 図8~図29の間に、送信元から出力されたと考えられる順序番号2~253の合計252個のパケットのうち、241組の連番パケットがリングバッファから読み出されて到着間隔を算出・集計されている。一方、図29においてデータロス回数は10、保存パケット数は1、である。これらの合計は241+10+1=251で、送信元から出力されたと考えられるパケットの個数と一致することから、データロス回数が補正により正しく集計されていることがわかる。
 図30は、図12の状態において受入区間外の順序番号1のパケットが到着して、図18と同様の受入区間外のパケットを受信した時の動作を行った後のリングバッファの状態である。データロス回数はインクリメントされて、データロス回数が1になる。
 図31は、図30に示した保存パケット数=0の状態において順序番号65535であるパケットが到着して、図8と同様の初期状態からの動作を行った後のリングバッファの状態である。受入区間の先頭順序番号が「0」になり、図30における最も前の先頭順序番号「3」よりも3つ前になる。
 パケット受信前である図30の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「0」で、「0」のほうが前の番号である。よって、図31において最も前の先頭順序番号は「0」となる。
 順序番号2~4の3個のパケットは過去に到着して図11、図12、図14でデータロスまたは到着間隔を集計されているので、図31以降にこれら3個のパケットのデータロスを集計すると同一パケットを二重に集計してしまう。二重カウントを回避するために、順序番号2~4の区間のデータロス回数を図21と同様に補正する必要がある。一方、順序番号65535、0~1の3個のパケットは、図31以降にデータロスまたは到着間隔を初めて集計するはずなので、受入区間の先頭順序番号が最も前の先頭順序番号よりも3つ前に移動した分のデータロス回数の補正は不要である。
 よって、受入区間の先頭の順序番号が6から0に「-6」移動しているが、受入区間の先頭順序番号が最も前の先頭順序番号よりも「3つ」前に移動した分を相殺して、データロス回数を「-6+3」補正して、データロス回数が-2になる。データロス回数は一時的に負の値になるが、過去に到着した順序番号2~4の3個のパケットは図31以降に必ずデータロスとして集計されるので、最終的には合計データロス回数が正しい値になる。なお、受入区間の先頭順序番号が「0」になったので、最も前の先頭順序番号が「3」から「0」に更新される。
 図32は、図31の状態において受入区間内の順序番号=0であるパケットが到着して、図9と同様に書き込み動作を行った後のリングバッファの状態である。
 図33は、図32の状態で監視区間内に全てのデータ(到着時刻情報T_65535、T_0)が揃ったので、図11と同様の読み出し動作を行った後の状態である。
 図34は、図33の状態の後に順序番号=1~4のパケットは到着せずに、受入区間内の順序番号=5~123の119個のパケットが到着して、図13と同様に、それらの到着時刻情報T_5~T_123を書き込んだ後のリングバッファの状態である。保存パケット数は、119増えて120となり、保存パケット数の閾値120に達している。なお、順序番号2~4の3個のパケットは過去に到着したので、今後到着することはない。
 図35は、図34で保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。監視区間から外れた記憶領域(アドレス0)の到着フラグは、図34では上がった状態であるので、アドレス0の到着フラグは下され、保存パケット数も1減らされて119となる。
 図36は、図35の状態において受入区間内の順序番号=124であるパケットが到着して、図9と同様に書き込み動作を行った後のリングバッファの状態である。保存パケット数は、119増えて120となり、保存パケット数の閾値120に達している。
 図37は、図36で保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させる動作を4回行ったあとのリングバッファの状態である。ただし、監視区間から外れた記憶領域(アドレス1)の到着フラグは図36の状態で下りていたので、この到着フラグは下りた状態で保持され、保存パケット数も変更されない。データロス回数は4回インクリメントされて、データロス回数が3になる。
 図38は、図37の状態で到着時刻情報T_135~T_253が揃ったので、図17と同様に繰り返し読み出した後のリングバッファの状態である。
 図8~図12、図30~図38の間に、送信元から出力されたと考えられる順序番号65535、0~124の合計126個のパケットのうち、122組の連番パケットがリングバッファから読み出されて到着間隔を算出・集計されている。一方、図38においてデータロス回数は3、保存パケット数は1、である。これらの合計は122+3+1=126で、送信元から出力されたと考えられるパケットの個数と一致することから、データロス回数が補正により正しく集計されていることがわかる。
<先頭もしくは先頭に最も近いデータの到着時刻から一定時間が経過した時の動作>
 リングバッファに書き込むデータがパケットの到着時刻情報を含む場合は、上記の動作に加えて、監視区間の先頭データの到着時刻情報を現在時刻と比較して、到着時刻から現在時刻が一定時間を超過していた場合に、監視区間と受入区間を1つ後に移動させてもよい。
 監視区間の先頭データが書き込まれていない場合は、監視区間の2つ目以降のデータで先頭に最も近いデータの到着時刻情報を用いてもよい。監視区間内のデータが失われていた場合でも、監視区間と受入区間を強制的に移動させることで、その後の監視区間内のデータが揃っていれば、リングバッファからデータを読み出すことができる。
<初回受信データか否かの判定方法>
 保存パケット数=0の時に受信したデータが初回受信データか否かは、例えば、最後のデータを受信してから一定時間が経過したら、リングバッファの到着フラグを全て0に下ろすとともに、監視区間と受入区間の先頭順序番号と末尾順序番号、および、保存パケット数を全て0に更新し、先頭順序番号・末尾順序番号・保存パケット数が全て0の時に受信したデータを初回受信データと判定するようにしてもよい。
 別の例では、連続データの送信開始通知、または、送信終了通知を受信した場合に、リングバッファの到着フラグを全て0に下ろすとともに、監視区間と受入区間の先頭順序番号と末尾順序番号、および、保存パケット数を全て0に更新し、先頭順序番号・末尾順序番号・保存パケット数が全て0の時に受信したデータを初回受信データと判定するようにしてもよい。ここで、連続データの送信開始通知とは、IP電話の通話においてはセッションを確立する(=電話が繋がる)時に送信されるSIP(Session Initiation Protocol)メッセージであり、セッションが確立すると音声データとシーケンス番号を格納したRTPパケットが等間隔で送信される。同様に、送信終了通知とはセッションを終了する(=電話が切れる)時に送信されるSIPメッセージである。
<第1の実施の形態の効果>
 第1の実施の形態によれば、順序番号2個分の幅の監視区間にデータが揃ったら監視区間内のデータをすべて読み出し、監視区間と受入区間を1つ後に移動するように構成したので、順不同で到着したパケットの中から連番パケットを抽出してパケット間隔を算出する処理をリアルタイムに行うことが可能になる。順序番号をリングバッファの記憶領域数で割った剰余によりデータの書込先記憶領域を決定することで、リングバッファの記憶領域数に制約があって全順序番号分の記憶領域を実装できない場合でも順序補正が可能になる。
 第1の実施の形態では、従来と異なり、監視区間と受入区間の先頭と末尾を記憶領域の位置(アドレス)ではなく順序番号で管理するように構成したので、順序番号をリングバッファの記憶領域数で割った余剰が既にリングバッファに保存されているデータと同じだが順序番号が異なるデータが到着した場合でも、データを誤った順に並べてしまう誤動作を防ぐことができる。リングバッファがデータを格納可能な順序番号の幅の範囲内、すなわち、監視区間の先頭から受入区間の末尾の範囲内であれば、順序制御が可能である。
 また、監視区間の先頭から受入区間の末尾に記憶されているデータの個数が一定数に達した場合、受信したデータが受入区間外の場合に監視区間と受入区間を1つ後に移動させ、あるいは、先頭もしくは先頭に最も近いデータの到着時刻から一定時間が経過した時に、データロスと判定して、監視区間と受入区間を当該先頭もしくは先頭に最も近いデータの1つ後まで移動させることにより、監視区間内のデータが失われていた場合でも、監視区間と受入区間を強制的に移動させて、その後の監視区間内のデータが揃っていれば、リングバッファからデータを読み出すことができる。
 さらに、データロス回数を集計することにより、パケットの損失や大幅な遅延の頻度を把握することも可能である。さらに、リングバッファが空になった後に到着したデータを先頭としてリングバッファに格納した時に、先頭順序番号が移動した分だけデータロス回数を補正することで、カウント漏れや二重カウントを回避することができる。
<第2の実施の形態>
 第1の実施の形態では、リングバッファが空になった後に到着したデータを先頭としてリングバッファに格納した時に、先頭順序番号が移動した分をまとめてデータロス回数に加算することでデータロス回数を補正した。例えば、図31では、データロス回数を「-3」補正することで、順序番号2~4の3個のパケットのデータが二重に集計されるのを回避している。しかしながら、パケット3個分の補正を先にまとめて行うので、過去に到着した順序番号2~4の3個のパケットが図31以降に必ずデータロスとして集計されるまでは、実際のデータロス回数との間に乖離が生じるという問題がある。この時、データロス回数が一時的に負の値になることもある。
 そこで、第2の実施の形態では、受入区間の先頭順序番号が前に移動する場合にまとめて補正せずに、一旦前に移動した先頭順序番号をデータ読出やデータロスで1つずつ後に更新する度にデータロス回数を1回ずつ差し引いて補正する。具体的には、監視区間内に揃ったデータをリングバッファから読み出して監視区間と受入区間を1つ後に移動する時は、データロス回数をデクリメントして補正する。これは、順序補正後に到着間隔算出のために読み出されたデータと同じ順序番号が過去にデータロスと判定されているので、その分のデータロス回数を1回差し引くためである。
 また、データロスと判定して監視区間と受入区間を1つ後に移動する時は、補正のためデータロス回数をインクリメントしない。これは、過去にデータロスと判定されている場合はデータロスを二重にカウントしないため、過去にデータ読出を行った場合はパケット間隔の度数分布としてカウント済だからである。
<パケット順序補正部の動作例>
 図39Aは、本実施の形態に係るデータ順序補正方法の動作フローチャートの一例である。図39Bは、第2の実施の形態に係るパケット保存数0の時の処理の動作フローチャートの例を示す図である。図40は、第2の実施の形態に係るデータロス回数の補正処理の動作フローチャートの例を示す図である。図6A、図6Bと比較すると、逐次補正開始順序番号と逐次補正終了順序番号を保持するレジスタを備え、受入区間の先頭順序番号が逐次補正開始順序番号~逐次補正終了順序番号の時だけデータロス回数の補正を行う点(S4-9、S4-10、S9-1、S9-2)が異なる。
<初期状態からの動作>
 図41は、本実施の形態におけるリングバッファの初期状態を表す図である。図7との差分は、逐次補正開始順序番号と逐次補正終了順序番号を保持するレジスタ等が追加された点である。逐次補正開始順序番号は、受入区間の先頭順序番号が逐次補正開始順序番号よりも後に移動したら、最も前の先頭順序番号に更新される。逐次補正終了順序番号は、受入区間の先頭順序番号がこれまで更新されてきた中で最も後ろの順序番号である。受入区間の先頭順序番号が逐次補正開始順序番号~逐次補正終了順序番号の時だけデータロス回数の補正を行う。
 図42は、図41に示した保存パケット数=0の初期状態において順序番号=2であるパケットが到着して、その到着時刻情報T_2を書き込んだ後のリングバッファの状態である。初回受信データの場合は、逐次補正開始順序番号と逐次補正終了順序番号を、受入区間の先頭順序番号「3」に更新する点が、図8と異なる。
 図43は、図42の状態の後に図9~図18と同様にパケットが到着した後のリングバッファの状態である。最後に受入区間外の順序番号5のパケットが到着したので、データロスと判定して監視区間と受入区間をそれぞれ後に1つ移動させて、保存パケット数が0となった。受入区間の先頭順序番号を後に更新するのに合わせて逐次補正終了順序番号も後に更新した結果、逐次補正終了順序番号が「127」となる点が、図18と異なる。
 図44は、図43に示した保存パケット数=0の状態において順序番号133であるパケットが到着して、初期状態からの動作を行った後のリングバッファの状態である。受入区間の先頭順序番号が「127」から「134」と後へ7つ移動したので、図19と同様に、データロス回数をまとめて「+7」補正して「10」となる。パケット受信前である図43の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「134」で、「3」のほうが前の番号である。よって、図44において最も前の先頭順序番号は、引き続き「3」となる。逐次補正終了順序番号を、受入区間の先頭順序番号「134」に更新する点が、図19と異なる。
 図45は、図44の状態において受入区間外の順序番号132のパケットが到着して、同様の受入区間外のパケットを受信した時の動作を行った後のリングバッファの状態である。逐次補正終了順序番号を、受入区間の先頭順序番号「135」に更新する点が、図20と異なる。
 図46は、図45に示した保存パケット数=0の状態において順序番号130であるパケットが到着して、初期状態からの動作を行った後のリングバッファの状態である。受入区間の先頭順序番号が「135」から「131」と前へ移動したので、図21と異なり、データロス回数をまとめて補正せずに、この後、先頭順序番号が逐次補正終了順序番号になるまでは、1つ後に移動する度にデータロス回数を1つずつ差し引いて補正していく。
パケット受信前である図45の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「131」で、「3」のほうが前の番号である。よって、図46において最も前の先頭順序番号は、引き続き「3」となる。
 図47は、図46において受入区間内の順序番号=131のパケットが到着して、その到着時刻情報T_131を書き込んだ後のリングバッファの状態である。逐次補正開始順序番号と逐次補正終了順序番号を保持している点とデータロス回数が補正されていない点が、図22と異なる。
 図48は、図47の状態で監視区間内に全てのデータ(到着時刻情報T_130、T_131)が揃ったので、読み出し動作を行った後の状態である。先頭順序番号が逐次補正終了順序番号になるまでは、1つ後に移動する度にデータロス回数を1つずつ差し引いて補正していくので、データロス回数をデクリメントして補正する点が、図23と異なる。
 図49は、図48の状態の後に順序番号=134~252の118個のパケットが到着して、それらの到着時刻情報T_134~T_252を書き込んだ後のリングバッファの状態である。
 図50は、図49において保存パケット数が閾値120に達してデータロスと判定したため、監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。T_131の到着フラグが下りて保存パケット数が1減って119となる。データロスと判定されてインクリメントする分と補正のためデクリメントする分が相殺されて、データロス回数は変化しない点が、図25と異なる。
 図51は、図50の状態の後に順序番号=253のパケットが到着して、その到着時刻情報T_253を書き込んだ後のリングバッファの状態である。
 図52は、図51において保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。データロスと判定されてインクリメントする分と補正のためデクリメントする分が相殺されて、データロス回数は変化しない点が、図27と異なる。
 図53は、図52において保存パケット数が閾値120に達してデータロスと判定したため、図14と同様に監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。データロスと判定されてインクリメントする分と補正のためデクリメントする分が相殺されて、データロス回数は変化しない点が、図28と異なる。
 先頭順序番号が1つ後に更新されて逐次補正終了順序番号「135」と同じになり、データロス回数はまとめて補正した時の図28と同じ「10」になった。以後は、データロス回数の補正は不要である。
 図54は、図53の状態で到着時刻情報T_135~T_253が揃ったので、繰り返し読み出した後のリングバッファの状態である。
 図42~図53の間に、送信元から出力されたと考えられる順序番号2~253の合計252個のパケットのうち、241組の連番パケットがリングバッファから読み出されて到着間隔を算出・集計されている。一方、図54においてデータロス回数は10、保存パケット数は1である。これらの合計は241+10+1=252で、送信元から出力されたと考えられるパケットの個数と一致することから、データロス回数が補正により正しく集計されていることがわかる。
 図55は、図41の状態の後に図8~図12と同様にパケットが到着した後、最後に受入区間外の順序番号1のパケットが到着して、受入区間外のパケットを受信した時の動作を行った後のリングバッファの状態である。受入区間の先頭順序番号を後に更新するのに合わせて逐次補正終了順序番号も後に更新した結果、逐次補正終了順序番号が「6」となる点が、図30と異なる。
 図56は、図55に示した保存パケット数=0の状態において順序番号65535であるパケットが到着して、初期状態からの動作を行った後のリングバッファの状態である。受入区間の先頭順序番号が「6」から「0」と前へ移動したので、図31と異なり、データロス回数をまとめて補正せずに、この後、先頭順序番号が逐次補正開始順序番号と逐次補正終了順序番号の間(逐次補正開始順序番号≦先頭順序番号<逐次補正終了順序番号)にある時は、1つ後に移動する度にデータロス回数を1つずつ差し引いて補正していく。
 パケット受信前である図55の状態における最も前の先頭順序番号の現在値は「3」、決定した前記先頭順序番号は「0」で、「0」のほうが前の番号である。よって、図56において最も前の先頭順序番号は「0」となる。
 図57は、図56の状態において受入区間内の順序番号=0であるパケットが到着して、書き込み動作を行った後のリングバッファの状態である。
 図58は、図57の状態で監視区間内に全てのデータ(到着時刻情報T_65535、T_0)が揃ったので、読み出し動作を行った後の状態である。先頭順序番号が逐次補正開始順序番号と逐次補正終了順序番号の間にある時以外はデータロス回数の補正を行わないので、図33と同様にデータロス回数は変化しない。
 図59は、図58の状態の後に順序番号=1~4のパケットは到着せずに、受入区間内の順序番号=5~123の119個のパケットが到着して、それらの到着時刻情報T_5~T_123を書き込んだ後のリングバッファの状態である。図34と同様に、保存パケット数は、119増えて120となり、保存パケット数の閾値120に達している。なお、順序番号2~4の3個のパケットは過去に到着したので、今後到着することはない。
 図60は、図59で保存パケット数が閾値120に達してデータロスと判定したため、監視区間と受入区間をそれぞれ後に1つ移動させたリングバッファの状態である。先頭順序番号が逐次補正開始順序番号と逐次補正終了順序番号の間にある時以外はデータロス回数の補正を行わないので、図35と同様にデータロス回数をインクリメントする。
 図61は、図60の状態において受入区間内の順序番号=124であるパケットが到着して、書き込み動作を行った後のリングバッファの状態である。
 図62は、図61で保存パケット数が閾値120に達してデータロスと判定したため、監視区間と受入区間をそれぞれ後に1つ移動させたあとのリングバッファの状態である。
先頭順序番号が逐次補正開始順序番号と逐次補正終了順序番号の間にある時以外はデータロス回数の補正を行わないので、データロス回数をインクリメントする。なお、先頭順序番号が逐次補正開始順序番号と同じ「3」になったので、以後は、先頭順序番号が逐次補正終了順序番号になるまでは、1つ後に移動する度にデータロス回数を1つずつ差し引いて補正していく。
 図63は、図62で保存パケット数が閾値120に達してデータロスと判定したため、監視区間と受入区間をそれぞれ後に1つ移動させる動作を更に3回行ったあとのリングバッファの状態である。先頭順序番号が逐次補正開始順序番号と逐次補正終了順序番号の間(逐次補正開始順序番号(3)≦先頭順序番号<逐次補正終了順序番号(6))にある時は、データロス回数の補正を行う。データロスと判定されてインクリメントする分と補正のためデクリメントする分が相殺されて、データロス回数は変化しない点が、図37と異なる。また、先頭順序番号が逐次補正開始順序番号より後になったので、逐次補正開始順序番号を最も前の先頭順序番号に更新する。
 ここで、先頭順序番号が3つ後に更新されて逐次補正終了順序番号「6」と同じになり、データロス回数は、まとめて補正した時の図37と同じ「3」になった。以後は、データロス回数の補正は不要である。
 図64は、図63の状態で到着時刻情報T_135~T_253が揃ったので、図17と同様に繰り返し読み出した後のリングバッファの状態である。
 図55~図63の間に、送信元から出力されたと考えられる順序番号65535、0~124の合計126個のパケットのうち、122組の連番パケットがリングバッファから読み出されて到着間隔を算出・集計されている。一方、図64においてデータロス回数は3、保存パケット数は1、である。これらの合計は122+3+1=126で、送信元から出力されたと考えられるパケットの個数と一致することから、データロス回数が補正により正しく集計されていることがわかる。
<第2の実施の形態の効果>
 第2の実施の形態によれば、受入区間の先頭順序番号が前に移動する場合に、データロス回数をまとめて補正せずに、一旦前に移動した先頭順序番号をデータ読出やデータロスで1つずつ後に更新する度にデータロス回数を1回ずつ差し引いて補正するように構成したので、データロス回数をまとめて補正する場合と比較して、実際のデータロス回数との間に乖離が生じるという問題を回避することが可能となる。
<実施の形態の拡張>
 以上、実施の形態を参照して本発明を説明したが、本発明は上記の実施の形態に限定されるものではない。本発明の構成や詳細には、本発明の技術思想の範囲内で当業者が理解し得る様々な変更をすることができる。
 1…パケット監視装置、10…PHY部、20…MAC部、30…到着時刻情報付与部、40…監視対象抽出部、50…パケット順序補正部、51…受入可否判断部、52…リングバッファ書込部、53…リングバッファ読み出し部、54…監視区間/受入区間管理部、55…リングバッファ、60…パケット間隔計算部、70…統計情報記憶部、80…可視化部。

Claims (9)

  1.  順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正方法であって、
     前記リングバッファは、
     順序情報に対応する所定の数の記憶領域を備え、
     1個または連続する2個以上の順序番号からなる監視区間と、
     前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、
     受信したデータの順序番号が前記受入区間内であった場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むステップと、
     前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すステップと、
     前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新するステップと、
     前記リングバッファに記憶されているデータの個数が0の場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、
     前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定するステップと、
     前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントするステップと、
     前記リングバッファに記憶されているデータの個数が0の状態において、受信したデータが初回受信データでない場合は、前記受信したデータを前記監視区間の先頭として前記監視区間及び前記受入区間を決定した後に、前記監視区間及び前記受入区間を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正するステップと、
     を含むデータ順序補正方法。
  2.  前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでない場合は、前記監視区間及び前記受入区間を決定する前後の前記監視区間及び前記受入区間の移動量を前記データロス回数に加算して補正する
     請求項1記載のデータ順序補正方法。
  3.  前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データの場合は、決定した前記受入区間の先頭順序番号を最も前の先頭順序番号として記憶し、
     受信したデータが初回受信データでない場合は、前記最も前の先頭順序番号を現在値または決定した前記先頭順序番号のうちのより前の値に更新し、前記監視区間及び前記受入区間の移動量から前記最も前の先頭順序番号の更新による移動量を差し引いて、前記データロス回数を補正する
     請求項2記載のデータ順序補正方法。
  4.  前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データの場合は、決定した前記受入区間の先頭順序番号を逐次補正終了順序番号として記憶し、
     前記リングバッファに記憶されているデータの個数が0でない状態において、前記リングバッファからのデータ読出、または前記データロスにより、前記先頭順序番号を前記逐次補正終了順序番号よりも後ろに更新し、前記先頭順序番号の更新に合わせて前記逐次補正終了順序番号を更新し、
     前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでなく、且つ、前記決定した先頭順序番号が前記逐次補正終了順序番号よりも後の場合は、前記監視区間及び前記受入区間を決定する前後の前記監視区間及び前記受入区間の移動量を前記データロス回数に加算して補正し、前記逐次補正終了順序番号を前記先頭順序番号に更新し、
     前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでなく、且つ、前記決定した先頭順序番号が前記逐次補正終了順序番号よりも前の場合は、前記データロス回数を変更せず、
     前記先頭順序番号が前記逐次補正終了順序番号よりも前の場合のみ、前記監視区間に揃ったデータを読み出して前記先頭順序番号を1つ後に更新する時は、前記データロス回数をデクリメントして補正し、前記データロスが発生したと判定されて前記先頭順序番号を1つ後に更新する時は、前記データロス回数を更新しない
     請求項1記載のデータ順序補正方法。
  5.  前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データの場合は、前記決定した先頭順序番号を逐次補正開始順序番号として記憶し、前記決定した先頭順序番号を最も前の先頭順序番号として記憶し、
     前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでない場合は、前記逐次補正開始順序番号を前記最も前の先頭順序番号に更新し、前記最も前の先頭順序番号を現在値または前記決定した先頭順序番号のうちのより前の値に更新し、
     前記先頭順序番号が前記逐次補正開始順序番号より前の場合は、前記逐次補正終了順序番号よりも前の場合であっても前記データロス回数を補正しない
     請求項4記載のデータ順序補正方法。
  6.  前記監視区間の先頭から前記受入区間の末尾に記憶されている到着時刻情報の個数が所定の数に達した場合、
     受信したパケットの到着時刻情報の順序情報が前記受入区間内でなかった場合、
     前記監視区間の先頭もしくは先頭に最も近い到着時刻情報が示す到着時刻から所定の時間が経過した場合、
     のいずれか1つ以上の条件が成立する時に前記データロスが発生したと判定する
     請求項1~5の何れか1項に記載のデータ順序補正方法。
  7.  ヘッダ内に順序情報が含まれる受信パケットに到着時刻情報を付与する到着時刻情報付与部と、
     前記受信パケットのヘッダ内の情報に基づいて、監視対象パケットを抽出する監視対象抽出部と、
     監視対象パケットのヘッダ内の前記順序情報に基づいて、請求項1~6のいずれかの方法で前記監視対象パケットの順序を補正し、前記順序情報が連続する2つのパケットの到着時刻情報を出力するとともに、前記リングバッファの記憶限度を超えても前記順序情報が連続する2つのパケットが揃わない時にパケットロス発生と判定して、前記リングバッファの先頭位置を進めてパケットロス発生回数をカウントアップするパケット順序補正部と、
     前記順序情報が連続する2つのパケットの到着時刻の差からパケット間隔を求めるパケット間隔計算部と、
     前記パケット間隔の度数分布、および前記パケットロス発生回数を記憶する統計情報記憶部と、
     前記統計情報記憶部に記憶されている前記パケット間隔の度数分布、および、前記パケットロス発生回数に基づいて、ヒストグラムとして表示する可視化部と
     を備えるパケット監視装置。
  8.  順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正装置であって、
     前記リングバッファは、
     順序情報に対応する所定の数の記憶領域を備え、
     1個または連続する2個以上の順序番号からなる監視区間と、
     前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、
     受信したデータの順序番号が前記受入区間内であるかを判断する受入可否判断部と、
     受信したデータの順序番号が前記受入区間内であった場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むリングバッファ書込部と、
     前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すリングバッファ読出部と、
     前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新する監視区間/受入区間管理部と
     を備え、
     前期監視区間/受入区間管理部は、
     前記リングバッファに記憶されているデータの個数が0の場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、
     前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定し、
     前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、
     前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントし、
     前記リングバッファに記憶されているデータの個数が0の状態において受信したデータが初回受信データでない場合は、前記先頭の順序番号を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正する、
     データ順序補正装置。
  9.  順序情報付のデータをリングバッファに一時保存して順序補正するデータ順序補正方法を実行するためのデータ順序補正プログラムであって、
     前記リングバッファは、
     順序情報に対応する所定の数の記憶領域を備え、
     1個または連続する2個以上の順序番号からなる監視区間と、
     前記監視区間の先頭または2つ目の順序番号を先頭の順序番号とし、前記監視区間の先頭を含めてリングバッファの記憶領域数後の順序番号を末尾の順序番号とする受入区間を備え、
     受信したデータの順序番号が前記受入区間内であった場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、受信したデータを書き込むステップと、
     前記監視区間の全てにデータが書き込まれている場合に、前記監視区間内の全てのデータを読み出すステップと、
     前記監視区間の順序番号数の範囲内で、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を後に更新するステップと、
     前記リングバッファに記憶されているデータの個数が0の場合に、
     受信したデータの順序番号を前記リングバッファの記憶領域数で割った余剰に基づいて決定した値に対応する前記記憶領域の位置に、前記受信したデータを書き込み、
     前記受信したデータを前記監視区間の先頭とし、前記監視区間の先頭に対応させて、前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を決定するステップと、
     前記監視区間の1か所以上が空であっても、予め定めた判定条件を満たす場合は、前記リングバッファの記憶限度を超えたデータロスが発生したと判定して、
     前記監視区間及び前記受入区間のそれぞれの先頭の順序番号及び末尾の順序番号を1つ後に更新するとともに、データロス回数をインクリメントするステップと、
     前記リングバッファに記憶されているデータの個数が0の時に受信したデータが初回受信データでない場合は、前記先頭の順序番号を決定する前後の前記監視区間及び前記受入区間の移動量に応じて前記データロス回数を補正するステップと
     をコンピュータに実行させるデータ順序補正プログラム。
PCT/JP2019/048557 2019-12-11 2019-12-11 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム WO2021117171A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2019/048557 WO2021117171A1 (ja) 2019-12-11 2019-12-11 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム
JP2021563521A JP7197026B2 (ja) 2019-12-11 2019-12-11 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム
US17/783,540 US20230009530A1 (en) 2019-12-11 2019-12-11 Data Sequence Amendment Method, Packet Monitoring Apparatus, Data Sequence Amendment Device, and Data Sequence Amendment Program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/048557 WO2021117171A1 (ja) 2019-12-11 2019-12-11 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム

Publications (1)

Publication Number Publication Date
WO2021117171A1 true WO2021117171A1 (ja) 2021-06-17

Family

ID=76330843

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/048557 WO2021117171A1 (ja) 2019-12-11 2019-12-11 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム

Country Status (3)

Country Link
US (1) US20230009530A1 (ja)
JP (1) JP7197026B2 (ja)
WO (1) WO2021117171A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020261320A1 (ja) * 2019-06-24 2020-12-30 日本電信電話株式会社 データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006510255A (ja) * 2002-12-12 2006-03-23 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ ストリーミング・アプリケーションにおけるパケット損失を循環バッファを用いて検出するシステムおよび方法
JP2009171157A (ja) * 2008-01-15 2009-07-30 Fujitsu Ltd リングバッファの使用方法およびスイッチング装置
US20160134501A1 (en) * 2014-11-07 2016-05-12 Nomad Spectrum Limited Data traffic processing and analysis
WO2018142866A1 (ja) * 2017-02-06 2018-08-09 日本電信電話株式会社 転送装置、転送方法及びプログラム

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20050088116A (ko) * 2002-12-12 2005-09-01 코닌클리케 필립스 일렉트로닉스 엔.브이. 컬러 매칭 함수에 근접하기 위한 변환 구조
US20090135724A1 (en) * 2007-11-27 2009-05-28 Tellabs Operations, Inc. Method and apparatus of RTP control protocol (RTCP) processing in real-time transport protocol (RTP) intermediate systems
ATE514264T1 (de) * 2008-02-08 2011-07-15 Freescale Semiconductor Inc Puffermodul, empfänger, einrichtung und pufferverfahren unter verwendung von fenstern
JP2014158241A (ja) * 2013-02-18 2014-08-28 Ricoh Co Ltd データ通信装置及びデータ通信方法
US10135746B2 (en) * 2015-07-07 2018-11-20 Strong Force Iot Portfolio 2016, Llc Cross-session network communication configuration
US9876613B2 (en) * 2015-08-28 2018-01-23 Qualcomm Incorporated Transport protocol communications reduction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006510255A (ja) * 2002-12-12 2006-03-23 コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ ストリーミング・アプリケーションにおけるパケット損失を循環バッファを用いて検出するシステムおよび方法
JP2009171157A (ja) * 2008-01-15 2009-07-30 Fujitsu Ltd リングバッファの使用方法およびスイッチング装置
US20160134501A1 (en) * 2014-11-07 2016-05-12 Nomad Spectrum Limited Data traffic processing and analysis
WO2018142866A1 (ja) * 2017-02-06 2018-08-09 日本電信電話株式会社 転送装置、転送方法及びプログラム

Also Published As

Publication number Publication date
JP7197026B2 (ja) 2022-12-27
US20230009530A1 (en) 2023-01-12
JPWO2021117171A1 (ja) 2021-06-17

Similar Documents

Publication Publication Date Title
US7336678B2 (en) State-based jitter buffer and method of operation
US6985501B2 (en) Device and method for reducing delay jitter in data transmission
US10757034B2 (en) Queue flushing method and related device
US8089979B2 (en) Packet relay apparatus and packet relay method
US8306045B2 (en) Packet forwarding apparatus and method for discarding packets
WO2012109911A1 (zh) 网络流量监管方法及装置
US12004258B2 (en) Method and system for performing charging on network resource, and related device
CN110086728B (zh) 发送报文的方法、第一网络设备及计算机可读存储介质
CN101370016A (zh) 一种数据流表的老化方法、装置和系统
CN113225253B (zh) 一种报文转发方法及装置
WO2021117171A1 (ja) データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム
CN102882809B (zh) 一种基于报文缓存的网络限速方法及装置
US6975643B2 (en) Queue management in packet switched networks
CN1692609B (zh) 以太网(r)中的帧转发方法及节点
US6621825B1 (en) Method and apparatus for per connection queuing of multicast transmissions
WO2020261320A1 (ja) データ順序補正方法、パケット監視装置、データ順序補正装置、及びデータ順序補正プログラム
CN107770124A (zh) 一种ip语音缓冲区的动态控制方法及装置
US10084709B1 (en) Methods and apparatus for scheduling transmission of data in a network
US7362771B1 (en) Reduced latency FIFO
WO2024134755A1 (ja) パケット監視装置、方法およびプログラム
CN105099932B (zh) 基于直通转发技术的调度方法及装置
CN109639532A (zh) 一种快速缩减抖动缓冲区的方法及装置
US20230081344A1 (en) Flow characteristic extraction method and apparatus
JP3669683B2 (ja) フロー測定装置、フロー測定方法及び記録媒体
CN117793026A (zh) 一种网络流量ip限速方法及装置

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: 19955718

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021563521

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19955718

Country of ref document: EP

Kind code of ref document: A1