WO2022041696A1 - 流量监控方法、装置、集成电路及网络设备 - Google Patents
流量监控方法、装置、集成电路及网络设备 Download PDFInfo
- Publication number
- WO2022041696A1 WO2022041696A1 PCT/CN2021/081657 CN2021081657W WO2022041696A1 WO 2022041696 A1 WO2022041696 A1 WO 2022041696A1 CN 2021081657 W CN2021081657 W CN 2021081657W WO 2022041696 A1 WO2022041696 A1 WO 2022041696A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- register
- information
- value
- monitoring device
- packet
- Prior art date
Links
- 238000012544 monitoring process Methods 0.000 title claims abstract description 122
- 238000000034 method Methods 0.000 title claims abstract description 113
- 238000012806 monitoring device Methods 0.000 claims description 221
- 238000005259 measurement Methods 0.000 claims description 28
- 230000004044 response Effects 0.000 claims description 18
- 230000010354 integration Effects 0.000 claims 1
- 238000004891 communication Methods 0.000 description 46
- 238000012545 processing Methods 0.000 description 46
- 230000015654 memory Effects 0.000 description 28
- 230000006870 function Effects 0.000 description 16
- 238000010586 diagram Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 10
- 239000004744 fabric Substances 0.000 description 8
- 238000004590 computer program Methods 0.000 description 7
- 238000005315 distribution function Methods 0.000 description 5
- 239000000284 extract Substances 0.000 description 5
- 230000001186 cumulative effect Effects 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 238000012896 Statistical algorithm Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000010606 normalization Methods 0.000 description 2
- 238000007619 statistical method Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004422 calculation algorithm Methods 0.000 description 1
- 230000002950 deficient Effects 0.000 description 1
- 230000001934 delay Effects 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- RGNPBRKPHBKNKX-UHFFFAOYSA-N hexaflumuron Chemical compound C1=C(Cl)C(OC(F)(F)C(F)F)=C(Cl)C=C1NC(=O)NC(=O)C1=C(F)C=CC=C1F RGNPBRKPHBKNKX-UHFFFAOYSA-N 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000013508 migration Methods 0.000 description 1
- 230000005012 migration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/06—Generation of reports
- H04L43/062—Generation of reports related to network traffic
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
- H04L43/026—Capturing of monitoring data using flow identification
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/14—Network analysis or design
- H04L41/142—Network analysis or design using statistical or mathematical methods
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
- H04L43/0894—Packet rate
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/16—Threshold monitoring
Definitions
- the present application relates to the field of communication technologies, and in particular, to a traffic monitoring method, apparatus, integrated circuit and network equipment.
- the distribution of performance indicators such as packet delay and chip port queue length can reflect the network operation status. Its distribution can be accurately calculated by storing all the values of the performance indicator, but this method requires a lot of storage resources. In order to reduce storage requirements, currently, the distribution of values of various performance indicators is roughly calculated by means of histogram statistics.
- the embodiments of the present application provide a traffic monitoring method, apparatus, integrated circuit, and network device, which can perform simple and accurate statistics on various performance indicators of received packets. With a small amount of storage resources, the real status of network devices can be accurately reflected.
- an embodiment of the present application provides a traffic monitoring method.
- the method may include: when a traffic monitoring device receives a first packet, determining whether the traffic monitoring device includes a first register, where the first register includes For the first information and the second information, the value of the second information in the first register is zero, and the first information in the first register is used to indicate the value of the data bucket that carries the measurement value of the target performance indicator of the monitored packet.
- the second information in the first register is used to indicate the number of packets matching the value of the first information in the first register in the packets received by the flow monitoring device; in response to the flow monitoring device determining the flow monitoring
- the device includes a first register, and the flow monitoring device updates the value of the first information in the first register to the measured value of the target performance index of the first packet, and adds one to the value of the second information in the first register. In this way, it is not necessary to configure the value range of the target performance indicator, nor to divide the value range into equal parts to determine the depth of each data bucket.
- the first information of the depth of the data bucket, and the second information used to indicate the number of packets in the received packets that match the value of the first information in each register are used as two statistical parameters of the register, according to the destination of the received packets.
- the measured value of the performance index can flexibly update the values of the two statistical parameters in each register to realize the statistics of the target performance index, which not only reduces the configuration workload of the statistical target performance index, but also no longer limits the overall value range of the statistics.
- the value sub-ranges of the statistics of each register it is possible to obtain more comprehensive and accurate statistical results, so that the real operating status of the network device can be known more accurately.
- each register corresponds to a data bucket
- the data bucket counts the packets with the measured value of the target performance index within a certain range
- the data bucket records the value of the first information and the value of the second information, wherein the first information
- the value of the value refers to the measured value or range of the measured value of the packets counted in the data bucket
- the value of the second information refers to the number of packets counted in the data bucket.
- the statistical results recorded in the data buckets are stored in the corresponding registers.
- the depth of the data bucket corresponding to the register can be used as the value of the first information in the register, and the number of packets falling into the depth of the corresponding data bucket can be used as the value of the second information in the register corresponding to the data bucket.
- the method may further include: when the traffic monitoring device receives the second packet, determining whether the traffic monitoring device includes a second register, where the second register includes the first information and the second information , the value of the second information in the second register is zero, the first information in the second register is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored message, and the second information in the second register The information is used to indicate the number of packets matching the value of the first information in the second register in the packets received by the traffic monitoring device; at this time, in response to the traffic monitoring device determining that the traffic monitoring device does not include the second register, the traffic The monitoring apparatus performs the following operation: updating the value of the first information in the fourth register included in the flow monitoring apparatus according to the value of the first information in the third register included in the flow monitoring apparatus and the value of the second information in the third register and the value of the second information in the fourth register, the value of the second information in the updated fourth register is equal to the sum of the value of the second information
- this method will be used to indicate the first information of the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the first information used to indicate the value of the first information in the received packet that matches each register.
- the second information of the number of messages is used as the two statistical parameters of the register, and the values of the two statistical parameters in each register are flexibly updated according to the measured value of the target performance index of the received message, and the target is realized when it is determined that there is no empty register.
- the statistics of performance indicators not only reduces the configuration workload of statistical target performance indicators, but also makes it possible to obtain more comprehensive and accurate statistical results because the overall value range of statistics and the sub-range of values for each register statistics are no longer limited. Therefore, the real operation status of the network device can be known more accurately.
- the determined third register and the fourth register are two adjacent registers after sorting, and the manner of determining the third register and the fourth register in the adjacent registers includes but is not limited to the following four possible registers Method to realize:
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is less than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent ones included in the traffic monitoring device The sum of the values of the second information in the register.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two phases included in the flow monitoring device.
- the method may further include: the traffic monitoring device determines that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, and the traffic monitoring device determines that the measured value of the target performance index of the second packet matches the value of the first information in the updated fourth register, The value of the second information in the four registers is incremented by one.
- the flow monitoring apparatus determines that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register.
- the flow monitoring apparatus may determine the target performance of the second packet.
- the measured value of the indicator belongs to the numerical range corresponding to the value of the first information in the fourth register.
- the flow monitoring apparatus determines that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, for example, it may also include: the flow monitoring apparatus determines the target of the second packet The difference between the measured value of the performance index and the value of the first information in the fourth register is smaller than the difference between the measured value of the target performance index of the second packet and the value of the first information in other registers. In this way, after the third register and the fourth register are updated, the fourth register is used to quickly count the target performance index of the second packet.
- the method may further include: the traffic monitoring device determines that the measured value of the target performance index of the second packet does not match the value of the first information in the updated fourth register, and the traffic monitoring device determines The value of the first information in the third register is updated to the measured value of the target performance index of the second message, and the value of the second information in the third register is incremented by one. In this way, after the third register and the fourth register are updated, fast statistics on the target performance index of the second packet through the third register is achieved.
- the method may further include: when the traffic monitoring device receives the third packet, the traffic monitoring device determines that the measured value of the target performance index of the third packet matches the first information in the third register , then the flow monitoring device increases the value of the second information in the third register by one. In this way, more rapid and effective statistics of the packets whose measured value of the target performance index matches the value of the first information of the register is realized.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the value of the first information in the third register is greater than The value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring device are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the traffic monitoring device is included in a processing chip, for example, may be integrated in a network processor (English: network processor, NP for short) chip.
- a network processor English: network processor, NP for short
- an embodiment of the present application provides a flow monitoring apparatus, and the flow monitoring apparatus may include, for example, a first receiving unit, a first determining unit, and a second determining unit.
- the first receiving unit is used to receive the first message
- the first determination unit is used to determine whether the traffic monitoring device includes a first register, the first register includes first information and second information, and the first register includes The value of the second information is zero, the first information in the first register is used to indicate the depth of the data bucket that carries the measurement value of the target performance indicator of the monitored packet, and the second information in the first register is used to indicate the flow monitoring The number of packets that match the value of the first information in the first register in the packets received by the device; the second determining unit is configured to, in response to the traffic monitoring device determining that the traffic monitoring device includes the first register, convert the value in the first register The value of the first information is updated to the measured value of the target performance index of the first packet, and the value of the second information in the first register is incremented
- the apparatus further includes: a second receiving unit, a third determining unit and a first updating unit.
- the second receiving unit is used to receive the second message;
- the third determination unit is used to determine whether the traffic monitoring device includes a second register, the second register includes the first information and the second information, and the second register includes the first information and the second information.
- the value of the second information is zero, the first information in the second register is used to indicate the depth of the data bucket that carries the measurement value of the target performance indicator of the monitored packet, and the second information in the second register is used to indicate the flow monitoring the number of packets matching the value of the first information in the second register in the packets received by the device; the first update unit, configured to respond to the traffic monitoring device determining that the traffic monitoring device does not include the second register, according to the traffic monitoring device including The value of the first information in the third register and the value of the second information in the third register update the value of the first information in the fourth register and the value of the second information in the fourth register included in the flow monitoring device, The updated value of the second information in the fourth register is equal to the sum of the value of the second information in the third register and the value of the second information in the fourth register; and changing the value of the second information in the third register clear.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device. The sum of the values of the second information.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device.
- the apparatus further includes: a fourth determining unit and a second updating unit.
- the fourth determining unit is configured to determine that the measured value of the target performance index of the second message matches the value of the updated first information in the fourth register
- the second updating unit is configured to convert the second information in the fourth register The value is incremented by one.
- the fourth determining unit is specifically configured to: determine that the measured value of the target performance indicator of the second packet belongs to a numerical range corresponding to the value of the first information in the fourth register.
- the fourth determining unit is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the target performance of the second packet The difference between the measured value of the indicator and the value of the first information in the other registers.
- the apparatus further includes: a fifth determining unit and a third updating unit.
- the fifth determining unit is configured to determine that the measured value of the target performance index of the second packet does not match the value of the first information in the updated fourth register;
- the third updating unit is configured to convert the value of the first information in the third register The value of the first information is updated to the measured value of the target performance index of the second message, and the value of the second information in the third register is incremented by one.
- the apparatus further includes: a third receiving unit, a sixth determining unit, and a fourth updating unit.
- the third receiving unit is configured to receive the third message; the sixth determining unit is configured to determine that the measured value of the target performance index of the third message matches the value of the first information in the third register, and the fourth updating unit , which is used to add one to the value of the second information in the third register.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring device are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device is included in a processing chip, for example, can be integrated in an NP chip.
- the flow monitoring device provided in the second aspect corresponds to the method provided in the first aspect.
- the specific implementation manner and achieved effects refer to the relevant description of the method shown in the first aspect.
- an embodiment of the present application further provides a traffic monitoring device, where the device includes a processor and a transceiver.
- the transceiver is used to receive the first message;
- the processor is used to determine whether the traffic monitoring device includes a first register, the first register includes first information and second information, and the second information in the first register is The value is zero, the first information in the first register is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information in the first register is used to indicate the packet received by the traffic monitoring device.
- the processor is further configured to update the value of the first information in the first register to the first register in response to determining that the flow monitoring device includes the first register.
- the measured value of the target performance index of a message, and the value of the second information in the first register is incremented by one.
- the transceiver is further configured to receive the second packet;
- the processor is further configured to determine whether the traffic monitoring device includes a second register, and the second register includes the first information and the second information, The value of the second information in the second register is zero, the first information in the second register is used to indicate the depth of the data bucket carrying the measured value of the target performance index of the monitored packet, and the second information in the second register used to indicate the number of packets matching the value of the first information in the second register in the packets received by the traffic monitoring device;
- the processor is further configured to respond to the traffic monitoring device determining that the second register is not included in the traffic monitoring device, according to The value of the first information in the third register and the value of the second information in the third register included in the flow monitoring apparatus update the value of the first information in the fourth register and the second information in the fourth register included in the flow monitoring apparatus
- the value of the information, the updated value of the second information in the fourth register is equal to the sum of the value of the second information in the third register and the value of the second information
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device. The sum of the values of the second information.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device.
- the processor is further configured to determine that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, and the traffic monitoring device stores the value in the fourth register The value of the second information is incremented by one.
- the processor is specifically configured to: determine that the measured value of the target performance index of the second packet belongs to the numerical range corresponding to the value of the first information in the fourth register.
- the processor is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the measured value of the target performance index of the first packet and other registers The difference in the value of the first information in .
- the processor is further configured to determine that the measured value of the target performance index of the second packet does not match the value of the first information in the updated fourth register, and the traffic monitoring device stores the third register The value of the first information in the third register is updated to the measured value of the target performance index of the second packet, and the value of the second information in the third register is increased by one.
- the transceiver is further configured to receive the third packet; the processor is further configured to determine that the measured value of the target performance index of the third packet matches the value of the first information in the third register , the flow monitoring device adds one to the value of the second information in the third register.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring device are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device is included in a processing chip, for example, can be integrated in an NP chip.
- the flow monitoring device provided in the third aspect corresponds to the method provided in the first aspect.
- the specific implementation manner and achieved effects refer to the relevant description of the method shown in the first aspect.
- an embodiment of the present application further provides an integrated circuit, where the integrated circuit includes a control circuit and an interface circuit.
- the interface circuit is used to receive the first message;
- the control circuit is used to determine whether the integrated circuit includes a first register, the first register includes first information and second information, and the value of the second information in the first register is zero, the first information in the first register is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored message, and the second information in the first register is used to indicate that in the message received by the integrated circuit the number of packets matching the value of the first information in the first register;
- the control circuit is further configured to update the value of the first information in the first register to the first packet in response to determining that the integrated circuit includes the first register The measured value of the target performance index, and the value of the second information in the first register is increased by one.
- the interface circuit is further configured to receive the second message; the control circuit is further configured to determine whether the integrated circuit includes a second register, the second register includes the first information and the second information, the first The value of the second information in the second register is zero, the first information in the second register is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information in the second register is used for the number of messages that match the value of the first information in the second register in the messages received by the instruction integrated circuit; the control circuit is further configured to respond to the integrated circuit for determining that the second register is not included in the integrated circuit, according to the information included in the integrated circuit.
- the value of the first information in the third register and the value of the second information in the third register update the value of the first information in the fourth register and the value of the second information in the fourth register included in the integrated circuit, after the update
- the value of the second information in the fourth register is equal to the sum of the value of the second information in the third register and the value of the second information in the fourth register; and the value of the second information in the third register is cleared .
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than the value in any two adjacent registers included in the integrated circuit. The sum of the values of the second information.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device.
- control circuit is further configured to determine that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, and the integrated circuit compares the value of the first information in the fourth register The value of the second information is incremented by one.
- the control circuit is specifically configured to: determine that the measured value of the target performance index of the second packet belongs to the numerical range corresponding to the value of the first information in the fourth register.
- the control circuit is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the measured value of the target performance index of the first packet and other registers The difference in the value of the first information in .
- control circuit is further configured to determine that the measured value of the target performance index of the second packet does not match the updated value of the first information in the fourth register, and the integrated circuit stores the value of the first information in the third register The value of the first information is updated to the measured value of the target performance index of the second packet, and the value of the second information in the third register is incremented by one.
- the transceiver is further configured to receive the third packet; the control circuit is further configured to determine that the measured value of the target performance index of the third packet matches the value of the first information in the third register , the integrated circuit adds one to the value of the second information in the third register.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring device are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device is included in a processing chip, for example, can be integrated in an NP chip.
- the integrated circuit provided in the fourth aspect corresponds to the method provided in the first aspect.
- specific implementation manners and achieved effects refer to the relevant description of the method shown in the first aspect.
- an embodiment of the present application further provides a network device.
- the network device may include the traffic monitoring apparatus provided in the second aspect or the third aspect, or the network device may include the integrated circuit provided in the fourth aspect. .
- the embodiments of the present application further provide a computer-readable storage medium, including instructions, which, when executed on a computer, cause the computer to execute the method provided in the first aspect above.
- the present application also provides a computer program product, including a computer program or computer-readable instructions, which, when the computer program or the computer-readable instructions are run on a computer, cause the computer to execute the aforementioned first aspect. method.
- FIG. 1 is a histogram schematic diagram of a time delay of a histogram statistical algorithm in an embodiment of the present application
- FIG. 2 is a schematic structural diagram of a network device 10 in an embodiment of the present application.
- FIG. 3 is an exemplary schematic flowchart of a flow monitoring method in an embodiment of the present application.
- FIG. 4a is a schematic diagram of the contents stored in each register under the traffic monitoring method shown in FIG. 3 in an embodiment of the application;
- Fig. 4b is another schematic diagram of the contents saved in each register under the traffic monitoring method shown in Fig. 3 in the embodiment of the application;
- FIG. 5 is a schematic flowchart of a flow monitoring method 100 in an embodiment of the present application.
- FIG. 6 is a schematic flowchart of a flow monitoring method 200 in an embodiment of the present application.
- FIG. 7 is a schematic structural diagram of a flow monitoring device 700 in an embodiment of the present application.
- FIG. 8 is a schematic structural diagram of a flow monitoring device 800 in an embodiment of the present application.
- FIG. 9 is a schematic structural diagram of an integrated circuit 900 in an embodiment of the present application.
- FIG. 10 is a schematic structural diagram of a communication device 1000 in an embodiment of the present application.
- FIG. 11 is a schematic structural diagram of a communication device 1100 in an embodiment of the present application.
- performance indicators such as storage delay, packet length, time interval for receiving packets, or queue occupancy rate
- performance indicators are usually recorded by means of histogram statistics, thus reflecting the network operating status.
- the current way to count performance indicators of network devices can be implemented through four registers R1 to R4 on the network device.
- the preset target quantile value that is, the adjustment delay The reference ratio of the delay threshold
- R1 is used to save the total number n of packets collected in the current cycle. Every time the network device receives a packet, the value in R1 is incremented by one; R2 is used to save the The delay threshold t1 in the cycle; R3 is used to save the number m of packets whose delay exceeds the delay threshold t1 in the received packets in the cycle; R4 is used to save the current received packets in the cycle.
- the maximum delay value (English: max latency, ML for short).
- the network device will periodically calculate (m/n) (that is, the proportion of packets with a delay greater than t1 to all packets), and update the value in R2 according to (m/n) and the target quantile value , when (1-m/n) ⁇ 95%, the new delay threshold t2 is calculated according to the following formula (1), when (1-m/n) ⁇ 95%, then, according to the following formula (2) ) to calculate the new delay threshold t3:
- G is the step size and is a constant. It should be noted that each time the value of R2 is updated, the values of other registers need to be cleared.
- This statistical scheme is relatively simple to implement, but there are many problems: problem one, because the data distribution is not considered, only linear gradient descent can be used to converge the threshold t1, which is easy to cause convergence problems and affect the statistical accuracy; problem two, this scheme can only The target quantile set in advance cannot be obtained, but other quantile information cannot be obtained; the third problem is that the statistical results reflect a real-time value, which may have a large gap with the performance index during the entire operation of the network device.
- a histogram statistical algorithm can also be used to count performance indicators. Take the performance index counted by R1-R4, for example, a data bucket (English: data bucket) included in each R in R1-R4 for counting the delay.
- a data bucket English: data bucket
- This example is described by taking the specific implementation of the data bucket of the histogram (English: bin) in the histogram statistical method as an example.
- R1 includes bin 1 for statistical delay
- R2 includes bin 1 for statistical Delayed bin 2
- R3 includes bin 3 for statistical delay
- R4 includes bin 4 for statistical delay.
- bin 1 to bin 4 are a group of bins for statistical delay.
- the network device is pre-configured with the delay statistics range: [t1, t2], bin 1 to bin 4 respectively include a counter (English: counter), each counter is used to count the received packets that fall into the corresponding delay sub of the bin to which they belong.
- the counter1 in bin 1 is used to count the packets with the delay within [t1, t3] in the received packets
- the number, counter2 in bin 2 is used to count the number of received packets with delay within (t3, t4], and counter3 in bin 3 is used to count received packets with delay within ( The number of packets in t4, t5], and counter4 in bin 4 is used to count the number of packets with delays within (t5, t2] in the received packets.
- any delay sub-range can be recorded as As the depth of the bin, for example, the delay sub-range (t3, t4] can be called the depth of bin 2.
- the probability of the delay of the network device can be obtained based on the value of counter in the bin 1 to bin 4.
- the process of the distribution curve can be: normalize the values in each counter, and obtain the normalization results of counter1 to counter4: a, b, c, and d in turn, then, as shown in Figure 1
- the cumulative distribution function (English: cumulative distribution function, referred to as the cumulative distribution function of the delay) can be obtained according to this histogram. : CDF) curve, the value of the corresponding abscissa can be further determined according to the probability of occurrence of the demand (for example, 95%), as the time delay calibration value set by the network device.
- the current histogram statistical algorithm is compared with the statistical method introduced above , which can more accurately count the performance indicators of network devices.
- the value range corresponding to the performance indicators needs to be pre-configured and the value range is equally divided into the corresponding bins.
- the configuration process is cumbersome.
- the diversity and complexity of the text may lead to an unreasonable range of configuration values, and may also lead to unreasonable bin depth allocation.
- the counter value in some bins is large, while the counter value in some bins is small, and the statistical results are not accurate enough. .
- an embodiment of the present application provides a traffic monitoring method.
- the traffic monitoring method is applied to the traffic monitoring device provided by the embodiment of the present application.
- the traffic monitoring device includes a plurality of registers, and each register includes first information and The second information, where the first information is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information is used to indicate that the packets received by the traffic monitoring device match those in the register The number of packets of the value of the first information.
- Each register corresponds to a data bucket
- the data bucket counts the packets whose measured value of the target performance index is within a certain range
- the data bucket records the value of the first information and the value of the second information, wherein the value of the first information It refers to the measurement value or the range of the measurement value of the packets counted in the data bucket, and the value of the second information refers to the number of packets counted in the data bucket.
- the statistical results recorded in the data buckets are stored in the corresponding registers.
- the depth of the data bucket corresponding to the register can be used as the value of the first information in the register, and the number of packets falling into the depth of the corresponding data bucket can be used as the value of the second information in the register corresponding to the data bucket.
- the register Rx corresponding to the data bucket x, the depth of the data bucket x is 0-50, then, when the traffic monitoring device does not receive the message whose measurement value of the target performance index falls within 0-50, the register Rx
- the traffic monitoring method provided in this embodiment of the present application may, for example, include: when the traffic monitoring device receives the first packet, and determining that the traffic monitoring device also includes an empty first register (that is, the second information in the first register value is zero), then use the first register to count the target performance index of the first packet, that is, update the value of the first information in the first register to the measured value of the target performance index of the first packet, The value of the second information in the first register is incremented by one. In this way, there is no need to configure the value range of the performance indicator to be monitored (that is, the target performance indicator), and it is not necessary to divide the value range into equal parts to determine the depth of each data bucket.
- the first information of the depth of the data bucket of the measured value of the target performance index, and the second information used to indicate the number of packets in the received packets that match the value of the first information in each register as the two statistical parameters of the register flexibly update the values of these two statistical parameters in each register according to the measured value of the target performance indicator of the received message, and realize the statistics of the target performance indicator, which not only reduces the workload of configuring the target performance indicator, but also reduces the
- the overall value range of the statistics and the value sub-ranges of the statistics of each register are further limited, which makes it possible to obtain more comprehensive and accurate statistical results, so that the real operation status of the network device can be known more accurately. It should be noted that, in this implementation manner, the greater the number of registers used for statistics in the traffic monitoring device, the more accurate the statistics result.
- the data bucket is used to represent the object for which the measurement value of the target performance index is counted
- the depth of the data bucket refers to the measurement value or the range of the measurement value of the target performance index that can be counted by the data bucket
- the data buckets of different depths are used to realize the Statistics on packets with different measured values or ranges of target performance indicators.
- the traffic monitoring device includes: a data bucket 1 and a data bucket 2, wherein the data bucket 1 is used to count the packets whose measurement value of the target performance index is between 0 and 50, and the data bucket 2 is used to count the packets of the target performance index
- the depth of bucket 1 can be expressed as 0-50, and the depth of bucket 2 can be expressed as 51-100;
- the data bucket is used to carry the packet from the depth of the data bucket to the depth of the data bucket plus 50.
- the depth of data bucket 1 can also be expressed as 0, and the depth of data bucket 1 can also be expressed as 0.
- the depth of 2 can be expressed as 51; or, the depth of the data bucket can also be expressed as the average value of the measured values of the packets that fall within the statistical range of the data bucket.
- the register is a hardware implementation of the data bucket in the traffic monitoring device.
- the data collected in the data bucket 1 can be stored in the register 1 of the traffic monitoring device, and the data collected in the data bucket 2 can be stored in the register 2 of the traffic monitoring device.
- packet 1, packet 2 and Packet 4 corresponds to the depth of data bucket 1 (that is, falls within the statistical range of data bucket 1).
- Register 1 stores the statistical results corresponding to Packet 1, Packet 2, and Packet 4, and Packet 3 corresponds to Packet 5.
- Register 2 stores the statistical results corresponding to packet 3 and packet 5.
- the data bins can be implemented by, for example, histogram bins, each register stores a statistical result corresponding to one bin, and the statistical results collected by the bin are stored in the corresponding register.
- buckets, bins and registers can be used interchangeably.
- the first information in the register may be represented as value
- the second information in the register may be represented as counter.
- the first information and value may be used interchangeably
- the second information and counter may be used interchangeably.
- the network device 10 may include at least a traffic monitoring apparatus 120 .
- the traffic monitoring device 120 may include multiple registers R. Taking the traffic monitoring device 120 including R1 to R4 as an example, the traffic monitoring device 120 can store the data stored in R1 to R4 according to the traffic monitoring method provided in the embodiment of the present application. content is managed and processed.
- the traffic monitoring device 120 may be integrated in a processing chip, for example, may be integrated in a network processor (English: network processor, NP for short) chip 110, and the traffic monitoring device 120 may be a device in the NP chip 110 that has the functions implemented in the present application.
- the example provides a functional module of the traffic monitoring capability.
- the flow monitoring device 120 is a coprocessor with flow monitoring capability in the NP chip 110 .
- the registers used to store the statistical results are R1 to R4, and the traffic monitoring device 120 may further include a register R0, which is used to store the value of the first information and the second information of the packets to be counted.
- the value of the information, the value of the second information in R0 is 1. If the statistics of a packet are completed, the value of the first information and the value of the second information of the packet in R0 can be cleared to prepare for the statistics of the next packet; or, after receiving the next packet When there is a packet to be counted, the value of the first information of the previous packet in the R0 is directly updated with the value of the first information of the next packet.
- the traffic monitoring process may include: S11, the traffic monitoring apparatus 120 receives a packet 1.
- the traffic monitoring device 120 in S11 receives the packet 1 and obtains the measurement value x of the target performance index of the packet 1. Specifically, the network device 10 receives the packet 1, and the NP chip 110 extracts the packet 1 from the packet 1. The packet header (or, extracting part of the data and the packet header in the payload (English: payload)), the traffic monitoring device 120 in the NP chip 110 performs traffic monitoring according to the extracted part, and obtains the target performance of the packet 1 The measure x of the indicator.
- the delay unit in the following description may be, for example, milliseconds. Take the value in R for saving the statistical results sorted from small to large as an example for description.
- the conditions of R1 to R4 of the traffic monitoring module 120 can be referred to as shown in the first part to the third part of FIG. 4b, where , the first to third parts in FIG. 4b are respectively the same as the first to third parts in FIG. 4a; when the network device 10 receives the packet 4', the flow monitoring module 120 obtains the packet
- the network device 10 or other network devices capable of communicating with the network device 10 may also include a control device, and the control device may be, for example, a central processing unit (English: central process unit, abbreviated as: CPU).
- the control device can read the statistical results stored in R1 to R4, and process the read statistical results, for example, normalize the value of counter in each R, and take the value in each R as the value of The abscissa, the normalized processing result of the value of counter is the ordinate, and the probability distribution function (English: probability distribution function, abbreviated as: PDF) curve of the time delay of the network device 10 until the moment when the statistical result is read is obtained.
- PDF probability distribution function
- the traffic monitoring method does not need to store the specific values of the performance indicators of all packets, saves the storage resources of the network equipment, and does not require complex configuration, and can simply and accurately monitor the performance indicators of the network equipment. Packet-by-packet statistics are performed, so that the real operating status of network devices can be accurately analyzed based on the statistical results.
- a network device refers to a device that integrates the traffic monitoring module provided by the embodiments of the present application and can perform packet-by-packet performance index statistics on received packets, which may specifically include but not be limited to switches, routers, or firewalls, etc. .
- the performance indicators of network device statistics include but are not limited to: delay, packet size (also referred to as packet length), time interval for receiving packets, or queue occupancy.
- a traffic monitoring method in this embodiment of the present application can be applied to a traffic monitoring apparatus, for example, the traffic monitoring apparatus 120 in the network device 10 shown in FIG. 2 above.
- the operations performed by the traffic monitoring device to count different performance indicators are the same.
- the traffic monitoring device counts target performance indicators as an example for description, and the target performance indicator is among all the performance indicators that the traffic monitoring device can monitor and count. any of the .
- the traffic monitoring device includes: a register for temporarily storing the measured value of the target performance index of the message to be monitored, and several registers for saving the statistical results of the target performance index. Among them, the number of registers used to save the statistical results of the target performance indicators is fixed; the registers used to temporarily store the measured values of the target performance indicators of the to-be-monitored packets are sent to the pair after receiving the to-be-monitored packets. Before the target performance indicator of the message to be monitored is monitored, the value of the first information and the value of the second information of the target performance indicator of the message to be monitored are stored, and the value of the second information is 1.
- the registers for saving the statistical results of the target performance indicators include first information and second information, and the first information in each register is used to indicate the measurement value of the target performance indicator carrying the monitored message.
- the depth of the data bucket for example, in the above Figure 4b, the first information in each register is represented as value, taking R1 in the seventh part of Figure 4b as an example, R1 includes a data bucket, and the depth of the data bucket corresponds to 5, That is, the first information in R1 is used to indicate that the depth of the data bucket carrying the measured value of the delay of the monitored packet is 5, that is, the packet corresponding to the measured value of monitoring delay in R1 is 5.
- the second information in each register is used to indicate the number of packets in the packets received by the traffic monitoring device that match the value of the first information in the register.
- the second information in each register is represented as counter, Taking R1 in the seventh part of Fig. 4b as an example, the value of the second information in R1 is 2, which is used to indicate that there are 2 packets whose delay measurement value matches 5 in the received packets, that is to say, Two packets corresponding to the delay measurement value of 5 are monitored in R1.
- the value of the second information in the register is zero, it means that the register has not monitored the measurement value of the target performance index of any message, which means that the register is empty.
- the traffic monitoring device When the traffic monitoring device receives a message to be monitored, it needs to first check whether the traffic monitoring device still has an empty register for saving the statistical results of the target performance indicators.
- the shown method 100 completes the monitoring of the to-be-monitored message; if there is no empty register for saving the statistical result of the target performance index, then the method 200 shown in the following Figure 6 can complete the to-be-monitored message monitoring.
- a traffic monitoring method 100 provided by this embodiment of the present application may, for example, include the following S101 to S103:
- the traffic monitoring apparatus receives a first packet.
- the first message may be a service message or a control message, which is not limited in this embodiment of the present application.
- the NP chip in the network device may extract the packet header (or, extract part of the data and packets in the payload) from the first packet head), and then the flow monitoring device in the NP chip performs flow monitoring according to the extracted part.
- the traffic monitoring apparatus may acquire the measured value of the target performance index of the first packet, and update the first in the register for temporarily storing the measured value of the target performance index of the to-be-monitored packet based on the measured value
- the value of the information and the value of the second information, after the update, the value of the first information in the register is the measured value of the target performance index of the first packet, and the value of the second information in the register after the update is 1. In this way, a data basis is provided for the subsequent monitoring of the first packet.
- the flow monitoring device determines whether the flow monitoring device includes a first register, the first register includes first information and second information, the value of the second information in the first register is zero, and the first register in the first register has a value of zero.
- One piece of information is used to indicate the depth of the data bucket carrying the measured value of the target performance index of the monitored packet, and the second information in the first register is used to indicate that the packet received by the traffic monitoring device matches the first value in the first register. The number of packets for the value of the message.
- the flow monitoring apparatus in response to the flow monitoring apparatus determining that the flow monitoring apparatus includes a first register, the flow monitoring apparatus updates the value of the first information in the first register to the measured value of the target performance index of the first packet, and updates the first register The value of the second information in a register is incremented by one.
- the flow monitoring device may determine whether there is an empty register from all the registers used to save the statistical results of the target performance index, if there is, record any one of the empty registers as the first register, and execute S103. For example, if it is determined that there are multiple empty registers in the traffic monitoring device, an empty register adjacent to a non-empty register may be selected as the first register.
- R1 to R4 included in the traffic monitoring device are all empty.
- any register of R1 to R4 can be determined as the first register.
- R1 is used as the first register.
- a register and update the value of the first information in the R1 to the measured value 7 of the target performance index (such as delay) of the packet 1, and update the value of the second information in the R1 to 1 (that is, before the update in the R1).
- the value of the second information is 0 plus 1).
- the flow monitoring device receives the message 2, and can determine any register in the empty R2 to R4 as the first register, for example, the R2 adjacent to the non-empty register R1 is used as the first register.
- the first register updates the value of the first information in the R2 to the measured value 12 of the target performance index of the packet 2, and updates the value of the second information in the R2 to 1.
- the registers in the flow monitoring apparatus may be arranged in an increasing order of the value of the first information in the registers, that is, taking the flow monitoring apparatus 120 shown in FIG. 2 as an example, if the first information in R1 The value of the information is a, the value of the first information in R2 is b, the value of the first information in R3 is c, and the value of the first information in R4 is d, and a ⁇ b ⁇ c ⁇ d, then, 4 registers
- the order of can be: R1, R2, R3 and R4.
- the register for temporarily storing the measured value of the target performance indicator of the to-be-monitored packet and the non-empty register for saving the statistical result of the target performance indicator may also be sorted according to the value of the first information
- the first register may be the register used to temporarily store the measured value of the target performance index of the message to be monitored and the register corresponding to the sorting position for saving the statistical result of the target performance index.
- the sorting can be performed first. The statistical result in the register of the position is shifted backward, and then S103 is executed.
- the value of the second information in is updated to 1. In this way, it can be ensured that after each update, each register in the flow monitoring device is still arranged in an increasing order of the value of the first information in the register.
- each register in the traffic monitoring device may also be arranged in a descending order of the value of the first information in the register, and the specific implementation can refer to the above description of the increasing order.
- the traffic monitoring device determines that there is no empty register (ie, does not include the first register), for the monitoring method of the received packet by the traffic monitoring device, reference may be made to the related description in the following method 200, which will not be repeated here.
- the method 100 there is no need to configure the value range of the target performance indicator to be monitored, and there is no need to equally divide the value range to determine the depth of each data bucket.
- the first information of the depth of the data bucket of the measured value of the target performance index, and the second information used to indicate the number of packets in the received packets that match the value of the first information in each register as the two statistical parameters of the register flexibly update the values of these two statistical parameters in each register according to the measured value of the target performance indicator of the received message, and realize the statistics of the target performance indicator when it is determined that there is an empty register, which not only reduces the configuration of statistical target performance indicators
- the workload is no longer limited to the overall value range of statistics and the sub-range of values for each register statistics, making it possible to obtain more comprehensive and accurate statistical results, so that the real operating status of network devices can be more accurately known.
- another traffic monitoring method 200 may, for example, include the following S201 to S203:
- the traffic monitoring apparatus receives a second packet.
- the second packet may be a service packet or a control packet, which is not limited in this embodiment of the present application.
- the NP chip in the network device can extract the packet header (or, extract part of the data and packets in the payload) from the second packet head), and then the flow monitoring device in the NP chip performs flow monitoring according to the extracted part.
- the traffic monitoring device may acquire the measured value of the target performance index of the second packet, and update the first in the register for temporarily storing the measured value of the target performance index of the to-be-monitored packet based on the measured value
- the value of the information and the value of the second information, after the update, the value of the first information in the register is the measured value of the target performance index of the second packet, and the value of the second information in the register after the update is 1. In this way, a data basis is provided for the subsequent monitoring of the second packet.
- the traffic monitoring device determines whether the traffic monitoring device includes a second register, where the second register includes first information and second information, the value of the second information in the second register is zero, and the first register in the second register has a value of zero.
- the information is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information in the second register is used to indicate that the packets received by the traffic monitoring device match the first in the second register. The number of packets for the value of a message.
- the traffic monitoring device in response to the traffic monitoring device determining that the second register is not included in the traffic monitoring device, the traffic monitoring device performs the following S2031 and S2032:
- the flow monitoring apparatus updates the value of the first information in the fourth register and the fourth register included in the flow monitoring apparatus according to the value of the first information in the third register and the value of the second information in the third register included in the flow monitoring apparatus
- the value of the second information in the updated fourth register is equal to the sum of the value of the second information in the third register and the value of the second information in the fourth register.
- the flow monitoring apparatus clears the value of the second information in the third register to zero.
- the flow monitoring device can determine whether there are empty registers from all the registers used to save the statistical results of the target performance indicators, and if not, it can be determined that the judgment result in S202 is: it is determined that the flow monitoring device does not include the second register, thereby executing S203.
- the traffic monitoring device when it is determined based on the judgment of S202 that the traffic monitoring device does not include an empty second register, the traffic monitoring device also needs to determine the third register and the fourth register, so as to complete the target performance index of the second packet. monitor. For example, all the registers in the traffic monitoring device for storing the statistical results of the target performance indicators and one register for temporarily storing the measured values of the target performance indicators of the packets to be monitored are arranged in an increasing order of the value of the first information, thereby The third and fourth registers to be processed are determined.
- the determined third register and the fourth register are two adjacent registers after sorting, and the manner in which the embodiment of the present application determines the adjacent third register and the fourth register includes but is not limited to the following four possible implementations:
- the third register and the fourth register are determined as the registers to be processed in S203, for example, it can be based on: the sum of the value of the second information in the third register and the value of the second information in the fourth register is less than first threshold.
- the order of the registers after sorting is: R0, R1, R2, R3 and R4, assuming that the first threshold is 4, then only R2 and R3
- the sum of the counter values 3 is less than the first threshold value 4, and R0 is located to the left of R2 and R3, thereby determining that the third register is R2 and the fourth register is R3.
- the third register and the fourth register are determined as the registers to be processed in S203, for example, it can also be based on: the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than the flow monitoring device The sum of the values of the second information in any two adjacent registers included. Still taking the message 11' received after the fifth part in Figure 4b as an example, the order of the registers after sorting is: R0, R1, R2, R3 and R4, and the sum of the counter values of each two adjacent Rs is calculated.
- the sum of the obtained counter values are: 6, 6, 3, and 4, respectively, and the smallest sum of the counter values is 3, 3 is the sum of the counter values in R2 and R3, and R0 is located between R2 and R3 left, thus determining that the third register is R2 and the fourth register is R3.
- Implementation mode three, the third register and the fourth register are determined as the registers to be processed in S203, for example, it can also be based on: the weighting of the value of the second information in the third register and the value of the second information in the fourth register and is less than the first threshold.
- the order of the registers after sorting is: R0, R1, R2, R3 and R4, assuming that the first threshold is 0.5, R0, R1, R2, R3
- the weights of R4 and R4 are 0.2, 0.2, 0.2, 0.1, and 0.3, respectively. Calculate the weighted sum of the counter values of each two adjacent Rs.
- the sum of 0.4 is less than the first threshold of 0.5, and R0 is located to the left of R2 and R3, thereby determining that the third register is R2 and the fourth register is R3.
- the third register and the fourth register are determined as the registers to be processed in S203, for example, it can also be based on: the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than the flow monitoring A weighted sum of the values of the second information in any two adjacent registers included in the device.
- the traffic monitoring device pre-sets a corresponding weight for each register, determines the third register and the fourth register to be processed in S203 according to the weighted sum of the weight and the value of the second information of the corresponding register, and implements intervention with a preset weight
- the effect of the statistical results in the data buckets of each register makes the statistical results obtained by the traffic monitoring device closer to the distribution of the real target performance indicators, and further improves the accuracy of traffic monitoring.
- the weights corresponding to each register may be the same or different, which are not specifically limited in the embodiments of the present application.
- the traffic monitoring device uses the third register to update the fourth register.
- the value of the updated first information of the fourth register may be obtained by the weighted average of the values of the first information in the two registers, and the weights are respectively the first information in the two registers.
- the value of the second information for example, the value of the first information in the third register is a, the value of the second information in the third register is b, the value of the first information in the fourth register is c, and the value of the second information in the fourth register is d, then the value of the first information in the fourth register after updating may be equal to [(a*b+c*d)/(b+d)].
- the average value of the values of the first information in the two registers may be used as the value of the first information in the fourth register after updating.
- the value of the first information in the third register is a
- the value of the first information in the fourth register is a
- the value of the first information is c
- the value of the first information in the fourth register after the update may be equal to [(a+c)/2].
- the specific implementation manner of using the third register to update the fourth register is not limited, and the above is only an exemplary description.
- the fourth register is updated in a weighted average manner as an example for description.
- the third register may be a register used to temporarily store the measured value of the target performance index of the message to be monitored
- the fourth register is the target performance index used for temporarily storing the message to be monitored after sorting.
- the register of the measured value of the index is adjacent to the register used to save the statistical result of the target performance index.
- S203 may include: the flow monitoring device according to the value of the first information in the third register, the value of the second information in the third register (ie 1), the value of the first information in the fourth register and the second information in the fourth register , update the value of the first information in the fourth register, add 1 to the value of the second information in the fourth register; clear the value of the second information in the third register.
- the third register and the fourth register may both be registers used to save the statistical result of the target performance indicator.
- S203 may include: the flow monitoring device according to the value of the first information in the third register, the value of the second information in the third register (ie 1), the value of the first information in the fourth register and the second information in the fourth register , update the value of the first information in the fourth register, and add the value of the second information in the fourth register to the value of the second information in the third register; after that, add the value of the second information in the third register clear.
- the traffic monitoring device may The value of the first information is updated to the measured value of the target performance index of the second packet, and the value of the second information in the third register is increased by one.
- the traffic monitoring device may also determine whether there is a value of the first information of the fourth register that matches the measured value of the target performance index of the second packet. , if so, the fourth register can be updated based on the second message, and the value of the first information in the updated fourth register can remain unchanged, or the value of the first information in the updated fourth register can be updated
- the value of the second information is incremented by 1.
- the traffic monitoring apparatus determining that the measured value of the target performance index of the second packet matches the value of the first information of the fourth register may include: the traffic monitoring apparatus determining the measurement of the target performance index of the second packet The value belongs to the numerical range corresponding to the value of the first information in the fourth register. For example, the value of the first information in the fourth register is 5, and the corresponding value range is 1 to 10. Then, if the measured value of the target performance index of the second packet is 7, it can be determined that the value of the second packet is The measured value of the target performance index matches the value of the first information of the fourth register. For another example, the value of the first information in the fourth register is 5, and the corresponding value range is 5 ⁇ 3. Then, if the measured value of the target performance index of the second packet is 7, it can be determined that the second packet is The measured value of the target performance index matches the value of the first information of the fourth register.
- the traffic monitoring apparatus determines that the measured value of the target performance indicator of the second packet matches the value of the first information in the fourth register, and may also include: the traffic monitoring apparatus determines the target performance indicator of the second packet.
- the difference between the measured value and the value of the first information in the fourth register is smaller than the difference between the measured value of the target performance index of the second packet and the value of the first information in other registers.
- the traffic monitoring device includes a fourth register and a fifth register, the value of the first information in the fourth register is 5, and the value of the first information in the fifth register is 12, if the measured value of the target performance index of the second packet is is 7, then, since (7-5) ⁇ (12-7), it can be determined that the measured value of the target performance index of the second packet matches the value of the first information of the fourth register.
- the traffic monitoring device can also determine whether there is a value of the first information of the register that matches the measured value of the target performance index of the received message, and if so, Then, the matched register can be updated based on the second message. For example, the traffic monitoring device may receive the third packet, and the traffic monitoring device determines that the measured value of the target performance index of the third packet matches the value of the first information in the third register, then the traffic monitoring device will The value of the second information in the register is incremented by one.
- the value of the first information in the third register after the update may remain unchanged, or the value of the first information in the third register after the update may be the value of the first information in the third register before the update and the third message
- the traffic monitoring device may receive the fourth packet, and the traffic monitoring device determines that the measured value of the target performance index of the fourth packet matches the value of the first information in the fourth register, then the traffic monitoring device will The value of the second information in the four registers is incremented by one.
- the value of the first information in the fourth register after the update may remain unchanged, or the value of the first information in the fourth register after the update may be the value of the first information in the fourth register before the update and the fourth message
- a control device (such as a CPU) in a network device including the flow monitoring device, or a network device that communicates with the network device including the flow monitoring device, can obtain information from the flow monitoring device at any desired moment.
- the statistical result stored in the register determines the probability distribution of the target performance index based on the obtained statistical result.
- the probability distribution can reflect the situation of the network device where the traffic monitoring device is located until the target performance index is obtained, for example, the ratio of the packets whose target performance index is less than a certain value to all the received packets;
- the value of the target performance indicator corresponding to the qualified rate or defective rate specified by the target performance indicator of the network device is usually used to indicate the calibration value of the target performance indicator of the network device.
- the method 200 it is not necessary to configure the value range of the target performance indicator to be monitored, and it is also not necessary to divide the value range into equal parts to determine the depth of each data bucket, but will be used to indicate that the monitored packet is carried
- the first information of the depth of the data bucket of the measured value of the target performance index, and the second information used to indicate the number of packets in the received packets that match the value of the first information in each register as the two statistical parameters of the register flexibly update the values of these two statistical parameters in each register according to the measured value of the target performance indicator of the received message, and realize the statistics of the target performance indicator when it is determined that there is no empty register, which not only reduces the statistical target performance indicator.
- the configuration workload is no longer limited to the overall value range of statistics and the sub-range of values for each register statistics, making it possible to obtain more comprehensive and accurate statistical results, so that the real operating status of network devices can be more accurately known .
- the method 100 and the method 200 are more effective in monitoring performance indicators of network devices with rich hardware resources (ie, more register resources).
- the embodiments of the present application further provide a flow monitoring device, which will be described below with reference to the accompanying drawings.
- the device 700 may be, for example, the flow monitoring device 120 , and executes the method shown in FIG. 3 .
- the device 700 may include: a first A receiving unit 701 , a first determining unit 702 and a second determining unit 703 .
- the first receiving unit 701 is configured to receive the first packet.
- the specific implementation of the first receiving unit 701 may refer to the detailed description of S101 in the embodiment shown in FIG. 5 .
- the first determining unit 702 is configured to determine whether the flow monitoring device 700 includes a first register, the first register includes first information and second information, the value of the second information in the first register is zero, and the value of the second information in the first register is zero.
- the first information is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information in the first register is used to indicate that the packets received by the traffic monitoring apparatus 700 match the data in the first register. The number of packets of the value of the first information.
- the specific implementation of the first determining unit 702 may refer to the detailed description of S102 in the embodiment shown in FIG. 5 .
- the second determining unit 703 is configured to update the value of the first information in the first register to the measured value of the target performance index of the first packet in response to the traffic monitoring device 700 determining that the traffic monitoring device 700 includes the first register, and increment the value of the second information in the first register by one.
- the specific implementation of the second determining unit 703 may refer to the detailed description of S103 in the embodiment shown in FIG. 5 .
- the apparatus 700 further includes: a second receiving unit, a third determining unit and a first updating unit.
- the second receiving unit is configured to receive the second message.
- the specific implementation of the second receiving unit may refer to the detailed description of S201 in the embodiment shown in FIG. 6 .
- the third determining unit is configured to determine whether the traffic monitoring apparatus 700 includes a second register, the second register includes first information and second information, the value of the second information in the second register is zero, and the value of the second information in the second register is zero.
- One piece of information is used to indicate the depth of the data bucket that carries the measured value of the target performance index of the monitored packet, and the second information in the second register is used to indicate that the packet received by the traffic monitoring apparatus 700 matches the first value in the second register. The number of packets for the value of a message.
- the specific implementation of the third determining unit may refer to the detailed description of S202 in the embodiment shown in FIG. 6 .
- the first updating unit is configured to respond to the flow monitoring apparatus 700 determining that the second register is not included in the flow monitoring apparatus 700, according to the value of the first information in the third register included in the flow monitoring apparatus 700 and the second register in the third register.
- the value of the information updates the value of the first information in the fourth register and the value of the second information in the fourth register included in the traffic monitoring device 700, and the updated value of the second information in the fourth register is equal to the value of the second information in the third register
- the specific implementation of the first update unit may refer to the detailed description of S203 in the embodiment shown in FIG. 6 .
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the traffic monitoring device 700 The sum of the values of the second information in .
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent ones included in the traffic monitoring device 700. A weighted sum of the values of the second information in the register.
- the apparatus 700 further includes: a fourth determining unit and a second updating unit.
- the fourth determining unit is configured to determine that the measured value of the target performance index of the second message matches the value of the updated first information in the fourth register
- the second updating unit is configured to convert the second information in the fourth register The value is incremented by one.
- the fourth determining unit is specifically configured to: determine that the measured value of the target performance indicator of the second packet belongs to a numerical range corresponding to the value of the first information in the fourth register.
- the fourth determining unit is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the target performance of the second packet The difference between the measured value of the indicator and the value of the first information in the other registers.
- the apparatus 700 further includes: a fifth determining unit and a third updating unit.
- the fifth determining unit is configured to determine that the measured value of the target performance index of the second packet does not match the value of the first information in the updated fourth register;
- the third updating unit is configured to convert the value of the first information in the third register The value of the first information is updated to the measured value of the target performance index of the second message, and the value of the second information in the third register is incremented by one.
- the apparatus 700 further includes: a third receiving unit, a sixth determining unit, and a fourth updating unit.
- the third receiving unit is configured to receive the third message; the sixth determining unit is configured to determine that the measured value of the target performance index of the third message matches the value of the first information in the third register, and the fourth updating unit , which is used to add one to the value of the second information in the third register.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring apparatus 700 are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device 700 are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device 700 is included in a processing chip, for example, can be integrated in an NP chip.
- an embodiment of the present application further provides a flow monitoring device 800 , as shown in FIG. 8 .
- the apparatus 800 includes a processor 801 and a transceiver 802 .
- the transceiver 802 is configured to receive the first packet.
- the processor 801 is configured to determine whether the flow monitoring device includes a first register, the first register includes first information and second information, the value of the second information in the first register is zero, and the first information in the first register It is used to indicate the depth of the data bucket that carries the measurement value of the target performance index of the monitored packet, and the second information in the first register is used to indicate that the packets received by the traffic monitoring apparatus match the first information in the first register. The number of packets with the value.
- the processor 801 is further configured to, in response to determining that the flow monitoring device includes a first register, update the value of the first information in the first register to the measured value of the target performance index of the first packet, and update the value of the first information in the first register.
- the value of the second information is incremented by one.
- transceiver 802 may refer to the detailed description of S101 in the embodiment shown in FIG. 5 .
- processor 801 reference may be made to the detailed descriptions of S102 to S103 in the embodiment shown in FIG. 5 .
- the transceiver 802 is further configured to receive the second packet; the processor 801 is further configured to determine whether the traffic monitoring apparatus 800 includes a second register, where the second register includes the first information and the first message. Second information, the value of the second information in the second register is zero, the first information in the second register is used to indicate the depth of the data bucket that carries the measured value of the target performance indicator of the monitored packet, and the value of the second information in the second register The second information is used to indicate the number of packets in the packets received by the traffic monitoring apparatus 800 that match the value of the first information in the second register; the processor 801 is further configured to determine, in response to the traffic monitoring apparatus 800, that the The second register is not included, and the value of the first information in the fourth register included in the flow monitoring apparatus 800 is updated according to the value of the first information in the third register included in the flow monitoring apparatus 800 and the value of the second information in the third register.
- Second information the value of the second information in the second register is zero, the first information in the second register is used to indicate the
- the updated value of the second information in the fourth register is equal to the sum of the value of the second information in the third register and the value of the second information in the fourth register ; and clear the value of the second information in the third register.
- the specific implementation of the transceiver 802 may refer to the detailed description of S201 in the embodiment shown in FIG. 6 .
- the processor 801 reference may be made to the detailed descriptions of S202 to S203 in the embodiment shown in FIG. 6 .
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the traffic monitoring device 800 The sum of the values of the second information in .
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent ones included in the traffic monitoring device 800. A weighted sum of the values of the second information in the register.
- the processor 801 is further configured to determine that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, and the traffic monitoring device 800 will The value of the second information in the register is incremented by one.
- the processor 801 is specifically configured to: determine that the measured value of the target performance index of the second packet belongs to a numerical range corresponding to the value of the first information in the fourth register.
- the processor 801 is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the measured value of the target performance index of the first packet and other The difference in the value of the first information in the register.
- the processor 801 is further configured to determine that the measured value of the target performance index of the second packet does not match the value of the first information in the updated fourth register, and the traffic monitoring device 800 will The value of the first information in the three registers is updated to the measured value of the target performance index of the second message, and the value of the second information in the third register is incremented by one.
- the transceiver 802 is further configured to receive the third packet; the processor 801 is further configured to determine that the measured value of the target performance index of the third packet matches the first information in the third register , the flow monitoring device 800 adds one to the value of the second information in the third register.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring apparatus 800 are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device 800 are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device 800 is included in a processing chip, for example, can be integrated in an NP chip.
- an embodiment of the present application further provides an integrated circuit 900 , as shown in FIG. 9 .
- the integrated circuit 900 includes a control circuit 901 and an interface circuit 902 .
- the interface circuit 902 is used for receiving the first message.
- the control circuit 901 is configured to determine whether the integrated circuit 900 includes a first register, the first register includes first information and second information, the value of the second information in the first register is zero, and the first information in the first register It is used to indicate the depth of the data bucket that carries the measurement value of the target performance index of the monitored message, and the second information in the first register is used to indicate that the message received by the integrated circuit 900 matches the first information in the first register. The number of packets with the value.
- the control circuit 901 is further configured to, in response to determining that the integrated circuit 900 includes the first register, update the value of the first information in the first register to the measured value of the target performance index of the first message, and update the value of the first information in the first register.
- the value of the second information is incremented by one.
- the specific implementation of the interface circuit 902 may refer to the detailed description of S101 in the embodiment shown in FIG. 5 .
- the control circuit 901 reference may be made to the detailed descriptions of S102 to S103 in the embodiment shown in FIG. 5 .
- the second information is used to indicate the number of packets in the packets received by the integrated circuit 900 that match the value of the first information in the second register; the control circuit 901 is also used to respond to the integrated circuit 900 for determining that the integrated circuit 900 does not include the second information.
- the register updating the value of the first information in the fourth register included in the integrated circuit 900 and the value of the first information in the fourth register included in the integrated circuit 900 according to the value of the first information in the third register included in the integrated circuit 900 and the value of the second information in the third register
- the value of the second information in the updated fourth register is equal to the sum of the value of the second information in the third register and the value of the second information in the fourth register; and the third register The value of the second information in is cleared.
- the specific implementation of the interface circuit 902 may refer to the detailed description of S601 in the embodiment shown in FIG. 6 .
- the control circuit 901 reference may be made to the detailed descriptions of S202 to S203 in the embodiment shown in FIG. 6 .
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is smaller than the first threshold.
- the third register is adjacent to the fourth register, and the sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the integrated circuit 900 . The sum of the values of the second information.
- the third register is adjacent to the fourth register, and the weighted sum of the value of the second information in the third register and the value of the second information in the fourth register is not greater than any two adjacent registers included in the flow monitoring device.
- control circuit 901 is further configured to determine that the measured value of the target performance index of the second packet matches the updated value of the first information in the fourth register, and the integrated circuit 900 stores the fourth register The value of the second information in is incremented by one.
- the control circuit 901 is specifically configured to: determine that the measured value of the target performance index of the second packet belongs to the numerical range corresponding to the value of the first information in the fourth register.
- the control circuit 901 is specifically configured to: determine that the difference between the measured value of the target performance index of the second packet and the value of the first information in the fourth register is smaller than the measured value of the target performance index of the first packet and other The difference in the value of the first information in the register.
- control circuit 901 is further configured to determine that the measured value of the target performance index of the second packet does not match the updated value of the first information in the fourth register, and the integrated circuit 900 converts the third The value of the first information in the register is updated to the measured value of the target performance index of the second message, and the value of the second information in the third register is incremented by one.
- the transceiver is further configured to receive the third packet; the control circuit 901 is further configured to determine that the measured value of the target performance index of the third packet matches the first information in the third register value, the integrated circuit 900 increments the value of the second information in the third register by one.
- the third register is located between the first register and the fourth register, wherein the third register is adjacent to the first register, and the third register is adjacent to the fourth register, and the first information in the third register is The value is greater than the value of the first information in the first register, and the value of the first information in the third register is smaller than the value of the first information in the fourth register.
- the registers in the traffic monitoring device are arranged in an increasing order of the values of the first information in the registers.
- the registers in the flow monitoring device are arranged in descending order of the values of the first information in the registers.
- the target performance indicator includes any one of the following indicators: delay, packet length, time interval for receiving packets, or queue occupancy.
- the flow monitoring device is included in a processing chip, for example, can be integrated in an NP chip.
- FIG. 10 is a schematic structural diagram of a communication device 1000 according to an embodiment of the present application.
- the communication device 1000 may be, for example, the network device 10 in the embodiment shown in FIG. 2 , or may also be the traffic flow in the embodiment shown in FIG. 7 .
- the network device where the monitoring apparatus 700 is located may also be the network device where the traffic monitoring apparatus 800 in the embodiment shown in FIG. 8 is located, or may also be the network device where the integrated circuit 900 in the embodiment shown in FIG. 9 is located.
- the communication device 1000 includes: a processor 1010 , a communication interface 1020 and a memory 1030 .
- the number of processors 1010 in the communication device 1000 may be one or more, and one processor is taken as an example in FIG. 10 .
- the processor 1010 , the communication interface 1020 , and the memory 1030 may be connected through a bus system or other manners, wherein the connection through the bus system 1040 is taken as an example in FIG. 10 .
- Processor 1010 may be a CPU, NP, or a combination of CPU and NP.
- the processor 1010 may further include a hardware chip.
- the above-mentioned hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof.
- the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a general-purpose array logic (generic array logic, GAL) or any combination thereof.
- the communication interface 1020 is used for receiving and sending messages.
- the communication interface 1020 may include a receiving interface and a sending interface.
- the receiving interface may be used to receive packets, and the sending interface may be used to send packets.
- the number of communication interfaces 1020 may be one or more.
- the memory 1030 may include a volatile memory (English: volatile memory), such as random-access memory (RAM); the memory 1030 may also include a non-volatile memory (English: non-volatile memory), such as a fast memory A flash memory (English: flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); the memory 1030 may also include a combination of the above-mentioned types of memory.
- volatile memory such as random-access memory (RAM)
- non-volatile memory such as a fast memory
- a flash memory English: flash memory
- HDD hard disk drive
- SSD solid-state drive
- the memory 1030 may also include a combination of the above-mentioned types of memory.
- the memory 1030 stores an operating system and programs, executable modules or data structures, or their subsets, or their extended sets, wherein the programs may include various operation instructions for implementing various operations.
- the operating system may include various system programs for implementing various basic services and handling hardware-based tasks.
- the processor 1010 may read the program in the memory 1030 to implement the traffic monitoring method provided by the embodiment of the present application.
- the memory 1030 may be a storage device in the communication device 1000 , or may be a storage device independent of the communication device 1000 .
- the bus system 1040 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus or the like.
- PCI peripheral component interconnect
- EISA extended industry standard architecture
- the bus system 1040 can be divided into an address bus, a data bus, a control bus, and the like. For ease of presentation, only one thick line is used in FIG. 10, but it does not mean that there is only one bus or one type of bus.
- FIG. 11 is a schematic structural diagram of another communication device 1100 provided by an embodiment of the present application.
- the communication device 1100 may be configured as the network device 10 in the embodiment shown in FIG. 2 , or may also be the network device 10 in the embodiment shown in FIG. 7
- the communication device 1100 includes: a main control board 1110 and an interface board 1130 .
- the main control board 1110 is also called the main processing unit (main processing unit, MPU) or the route processing card (route processor card). Equipment maintenance, protocol processing functions.
- the main control board 1110 includes: a central processing unit 1111 and a memory 1112 .
- the interface board 1130 is also referred to as a line processing unit (LPU), a line card or a service board.
- the interface board 1130 is used to provide various service interfaces and implement data packet forwarding.
- the service interface includes, but is not limited to, an Ethernet interface, a POS (Packet over SONET/SDH) interface, etc.
- the Ethernet interface is, for example, a flexible Ethernet service interface (Flexible Ethernet Clients, FlexE Clients).
- the interface board 1130 includes: a central processing unit 1131 , a network processor 1132 , a forwarding table entry memory 1134 and a physical interface card (ph8sical interface card, PIC) 1133 .
- the central processing unit 1131 on the interface board 1130 is used to control and manage the interface board 1130 and communicate with the central processing unit 1111 on the main control board 1110 .
- the network processor 1132 is used to implement packet forwarding processing.
- the form of the network processor 1132 may be a forwarding chip.
- the processing of the uplink packet includes: processing of the incoming interface of the packet, and searching of the forwarding table; processing of the downlink packet: searching of the forwarding table, and so on.
- the physical interface card 1133 is used to realize the interconnection function of the physical layer, the original traffic enters the interface board 1130 through this, and the processed packets are sent from the physical interface card 1133 .
- the physical interface card 1133 includes at least one physical interface, and the physical interface is also called a physical port.
- the physical interface card 1133 corresponds to the FlexE physical interface in the system architecture.
- the physical interface card 1133 also called a daughter card, can be installed on the interface board 1130, and is responsible for converting the photoelectric signal into a message, and after checking the validity of the message, it is forwarded to the network processor 1132 for processing.
- the central processing unit 1131 of the interface board 1130 can also perform the functions of the network processor 1132 , such as implementing software forwarding based on a general-purpose CPU, so that the network processor 1132 is not required in the physical interface card 1133 .
- the communication device 1100 includes multiple interface boards, for example, the communication device 1100 further includes an interface board 1140 , and the interface board 1140 includes a central processing unit 1141 , a network processor 1142 , a forwarding table entry storage 1144 and a physical interface card 1143 .
- the communication device 1100 further includes a switch fabric board 1120 .
- the switch fabric unit 1120 may also be referred to as a switch fabric unit (switch fabric unit, SFU).
- SFU switch fabric unit
- the switch fabric board 1120 is used to complete data exchange between the interface boards.
- the interface board 1130 and the interface board 1140 can communicate through the switch fabric board 1120 .
- the main control board 1110 and the interface board 1130 are coupled.
- the main control board 1110 , the interface board 1130 , the interface board 1140 , and the switch fabric board 1120 are connected to the system backplane through a system bus to implement intercommunication.
- an inter-process communication (inter-process communication, IPC) channel is established between the main control board 1110 and the interface board 1130, and the main control board 1110 and the interface board 1130 communicate through the IPC channel.
- IPC inter-process communication
- the communication device 1100 includes a control plane and a forwarding plane
- the control plane includes a main control board 1110 and a central processing unit 1131
- the forwarding plane includes various components that perform forwarding, such as forwarding entry storage 1134, physical interface card 1133, and network processing device 1132.
- the control plane executes functions such as routers, generating forwarding tables, processing signaling and protocol packets, and configuring and maintaining device status.
- the control plane delivers the generated forwarding tables to the forwarding plane.
- the network processor 1132 based on the control plane
- the delivered forwarding table forwards the packets received by the physical interface card 1133 by looking up the table.
- the forwarding table issued by the control plane may be stored in the forwarding table entry storage 1134 .
- the control plane and forwarding plane may be completely separate and not on the same device.
- the central processing unit 1111 may obtain the measured value of the target performance index of the first packet, determine whether to include an empty first register, and in response to determining that the first register is included, convert the first register The value of the first information in the first message is updated to the measured value of the target performance index of the first packet, and the value of the second information in the first register is incremented by one.
- the network processor 1132 may trigger the physical interface card 1133 to receive the first packet.
- the transceiver 802 in the flow monitoring apparatus 800 may be equivalent to the physical interface card 1133 or the physical interface card 1143 in the communication device 1100 ; the processor 802 in the flow monitoring apparatus 800 may be equivalent to the central processing unit in the communication device 1100 1111 or central processing unit 1131.
- the first receiving unit 701 in the flow monitoring apparatus 700 may be equivalent to the physical interface card 1133 or the physical interface card 1143 in the communication device 1100; the first determining unit 702 and the second determining unit 703 in the flow monitoring apparatus 700 may be equivalent to The central processing unit 1111 or the central processing unit 1131 in the communication device 1100 .
- the operations on the interface board 1140 in the embodiment of the present application are the same as the operations on the interface board 1130 , and for the sake of brevity, details are not repeated here.
- the communication device 1100 in this embodiment may correspond to the flow monitoring device or integrated circuit in each of the foregoing method embodiments, and the main control board 1110 , the interface board 1130 and/or the interface board 1140 in the communication device 1100 may implement the foregoing
- the functions of the flow monitoring apparatus in each method embodiment and/or the various steps implemented are not repeated here.
- main control boards there may be one or more main control boards, and when there are more than one main control board, it may include an active main control board and a standby main control board.
- the communication device does not need to switch the network board, and the interface board is responsible for the processing function of the service data of the entire system.
- a communication device may have at least one switching network board, and the switching network board realizes data exchange between multiple interface boards, providing large-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of communication devices in a distributed architecture are greater than those in a centralized architecture.
- the form of the communication device can also be that there is only one board, that is, there is no switching network board, and the functions of the interface board and the main control board are integrated on this board.
- the central processing unit and the main control board on the interface board can be combined into a central processing unit on this board to perform the functions of the two superimposed, the data exchange and processing capacity of this form of equipment is low (for example, low-end switches or routers, etc. equipment).
- the specific architecture used depends on the specific networking deployment scenario.
- each of the foregoing network devices or communication devices may be implemented as virtualized devices.
- the virtualization device may be a virtual machine (English: Virtual Machine, VM) running a program for sending a message, and the virtual machine is deployed on a hardware device (for example, a physical server).
- a virtual machine refers to a complete computer system with complete hardware system functions simulated by software and running in a completely isolated environment.
- a virtual machine can be configured as each of the network devices in Figure 1.
- each network device or communication device may be implemented based on a general physical server combined with a Network Functions Virtualization (NFV) technology.
- NFV Network Functions Virtualization
- Each network device or communication device is a virtual host, a virtual router or a virtual switch.
- the embodiment of the present application also provides a chip, including a processor and an interface circuit, the interface circuit is used to receive instructions and transmit them to the processor; the processor, for example, may be a specific embodiment of the flow monitoring device 800 shown in FIG. 8 .
- the implementation form can be used to execute the above flow monitoring method.
- the processor is coupled to a memory, and the memory is used to store programs or instructions, and when the programs or instructions are executed by the processor, the chip system enables the method in any of the foregoing method embodiments.
- the number of processors in the chip system may be one or more.
- the processor can be implemented by hardware or by software.
- the processor may be a logic circuit, an integrated circuit, or the like.
- the processor may be a general-purpose processor implemented by reading software codes stored in memory.
- the memory may be integrated with the processor, or may be provided separately from the processor, which is not limited in this application.
- the memory can be a non-transitory processor, such as a read-only memory ROM, which can be integrated with the processor on the same chip, or can be provided on different chips.
- the setting method of the processor is not particularly limited.
- the system-on-chip may be a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), or a system on chip (SoC), It can also be a central processing unit (CPU), a network processor (NP), a digital signal processing circuit (DSP), or a microcontroller (microcontroller).
- controller unit, MCU it can also be a programmable logic device (PLD) or other integrated chips.
- Embodiments of the present application also provide a computer-readable storage medium, including instructions or computer programs, which, when run on a computer, cause the computer to execute the traffic monitoring method provided by the above embodiments.
- the embodiments of the present application also provide a computer program product including instructions or computer programs, which, when running on a computer, cause the computer to execute the traffic monitoring method provided by the above embodiments.
- the disclosed system, apparatus and method may be implemented in other manners.
- the apparatus embodiments described above are only illustrative.
- the division of units is only a logical business division. In actual implementation, there may be other division methods.
- multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented.
- the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
- Units described as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
- each service unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically alone, or two or more units may be integrated into one unit.
- the above-mentioned integrated unit may be implemented in the form of hardware, or may be implemented in the form of a software business unit.
- the integrated unit if implemented as a software business unit and sold or used as a stand-alone product, may be stored in a computer-readable storage medium.
- the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application.
- the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
- the services described in the present invention may be implemented by hardware, software, firmware or any combination thereof.
- the services may be stored on or transmitted over as one or more instructions or code on a computer-readable medium.
- Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another.
- a storage medium can be any available medium that can be accessed by a general purpose or special purpose computer.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Physics & Mathematics (AREA)
- Algebra (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Mathematical Physics (AREA)
- Probability & Statistics with Applications (AREA)
- Pure & Applied Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请实施例公开了一种流量监控方法、装置、集成电路和网络设备,当流量监控装置接收报文时,确定该流量监控装置中包括空的第一寄存器后,将第一寄存器中的第一信息的值更新为该报文的目标性能指标的测量值并将第一寄存器中的第二信息的值加一。该第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示接收的报文中匹配第一寄存器中的第一信息的值的报文数量。这样,将第一信息和第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,实现对目标性能指标的全面、准确的统计。
Description
本申请要求于2020年8月26日提交的申请号为202010873634.3、发明名称为“一种数据统计方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中;并且,本申请还要求于2020年11月06提交中国国家知识产权局、申请号为202011235536.3、申请名称为“流量监控方法、装置、集成电路及网络设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及通信技术领域,特别是涉及一种流量监控方法、装置、集成电路及网络设备。
在网络运行的过程中,能够通过报文时延、芯片端口队列长度等性能指标取值的分布反映网络的运行状况。通过存储该性能指标的所有取值能够准确计算它的分布,但该方式需要占用大量的存储资源。为了减少存储需求,当前通过直方图统计的方式来粗略的统计各种性能指标取值的分布情况。
直方图统计算法中,需要预先设置各性能指标对应的取值范围并将取值范围等分到对应的数据桶,配置较为繁琐。而且,对于不同的数据流或相同数据流的不同阶段,无法确保配置的取值范围以及各个数据桶的深度划分是否合理,统计精度较差。
发明内容
基于此,本申请实施例提供了一种流量监控方法、装置、集成电路及网络设备,能够对接收到的报文的各种性能指标进行简单、准确的统计。通过少量的存储资源,就能准确的体现网络设备的真实状况。
第一方面,本申请实施例提供了一种流量监控方法,该方法例如可以包括:当流量监控装置接收第一报文时,确定该流量监控装置中是否包括第一寄存器,该第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的所述第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的所述第二信息用于指示流量监控装置接收的报文中匹配第一寄存器中的所述第一信息的值的报文数量;响应于该流量监控装置确定流量监控装置中包括第一寄存器,流量监控装置将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。这样,无需配置目标性能指标的取值范围,也不需要对取值范围进行等分来确定每个数据桶的深度,而是将用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度的第一信息,以及用于指示接收的报文中匹配各寄存器中第一信息的值的报文数量的第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,实现对目标性能指标的统计,不仅减少了统计目标性能指标的配置工作量,还由于不再局限统计的整体取值范围以及各个寄存器 统计的取值子范围,使得获得更加全面、准确的统计结果成为可能,从而,能够更加准确的知悉网络设备的真实运行状况。
需要说明的是,本申请实施例提供的方法中,流量监控装置中的用于统计的寄存器数量越多,统计结果越精确。
其中,每个寄存器对应一个数据桶,该数据桶统计目标性能指标的测量值在一定范围内的报文,该数据桶中记录第一信息的值和第二信息的值,其中,第一信息的值是指该数据桶中所统计的报文的测量值或测量值的范围,第二信息的值是指该数据桶所统计的报文的数量。数据桶中记录的统计结果存储在对应的寄存器中。寄存器对应的数据桶的深度可以作为该寄存器中第一信息的值,落入对应数据桶的深度的报文数量可以作为该数据桶对应寄存器中第二信息的值。
在一种可能的实现方式中,该方法还可以包括:当流量监控装置接收第二报文时,确定该流量监控装置中是否包括第二寄存器,该第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第二寄存器中的第一信息的值的报文数量;此时,响应于流量监控装置确定该流量监控装置中不包括第二寄存器,该流量监控装置执行下述操作:根据流量监控装置包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新流量监控装置包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。可见,该方法将用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度的第一信息,以及用于指示接收的报文中匹配各寄存器中第一信息的值的报文数量的第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,在确定不存在空寄存器时实现对目标性能指标的统计,不仅减少了统计目标性能指标的配置工作量,还由于不再局限统计的整体取值范围以及各个寄存器统计的取值子范围,使得获得更加全面、准确的统计结果成为可能,从而,能够更加准确的知悉网络设备的真实运行状况。
该实现方式中,确定的第三寄存器和第四寄存器是排序后相邻的两个寄存器,确定相邻的寄存器中的第三寄存器和第四寄存器的方式包括但不限于下述四种可能的实现方式:
作为一个示例,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。
作为另一个示例,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。
作为再一个示例,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值的和。
作为又一个示例,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的 第二信息的值加权和。可见,通过上述示例提供的方法,可以准确的确定流量监控装置中的第三寄存器和第四寄存器,为确保流量监控装置实现流量监控的精度提供了数据基础。
在一种可能的实现方式中,该方法还可以包括:流量监控装置确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,流量监控装置将第四寄存器中的第二信息的值加一。作为一个示例,该流量监控装置确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,例如可以包括:流量监控装置确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。作为另一个示例,流量监控装置确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,例如也可以包括:流量监控装置确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第二报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。如此,实现了在第三寄存器和第四寄存器更新后,通过第四寄存器对第二报文的目标性能指标的快速统计。
在一种可能的实现方式中,该方法还可以包括:流量监控装置确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值,流量监控装置将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。如此,实现了在第三寄存器和第四寄存器更新后,通过第三寄存器对第二报文的目标性能指标的快速统计。
在一种可能的实现方式中,该方法还可以包括:当流量监控装置接收第三报文时,流量监控装置确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,那么,该流量监控装置将第三寄存器中的第二信息的值加一。这样,实现了更加快速有效的对目标性能指标的测量值与寄存器的第一信息的值匹配的报文的统计。
其中,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置被包括在处理芯片中,例如,可以集成在网络处理器(英文:network processor,简称:NP)芯片中。
第二方面,本申请实施例提供了一种流量监控装置,该流量监控装置例如可以包括:第一接收单元、第一确定单元和第二确定单元。其中,第一接收单元,用于接收第一报文;第一确定单元,用于确定流量监控装置中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第一寄存器中的第一信息的值的报文数量;第二确定单元,用于响应于流量监控装置确定流量监控装置中包括第一寄存器,将第一寄存器中的第一信 息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
在一种可能的实现方式中,该装置还包括:第二接收单元、第三确定单元和第一更新单元。其中,第二接收单元,用于接收第二报文;第三确定单元,用于确定流量监控装置中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第二寄存器中的第一信息的值的报文数量;第一更新单元,用于响应于流量监控装置确定流量监控装置中不包括第二寄存器,根据流量监控装置包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新流量监控装置包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,该装置还包括:第四确定单元和第二更新单元。第四确定单元,用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,第二更新单元,用于将第四寄存器中的第二信息的值加一。
作为一个示例,所述第四确定单元,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。
作为另一个示例,所述第四确定单元,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第二报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,该装置还包括:第五确定单元和第三更新单元。其中,第五确定单元,用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值;第三更新单元,用于将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。
在一种可能的实现方式中,该装置还包括:第三接收单元、第六确定单元和第四更新单元。其中,第三接收单元,用于接收第三报文;第六确定单元,用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,第四更新单元,用于将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信 息的值。
本申请实施例中,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置被包括在处理芯片中,例如,可以集成在NP芯片中。
需要说明的是,第二方面提供的流量监控装置与第一方面提供的方法对应,具体实现方式以及达到的效果,参见第一方面所示的方法的相关描述。
第三方面,本申请实施例还提供了一种流量监控装置,该装置包括处理器和收发器。其中,收发器,用于接收第一报文;处理器,用于确定流量监控装置中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第一寄存器中的第一信息的值的报文数量;处理器,还用于响应于确定流量监控装置中包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
在一种可能的实现方式中,收发器,还用于接收第二报文;处理器,还用于确定流量监控装置中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第二寄存器中的第一信息的值的报文数量;处理器,还用于响应于流量监控装置确定流量监控装置中不包括第二寄存器,根据流量监控装置包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新流量监控装置包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,处理器,还用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,流量监控装置将第四寄存器中的第二信息的值加一。其中,处理器,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器 中第一信息的值对应的数值范围。或者,处理器,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第一报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,处理器,还用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值,流量监控装置将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。
在一种可能的实现方式中,收发器,还用于接收第三报文;处理器,还用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,流量监控装置将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置被包括在处理芯片中,例如,可以集成在NP芯片中。
需要说明的是,第三方面提供的流量监控装置与第一方面提供的方法对应,具体实现方式以及达到的效果,参见第一方面所示的方法的相关描述。
第四方面,本申请实施例还提供了一种集成电路,该集成电路包括控制电路和接口电路。其中,接口电路,用于接收第一报文;控制电路,用于确定集成电路中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示集成电路接收的报文中匹配第一寄存器中的第一信息的值的报文数量;控制电路,还用于响应于确定集成电路中包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
在一种可能的实现方式中,接口电路,还用于接收第二报文;控制电路,还用于确定集成电路中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示集成电路接收的报文中匹配第二寄存器中的第一信息的值的报文数量;控制电路,还用于响应于集成电路确定集成电路中不包括第二寄存器,根据集成电路包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新集成电路包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第 四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于集成电路包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,控制电路,还用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,集成电路将第四寄存器中的第二信息的值加一。其中,控制电路,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。或者,控制电路,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第一报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,控制电路,还用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值,集成电路将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。
在一种可能的实现方式中,收发器,还用于接收第三报文;控制电路,还用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,集成电路将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置被包括在处理芯片中,例如,可以集成在NP芯片中。
需要说明的是,第四方面提供的集成电路与第一方面提供的方法对应,具体实现方式以及达到的效果,参见第一方面所示的方法的相关描述。
第五方面,本申请实施例还提供了一种网络设备,该网络设备可以包括上述第二方面或第三方面提供的流量监控装置,或者,该网络设备可以包括上述第四方面提供的集成电路。
第六方面,本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行以上第一方面提供的所述方法。
第七方面,本申请还提供了计算机程序产品,包括计算机程序或计算机可读指令,当所述计算机程序或所述计算机可读指令在计算机上运行时,使得计算机执行前述第一方面所提供的方法。
图1为本申请实施例中一种直方图统计算法的时延的直方图示意图;
图2为本申请实施例中一种网络设备10的结构示意图;
图3为本申请实施例中一种流量监控方法的一示例性流程示意图;
图4a为本申请实施例中图3所示的流量监控方法下各寄存器保存内容的一示意图;
图4b为本申请实施例中图3所示的流量监控方法下各寄存器保存内容的另一示意图;
图5为本申请实施例中一种流量监控方法100的流程示意图;
图6为本申请实施例中一种流量监控方法200的流程示意图;
图7为本申请实施例中一种流量监控装置700的结构示意图;
图8为本申请实施例中一种流量监控装置800的结构示意图;
图9为本申请实施例中一种集成电路900的结构示意图;
图10为本申请实施例中一种通信设备1000的结构示意图;
图11为本申请实施例中一种通信设备1100的结构示意图。
为了减少获取存储时延、报文长度、接收报文的时间间隔或队列占用率等各种性能指标分布信息所需要的存储资源,通常通过直方图统计的方式记录性能指标的情况,从而体现网络的运行状况。
目前统计网络设备性能指标的方式,作为一个示例,可以通过网络设备上的四个寄存器R1~R4实现,以统计的性能指标为时延为例,假设预设的目标分位值(即调整时延阈值的参考比例)为95%,R1用于保存当前周期采集到的报文的总个数n,网络设备每接收到一个报文,该R1中的取值加一;R2用于保存该周期中的时延阈值t1;R3用于保存该周期内所接收的报文中时延超过时延阈值t1的报文的个数m;R4用于保存该周期内当前所接收的报文中时延的最大值(英文:max latency,简称ML)。具体实现时,网络设备会周期性的计算(m/n)(即时延大于t1的报文占所有报文的比例),并根据(m/n)和目标分位值更新R2中的取值,当(1-m/n)<95%,则,根据下述公式(1)计算新的时延阈值t2,当(1-m/n)≥95%,则,根据下述公式(2)计算新的时延阈值t3:
t2=t1-ML*[95%-(1-m/n)]/G ……公式(1)
t3=t1+ML*[(1-m/n)-95%)]/G ……公式(2)
其中,G为步长,是常数。需要说明的是,每次更新R2的取值时,其他寄存器的取值均需要清零。该统计方案,实现比较简单,但是存在很多问题:问题一,由于不考虑数据分布,只能采用线性的梯度下降来收敛阈值t1,容易引起收敛问题,影响统计精度;问题二,该方案只能获取事先设定的目标分位数,无法获取其他分位数信息;问题三,统计 结果体现一个实时的取值,与该性能指标在网络设备整个运行过程中的情况可能有较大差距。
作为另一个示例,目前还可以采用直方图统计算法来统计性能指标。以通过R1~R4统计的性能指标,例如,R1~R4中每个R中包括的一个用于统计时延的数据桶(英文:data bucket)。以直方图统计方法中的直方条(英文:bin)这一数据桶的具体实现为例对该示例进行说明,例如,R1中包括用于统计时延的bin 1,R2中包括用于统计时延的bin 2,R3中包括用于统计时延的bin 3,R4中包括用于统计时延的bin 4,那么,bin 1~bin 4为一组统计时延的bin。网络设备预先配置时延统计范围:[t1,t2],bin 1~bin 4中分别包括一个计数器(英文:counter),每个counter用于统计接收到的报文中落入所属bin对应时延子范围的报文个数。例如,将[t1,t2]等分为4个子区间:[t1,t3]、(t3,t4]、(t4,t5]、(t5,t2],其中,t3=t1+(t2-t1)/4,t4=t3+(t2-t1)/4,t5=t4+(t2-t1)/4。bin 1中的counter1用于统计接收到的报文中时延在[t1,t3]内的报文个数,bin 2中的counter2用于统计接收到的报文中时延在(t3,t4]内的报文个数,bin 3中的counter3用于统计接收到的报文中时延在(t4,t5]内的报文个数,bin 4中的counter4用于统计接收到的报文中时延在(t5,t2]内的报文个数。其中,任意一个时延子范围均可以记作该bin的深度,例如,时延子范围(t3,t4]可以称为bin 2的深度。任意时刻,可以基于该bin 1~bin 4中counter的取值,得到该网络设备的时延的概率分布曲线,过程例如可以是:将各counter中的取值进行归一化处理,得到counter1~counter4的归一化处理结果依次为:a、b、c和d,那么,可以得到如图1所示的直方图,其中,bin 1~bin 4对应的直方图高度分别为a、b、c和d。此外,可以根据此直方图得到该时延的累积分布函数(英文:cumulative distribution function,简称:CDF)的曲线,进一步可以按照需求的出现概率(例如95%)确定对应的横坐标的值,作为网络设备设置的时延标定值。虽然目前的直方图统计算法相比上述介绍的统计方法,能够较准确的统计网络设备的性能指标,但是,该直方图统计方案中需要预先配置性能指标对应的取值范围并将取值范围等分到对应的bin中,配置过程较为繁琐,由于报文的多样性和复杂性可能导致配置的取值范围不合理,还可能导致bin的深度分配不合理,部分bin中的counter值很大,而部分bin中的counter值很小,统计结果不够精确。
基于此,本申请实施例提供了一种流量监控方法,该流量监控方法应用于本申请实施例提供的流量监控装置中,流量监控装置中包括多个寄存器,每个寄存器中包括第一信息和第二信息,其中,第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二信息用于指示所述流量监控装置接收的报文中匹配该寄存器中的第一信息的值的报文数量。每个寄存器对应一个数据桶,该数据桶统计目标性能指标的测量值在一定范围内的报文,该数据桶中记录第一信息的值和第二信息的值,其中,第一信息的值是指该数据桶中所统计的报文的测量值或测量值的范围,第二信息的值是指该数据桶所统计的报文的数量。数据桶中记录的统计结果存储在对应的寄存器中。寄存器对应的数据桶的深度可以作为该寄存器中第一信息的值,落入对应数据桶的深度的报文数量可以作为该数据桶对应寄存器中第二信息的值。例如,对于寄存器Rx,对应于数据桶x,该数据桶x的深度为0-50,那么,当流量监控装置未接收到目标性能指标的测量值落入0-50的报文时,寄 存器Rx中第一信息的值和第二信息的值为0;当流量监控装置接收到目标性能指标的测量值为10的报文1时,寄存器Rx中第一信息的值可以为10,第二信息的值可以为1;当流量监控装置接收到目标性能指标的测量值为16的报文2时,寄存器Rx中第一信息的值可以为[(10*1+16*1)/(1+1)]=13,第二信息的值可以为2;当流量监控装置接收到目标性能指标的测量值为7的报文3时,寄存器Rx中第一信息的值可以为[(13*2+7*1)/(2+1)]=11,第二信息的值可以为3。
本申请实施例提供的流量监控方法,例如可以包括:当流量监控装置接收第一报文时,且确定该流量监控装置中还包括空的第一寄存器(即,第一寄存器中第二信息的值为零),则,利用第一寄存器统计该第一报文的目标性能指标,即,将第一寄存器中第一信息的值更新为该第一报文的目标性能指标的测量值,将第一寄存器中第二信息的值加一。这样,无需配置待监测的性能指标(即目标性能指标)的取值范围,也不需要对取值范围进行等分来确定每个数据桶的深度,而是将用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度的第一信息,以及用于指示接收的报文中匹配各寄存器中第一信息的值的报文数量的第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,实现对目标性能指标的统计,不仅减少了统计目标性能指标的配置工作量,还由于不再局限统计的整体取值范围以及各个寄存器统计的取值子范围,使得获得更加全面、准确的统计结果成为可能,从而,能够更加准确的知悉网络设备的真实运行状况。需要说明的是,该实现方式中,流量监控装置中的用于统计的寄存器数量越多,统计结果越精确。
其中,数据桶用于表征统计目标性能指标的测量值的对象,数据桶的深度是指该数据桶能够统计的目标性能指标的测量值或测量值的范围,不同深度的数据桶用于实现对目标性能指标的测量值不同或测量值范围不同的报文的统计。例如,流量监控装置中包括:数据桶1和数据桶2,其中,数据桶1用于统计目标性能指标的测量值在0-50之间的报文,数据桶2用于统计目标性能指标的测量值在51-101之间的报文,那么,数据桶1的深度可以表示为0-50,数据桶2的深度可以表示为51-100;或者,如果数据桶的深度是该数据桶用于承载的目标性能指标的测量值的最小值,数据桶用于承载该数据桶的深度到该数据桶的深度加50的报文,那么,数据桶1的深度也可以表示为0,数据桶2的深度可以表示为51;又或者,数据桶的深度也可以表示为落入该数据桶统计范围的报文的测量值的平均值。
寄存器是数据桶在该流量监控装置中的一种硬件实现方式。例如,上述数据桶1中统计的数据可以存储在该流量监控装置的寄存器1中,数据桶2中统计的数据可以存储在该流量监控装置的寄存器2中。假设流量监控装置接收到报文1~报文5,报文1~报文5的目标性能指标的测量值分别为10、20、60、30、90,那么,报文1、报文2和报文4对应数据桶1的深度(即,落入数据桶1的统计范围),寄存器1中保存报文1、报文2和报文4对应的统计结果,报文3和报文5对应数据桶2的深度,寄存器2保存报文3和报文5对应的统计结果,如,数据桶1对应的寄存器1中保存的第一信息的值可以为[(10*1+20*1+30*1)/(1+1+1)]=20,寄存器1中保存的第二信息的值为3;数据桶2对应的寄 存器2中保存的第一信息的值可以为[(60*1+90*1)/(1+1)]=75,寄存器2中保存的第二信息的值为2。
作为一个示例,在直方图统计方法中,数据桶例如可以通过直方条bin实现,每个寄存器保存一个bin对应的统计结果,bin采集的统计结果存储在对应的寄存器中。下文中,数据桶、bin和寄存器可以替换使用。
其中,寄存器中的第一信息可以表示为value,寄存器中第二信息可以表示为counter。下文中,第一信息和value可以替换使用,第二信息和counter可以替换使用。
举例来说,本申请实施例应用的网络设备10具体可以参见图2,如图2所示,该网络设备10至少可以包括流量监控装置120。其中,流量监控装置120中可以包括多个寄存器R,以流量监控装置120中包括R1~R4为例,该流量监控装置120能够按照本申请实施例提供的流量监控方法,对R1~R4中保存的内容进行管控和处理。该流量监控装置120可以被集成在处理芯片中,例如,可以集成在网络处理器(英文:network processor,简称:NP)芯片110中,流量监控装置120可以是NP芯片110中的具有本申请实施例所提供的流量监控能力的功能模块。如,流量监控装置120是NP芯片110中的一个具有流量监控能力的协处理器。
需要说明的是,本示例中用于存储统计结果的寄存器为R1~R4,该流量监控装置120还可以包括寄存器R0,该R0用于存储待统计的报文的第一信息的值和第二信息的值,R0中第二信息的值为1。如果完成一个报文的统计,则,可以将R0中该报文的第一信息的值和第二信息的值清零,为统计下一个报文做好准备;或者,也可以在接收到下一个待统计的报文时,直接用下一个报文的第一信息的值更新该R0中前一个报文的第一信息的值。
以图2所示的网络设备10为例,示例性的说明本申请实施例提供的流量监控方法的流程,参见图3所示,该流量监控过程可以包括:S11,流量监控装置120接收报文1,获取报文1的目标性能指标的测量值x,并在R0中保存:value=x、counter=1;S12,判断是否有空闲的用于保存统计结果的R,如果有,则执行下述S13,否则执行S14;S13,将R0中的内容写入相应的用于保存统计结果的R中,并执行S16,需要说明的是,各个R保存的对应关系中的value的值可以按从大到小或从小到大排序;S14,将R0按照value的值加入各R的排序,将排序后相邻R的counter的值之和最小的两个R进行合并;S15,判断R0是否参与合并,如果是,则,执行S16,否则,执行S13;S16,判断是否有新接收的报文,如果有,则返回执行S11,否则结束。
其中,S11中流量监控装置120接收报文1并获取报文1的目标性能指标的测量值x,具体可以是:网络设备10接收到报文1,并由NP芯片110从报文1中提取报文头(或者,提取有效载荷(英文:payload)中的部分数据和报文头),由NP芯片110中的流量监控装置120依据所提取的部分进行流量监控,获取报文1的目标性能指标的测量值x。
作为一个示例,基于上述图3所示的方法,说明接收到12个报文时,流量监控装置120进行逐包时延统计的过程,下述描述中时延的单位例如可以为毫秒。以各用于保存统计结果的R中的value值从小到大排序为例进行说明。
一种情况下,当网络设备10接收到报文1时,流量监控模块120获取该报文1的时延 的测量值为7,在R0中存入:value=7、counter=1,并将该R0中的value=7、counter=1存入R1中,如图4a中的第一个部分;当网络设备10接收到报文2时,流量监控模块120获取该报文2的时延的测量值为12,在R0中存入:value=12、counter=1,由于12大于7,所以,将该R0中的value=12、counter=1存入R2中,如图4a中的第二个部分;当网络设备10接收到报文3时,流量监控模块120获取该报文3的时延的测量值为8,在R0中存入:value=8、counter=1,由于8大于7且8小于12,所以,将R2中的value=12、counter=1搬移到R3中,将该R0中的value=8、counter=1存入R2中,如图4a中的第三个部分;当网络设备10接收到报文4时,流量监控模块120获取该报文4的时延的测量值为7,在R0中存入:value=7、counter=1,由于7小于8且7不小于7,所以,将R3中value=12、counter=1搬移到R4,将R2中的value=8、counter=1搬移到R3,将R0中的value=7、counter=1存入R2中,如图4a中的第四个部分;以此类推,接收到10个报文后,R1~R4中保存的内容参见图4a的第五个部分;当网络设备10接收到报文11时,流量监控模块120获取该报文11的时延的测量值为7,在R0中存入:value=7、counter=1,此时,由于不存在空闲的R,则,将R0与R1~R4按照value的值从小到大排序,分别为:R0(value=7,counter=1)、R1(value=7,counter=5)、R2(value=8,counter=1)、R3(value=11,counter=2)和R4(value=12,counter=2),从而确定相邻的两个R中counter的值之和最小的是R2和R3,合并R2(value=8,counter=1)和R3(value=11,counter=2)中的内容,得到[value=(8*1+11*2)/(1+2)=10,counter=(1+2)=3],将该合并后的value=8、counter=1存入R3,将R1中的value=7、counter=5搬移到R2,将R0中的value=7、counter=1存入R1,R1~R4中保存的内容如图4a的第六个部分;当网络设备10接收到报文12时,流量监控模块120获取该报文12的时延的测量值为4,在R0中存入:value=4、counter=1,此时,由于不存在空闲的R,则,将R0与R1~R4按照value的值从小到大排序,分别为:R0(value=4,counter=1)、R1(value=7,counter=1)、R2(value=7,counter=5)、R3(value=10,counter=3)和R4(value=12,counter=2),从而确定相邻的两个R中counter的值之和最小的是R0和R1,合并R0(value=4,counter=1)和R1(value=7,counter=1)中的内容,得到[value=(4*1+7*1)/(1+1)=5.5,counter=(1+1)=2],将该合并后的value=5.5、counter=2存入R1,R1~R4中保存的内容如图4a的第七个部分。
另一种情况下,当网络设备10接收到报文1~报文3时,流量监控模块120的R1~R4的情况可以分别参见图4b的第一个部分~第三个部分所示,其中,图4b的第一个部分~第三个部分分别与图4a中的第一个部分~第三个部分对应相同;当网络设备10接收到报文4’时,流量监控模块120获取该报文4’的时延的测量值为7,在R0中存入:value=7、counter=1,确定R0中的value的值和R1中的value的值均为7,所以,并将R0和R1的内容合并,即,将R1中counter的值加一,R1中保存:value=7、counter=2,如图4b中的第四个部分;以此类推,接收到10个报文后,R1~R4中保存的内容参见图4b的第五个部分;当网络设备10接收到报文11’时,流量监控模块120获取该报文11’的时延的测量值为6,在R0中存入:value=6、counter=1,此时,由于不存在空闲的R,则,将R0与R1~R4按照value的值从小到大排序,分别为:R0(value=6,counter=1)、R1 (value=7,counter=5)、R2(value=8,counter=1)、R3(value=11,counter=2)和R4(value=12,counter=2),从而确定相邻的两个R中counter的值之和最小的是R2和R3,合并R2(value=8,counter=1)和R3(value=11,counter=2)中的内容,得到[value=(8*1+11*2)/(1+2)=10,counter=(1+2)=3],将该合并后的value=10、counter=3存入R3,将R1的内容搬移到R2,将R0中的内容存入R1,R1~R4中保存的内容如图4b的第六个部分;当网络设备10接收到报文12’时,流量监控模块120获取该报文12’的时延的测量值为4,在R0中保存:value=4、counter=1,此时,由于不存在空闲的R,则,将R0与R1~R4按照value值从小到大排序,分别为:R0(value=4,counter=1)、R1(value=6,counter=1)、R2(value=7,counter=5)、R3(value=10,counter=3)和R4(value=12,counter=2),从而确定相邻的两个R中counter的值之和最小的是R0和R1,合并R0(value=4,counter=1)和R1(value=6,counter=1)中的内容,得到[value=(4*1+6*1)/(1+1)=5,counter=(1+1)=2],将该合并后的value=5、counter=2)存入R1,R1~R4中保存的内容如图4b的第七个部分。
需要说明的是,该网络设备10中或其他能够与该网络设备10通信的网络设备中还可以包括控制装置,该控制装置例如可以是中央处理单元(英文:central process unit,简称:CPU)。该控制装置能够读取R1~R4中保存的统计结果,并对所读取的统计结果进行处理,如,对各R中的counter的值进行归一化处理,以各R中的value值为横坐标,counter的值的归一化处理结果为纵坐标,得到该网络设备10截止读取统计结果时刻的时延的概率分布函数(英文:probability distribution function,简称:PDF)曲线。之后,以各R中的value值为横坐标,每个横坐标对应的纵坐标为:小于横坐标对应value值的所有R的counter的值归一化处理结果的累加和,得到该网络设备10截止读取统计结果时刻的时延的CDF曲线。
可见,本申请实施例提供的流量监控方法,无需存储所有报文的性能指标的具体数值,节约了网络设备的存储资源,也无需进行复杂的配置,能够简单、准确的对网络设备的性能指标进行逐报文的统计,从而,基于统计结果能够准确分析出网络设备的真实运行状况。
本申请实施例中,网络设备是指集成有本申请实施例提供的流量监控模块,能够对所接收的报文进行逐包性能指标统计的设备,具体可以包括但不限于交换机、路由器或防火墙等。
本申请实施例中,网络设备统计的性能指标包括但不限于:时延、报文大小(也可以称为报文长度)、接收报文的时间间隔或队列占用率。
下面结合附图,通过实施例来详细说明本申请实施例中一种流量监控方法的具体实现方式。
本申请实施例中一种流量监控方法,该方法可以应用于流量监控装置,例如应用于上述图2所示的网络设备10中的流量监控装置120中。流量监控装置统计不同的性能指标所 执行的操作均相同,本申请实施例中以流量监控装置统计目标性能指标为例进行说明,该目标性能指标为流量监控装置能够监控和统计的所有性能指标中的任意一种。
流量监控装置中包括:一个用于临时存储待监控报文的目标性能指标的测量值的寄存器,以及若干个用于保存目标性能指标的统计结果的寄存器。其中,用于保存目标性能指标的统计结果的寄存器的数量是固定不变的;用于临时存储待监控报文的目标性能指标的测量值的寄存器,在接收到该待监控报文之后到对该待监控报文的目标性能指标完成监控之前,存储该待监控报文的目标性能指标的第一信息的值和第二信息的值,第二信息的值为1。
下述实施例中,用于保存目标性能指标的统计结果的寄存器中包括第一信息和第二信息,每个寄存器中第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,例如,上述图4b中,各寄存器中第一信息表示为value,以图4b第七个部分中的R1为例,R1中包括数据桶,该数据桶的深度与5对应,即,R1中第一信息用于指示承载被监控报文的时延的测量值的数据桶的深度为5,也就是说,R1中监控时延测量值与5对应的报文。每个寄存器中第二信息用于指示该流量监控装置接收的报文中匹配该寄存器中第一信息的值的报文数量,例如,上述图4b中,各寄存器中第二信息表示为counter,以图4b第七个部分中的R1为例,R1中第二信息的值为2,用于指示所接收的报文中时延测量值与5匹配的报文为2个,也就是说,R1中监控到了时延测量值与5对应的2个报文。当寄存器中第二信息的值为零,则,说明该寄存器还未对任何报文的目标性能指标的测量值进行监控,表征该寄存器为空。
当流量监控装置接收到某个待监控报文时,需要先检查该流量监控装置是否还有空的用于保存目标性能指标的统计结果的寄存器,如果有,则,可以按照下述图5所示的方法100完成对该待监控报文的监控;如果没有空的用于保存目标性能指标的统计结果的寄存器,则,可以按照下述图6所示的方法200完成对该待监控报文的监控。
作为一个示例,参见图5,本申请实施例提供的一种流量监控方法100例如可以包括下述S101~S103:
S101,流量监控装置接收第一报文。
其中,该第一报文可以是业务报文,也可以是控制报文,在本申请实施例不作限定。
具体实现时,该流量监控装置所在的网络设备接收到第一报文后,可以由网络设备中的NP芯片从第一报文中提取报文头(或者,提取payload中的部分数据和报文头),再由该NP芯片中的流量监控装置依据所提取的部分进行流量监控。
在S101和S102之间,流量监控装置可以获取第一报文的目标性能指标的测量值,并基于该测量值更新用于临时存储待监控报文的目标性能指标的测量值的寄存器中第一信息的值和第二信息的值,更新后该寄存器中的第一信息的值为该第一报文的目标性能指标的测量值,更新后该寄存器中的第二信息的值为1。这样,为后续完成对第一报文的监控提供了数据基础。
S102,流量监控装置确定该流量监控装置中是否包括第一寄存器,该第一寄存器包括第一信息和第二信息,该第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用 于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第一寄存器中的第一信息的值的报文数量。
S103,响应于流量监控装置确定流量监控装置中包括第一寄存器,流量监控装置将第一寄存器中的第一信息的值更新为第一报文的所述目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
在S101之后,流量监控装置可以从所有用于保存目标性能指标的统计结果的寄存器中确定是否有空的寄存器,如果存在,则将该空的寄存器中的任意一个寄存器记作第一寄存器,执行S103。例如,假设确定流量监控装置中存在多个空寄存器时,可以选择与非空寄存器相邻的空寄存器作为第一寄存器。
以图4a为例,假设流量监控装置包括的R1~R4均为空,当流量监控装置接收到报文1时,可以将R1~R4任意一个寄存器确定为第一寄存器,例如,将R1作为第一寄存器,并将该R1中第一信息的值更新为报文1的目标性能指标(如时延)的测量值7,将该R1中第二信息的值更新为1(即将R1中更新前第二信息的值0加1)。
假设在图4a中第一个部分之后,流量监控装置接收到报文2,可以将空的R2~R4中任意一个寄存器确定为第一寄存器,例如,将与非空寄存器R1相邻的R2作为第一寄存器,将该R2中第一信息的值更新为报文2的目标性能指标的测量值12,将该R2中第二信息的值更新为1。
在一些可能的实现方式中,流量监控装置中的寄存器可以被按照寄存器中的第一信息的值的递增顺序排列,即,以图2所示的流量监控装置120为例,如果R1中第一信息的值为a,R2中第一信息的值为b,R3中第一信息的值为c,R4中第一信息的值为d,且a≤b≤c≤d,那么,4个寄存器的排序依次可以是:R1、R2、R3和R4。
作为一个示例,S102中,还可以将用于临时存储待监控报文的目标性能指标的测量值的寄存器和非空的用于保存目标性能指标的统计结果的寄存器按照第一信息的值进行排序,第一寄存器可以是该用于临时存储待监控报文的目标性能指标的测量值的寄存器所在排序位置对应的用于保存目标性能指标的统计结果的寄存器,该情况下,可以先将该排序位置的寄存器中的统计结果向后迁移,然后再执行S103。例如,在图4a中第二个部分之后,流量监控装置接收到报文3,可以将寄存器R0和R1、R2按照value值的大小排序,得到的顺序为:R1、R0和R2,那么,可以将R2中的value=12、counter=1迁移到R3中,将R2确定为第一寄存器,将该R2中第一信息的值更新为报文3的目标性能指标的测量值8,将该R2中第二信息的值更新为1。这样,可以确保每次更新后,流量监控装置中各个寄存器仍然按照寄存器中的第一信息的值的递增顺序排列。
需要说明的是,流量监控装置中各个寄存器也可以按照寄存器中的第一信息的值的递减顺序排列,具体实现方式可以参见上述递增顺序的相关描述。
如果流量监控装置确定不存在空寄存器(即不包括第一寄存器),则,流量监控装置对所接收报文的监控方法可以参见下述方法200中的相关描述,这里不再赘述。
这样,通过该方法100,无需配置待监测的目标性能指标的取值范围,也不需要对取值范围进行等分来确定每个数据桶的深度,而是将用于指示承载被监控报文的目标性能指 标的测量值的数据桶的深度的第一信息,以及用于指示接收的报文中匹配各寄存器中第一信息的值的报文数量的第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,在确定存在空寄存器时实现对目标性能指标的统计,不仅减少了统计目标性能指标的配置工作量,还由于不再局限统计的整体取值范围以及各个寄存器统计的取值子范围,使得获得更加全面、准确的统计结果成为可能,从而,能够更加准确的知悉网络设备的真实运行状况。
作为一个示例,参见图6,本申请实施例提供的另一种流量监控方法200例如可以包括下述S201~S203:
S201,流量监控装置接收第二报文。
其中,该第二报文可以是业务报文,也可以是控制报文,在本申请实施例不作限定。
具体实现时,该流量监控装置所在的网络设备接收到第二报文后,可以由网络设备中的NP芯片从第二报文中提取报文头(或者,提取payload中的部分数据和报文头),再由该NP芯片中的流量监控装置依据所提取的部分进行流量监控。
在S201和S202之间,流量监控装置可以获取第二报文的目标性能指标的测量值,并基于该测量值更新用于临时存储待监控报文的目标性能指标的测量值的寄存器中第一信息的值和第二信息的值,更新后该寄存器中的第一信息的值为该第二报文的目标性能指标的测量值,更新后该寄存器中的第二信息的值为1。这样,为后续完成对第二报文的监控提供了数据基础。
S202,流量监控装置确定流量监控装置中是否包括第二寄存器,该第二寄存器包括第一信息和第二信息,该第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的所述目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第二寄存器中的第一信息的值的报文数量。
S203,响应于流量监控装置确定流量监控装置中不包括第二寄存器,流量监控装置执行下述S2031和S2032:
S2031,流量监控装置根据流量监控装置包括的第三寄存器中第一信息的值和第三寄存器中的第二信息的值更新流量监控装置包括的第四寄存器中第一信息的值和第四寄存器中第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和。
S2032,流量监控装置将第三寄存器中的第二信息的值清零。
在S201之后,流量监控装置可以从所有用于保存目标性能指标的统计结果的寄存器中确定是否有空的寄存器,如果不存在,则可以确定S202中的判断结果是:确定流量监控装置中不包括第二寄存器,从而执行S203。
具体实现时,当基于S202的判断确定流量监控装置中不包括空的第二寄存器时,流量监控装置还需要确定第三寄存器和第四寄存器,才可以完成对第二报文的目标性能指标的监控。例如,将流量监控装置中的所有用于保存目标性能指标的统计结果的寄存器以及一个用于临时存储待监控报文的目标性能指标的测量值的寄存器按照第一信息的值递增顺 序排列,从而确定待处理的第三寄存器和第四寄存器。
所确定的第三寄存器和第四寄存器是排序后相邻的两个寄存器,本申请实施例确定相邻的第三寄存器和第四寄存器的方式包括但不限于下述四种可能的实现方式:
实现方式一,第三寄存器和第四寄存器确定为S203中待处理的寄存器,例如可以依据:第三寄存器中的第二信息的值与第四寄存器中的所述第二信息的值的和小于第一阈值。以图4b中第五个部分之后接收到报文11’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,假设第一阈值为4,则,只有R2和R3中counter的值之和3小于第一阈值4,而且,R0位于R2和R3的左侧,从而确定第三寄存器是R2,第四寄存器是R3。
实现方式二,第三寄存器和第四寄存器确定为S203中待处理的寄存器,例如还可以依据:第三寄存器中第二信息的值与第四寄存器第二信息的值的和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值的和。仍然以图4b中第五个部分之后接收到报文11’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,计算每两个相邻R的counter的值之和,得到的counter的值之和分别为:6、6、3和4,确定counter的值之和最小的是3,3是R2和R3中counter的值之和,而且,R0位于R2和R3的左侧,从而确定第三寄存器是R2,第四寄存器是R3。
实现方式三,第三寄存器和第四寄存器确定为S203中待处理的寄存器,例如还可以依据:第三寄存器中的第二信息的值与第四寄存器中的所述第二信息的值的加权和小于第一阈值。以图4b中第五个部分之后接收到报文11’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,假设第一阈值为0.5,R0、R1、R2、R3和R4的权重分别为0.2、0.2、0.2、0.1和0.3,计算每两个相邻R的counter的值的加权和,得到的counter的值加权和分别为:(1*0.2+5*0.2)=1.2、(5*0.2+1*0.2)=1.2、(1*0.2+2*0.1)=0.4以及(2*0.1+2*0.3)=0.8则,只有R2和R3中counter的值的加权和为0.4小于第一阈值0.5,而且,R0位于R2和R3的左侧,从而确定第三寄存器是R2,第四寄存器是R3。
实现方式四,第三寄存器和第四寄存器确定为S203中待处理的寄存器,例如还可以依据:第三寄存器中第二信息的值与第四寄存器第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值的加权和。仍然以图4b中第五个部分之后接收到报文11’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,假设R0、R1、R2、R3和R4的权重分别为0.2、0.2、0.2、0.1和0.3,计算每两个相邻R的counter的值的加权和,得到的counter的值加权和分别为:(1*0.2+5*0.2)=1.2、(5*0.2+1*0.2)=1.2、(1*0.2+2*0.1)=0.4以及(2*0.1+2*0.3)=0.8,确定counter的值的加权和最小的是0.4,0.4是R2和R3中counter的值的加权和,而且,R0位于R2和R3的左侧,从而确定第三寄存器是R2,第四寄存器是R3。
可见,流量监控装置预先为每个寄存器设置对应的权重,根据权重与对应寄存器的第二信息的值的加权和确定S203中待处理的第三寄存器和第四寄存器,实现以预设的权重干预各个寄存器的数据桶中统计结果的效果,使得流量监控装置获得的统计结果更接近真实的目标性能指标的分布情况,进一步提高流量监控的精度。需要说明的是,各个寄存器 对应的权重可以相同也可以不同,本申请实施例不做具体限定。
流量监控装置采用第三寄存器更新第四寄存器,作为一个示例,可以以两个寄存器中第一信息的值加权平均获得更新后第四寄存器的第一信息的值,权重分别为两个寄存器中第二信息的值,例如,第三寄存器中第一信息的值为a,第三寄存器中第二信息的值为b,第四寄存器中第一信息的值为c,第四寄存器中第二信息的值为d,则,更新后第四寄存器中第一信息的值可以等于[(a*b+c*d)/(b+d)]。作为另一个示例,可以以两个寄存器中第一信息的值的平均值作为更新后第四寄存器的第一信息的值,例如,第三寄存器中第一信息的值为a,第四寄存器中第一信息的值为c,则,更新后第四寄存器中第一信息的值可以等于[(a+c)/2]。本申请实施例中对于采用第三寄存器更新第四寄存器的具体实现方式不作限定,上述仅为示例性的说明。下文中以加权平均的方式更新第四寄存器为例进行说明。
在一些可能的实现方式中,第三寄存器可以是用于临时存储待监控报文的目标性能指标的测量值的寄存器,第四寄存器为排序后与该用于临时存储待监控报文的目标性能指标的测量值的寄存器相邻的用于保存目标性能指标的统计结果的寄存器。S203例如可以包括:流量监控装置根据第三寄存器中第一信息的值、第三寄存器中第二信息的值(即1)、第四寄存器中第一信息的值和第四寄存器中第二信息的值,更新第四寄存器中第一信息的值,并将第四寄存器中的第二信息的值的加1;将第三寄存器中第二信息的值清零。例如,以图4b中第六个部分之后接收到报文12’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,确定第三寄存器是R0,第四寄存器是R1,那么,更新后的R1中的value的值可以为[(4*1+6*1)/(1+1)]=5,更新后R1中counter的值可以为(1+1)=2;同时,将R0中的counter的值清零,以便对下一个待监控报文的目标性能指标的测量值进行临时保存,此外,流量监控装置还可以将R0中的value值也清零。
在另一些可能的实现方式中,第三寄存器和第四寄存器可以均为用于保存目标性能指标的统计结果的寄存器。S203例如可以包括:流量监控装置根据第三寄存器中第一信息的值、第三寄存器中第二信息的值(即1)、第四寄存器中第一信息的值和第四寄存器中第二信息的值,更新第四寄存器中第一信息的值,并将第四寄存器中的第二信息的值的加第三寄存器中第二信息的值;之后,将第三寄存器中第二信息的值清零。例如,以图4b中第五个部分之后接收到报文11’为例,排序后各寄存器的顺序为:R0、R1、R2、R3和R4,确定第三寄存器是R2,第四寄存器是R3,那么,更新后的R3中的value的值可以为[(8*1+11*2)/(1+2)]=10,更新后R3中counter的值可以为(1+2)=3;同时,将R2中的counter的值清零。如果排序后用于临时存储待监控报文的目标性能指标的测量值的寄存器与第三寄存器不相邻,则,流量监控装置可以通过数据迁移的方式实现对第二报文的监控,例如,上述举例中,将R2中的counter的值清零后,流量监控装置还可以将R1中的value=7、counter=5迁移到R2中,将R0中的value=6、counter=1迁移到R1中,并将R0中的counter的值清零。如此,确保完成对第二报文的监控之后,各寄存器还按照第一信息的值的递增顺序排序。
该实现方式中,如果排序后用于临时存储待监控报文的目标性能指标的测量值的寄存器与第三寄存器相邻且位于第三寄存器之前,则,流量监控装置可以将第三寄存器中的第 一信息的值更新为第二报文的目标性能指标的测量值,而且,将第三寄存器中的第二信息的值加一。
需要说明的是,在确定流量监控装置中不包括空寄存器时,该流量监控装置还可以确定是否存在与该第二报文的目标性能指标的测量值匹配的第四寄存器的第一信息的值,如果有,则,可以基于第二报文更新第四寄存器,更新后的第四寄存器中第一信息的值可以保持不变,或者,更新后第四寄存器中第一信息的值可以为更新前第四寄存器中第一信息的值和第二报文的目标性能指标的测量值的平均值(或加权平均值);更新后第四寄存器中第二信息的值为更新前第四寄存器中第二信息的值加1。
作为一个示例,流量监控装置确定该第二报文的目标性能指标的测量值与第四寄存器的第一信息的值匹配,可以包括:该流量监控装置确定第二报文的目标性能指标的测量值属于第四寄存器中所述第一信息的值对应的数值范围。例如,第四寄存器中第一信息的值为5,对应的数值范围为1~10,那么,如果第二报文的目标性能指标的测量值为7,则,可以确定该第二报文的目标性能指标的测量值与第四寄存器的第一信息的值匹配。又例如,第四寄存器中第一信息的值为5,对应的数值范围为5±3,那么,如果第二报文的目标性能指标的测量值为7,则,可以确定该第二报文的目标性能指标的测量值与第四寄存器的第一信息的值匹配。
作为另一个示例,流量监控装置确定该第二报文的目标性能指标的测量值与第四寄存器的第一信息的值匹配,也可以包括:流量监控装置确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第二报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。例如,流量监控装置包括第四寄存器和第五寄存器,第四寄存器中第一信息的值为5,第五寄存器中第一信息的值为12,如果第二报文的目标性能指标的测量值为7,那么,由于(7-5)<(12-7),则,可以确定该第二报文的目标性能指标的测量值与第四寄存器的第一信息的值匹配。
具体实现时,在确定流量监控装置中不包括空寄存器时,该流量监控装置还可以确定是否存在与所接收报文的目标性能指标的测量值匹配的寄存器的第一信息的值,如果有,则,可以基于第二报文更新该所匹配的寄存器。例如,流量监控装置可以接收第三报文,该流量监控装置确定该第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,则,该流量监控装置将第三寄存器中的第二信息的值加一。其中,更新后的第三寄存器中第一信息的值可以保持不变,或者,更新后第三寄存器中第一信息的值可以为更新前第三寄存器中第一信息的值和第三报文的目标性能指标的测量值的平均值(或加权平均值)。又例如,流量监控装置可以接收第四报文,该流量监控装置确定该第四报文的目标性能指标的测量值匹配第四寄存器中的第一信息的值,则,该流量监控装置将第四寄存器中的第二信息的值加一。其中,更新后的第四寄存器中第一信息的值可以保持不变,或者,更新后第四寄存器中第一信息的值可以为更新前第四寄存器中第一信息的值和第四报文的目标性能指标的测量值的平均值(或加权平均值)。
具体实现时,包括该流量监控装置的网络设备中的控制装置(如CPU),或者,与包括该流量监控装置的网络设备通信的网络设备,可以在任何需要的时刻从流量监控装置中 获取各个寄存器中保存的统计结果,基于所获取的统计结果确定该目标性能指标的概率分布。该概率分布能够体现流量监控装置所在的网络设备到获取时刻目标性能指标的情况,例如,该网络设备目标性能指标小于某个数值的报文占所接收的所有报文的比例;又例如,该网络设备的目标性能指标规定的合格率或次品率对应的目标性能指标的取值为多少,通常用于表示网络设备的目标性能指标的标定值。
可见,通过该方法200,无需配置待监测的目标性能指标的取值范围,也不需要对取值范围进行等分来确定每个数据桶的深度,而是将用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度的第一信息,以及用于指示接收的报文中匹配各寄存器中第一信息的值的报文数量的第二信息作为寄存器的两个统计参数,根据接收的报文的目标性能指标的测量值灵活的更新各寄存器中这两个统计参数的值,在确定不存在空寄存器时实现对目标性能指标的统计,不仅减少了统计目标性能指标的配置工作量,还由于不再局限统计的整体取值范围以及各个寄存器统计的取值子范围,使得获得更加全面、准确的统计结果成为可能,从而,能够更加准确的知悉网络设备的真实运行状况。
上述方法100和方法200中,流量监控装置中参与统计的寄存器越多,根据统计结果生成的CDF就会越接近基于所有目标性能指标的真实值获得的CDF,即,统计结果会越准确,所以,方法100和方法200对于硬件资源丰富(即寄存器资源较多)的网络设备的性能指标的监控效果更加突出。
基于上述方法实施例,本申请实施例还提供了一种流量监控装置,下面将结合附图对该装置进行说明。
参见图7,该图为本申请实施例提供的一种流量监控装置700的结构示意图,该装置700例如可以是流量监控装置120,执行图3所示的方法,该装置700可以包括:第一接收单元701、第一确定单元702和第二确定单元703。
第一接收单元701,用于接收第一报文。
其中,第一接收单元701的具体实现可以参见图5所述实施例中S101的详细描述。
第一确定单元702,用于确定流量监控装置700中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示流量监控装置700接收的报文中匹配第一寄存器中的第一信息的值的报文数量。
其中,第一确定单元702的具体实现可以参见图5所述实施例中S102的详细描述。
第二确定单元703,用于响应于流量监控装置700确定流量监控装置700中包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
其中,第二确定单元703的具体实现可以参见图5所述实施例中S103的详细描述。
在一种可能的实现方式中,该装置700还包括:第二接收单元、第三确定单元和第一更新单元。
第二接收单元,用于接收第二报文。
其中,第二接收单元的具体实现可以参见图6所述实施例中S201的详细描述。
第三确定单元,用于确定流量监控装置700中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置700接收的报文中匹配第二寄存器中的第一信息的值的报文数量。
其中,第三确定单元的具体实现可以参见图6所述实施例中S202的详细描述。
第一更新单元,用于响应于流量监控装置700确定流量监控装置700中不包括第二寄存器,根据流量监控装置700包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新流量监控装置700包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。
其中,第一更新单元的具体实现可以参见图6所述实施例中S203的详细描述。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于流量监控装置700包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置700包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,该装置700还包括:第四确定单元和第二更新单元。第四确定单元,用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,第二更新单元,用于将第四寄存器中的第二信息的值加一。
作为一个示例,所述第四确定单元,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。
作为另一个示例,所述第四确定单元,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第二报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,该装置700还包括:第五确定单元和第三更新单元。其中,第五确定单元,用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值;第三更新单元,用于将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。
在一种可能的实现方式中,该装置700还包括:第三接收单元、第六确定单元和第四更新单元。其中,第三接收单元,用于接收第三报文;第六确定单元,用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,第四更新单元,用于将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置700中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置700中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置700被包括在处理芯片中,例如,可以集成在NP芯片中。
关于流量监控装置700具体可执行的功能和实现,可以参见图3所示的方法、图5所示的方法100以及图6所示的方法200中的相应描述,此处不再赘述。
相应的,本申请实施例还提供了一种流量监控装置800,如图8所示。该装置800包括处理器801和收发器802。
收发器802,用于接收第一报文。
处理器801,用于确定流量监控装置中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示流量监控装置接收的报文中匹配第一寄存器中的第一信息的值的报文数量。
处理器801,还用于响应于确定流量监控装置中包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
其中,收发器802的具体实现可以参见图5所述实施例中S101的详细描述。处理器801的具体实现可以参见图5所述实施例中S102~S103的详细描述。
在一种可能的实现方式中,收发器802,还用于接收第二报文;处理器801,还用于确定流量监控装置800中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示流量监控装置800接收的报文中匹配第二寄存器中的第一信息的值的报文数量;处理器801,还用于响应于流量监控装置800确定流量监控装置800中不包括第二寄存器,根据流量监控装置800包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新流量监控装置800包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。其中,收发器802的具体实现可以参见图6所述实施例中S201的详细描述。处理器801的具体实现可以参见图6所述实施例中S202~S203的详细描述。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于流量监控装置800包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置800包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,处理器801,还用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,流量监控装置800将第四寄存器中的第二信息的值加一。其中,处理器801,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。或者,处理器801,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第一报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,处理器801,还用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值,流量监控装置800将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加一。
在一种可能的实现方式中,收发器802,还用于接收第三报文;处理器801,还用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,流量监控装置800将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置800中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置800中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置800被包括在处理芯片中,例如,可以集成在NP芯片中。
关于流量监控装置800具体可执行的功能和实现,可以参见图3所示的方法、图5所示的方法100以及图6所示的方法200中的相应描述,此处不再赘述。
相应的,本申请实施例还提供了一种集成电路900,如图9所示。该集成电路900包括控制电路901和接口电路902。
接口电路902,用于接收第一报文。
控制电路901,用于确定集成电路900中是否包括第一寄存器,第一寄存器包括第一信息和第二信息,第一寄存器中的第二信息的值为零,第一寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第一寄存器中的第二信息用于指示集成电路900接收的报文中匹配第一寄存器中的第一信息的值的报文数量。
控制电路901,还用于响应于确定集成电路900中包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。
其中,接口电路902的具体实现可以参见图5所述实施例中S101的详细描述。控制电路901的具体实现可以参见图5所述实施例中S102~S103的详细描述。
在一种可能的实现方式中,接口电路902,还用于接收第二报文;控制电路901,还用于确定集成电路900中是否包括第二寄存器,第二寄存器包括第一信息和第二信息,第二寄存器中的第二信息的值为零,第二寄存器中的第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,第二寄存器中的第二信息用于指示集成电路900接收的报文中匹配第二寄存器中的第一信息的值的报文数量;控制电路901,还用于响应于集成电路900确定集成电路900中不包括第二寄存器,根据集成电路900包括的第三寄存器中的第一信息的值和第三寄存器中的第二信息的值更新集成电路900包括的第四寄存器中的第一信息的值和第四寄存器中的第二信息的值,更新后的第四寄存器中的第二信息的值等于第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和;和将第三寄存器中的第二信息的值清零。
其中,接口电路902的具体实现可以参见图6所述实施例中S601的详细描述。控制电路901的具体实现可以参见图6所述实施例中S202~S203的详细描述。
其中,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和小于第一阈值。或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和小于第一阈值。又或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的和不大于集成电路900包括的任意两个相邻寄存器中的第二信息的值的和。再或者,第三寄存器与第四寄存器相邻,第三寄存器中的第二信息的值与第四寄存器中的第二信息的值的加权和不大于流量监控装置包括的任意两个相邻寄存器中的第二信息的值加权和。
在一种可能的实现方式中,控制电路901,还用于确定第二报文的目标性能指标的测量值匹配更新后的第四寄存器中的第一信息的值,集成电路900将第四寄存器中的第二信息的值加一。其中,控制电路901,具体用于:确定第二报文的目标性能指标的测量值属于第四寄存器中第一信息的值对应的数值范围。或者,控制电路901,具体用于:确定第二报文的目标性能指标的测量值与第四寄存器中的第一信息的值的差,小于第一报文的目标性能指标的测量值与其他寄存器中的第一信息的值的差。
在一种可能的实现方式中,控制电路901,还用于确定第二报文的目标性能指标的测量值不匹配更新后的第四寄存器中的第一信息的值,集成电路900将第三寄存器中的第一信息的值更新为第二报文的目标性能指标的测量值,和将第三寄存器中的第二信息的值加 一。
在一种可能的实现方式中,收发器,还用于接收第三报文;控制电路901,还用于确定第三报文的目标性能指标的测量值匹配第三寄存器中的第一信息的值,集成电路900将第三寄存器中的第二信息的值加一。
作为一个示例,第三寄存器位于第一寄存器和第四寄存器之间,其中,第三寄存器与第一寄存器相邻,且第三寄存器与第四寄存器相邻,第三寄存器中的第一信息的值大于第一寄存器中的第一信息的值,且第三寄存器中的第一信息的值小于第四寄存器中的第一信息的值。
本申请实施例中,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。或者,流量监控装置中的寄存器被按照寄存器中的第一信息的值的递减顺序排列。
本申请实施例中,目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
本申请实施例中,该流量监控装置被包括在处理芯片中,例如,可以集成在NP芯片中。
关于集成电路900具体可执行的功能和实现,可以参见图3所示的方法、图5所示的方法100以及图6所示的方法200中的相应描述,此处不再赘述。
图10为本申请实施例提供的一种通信设备1000的结构示意图,该通信设备1000例如可以是图2所示实施例中的网络设备10,或者也可以是图7所示实施例中的流量监控装置700所在的网络设备,或者也可以是图8所示实施例中的流量监控装置800所在的网络设备,又或者也可以是图9所示实施例中的集成电路900所在的网络设备。
请参阅图10所示,通信设备1000包括:处理器1010、通信接口1020和存储器1030。其中通信设备1000中的处理器1010的数量可以一个或多个,图10中以一个处理器为例。本申请实施例中,处理器1010、通信接口1020和存储器1030可通过总线系统或其它方式连接,其中,图10中以通过总线系统1040连接为例。
处理器1010可以是CPU、NP、或者CPU和NP的组合。处理器1010还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。
通信接口1020用于接收和发送报文,具体地,通信接口1020可以包括接收接口和发送接口。其中,接收接口可以用于接收报文,发送接口可以用于发送报文。通信接口1020的个数可以为一个或多个。
存储器1030可以包括易失性存储器(英文:volatile memory),例如随机存取存储器(random-access memory,RAM);存储器1030也可以包括非易失性存储器(英文: non-volatile memory),例如快闪存储器(英文:flash memory),硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD);存储器1030还可以包括上述种类的存储器的组合。
可选地,存储器1030存储有操作系统和程序、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,程序可包括各种操作指令,用于实现各种操作。操作系统可包括各种系统程序,用于实现各种基础业务以及处理基于硬件的任务。处理器1010可以读取存储器1030中的程序,实现本申请实施例提供的流量监控方法。
其中,存储器1030可以为通信设备1000中的存储器件,也可以为独立于通信设备1000的存储装置。
总线系统1040可以是外设部件互连标准(peripheral component interconnect,PCI)总线或扩展工业标准结构(extended industry standard architecture,EISA)总线等。总线系统1040可以分为地址总线、数据总线、控制总线等。为便于表示,图10中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
图11是本申请实施例提供的另一种通信设备1100的结构示意图,通信设备1100可以配置为前述图2所示实施例中的网络设备10,或者也可以是图7所示实施例中的流量监控装置700所在的网络设备,或者也可以是图8所示实施例中的流量监控装置800所在的网络设备,又或者也可以是图9所示实施例中的集成电路900所在的网络设备,再或者也可以是图10所示的通信设备1000。
通信设备1100包括:主控板1110和接口板1130。
主控板1110也称为主处理单元(main processing unit,MPU)或路由处理卡(route processor card),主控板1110对通信设备1100中各个组件的控制和管理,包括路由计算、设备管理、设备维护、协议处理功能。主控板1110包括:中央处理器1111和存储器1112。
接口板1130也称为线路接口单元卡(line processing unit,LPU)、线卡(line card)或业务板。接口板1130用于提供各种业务接口并实现数据包的转发。业务接口包括而不限于以太网接口、POS(Packet over SONET/SDH)接口等,以太网接口例如是灵活以太网业务接口(Flexible Ethernet Clients,FlexE Clients)。接口板1130包括:中央处理器1131、网络处理器1132、转发表项存储器1134和物理接口卡(ph8sical interface card,PIC)1133。
接口板1130上的中央处理器1131用于对接口板1130进行控制管理并与主控板1110上的中央处理器1111进行通信。
网络处理器1132用于实现报文的转发处理。网络处理器1132的形态可以是转发芯片。具体而言,上行报文的处理包括:报文入接口的处理,转发表查找;下行报文的处理:转发表查找等等。
物理接口卡1133用于实现物理层的对接功能,原始的流量由此进入接口板1130,以及处理后的报文从该物理接口卡1133发出。物理接口卡1133包括至少一个物理接口,物理接口也称物理口,物理接口卡1133对应于系统架构中的FlexE物理接口。物理接口卡1133也称为子卡,可安装在接口板1130上,负责将光电信号转换为报文并对报文进行合 法性检查后转发给网络处理器1132处理。在一些实施例中,接口板1130的中央处理器1131也可执行网络处理器1132的功能,比如基于通用CPU实现软件转发,从而物理接口卡1133中不需要网络处理器1132。
可选地,通信设备1100包括多个接口板,例如通信设备1100还包括接口板1140,接口板1140包括:中央处理器1141、网络处理器1142、转发表项存储器1144和物理接口卡1143。
可选地,通信设备1100还包括交换网板1120。交换网板1120也可以称为交换网板单元(switch fabric unit,SFU)。在通信设备有多个接口板1130的情况下,交换网板1120用于完成各接口板之间的数据交换。例如,接口板1130和接口板1140之间可以通过交换网板1120通信。
主控板1110和接口板1130耦合。例如。主控板1110、接口板1130和接口板1140,以及交换网板1120之间通过系统总线与系统背板相连实现互通。在一种可能的实现方式中,主控板1110和接口板1130之间建立进程间通信协议(inter-process communication,IPC)通道,主控板1110和接口板1130之间通过IPC通道进行通信。
在逻辑上,通信设备1100包括控制面和转发面,控制面包括主控板1110和中央处理器1131,转发面包括执行转发的各个组件,比如转发表项存储器1134、物理接口卡1133和网络处理器1132。控制面执行路由器、生成转发表、处理信令和协议报文、配置与维护设备的状态等功能,控制面将生成的转发表下发给转发面,在转发面,网络处理器1132基于控制面下发的转发表对物理接口卡1133收到的报文查表转发。控制面下发的转发表可以保存在转发表项存储器1134中。在一些实施例中,控制面和转发面可以完全分离,不在同一设备上。
如果通信设备1100被配置为网络设备10,中央处理器1111可以获取第一报文的目标性能指标的测量值,确定是否包括空的第一寄存器,响应于确定包括第一寄存器,将第一寄存器中的第一信息的值更新为第一报文的所述目标性能指标的测量值,和将第一寄存器中的第二信息的值加一。网络处理器1132可以触发物理接口卡1133接收第一报文。
应理解,流量监控装置800中的收发器802可以相当于通信设备1100中的物理接口卡1133或物理接口卡1143;流量监控装置800中的处理器802可以相当于通信设备1100中的中央处理器1111或中央处理器1131。流量监控装置700中的第一接收单元701可以相当于通信设备1100中的物理接口卡1133或物理接口卡1143;流量监控装置700中的第一确定单元702和第二确定单元703等可以相当于通信设备1100中的中央处理器1111或中央处理器1131。
应理解,本申请实施例中接口板1140上的操作与接口板1130的操作一致,为了简洁,不再赘述。应理解,本实施例的通信设备1100可对应于上述各个方法实施例中的流量监控装置或集成电路,该通信设备1100中的主控板1110、接口板1130和/或接口板1140可以实现上述各个方法实施例中的流量监控装置中所具有的功能和/或所实施的各种步骤,为了简洁,在此不再赘述。
应理解,主控板可能有一块或多块,有多块的时候可以包括主用主控板和备用主控 板。接口板可能有一块或多块,通信设备的数据处理能力越强,提供的接口板越多。接口板上的物理接口卡也可以有一块或多块。交换网板可能没有,也可能有一块或多块,有多块的时候可以共同实现负荷分担冗余备份。在集中式转发架构下,通信设备可以不需要交换网板,接口板承担整个系统的业务数据的处理功能。在分布式转发架构下,通信设备可以有至少一块交换网板,通过交换网板实现多块接口板之间的数据交换,提供大容量的数据交换和处理能力。所以,分布式架构的通信设备的数据接入和处理能力要大于集中式架构的设备。可选地,通信设备的形态也可以是只有一块板卡,即没有交换网板,接口板和主控板的功能集成在该一块板卡上,此时接口板上的中央处理器和主控板上的中央处理器在该一块板卡上可以合并为一个中央处理器,执行两者叠加后的功能,这种形态设备的数据交换和处理能力较低(例如,低端交换机或路由器等通信设备)。具体采用哪种架构,取决于具体的组网部署场景。
在一些可能的实施例中,上述各网络设备或通信设备可以实现为虚拟化设备。例如,虚拟化设备可以是运行有用于发送报文功能的程序的虚拟机(英文:Virtual Machine,VM),虚拟机部署在硬件设备上(例如,物理服务器)。虚拟机指通过软件模拟的具有完整硬件系统功能的、运行在一个完全隔离环境中的完整计算机系统。可以将虚拟机配置为图1中的各网络设备。例如,可以基于通用的物理服务器结合网络功能虚拟化(Network Functions Virtualization,NFV)技术来实现各网络设备或通信设备。各网络设备或通信设备为虚拟主机、虚拟路由器或虚拟交换机。本领域技术人员通过阅读本申请即可结合NFV技术在通用物理服务器上虚拟出具有上述功能的各网络设备或通信设备,此处不再赘述。
应理解,上述各种产品形态的通信设备,分别具有上述方法实施例中各网络设备或通信设备的任意功能,此处不再赘述。
本申请实施例还提供了一种芯片,包括处理器和接口电路,接口电路,用于接收指令并传输至处理器;处理器,例如可以是图8示出的流量监控装置800的一种具体实现形式,可以用于执行上述流量监控方法。其中,所述处理器与存储器耦合,所述存储器用于存储程序或指令,当所述程序或指令被所述处理器执行时,使得该芯片系统实现上述任一方法实施例中的方法。
可选地,该芯片系统中的处理器可以为一个或多个。该处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
可选地,该芯片系统中的存储器也可以为一个或多个。该存储器可以与处理器集成在一起,也可以和处理器分离设置,本申请并不限定。示例性的,存储器可以是非瞬时性处理器,例如只读存储器ROM,其可以与处理器集成在同一块芯片上,也可以分别设置在不同的芯片上,本申请对存储器的类型,以及存储器与处理器的设置方式不作具体限定。
示例性的,该芯片系统可以是现场可编程门阵列(field programmable gate array,FPGA),可以是专用集成芯片(application specific integrated circuit,ASIC),还可以是系统芯片(system on chip,SoC),还可以是中央处理器(central processor unit,CPU),还可以是网络处理器(network processor,NP),还可以是数字信号处理电路(digital signal processor,DSP),还可以是微控制器(micro controller unit,MCU),还可以是可编程控制器(programmable logic device,PLD)或其他集成芯片。
本申请实施例还提供了一种计算机可读存储介质,包括指令或计算机程序,当其在计算机上运行时,使得计算机执行以上实施例提供的流量监控方法。
本申请实施例还提供了一种包含指令或计算机程序的计算机程序产品,当其在计算机上运行时,使得计算机执行以上实施例提供的流量监控方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,单元的划分,仅仅为一种逻辑业务划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各业务单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件业务单元的形式实现。
集成的单元如果以软件业务单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本领域技术人员应该可以意识到,在上述一个或多个示例中,本发明所描述的业务可以用硬件、软件、固件或它们的任意组合来实现。当使用软件实现时,可以将这些业务存 储在计算机可读介质中或者作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是通用或专用计算机能够存取的任何可用介质。
以上的具体实施方式,对本发明的目的、技术方案和有益效果进行了进一步详细说明,所应理解的是,以上仅为本发明的具体实施方式而已。
以上,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。
Claims (47)
- 一种流量监控方法,其特征在于,所述方法包括:流量监控装置接收第一报文;所述流量监控装置确定所述流量监控装置中是否包括第一寄存器,所述第一寄存器包括第一信息和第二信息,所述第一寄存器中的所述第二信息的值为零,所述第一寄存器中的所述第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,所述第一寄存器中的所述第二信息用于指示所述流量监控装置接收的报文中匹配所述第一寄存器中的所述第一信息的值的报文数量;响应于所述流量监控装置确定所述流量监控装置中包括所述第一寄存器,所述流量监控装置将所述第一寄存器中的所述第一信息的值更新为所述第一报文的所述目标性能指标的测量值,和将所述第一寄存器中的所述第二信息的值加一。
- 根据权利要求1所述的方法,其特征在于,所述方法还包括:所述流量监控装置接收第二报文;所述流量监控装置确定所述流量监控装置中是否包括第二寄存器,所述第二寄存器包括所述第一信息和所述第二信息,所述第二寄存器中的所述第二信息的值为零,所述第二寄存器中的所述第一信息用于指示承载被监控报文的所述目标性能指标的测量值的数据桶的深度,所述第二寄存器中的所述第二信息用于指示所述流量监控装置接收的报文中匹配所述第二寄存器中的所述第一信息的值的报文数量;响应于所述流量监控装置确定所述流量监控装置中不包括所述第二寄存器,所述流量监控装置:根据所述流量监控装置包括的第三寄存器中的所述第一信息的值和所述第三寄存器中的所述第二信息的值更新所述流量监控装置包括的第四寄存器中的所述第一信息的值和所述第四寄存器中的所述第二信息的值,更新后的所述第四寄存器中的所述第二信息的值等于所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和;和将所述第三寄存器中的所述第二信息的值清零。
- 根据权利要求2所述的方法,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和小于第一阈值。
- 根据权利要求2所述的方法,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和小于第一阈值。
- 根据权利要求2所述的方法,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和不大于所述流量监控装置包括的任意两个相邻寄存器中的所述第二信息的值的和。
- 根据权利要求2所述的方法,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和不大于所述流量监控装置包括的任意两个相邻寄存器中的所述第二信息的值加权和。
- 根据权利要求2-6任一项所述的方法,其特征在于,所述方法还包括:所述流量监控装置确定所述第二报文的所述目标性能指标的测量值匹配更新后的所述第四寄存器中的所述第一信息的值,所述流量监控装置将所述第四寄存器中的所述第二信息的值加一。
- 根据权利要求7所述方法,其特征在于,所述流量监控装置确定所述第二报文的所述目标性能指标的测量值匹配更新后的所述第四寄存器中的所述第一信息的值,包括:所述流量监控装置确定所述第二报文的目标性能指标的测量值属于所述第四寄存器中所述第一信息的值对应的数值范围。
- 根据权利要求7所述的方法,其特征在于,所述流量监控装置确定所述第二报文的所述目标性能指标的测量值匹配更新后的所述第四寄存器中的所述第一信息的值,包括:所述流量监控装置确定所述第二报文的目标性能指标的测量值与所述第四寄存器中的所述第一信息的值的差,小于所述第二报文的目标性能指标的测量值与其他寄存器中的所述第一信息的值的差。
- 根据权利要求2-6任一项所述的方法,其特征在于,所述方法还包括:所述流量监控装置确定所述第二报文的所述目标性能指标的测量值不匹配更新后的所述第四寄存器中的所述第一信息的值,所述流量监控装置将所述第三寄存器中的所述第一信息的值更新为所述第二报文的所述目标性能指标的测量值,和将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求10所述的方法,其特征在于,所述方法还包括:所述流量监控装置接收第三报文;所述流量监控装置确定所述第三报文的所述目标性能指标的测量值匹配所述第三寄存器中的所述第一信息的值,所述流量监控装置将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求10或11所述的方法,其特征在于,所述第三寄存器位于所述第一寄存器和所述第四寄存器之间,其中,所述第三寄存器与所述第一寄存器相邻,且所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第一信息的值大于所述第一寄存器中的所述第一信息的值,且所述第三寄存器中的所述第一信息的值小于所述第四寄存器中的所述第一信息的值。
- 根据权利要求1-12任一项所述的方法,其特征在于,所述流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。
- 根据权利要求1-13任一项所述的方法,其特征在于,所述目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
- 根据权利要求1-14任一项所述的方法,其特征在于,所述流量监控装置被包括在所述网络处理器NP芯片中。
- 一种流量监控装置,其特征在于,所述装置包括处理器和收发器,其中:所述收发器,用于接收第一报文;所述处理器,用于确定所述流量监控装置中是否包括第一寄存器,所述第一寄存器包括第一信息和第二信息,所述第一寄存器中的所述第二信息的值为零,所述第一寄存器中的所述第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,所述第一寄存器中的所述第二信息用于指示所述流量监控装置接收的报文中匹配所述第一寄存器中的所述第一信息的值的报文数量;所述处理器,还用于响应于确定所述流量监控装置中包括所述第一寄存器,将所述第一寄存器中的所述第一信息的值更新为所述第一报文的所述目标性能指标的测量值,和将所述第一寄存器中的所述第二信息的值加一。
- 根据权利要求16所述的装置,其特征在于,所述收发器,还用于接收第二报文;所述处理器,还用于确定所述流量监控装置中是否包括第二寄存器,所述第二寄存器包括所述第一信息和所述第二信息,所述第二寄存器中的所述第二信息的值为零,所述第二寄存器中的所述第一信息用于指示承载被监控报文的所述目标性能指标的测量值的数据桶的深度,所述第二寄存器中的所述第二信息用于指示所述流量监控装置接收的报文中匹配所述第二寄存器中的所述第一信息的值的报文数量;所述处理器,还用于响应于所述流量监控装置确定所述流量监控装置中不包括所述第二寄存器,根据所述流量监控装置包括的第三寄存器中的所述第一信息的值和所述第三寄存器中的所述第二信息的值更新所述流量监控装置包括的第四寄存器中的所述第一信息的值和所述第四寄存器中的所述第二信息的值,更新后的所述第四寄存器中的所述第二信息的值等于所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和;和将所述第三寄存器中的所述第二信息的值清零。
- 根据权利要求17所述的装置,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和小于第一阈值。
- 根据权利要求17所述的装置,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和小于第一阈值。
- 根据权利要求17所述的装置,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和不大于所述流量监控装置包括的任意两个相邻寄存器中的所述第二信息的值的和。
- 根据权利要求17所述的装置,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和不大于所述流量监控装置包括的任意两个相 邻寄存器中的所述第二信息的值加权和。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述处理器,还用于确定所述第二报文的所述目标性能指标的测量值匹配更新后的所述第四寄存器中的所述第一信息的值,所述流量监控装置将所述第四寄存器中的所述第二信息的值加一。
- 根据权利要求22所述装置,其特征在于,所述处理器,具体用于:确定所述第二报文的目标性能指标的测量值属于所述第四寄存器中所述第一信息的值对应的数值范围。
- 根据权利要求22所述的装置,其特征在于,所述处理器,具体用于:确定所述第二报文的目标性能指标的测量值与所述第四寄存器中的所述第一信息的值的差,小于所述第一报文的目标性能指标的测量值与其他寄存器中的所述第一信息的值的差。
- 根据权利要求17-21任一项所述的装置,其特征在于,所述处理器,还用于确定所述第二报文的所述目标性能指标的测量值不匹配更新后的所述第四寄存器中的所述第一信息的值,所述流量监控装置将所述第三寄存器中的所述第一信息的值更新为所述第二报文的所述目标性能指标的测量值,和将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求25所述的装置,其特征在于,所述收发器,还用于接收第三报文;所述处理器,还用于确定所述第三报文的所述目标性能指标的测量值匹配所述第三寄存器中的所述第一信息的值,所述流量监控装置将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求25或26所述的装置,其特征在于,所述第三寄存器位于所述第一寄存器和所述第四寄存器之间,其中,所述第三寄存器与所述第一寄存器相邻,且所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第一信息的值大于所述第一寄存器中的所述第一信息的值,且所述第三寄存器中的所述第一信息的值小于所述第四寄存器中的所述第一信息的值。
- 根据权利要求16-27任一项所述的装置,其特征在于,所述流量监控装置中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。
- 根据权利要求16-28任一项所述的装置,其特征在于,所述目标性能指标包括下述指标中的任意一种:时延、报文长度、接收报文时间间隔或队列占用率。
- 根据权利要求16-29任一项所述的装置,其特征在于,所述流量监控装置被包括在所述网络处理器NP芯片中。
- 一种集成电路,其特征在于,所述集成电路包括控制电路和接口电路,其中:所述接口电路,用于接收第一报文;所述控制电路,用于确定所述集成电路中是否包括第一寄存器,所述第一寄存器包括 第一信息和第二信息,所述第一寄存器中的所述第二信息的值为零,所述第一寄存器中的所述第一信息用于指示承载被监控报文的目标性能指标的测量值的数据桶的深度,所述第一寄存器中的所述第二信息用于指示所述集成电路接收的报文中匹配所述第一寄存器中的所述第一信息的值的报文数量;所述控制电路,还用于响应于确定所述集成电路中包括所述第一寄存器,将所述第一寄存器中的所述第一信息的值更新为所述第一报文的所述目标性能指标的测量值,和将所述第一寄存器中的所述第二信息的值加一。
- 根据权利要求31所述的集成电路,其特征在于,所述接口电路,还用于接收第二报文;所述控制电路,还用于确定所述集成电路中是否包括第二寄存器,所述第二寄存器包括所述第一信息和所述第二信息,所述第二寄存器中的所述第二信息的值为零,所述第二寄存器中的所述第一信息用于指示承载被监控报文的所述目标性能指标的测量值的数据桶的深度,所述第二寄存器中的所述第二信息用于指示所述集成电路接收的报文中匹配所述第二寄存器中的所述第一信息的值的报文数量;所述控制电路,还用于响应于所述集成电路确定所述集成电路中不包括所述第二寄存器,根据所述集成电路包括的第三寄存器中的所述第一信息的值和所述第三寄存器中的所述第二信息的值更新所述集成电路包括的第四寄存器中的所述第一信息的值和所述第四寄存器中的所述第二信息的值,更新后的所述第四寄存器中的所述第二信息的值等于所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和;和将所述第三寄存器中的所述第二信息的值清零。
- 根据权利要求32所述的集成电路,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和小于第一阈值。
- 根据权利要求32所述的集成电路,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和小于第一阈值。
- 根据权利要求32所述的集成电路,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的和不大于所述集成电路包括的任意两个相邻寄存器中的所述第二信息的值的和。
- 根据权利要求32所述的装置,其特征在于,所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第二信息的值与所述第四寄存器中的所述第二信息的值的加权和不大于所述流量监控装置包括的任意两个相邻寄存器中的所述第二信息的值加权和。
- 根据权利要求32-36任一项所述的集成电路,其特征在于,所述控制电路,还用于确定所述第二报文的所述目标性能指标的测量值匹配更新后的所述第四寄存器中的所述第一信息的值,所述集成电路将所述第四寄存器中的所述第二信 息的值加一。
- 根据权利要求37所述集成电路,其特征在于,所述控制电路,具体用于:确定所述第二报文的目标性能指标的测量值属于所述第四寄存器中所述第一信息的值对应的数值范围。
- 根据权利要求37所述的集成电路,其特征在于,所述控制电路,具体用于:确定所述第二报文的目标性能指标的测量值与所述第四寄存器中的所述第一信息的值的差,小于所述第一报文的目标性能指标的测量值与其他寄存器中的所述第一信息的值的差。
- 根据权利要求32-36任一项所述的集成电路,其特征在于,所述控制电路,还用于确定所述第二报文的所述目标性能指标的测量值不匹配更新后的所述第四寄存器中的所述第一信息的值,所述集成电路将所述第三寄存器中的所述第一信息的值更新为所述第二报文的所述目标性能指标的测量值,和将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求40所述的集成电路,其特征在于,所述收发器,还用于接收第三报文;所述控制电路,还用于确定所述第三报文的所述目标性能指标的测量值匹配所述第三寄存器中的所述第一信息的值,所述集成电路将所述第三寄存器中的所述第二信息的值加一。
- 根据权利要求40或41所述的集成电路,其特征在于,所述第三寄存器位于所述第一寄存器和所述第四寄存器之间,其中,所述第三寄存器与所述第一寄存器相邻,且所述第三寄存器与所述第四寄存器相邻,所述第三寄存器中的所述第一信息的值大于所述第一寄存器中的所述第一信息的值,且所述第三寄存器中的所述第一信息的值小于所述第四寄存器中的所述第一信息的值。
- 根据权利要求31-42任一项所述的集成电路,其特征在于,所述集成电路中的寄存器被按照寄存器中的第一信息的值的递增顺序排列。
- 根据权利要求31-43任一项所述的集成电路,其特征在于,所述目标性能指标包括下述指标中的任意一种:时延、报文长度、报文接收时间间隔或队列占用率。
- 根据权利要求31-44任一项所述的集成电路,其特征在于,所述集成电路被包括在所述网络控制电路NP芯片中。
- 一种网络设备,其特征在于,所述网络设备包括权利要求16-30任一项所述的流量监控装置,或者,所述网络设备包括权利要求31-45任一项所述的集成电路。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括指令,当其在计算机上运行时,使得计算机执行以上权利要求1-15任一项所述的方法。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP21859545.2A EP4195540A4 (en) | 2020-08-26 | 2021-03-19 | TRAFFIC MONITORING METHOD AND DEVICE, INTEGRATED CIRCUIT AND NETWORK DEVICE |
US18/173,662 US11777826B2 (en) | 2020-08-26 | 2023-02-23 | Traffic monitoring method and apparatus, integrated circuit, and network device |
Applications Claiming Priority (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010873634.3 | 2020-08-26 | ||
CN202010873634 | 2020-08-26 | ||
CN202011235536.3A CN114124731B (zh) | 2020-08-26 | 2020-11-06 | 流量监控方法、装置、集成电路及网络设备 |
CN202011235536.3 | 2020-11-06 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US18/173,662 Continuation US11777826B2 (en) | 2020-08-26 | 2023-02-23 | Traffic monitoring method and apparatus, integrated circuit, and network device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2022041696A1 true WO2022041696A1 (zh) | 2022-03-03 |
Family
ID=80354471
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/081657 WO2022041696A1 (zh) | 2020-08-26 | 2021-03-19 | 流量监控方法、装置、集成电路及网络设备 |
Country Status (3)
Country | Link |
---|---|
US (1) | US11777826B2 (zh) |
EP (1) | EP4195540A4 (zh) |
WO (1) | WO2022041696A1 (zh) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP4195609A4 (en) * | 2020-08-26 | 2024-01-10 | Huawei Technologies Co., Ltd. | TRAFFIC MONITORING METHOD AND APPARATUS, INTEGRATED CIRCUIT, NETWORK DEVICE, AND NETWORK SYSTEM |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741739A (zh) * | 2009-12-01 | 2010-06-16 | 中兴通讯股份有限公司 | 一种交换设备出、入端口报文统计的方法和装置 |
WO2013139363A1 (en) * | 2012-03-19 | 2013-09-26 | Huawei Technologies Co., Ltd. | Memory architecture determining the number of replicas stored in memory banks or devices according to a packet size |
CN105608050A (zh) * | 2015-12-31 | 2016-05-25 | 华为技术有限公司 | 数据存储方法及系统 |
CN106789450A (zh) * | 2017-03-01 | 2017-05-31 | 杭州迪普科技股份有限公司 | 一种报文的特征统计方法及装置 |
US20180088947A1 (en) * | 2016-09-27 | 2018-03-29 | Cooper Technologies Company | Multi-producer single consumer queue systems and methods |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030033403A1 (en) * | 2001-07-31 | 2003-02-13 | Rhodes N. Lee | Network usage analysis system having dynamic statistical data distribution system and method |
US20070244864A1 (en) * | 2006-04-18 | 2007-10-18 | Bellsouth Intellectual Property Corporation | Modifying thresholds for communications traffic data |
JP4774357B2 (ja) * | 2006-05-18 | 2011-09-14 | アラクサラネットワークス株式会社 | 統計情報収集システム及び統計情報収集装置 |
JP4764810B2 (ja) * | 2006-12-14 | 2011-09-07 | 富士通株式会社 | 異常トラヒック監視装置、エントリ管理装置およびネットワークシステム |
KR20100126690A (ko) * | 2008-02-18 | 2010-12-02 | 샌드브리지 테크놀로지스, 인코포레이티드 | 널-종료 문자열 동작을 가속화하는 방법 |
US8331231B2 (en) * | 2008-09-09 | 2012-12-11 | Centurylink Intellectual Property Llc | System and method for monitoring bursting traffic |
US9148359B2 (en) * | 2011-12-22 | 2015-09-29 | Voipfuture Gmbh | Correlation of media plane and signaling plane of media services in a packet-switched network |
US8751757B1 (en) * | 2011-12-30 | 2014-06-10 | Emc Corporation | Acquisition and kernel memory storage of I/O metrics |
CN107566206B (zh) * | 2017-08-04 | 2020-09-04 | 华为技术有限公司 | 一种流量测量方法、设备及系统 |
-
2021
- 2021-03-19 EP EP21859545.2A patent/EP4195540A4/en active Pending
- 2021-03-19 WO PCT/CN2021/081657 patent/WO2022041696A1/zh unknown
-
2023
- 2023-02-23 US US18/173,662 patent/US11777826B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101741739A (zh) * | 2009-12-01 | 2010-06-16 | 中兴通讯股份有限公司 | 一种交换设备出、入端口报文统计的方法和装置 |
WO2013139363A1 (en) * | 2012-03-19 | 2013-09-26 | Huawei Technologies Co., Ltd. | Memory architecture determining the number of replicas stored in memory banks or devices according to a packet size |
CN105608050A (zh) * | 2015-12-31 | 2016-05-25 | 华为技术有限公司 | 数据存储方法及系统 |
US20180088947A1 (en) * | 2016-09-27 | 2018-03-29 | Cooper Technologies Company | Multi-producer single consumer queue systems and methods |
CN106789450A (zh) * | 2017-03-01 | 2017-05-31 | 杭州迪普科技股份有限公司 | 一种报文的特征统计方法及装置 |
Non-Patent Citations (1)
Title |
---|
See also references of EP4195540A4 |
Also Published As
Publication number | Publication date |
---|---|
EP4195540A1 (en) | 2023-06-14 |
EP4195540A4 (en) | 2024-01-10 |
US11777826B2 (en) | 2023-10-03 |
US20230216769A1 (en) | 2023-07-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP7039685B2 (ja) | トラフィック測定方法、デバイス、およびシステム | |
US11876715B2 (en) | Load balancing method, device, and system | |
CN108243116B (zh) | 一种流量控制方法及交换设备 | |
US20190190838A1 (en) | Elephant Flow Detection in Network Access | |
US11750699B2 (en) | Small message aggregation | |
US11050649B2 (en) | Delay measurement method of network node device, apparatus, and network node device | |
US20040193768A1 (en) | Method and apparatus for implementing infiniband receive function | |
US12047295B2 (en) | Microburst detection and management | |
EP2670085B1 (en) | System for performing Data Cut-Through | |
CN111726299B (zh) | 流量均衡方法及装置 | |
US20220311711A1 (en) | Congestion control based on network telemetry | |
WO2022041696A1 (zh) | 流量监控方法、装置、集成电路及网络设备 | |
Emmerich et al. | Optimizing latency and CPU load in packet processing systems | |
WO2022247308A1 (zh) | 流量测量方法、装置及相关设备 | |
US9154390B2 (en) | Packet relay apparatus and measurement method for measuring discard number of data packets | |
WO2022041695A1 (zh) | 流量监控方法、装置、集成电路、网络设备及网络系统 | |
US11108697B2 (en) | Technologies for controlling jitter at network packet egress | |
CN114124731B (zh) | 流量监控方法、装置、集成电路及网络设备 | |
Liu et al. | Optimizing flow completion time via adaptive buffer management in data center networks | |
WO2024113830A1 (zh) | 数据传输方法、装置、设备、系统及存储介质 | |
WO2023155904A1 (zh) | 一种网络设备运行状态的调整方法、装置及相关设备 | |
WO2024174783A1 (zh) | 带宽测量的方法、装置以及系统 | |
US20240259304A1 (en) | Aggregation packet forwarding method and aggregation packet forwarding system | |
WO2024021878A1 (zh) | 一种发送负载信息的方法、发送报文的方法及装置 | |
EP4142250A1 (en) | Flow characteristic extraction method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
ENP | Entry into the national phase |
Ref document number: 2021859545 Country of ref document: EP Effective date: 20230309 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |