CN115022212A - Bandwidth monitoring method, device, circuit and electronic equipment - Google Patents

Bandwidth monitoring method, device, circuit and electronic equipment Download PDF

Info

Publication number
CN115022212A
CN115022212A CN202210617463.7A CN202210617463A CN115022212A CN 115022212 A CN115022212 A CN 115022212A CN 202210617463 A CN202210617463 A CN 202210617463A CN 115022212 A CN115022212 A CN 115022212A
Authority
CN
China
Prior art keywords
current
time window
bandwidth
bandwidth monitoring
previous
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210617463.7A
Other languages
Chinese (zh)
Other versions
CN115022212B (en
Inventor
苗昆
代开勇
潘于
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Haiguang Information Technology Co Ltd
Original Assignee
Haiguang Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haiguang Information Technology Co Ltd filed Critical Haiguang Information Technology Co Ltd
Priority to CN202210617463.7A priority Critical patent/CN115022212B/en
Publication of CN115022212A publication Critical patent/CN115022212A/en
Application granted granted Critical
Publication of CN115022212B publication Critical patent/CN115022212B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements

Landscapes

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

Abstract

The embodiment of the application provides a bandwidth monitoring method, a bandwidth monitoring device, a bandwidth monitoring circuit and electronic equipment, wherein the data processing method comprises the steps of obtaining the flow size of a bandwidth monitoring data stream in a current preset time window to obtain the current continuous flow size of the bandwidth monitoring data stream, and the current preset time window and a previous preset time window comprise at least one common clock cycle; and acquiring the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window. The embodiment of the application can improve the continuity of bandwidth monitoring on the bandwidth monitoring data stream.

Description

Bandwidth monitoring method, device, circuit and electronic equipment
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a bandwidth monitoring method, a bandwidth monitoring device, a bandwidth monitoring circuit and electronic equipment.
Background
In order to understand the bandwidth of the data stream, a bandwidth monitoring circuit is disposed in the logic circuit for monitoring the bandwidth of the data stream, and the detected bandwidth is usually used for visual presentation and generating an alarm when the bandwidth does not meet the expected size.
In the existing bandwidth monitoring technology, a data stream is divided into independent time windows, data stream flow in each time window is independently counted after each time window is finished, and bandwidth monitoring is performed by a bandwidth calculation method.
However, the method of dividing the data stream into independent parts and performing traffic statistics and bandwidth calculation separately may cause discontinuity of bandwidth monitoring, thereby causing problems of unsmooth visualization and inaccurate and delayed alarm.
Therefore, how to improve the continuity of bandwidth monitoring becomes a technical problem that needs to be solved urgently by those skilled in the art.
Disclosure of Invention
In view of the above, embodiments of the present disclosure provide a method, an apparatus, a circuit and an electronic device for bandwidth monitoring, so as to continuously monitor a bandwidth of a data stream.
In order to achieve the above purpose, the embodiments of the present application provide the following technical solutions:
in a first aspect, an embodiment of the present application provides a bandwidth monitoring method, including:
acquiring the flow of a bandwidth monitoring data stream in a current preset time window to obtain the current continuous flow of the bandwidth monitoring data stream, wherein the current preset time window and a previous preset time window comprise at least one common clock period;
and acquiring the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window.
In a second aspect, an embodiment of the present application provides a bandwidth monitoring apparatus, including:
a current continuous traffic size obtaining module, adapted to obtain a traffic size of a bandwidth monitoring data stream within a current predetermined time window, to obtain a current continuous traffic size of the bandwidth monitoring data stream, where the current predetermined time window and a previous predetermined time window include at least one common clock cycle;
and the bandwidth obtaining module is suitable for obtaining the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window.
In a third aspect, an embodiment of the present application provides a bandwidth monitoring circuit, including:
the extractor is suitable for extracting the flow size information of the current clock period from the bandwidth monitoring data stream;
a first-in first-out memory, which is pre-configured to have an initial write pointer larger than an initial read pointer, has a predetermined address difference between the initial write pointer and the initial read pointer equal to the current predetermined time window, and is adapted to store the traffic size information of the current clock cycle received from the extractor;
a counter adapted to perform an accumulation operation according to the traffic size information received from the extractor and to perform an accumulation operation according to the traffic size information received from the first-in first-out memory;
and the bandwidth monitor is suitable for calculating the bandwidth by taking the count value of the counter as the flow size and monitoring the bandwidth.
In a fourth aspect, an embodiment of the present application provides an electronic device, including the bandwidth monitoring apparatus according to any one of the second aspects or the bandwidth monitoring circuit according to any one of the third aspects.
The bandwidth monitoring method provided by the embodiment of the application obtains the flow size of the bandwidth monitoring data stream in the current preset time window, that is, the current continuous flow size, and the current preset time window includes at least one common clock cycle with the previous preset time window, and then obtains the bandwidth through the current continuous flow size and the current preset time window, thereby realizing the obtaining of the bandwidth and further realizing the monitoring of the bandwidth. Therefore, according to the bandwidth monitoring method provided by the embodiment of the application, the current preset time window comprises at least one common clock cycle with the previous preset time window, so that continuity exists between the flow of the current preset time window and the flow of the previous preset time window, that is, a bandwidth monitoring data stream passes through a unique fixed time window, the flow in the fixed time window is counted, and the bandwidth is calculated, so that the continuity of bandwidth monitoring on the bandwidth monitoring data stream is improved; meanwhile, due to the improvement of the continuity of the bandwidth monitoring, the smoothness of the bandwidth monitoring can be enhanced when the bandwidth is visually presented; furthermore, the number of each current preset time window and the frequency of acquiring the bandwidth can be increased based on the flow of the overlapped common clock period, so that bandwidth monitoring errors caused by the fact that the bandwidth is acquired based on the flow of each independent preset time window due to independent division of the preset time windows are prevented, and the accuracy of bandwidth monitoring is improved; finally, after the bandwidth is acquired every time, the bandwidth of the next current scheduled time window can be acquired under the condition that a scheduled time window is not enough, the bandwidth can be found to be not satisfied with the preset bandwidth threshold more quickly, and the alarm delay can be shortened.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1a is a schematic diagram of a bandwidth monitoring method;
FIG. 1b is a logic timing diagram of a bandwidth monitoring method;
FIG. 1c is a diagram illustrating the visualization of bandwidth in a bandwidth monitoring method;
FIG. 1d is a schematic circuit diagram of a bandwidth monitoring method;
fig. 2a is a flowchart of a bandwidth monitoring method according to an embodiment of the present application;
fig. 2b is a bandwidth visualization display diagram of a bandwidth monitoring method provided in the embodiment of the present application;
fig. 3 is a flowchart of a current continuous traffic size obtaining step in a current predetermined time window of a bandwidth monitoring method according to an embodiment of the present application;
fig. 4 is a flowchart illustrating a method for monitoring bandwidth according to an embodiment of the present invention, wherein the method includes obtaining a flow rate of a current period of a current predetermined time window;
fig. 5 is another flowchart of a step of obtaining a current traffic size of a predetermined time window in a bandwidth monitoring method according to an embodiment of the present application;
fig. 6 is a flowchart of a previous period traffic size and a current period traffic size obtaining step of the bandwidth monitoring method according to the embodiment of the present application;
fig. 7 is a schematic circuit diagram of a bandwidth monitoring method according to an embodiment of the present application;
fig. 8 is a block diagram of a bandwidth monitoring apparatus according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
A bandwidth monitoring method is described below.
Referring to fig. 1a, fig. 1b, fig. 1c and fig. 1d, fig. 1a is a schematic diagram illustrating a bandwidth monitoring method; FIG. 1b is a logic timing diagram of a bandwidth monitoring method; FIG. 1c is a diagram illustrating the visualization of bandwidth in a bandwidth monitoring method; fig. 1d is a circuit diagram of a bandwidth monitoring method.
In the data transmission process, data is continuously transmitted like water flow, therefore, when the flow of the data flow is monitored, the total bandwidth is not calculated uniformly after all data are transmitted, but the total bandwidth is divided into time windows with certain time length, and then the bandwidth size in the time windows is calculated. As shown in fig. 1a, taking a data stream output from one output end as an example, a data stream that is continuously transmitted is divided into data streams of time windows, and a bandwidth in each time window is calculated, so as to implement monitoring of a data stream bandwidth.
Referring to fig. 1b, a specific method for monitoring the bandwidth of the data stream may use the entirety of the data stream output by the two output terminals, i.e., output terminal 1 and output terminal 2, as an object of bandwidth monitoring.
As shown in the figure, it is possible that the output terminal 1 and the output terminal 2 will send data at the rising edge of each clock cycle, the length of the time window is 4 clock cycles, and when the determination of the time window is performed by the number of clock cycles, the first clock cycle is recorded as 0, so the maximum value of the clock cycles (win _ max) in the time window is 3, and when the upper limit of the time window is reached, the time window is ended, and the relay of the next time window is started.
Specifically, the method comprises the following steps: as shown in fig. 1b, the first time window starts from the beginning of clock cycle 2 and ends at the end of clock cycle 5, the second time window ends from the beginning of clock cycle 6 and ends at the end of clock cycle 9, and each time a time window ends, the bandwidth size of the time window is calculated according to the traffic size (cli _ cnt) and the time window length (win _ max +1) counted in the time window:
Figure BDA0003675007350000051
it can be seen that, each time a time window is newly started, the corresponding traffic size is counted again (new _ stat). Therefore, the final bandwidth visualization display effect is as shown in fig. 1c, and an overall Bandwidth (BW) of each time window (win) is obtained.
And the specific bandwidth monitoring circuit can refer to fig. 1 d:
as shown in fig. 1d, the bandwidth monitoring circuit includes an extractor 110, a counter 120, a time window module 130, and a bandwidth monitor 140.
The extractor 110 is configured to extract traffic size information in a data stream, and transmit the traffic size information to the counter 120, specifically, the extractor 110 reads a data segment containing the data packet size information in a data packet sent by each sending end, and of course, the data segment containing the data packet size information still reaches a receiving end along with the data packet, so that the integrity of data in the data stream is not affected by the traffic size information sent by the sending end at the current clock cycle extracted from the data stream.
The counter 120 counts the traffic size using the traffic size information;
the time window module 130 (which is essentially a cyclic counter) records the number of elapsed clock cycles, when the number of clock cycles recorded by the time window module 130 has reached a maximum value, the counter 120 sends the counted traffic size to the bandwidth monitor 140, and the traffic size stored in the counter 120 is cleared, and the bandwidth monitor 140 performs bandwidth calculation on the obtained traffic size to obtain the bandwidth size of the time window.
However, when monitoring the bandwidth according to the existing bandwidth monitoring method, the data stream is divided into mutually independent portions, and traffic statistics and bandwidth calculation are respectively performed, which results in discontinuity of bandwidth monitoring, and the discontinuity makes the visual display of the bandwidth not smooth enough (as shown in fig. 1 c), and there is a sudden change in the bandwidth size between time windows, and meanwhile, since the calculation of the bandwidth is only performed at the end of each respectively independent time window, that is, the bandwidth is the average value of the traffic size within the time window, and for performing bandwidth monitoring, the length of the time window is not too small, which results in inaccurate bandwidth and also causes alarm delay.
Therefore, how to improve the continuity of bandwidth monitoring becomes a technical problem that needs to be solved urgently by those skilled in the art.
To solve the foregoing problems, an embodiment of the present invention provides a bandwidth monitoring method, please refer to fig. 2a, and fig. 2a is a flowchart of the bandwidth monitoring method according to the embodiment of the present invention.
As shown in fig. 2, a bandwidth monitoring method provided in the embodiment of the present application includes:
in step S1, the traffic of the bandwidth monitoring rod data stream within the current predetermined time window is obtained, and the current continuous traffic of the bandwidth monitoring data stream is obtained.
It is easy to understand that the bandwidth monitoring data stream is a data stream monitored by the bandwidth, the current predetermined time window refers to a time window in which the bandwidth needs to be acquired currently, and the current predetermined time window includes a predetermined number of clock cycles; the previous predetermined time window is a time window in which the bandwidth is acquired before, the previous predetermined time window also includes a predetermined number of clock cycles, and the current predetermined time window and the previous predetermined time window include at least one common clock cycle, that is, the number of clock cycles of the current predetermined time window and the previous predetermined time window are the same, but a part of the clock cycles between the current predetermined time window and the previous predetermined time window are overlapped, and the two are not completely independent.
It is easy to understand that the traffic generated in the common clock cycle plays a role in the traffic size statistics in the bandwidth monitoring data stream in the previous predetermined time window and plays a role in the traffic size statistics in the current predetermined time window, so that the continuity of the traffic sizes in two adjacent predetermined time windows can be realized.
Of course, the larger the proportion of the common clock cycle in the predetermined time window, the stronger the continuity of the obtained traffic, and when the current predetermined time window and the previous predetermined time window have only one non-common clock cycle, the proportion reaches the maximum value, in this case, it is equivalent to acquiring a bandwidth once per clock cycle.
It should be noted that, when the actual number of clock cycles included in the current predetermined time window is smaller than the number of current clock cycles required by the current predetermined time window, the current predetermined time window does not actually have a previous predetermined time window, and it can be understood that the current predetermined time window has a previous predetermined time window in which the previous cycle flow of each previous clock cycle is 0, and because the flow of each common clock cycle is regarded as 0, the first current continuous flow can be obtained according to the flow of the non-common clock cycle in the current predetermined time window and the previous predetermined time window.
Such as: the current preset time window is 4 clock cycles, when the current preset time window and the previous preset time window only have one non-common clock cycle, each clock cycle needs to acquire bandwidth, and each previous clock cycle is 0, so that when the first bandwidth is acquired, the actual clock cycle is 1, the common clock cycle is 3, but the flow is 0, and therefore the first bandwidth is the ratio of the flow of the first clock cycle to the preset time window; when the second bandwidth is obtained, the actual clock period is 2, the common clock period is 3, the flow sizes of the two clock periods are both 0, and only one flow size of the first clock period and the flow size of the second clock period exist, so that the second bandwidth is the ratio of the sum of the flow size of the first clock period and the flow size of the second clock period to the preset time window; ...; until the number (4 clock cycles) of the clock cycles contained in the preset time window is met, obtaining the bandwidth of a first complete preset time window, namely the ratio of the sum of the flow of the first clock cycle to the flow of the fourth clock cycle to the preset time window; then, acquiring the sum of the flow in the second clock cycle and the flow in the fifth clock cycle, and the ratio of the sum to a preset time window;
when the current preset time window is 4 clock cycles and the current preset time window and the previous preset time window have two non-common clock cycles, the bandwidth needs to be obtained in every two clock cycles, and each previous clock cycle is 0, so the first bandwidth can be the ratio of the sum of the flow of the first clock cycle and the flow of the second clock cycle to the preset time window (4 clock cycles); the second bandwidth may be a ratio of a sum of a traffic size of the first clock cycle to a traffic size of the fourth clock cycle to a predetermined time window; then, the sum of the flow magnitude of the third clock cycle to the flow magnitude of the sixth clock cycle is obtained, and the ratio of the sum to the predetermined time window.
It can be seen that, in the data stream bandwidth monitoring method provided in the embodiment of the present application, the current predetermined time window includes a situation that the number of clock cycles actually included is less than the number of clock cycles of the current predetermined time window, and only the traffic of a part of clock cycles of the previous predetermined time window needs to be regarded as 0.
In step S2, the bandwidth of the bandwidth monitoring data stream is obtained according to the current continuous traffic size and the current predetermined time window.
After the current continuous flow (represented by cli _ cnt) and the current preset time window (represented by win _ max +1) are obtained, according to a bandwidth calculation formula:
Figure BDA0003675007350000071
the Bandwidth (BW) can be calculated, so as to obtain the bandwidth of the current predetermined time window.
It is easy to understand that, as time advances, a new current clock cycle and a current predetermined time window to which the current clock cycle belongs will appear, and an old current clock cycle and the current predetermined time window to which the current clock cycle belongs become a previous clock cycle and a previous predetermined time window, so as to realize continuous bandwidth monitoring on data streams.
Of course, it is easily understood that the data stream bandwidth monitoring method provided by the embodiment of the present application is not necessarily used in the whole process of the data stream bandwidth monitoring, and the data stream bandwidth monitoring method provided by the embodiment of the present application is used once in the process of the bandwidth monitoring, which falls into the protection scope of the present application.
To illustrate the technical effects obtained by the embodiments of the present application compared with the prior art, the following specific examples are given:
assuming that ten transmitting ports transmit in units of 1byte, that is, each port transmits one byte or does not transmit data in each clock cycle, the time window size is 1 second, including 5 clock cycles, the bandwidth configuration minimum is 15, the bandwidth configuration maximum is 30, that is, when the bandwidth is detected to be less than 15 or greater than 30, an alarm is issued. Of course, the actual data sent by the port is based on the data packet, and the clock period is much less than 0.2 seconds, and this example is assumed for convenience of description.
Further, in two time windows (two seconds) of ten clock cycles, the data respectively transmitted by the ten transmitting terminals in each clock cycle is: 9, 1, 2, 0, 4, 3, 10, 8, 7, 1
Based on the existing bandwidth monitoring method, 16 bytes/s bandwidth is obtained at the end of the first second, and 29 bytes/s bandwidth is obtained at the end of the second, namely two bandwidth values are obtained.
Based on the bandwidth monitoring method provided by the embodiment of the present application, when the assumed common clock cycle proportion reaches the maximum, that is, 4, 9Byte/s (flow rate of only the first clock cycle), 10Byte/s (flow rate of the first clock cycle and the second clock cycle), 12Byte/s (flow rate of the first clock cycle to the third clock cycle), 12Byte/s (flow rate of the first clock cycle to the fourth clock cycle), 16Byte/s [ flow rate of the first clock cycle to the fifth clock cycle (the first complete current predetermined time window) ], 10Byte/s [ flow rate of the second clock cycle to the sixth clock cycle (the second complete current predetermined time window) ], 19Byte/s [ flow rate of the third clock cycle to the seventh clock cycle (the third complete current predetermined time window) ], and, 25 bytes/s [ flow from fourth clock cycle to eighth clock cycle (fourth complete current predetermined time window) ], 32 bytes/s [ flow from fifth clock cycle to ninth clock cycle (fifth complete current predetermined time window) ], and 29 bytes/s [ flow from sixth clock cycle to tenth clock cycle (sixth complete current predetermined time window) ].
Therefore, by using the bandwidth monitoring method provided by the embodiment of the application, not only can continuous bandwidths be obtained, but also more bandwidths can be obtained, and further, it can be found that the bandwidth of the sixth clock cycle is 10Byte/s and is smaller than the minimum value of bandwidth configuration, the bandwidth of the ninth clock cycle is 32Byte/s and is greater than the maximum value of bandwidth configuration, and the accuracy is higher; on the other hand, if the maximum configured bandwidth is 25, by using the bandwidth monitoring method provided by the embodiment of the present application, it can be determined that the bandwidth exceeds the bandwidth threshold at 1.8 seconds, and an alarm can be performed, whereas the existing scheme can only find that 29Byte/s is greater than the maximum 25 at the end of 2 seconds, which causes an alarm delay, and the technical solution provided by the embodiment of the present application can realize that the alarm is even if the alarm is performed, and the alarm delay is shortened.
Therefore, the bandwidth monitoring method provided by the embodiment of the application has continuity between the flow of the current predetermined time window and the flow of the previous predetermined time window, which is equivalent to passing a bandwidth monitoring data stream through a unique fixed time window, counting the flows in the fixed time window and calculating the bandwidth, thereby improving the continuity of bandwidth monitoring on the bandwidth monitoring data stream; meanwhile, due to the improvement of the continuity of the bandwidth monitoring, the smoothness of the bandwidth monitoring can be enhanced when the bandwidth is visually presented; furthermore, the number of each current preset time window and the frequency of acquiring the bandwidth can be increased based on the flow of the overlapped common clock period, so that bandwidth monitoring errors caused by the fact that the bandwidth is acquired based on the flow of each independent preset time window due to independent division of the preset time windows are prevented, and the accuracy of bandwidth monitoring is improved; finally, after the bandwidth is acquired every time, the bandwidth of the next current scheduled time window can be acquired under the condition that a scheduled time window is not enough, the bandwidth can be found to be not satisfied with the preset bandwidth threshold more quickly, and the alarm delay can be shortened.
In a specific embodiment, after obtaining the bandwidth, in order to facilitate displaying, an embodiment of the present application further provides a bandwidth monitoring method, please refer to fig. 2a continuously.
As shown in the figure, the bandwidth monitoring method provided in the embodiment of the present application may further include:
step S3: and visually displaying the bandwidth.
By visually displaying the bandwidth, the result of the bandwidth monitoring can be visually displayed, and the displayed graph is smoother due to the enhancement of the continuity of the bandwidth monitoring, specifically referring to fig. 2b, where fig. 2b is a bandwidth visual display graph of the bandwidth monitoring method provided in the embodiment of the present application.
In another specific implementation, as shown in fig. 2a, the bandwidth monitoring method provided in the embodiment of the present application may further include:
in step S4, when the bandwidth is greater than the preset maximum bandwidth value or less than the preset minimum bandwidth value, an alarm is issued.
By monitoring the bandwidth of the bandwidth monitoring data stream continuously, the alarm is given when the bandwidth is greater than a preset maximum value or less than a preset minimum value accurately in real time, so that the bandwidth abnormality can be found accurately and timely, and the timeliness of subsequent processing is ensured.
In a specific embodiment, to facilitate obtaining the current continuous traffic size within the current predetermined time window, please refer to fig. 3, where fig. 3 is a flowchart of a step of obtaining the current continuous traffic size within the current predetermined time window of the bandwidth monitoring method provided in the embodiment of the present application.
As shown in fig. 3, the step of obtaining the current continuous traffic size in the current predetermined time window of the bandwidth monitoring method provided in the embodiment of the present application may specifically include the following steps:
in step S11, the current period traffic of each clock period of the bandwidth monitoring data stream in the current predetermined time window is obtained.
And obtaining the current period flow of all clock periods in the current preset time window, wherein the current period flow is the flow of the clock periods in the current preset time window.
In some embodiments, please refer to fig. 4, fig. 4 is a flowchart illustrating how to obtain the traffic size of the current period of the current predetermined time window in the bandwidth monitoring method according to the embodiment of the present application.
As shown in fig. 4, the step of obtaining the flow rate in the current period includes the following steps:
in step S111, the traffic size information of the current clock cycle is extracted from the bandwidth monitoring data stream and stored, so as to obtain the traffic size of the current clock cycle.
It is to be understood that, the current clock cycle described herein refers to the last clock cycle of the current predetermined time window, and in each clock cycle, the data stream includes the data transmitted by each port in the clock cycle, and each data has a data bit indicating the size information of the data, i.e. the traffic size information transmitted by the port transmitting the data in the clock cycle. Therefore, the traffic size information of the data sent by each port in the current clock cycle is extracted from the bandwidth monitoring data stream, and the traffic size of the current clock cycle can be obtained.
Certainly, data in the data stream is received by the receiving end quickly, and the calculation of the time window bandwidth requires traffic size information of all clock periods in the time window, so that the traffic size information of the current clock period acquired from the data stream needs to be stored, so as to acquire the traffic size information from the storage in the calculation process of the subsequent time window.
In step S112, the stored traffic size information of each early clock cycle in the current predetermined time window is obtained, and the traffic size of each early clock cycle is obtained.
It is to be understood that the current predetermined time window includes, besides the current clock cycle, an early clock cycle within the current predetermined time window except the current clock cycle, and the early clock cycle described herein refers to each clock cycle within the current predetermined time window except the current clock cycle.
The traffic size information of the early clock cycle is received by the receiving end along with the whole traffic, so that the traffic size information of the early clock cycle can be only obtained from the storage, and the traffic size information is stored in the storage when the traffic size information is obtained in the early clock cycle.
Therefore, the flow size is obtained by extracting the flow size information in the data stream, the existing information is fully utilized while the data transmission from the sending end to the receiving end is not influenced, and the flow size of each clock period is quickly obtained.
In step S12, a sum of the traffic of each current period is obtained, so as to obtain a current continuous traffic of the bandwidth monitoring data stream.
And after the current period flow of all clock periods in the current preset time window is obtained, summing to obtain the current continuous flow of the bandwidth monitoring data stream.
Therefore, the bandwidth monitoring method provided by the embodiment of the application only needs to acquire the flow size of each clock cycle from the bandwidth monitoring data stream, then stores the flow size, reads the stored flow size of each current cycle when the current preset time window is finished, and calculates to obtain the current continuous flow size, only uses the most basic storage and calculation functions after the flow size is acquired, does not need to change hardware, is convenient to implement and simple to operate, and can be implemented in the existing general electronic equipment in a software mode.
In another specific embodiment, in order to achieve the obtaining of the continuous traffic size of the current predetermined time window, an embodiment of the present application further provides another bandwidth monitoring method, please refer to fig. 5, and fig. 5 is another flowchart of the step of obtaining the traffic size of the current predetermined time window of the bandwidth monitoring method provided in the embodiment of the present application.
As shown in fig. 5, the step of obtaining the current continuous traffic size in the current predetermined time window of the bandwidth monitoring method provided in the embodiment of the present application may specifically include the following steps:
in step S13, the previous continuous traffic of the bandwidth monitoring data stream in the previous predetermined time window is obtained.
Of course, the previous continuous flow rate is the sum of the flow rates of the previous predetermined time window in each clock cycle, that is, after the previous continuous flow rate is obtained in the previous predetermined time window, the previous continuous flow rate is stored, and in the current clock cycle, the stored previous continuous flow rate is read.
In some embodiments, the previous continuous traffic size is stored in a counter. And accumulating the flow of each previous clock period in the previous preset time window through a counter so as to store the previous continuous flow. Of course, the counter does not store the flow rate value of each previous clock cycle, and only stores the previous continuous flow rate value.
The counter has the hardware function of counting up and down, the counter can realize the quick accumulation of the flow of each previous period of the previous preset time window, and the intervention of writing and reading in the memory can be reduced by directly storing the flow of the previous continuous flow through the accumulated value, so that the complexity of software and hardware is reduced, and the bandwidth monitoring efficiency is further improved.
In step S14, the previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous predetermined time window is obtained, and the current period traffic of each current non-common clock cycle of the bandwidth monitoring data stream in the current predetermined time window is obtained.
It is to be understood that the previous non-common clock cycle described herein refers to a clock cycle belonging to a previous predetermined time window but not to a current predetermined time window, and the current non-common clock cycle described herein refers to a clock cycle belonging to a current predetermined time window but not to a previous predetermined time window. Of course, the previous predetermined time window is relative to the newly appeared current predetermined time window along with the update of the clock period, so that the previous predetermined time window is not different from the current predetermined time window itself, but is different in time. The number of previous non-common clock cycles is the same as the number of current non-common clock cycles.
It is easy to understand that, in the subsequent calculation of the current continuous flow, the previous period flow of each previous non-common clock cycle plays a role, so the specific storage mode can be that the previous period flow of each previous non-common clock cycle is respectively stored through a memory, that is, when each previous non-common clock cycle is the current clock cycle, the acquisition and the storage are performed; similarly, the current cycle traffic of each current non-common clock cycle may also be stored separately, that is, when each current non-common clock cycle is the current clock cycle, the current cycle traffic is acquired and stored.
In some embodiments, the number of previous non-common clock cycles and the number of current non-common clock cycles are both 1. Therefore, the continuity of bandwidth monitoring is the largest, the smooth curve containing the most information can be displayed in the subsequent visual display, and accurate and timely alarm can be realized when the subsequent alarm is carried out on the bandwidth which does not meet the expected size.
In some embodiments, please refer to fig. 6 for specific steps of obtaining previous period traffic and current period traffic, and fig. 6 is a flowchart of steps of obtaining previous period traffic and current period traffic of a bandwidth monitoring method according to an embodiment of the present invention.
As shown in fig. 6, the specific steps of obtaining the flow rate of the previous period and the flow rate of the current period include:
in step S141, a pre-stored previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous predetermined time window is obtained, and each previous period traffic is obtained and stored in each corresponding previous clock cycle of the previous predetermined time window.
It is easy to understand that the traffic of the current period is acquired from the bandwidth monitoring data stream and then stored, that is, the traffic of the previous period can be acquired from the storage when needed in the following.
In step S142, a current period traffic of each current non-common clock cycle of the bandwidth monitoring data stream in a current predetermined time window is obtained, and each current period traffic is obtained and stored in each corresponding current non-common clock cycle of the current predetermined time window.
Referring to step S141, it is understood that the period traffic of the current clock period may be directly obtained from the bandwidth monitoring data stream, and stored after obtaining.
In step S15, a traffic difference between the previous continuous traffic and each previous period traffic is obtained, and a sum of the traffic difference and each current period traffic is obtained, so as to obtain a current continuous traffic of the bandwidth monitoring data stream.
And further obtaining the current continuous flow after obtaining the previous continuous flow, the previous period flow and the current period flow.
It is easy to understand that the current continuous flow rate and the previous continuous flow rate can be divided into three parts, which are:
1. the current continuous flow and the previous continuous flow both contain the common flow of the common clock period, namely the sum of the flow of the common clock period of the current preset time window and the previous preset time window;
2. only the portion of the previous continuous flow rate, i.e., the flow rate of each previous cycle of each previous non-common clock cycle within the previous predetermined time window;
3. only the fraction of the current continuous traffic size, i.e., each current cycle traffic size of each current non-common clock cycle within the current predetermined time window, is included.
It can be seen that the current continuous flow is obtained by subtracting the previous period flow from the previous continuous flow and adding the current period flow. Therefore, after the three numerical values are obtained, the current continuous flow can be obtained only by simple calculation.
It can be seen that, in the bandwidth monitoring method provided in the embodiment of the present application, the relationship between the current traffic size and the previous traffic size is fully utilized, and the related value is obtained on the basis of the previous traffic size to calculate the current traffic size information, so that repeated reading and calculation of the common period traffic size are avoided, the calculation efficiency is improved, and the current continuous traffic size can be calculated more quickly.
In one embodiment, each previous cycle flow size and each current cycle flow size may be stored in a first-in-first-out memory that is pre-configured such that the initial write pointer is larger than the initial read pointer, and the predetermined address difference between the initial write pointer and the initial read pointer is equal to the size of the current predetermined time window.
Of course, in the bandwidth monitoring method for obtaining the traffic size by extracting the traffic size information in the bandwidth monitoring data stream, the traffic size information may also be stored in the first-in first-out memory. In some embodiments, please refer to fig. 7 for specific circuits, and fig. 7 is a circuit diagram illustrating a bandwidth monitoring method according to an embodiment of the present disclosure.
As shown in fig. 7, the bandwidth monitoring circuit of the bandwidth monitoring method provided in the embodiment of the present application may include an extractor 210, a first-in first-out memory 220, a counter 230, and a bandwidth monitor 240. The extractor 210 extracts the current traffic size information from the data stream and transfers the current traffic size information to the fifo 220 and the counter 230; the fifo 220 writes the traffic size information into the memory space pointed to by the write pointer; the fifo 220 reads the traffic size information pointed by the read pointer out of the counter 230; the counter 230 accumulates according to the traffic size information transmitted from the extractor 210, performs an accumulation operation according to the traffic size information read by the fifo 220, and transmits a count value to the bandwidth monitor 240; the bandwidth monitor 240 performs bandwidth calculation and subsequent processing based on the accumulated value read from the counter.
It is noted that, after the fifo 220 is initialized, the initial write pointer is configured by software to point to a predetermined address, and the address difference between the address and the zero address pointed by the initial read pointer is equal to the size of the current predetermined time window.
Thus, in each clock cycle, the extractor 210 extracts traffic size information from the bandwidth monitoring data stream, and the read pointer and the write pointer point to the next address after performing one read and write operation, because the traffic size information read by the read pointer is subtracted from the counter, the count value of the counter 230 is the traffic size information of the address between the read pointer and the write pointer, and because the address difference between the read pointer and the write pointer is equal to the size of the current predetermined time window, the count value of the counter 230 is the current continuous traffic size of the current predetermined time window. The bandwidth monitor reads the current continuous traffic size in the counter 230 to obtain the bandwidth of the current predetermined time window.
Of course, the acquisition of the bandwidth when the number of previous non-common clock cycles and the number of current non-common clock cycles are not 1 can be achieved by adjusting the timing of the bandwidth monitor 240 reading the continuous traffic in the counter 230.
Of course, the bandwidth monitoring for different data streams can be realized by setting a plurality of counters and a plurality of first-in first-out memories.
Therefore, the bandwidth monitoring method provided by the embodiment of the application is realized by changing the bandwidth monitoring circuit by using the first-in first-out memory, so that the efficiency of bandwidth monitoring can be further accelerated, the running cost of software is reduced, the error probability is reduced, and the safety of bandwidth monitoring is ensured.
In order to solve the foregoing technical problem, an embodiment of the present application further provides a bandwidth monitoring apparatus, which may be regarded as a functional module that is required to be set to implement the data processing method provided in the embodiment of the present application. The contents of the apparatus described herein are referred to in correspondence with the contents of the method described above.
Fig. 8 is a block diagram of a bandwidth monitoring apparatus according to an embodiment of the present application. The device can be applied to the bandwidth monitoring method provided by the embodiment of the application. Referring to fig. 8, a bandwidth monitoring apparatus provided in an embodiment of the present application may include:
a current continuous traffic obtaining module 810, adapted to obtain a traffic of a bandwidth monitoring data stream within a current predetermined time window, to obtain a current continuous traffic of the bandwidth monitoring data stream, where the current predetermined time window and a previous predetermined time window include at least one common clock cycle;
a bandwidth obtaining module 820, adapted to obtain the bandwidth of the bandwidth monitoring data stream according to the current continuous traffic size and the current predetermined time window.
Therefore, the bandwidth monitoring device provided in the embodiment of the present application, where the current predetermined time window includes at least one common clock cycle with the previous predetermined time window, has continuity between the traffic of the current predetermined time window and the traffic of the previous predetermined time window, which is equivalent to letting the bandwidth monitoring data stream pass through the unique fixed time window, counting the traffic in the fixed time window and calculating the bandwidth, thereby improving the continuity of bandwidth monitoring on the bandwidth monitoring data stream; meanwhile, due to the improvement of the continuity of the bandwidth monitoring, the smoothness of the bandwidth monitoring can be enhanced when the bandwidth is visually presented; furthermore, the number of each current preset time window and the frequency of acquiring the bandwidth can be increased based on the flow of the overlapped common clock period, so that bandwidth monitoring errors caused by the fact that the bandwidth is acquired based on the flow of each independent preset time window due to independent division of the preset time windows are prevented, and the accuracy of bandwidth monitoring is improved; finally, after the bandwidth is obtained every time, under the condition that a preset time window is not enough, the bandwidth of the next current preset time window can be obtained, the fact that the bandwidth does not meet the preset bandwidth threshold value can be found more quickly, and the alarm delay can be shortened.
In some embodiments, the module 810 for obtaining a current continuous traffic size is adapted to obtain a traffic size of a bandwidth monitoring data stream within a current predetermined time window, and obtain the current continuous traffic size of the bandwidth monitoring data stream, including:
acquiring the current period flow of each clock period of the bandwidth monitoring data stream in the current preset time window;
and obtaining the sum of the flow of the current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
In some embodiments, the module 810 for obtaining a current continuous traffic size is adapted to obtain a current periodic traffic size of each clock cycle of the bandwidth monitoring data stream in the current predetermined time window, and includes:
extracting and storing the traffic size information of the current clock period from the bandwidth monitoring data stream to obtain the traffic size of the current clock period;
and acquiring the stored traffic size information of each early clock cycle in the current preset time window to obtain the traffic size of each early clock cycle, wherein the early clock cycle comprises each clock cycle which is earlier than the current clock cycle in the current preset time window.
In some embodiments, the module 810 for obtaining a current continuous traffic size is adapted to obtain a traffic size of a bandwidth monitoring data stream within a current predetermined time window, and obtain the current continuous traffic size of the bandwidth monitoring data stream, including:
acquiring the previous continuous flow of the bandwidth monitoring data stream in the previous preset time window;
acquiring the flow of each previous cycle of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous preset time window, and acquiring the flow of each current cycle of each current non-common clock cycle of the bandwidth monitoring data stream in the current preset time window;
and acquiring the flow difference between the previous continuous flow and each previous period flow, and acquiring the sum of the flow difference and each current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
In some embodiments, the number of previous non-common clock cycles and the number of current non-common clock cycles are both 1.
In some embodiments, the current continuous traffic obtaining module 810 is adapted to obtain a previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous predetermined time window, and obtain a current period traffic of each current non-common clock cycle of the bandwidth monitoring data stream in the current predetermined time window, and includes:
acquiring pre-stored previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream within the previous preset time window, wherein the previous period traffic is acquired and stored in each corresponding previous clock cycle of the previous preset time window;
and acquiring the current period flow of each current non-common clock period of the bandwidth monitoring data stream in a current preset time window, and acquiring and storing the current period flow in each corresponding current non-common clock period of the current preset time window.
In some embodiments, the previous continuous traffic size is stored in a counter.
In some embodiments, each of the previous cycle traffic sizes and each of the current cycle traffic sizes are stored in a first-in-first-out memory that is preconfigured with an initial write pointer that is larger than an initial read pointer, and a predetermined address difference between the initial write pointer and the initial read pointer is equal to a size of the current predetermined time window.
In some embodiments, further comprising:
and a visual display module 830 adapted to visually display the bandwidth.
In some embodiments, further comprising:
the alarm module 840 is adapted to alarm when the bandwidth is greater than a preset maximum bandwidth value or less than a preset minimum bandwidth value.
To solve the foregoing technical problem, an embodiment of the present invention further provides a bandwidth monitoring circuit, as shown in fig. 7, the bandwidth monitoring circuit may include:
an extractor 210 adapted to extract traffic size information of a current clock cycle from the bandwidth monitoring data stream;
a current continuous traffic size acquirer 220, adapted to acquire a traffic size of a bandwidth monitoring data stream within a current predetermined time window to obtain a current continuous traffic size of the bandwidth monitoring data stream, where the current predetermined time window and a previous predetermined time window include at least one common clock cycle;
and a bandwidth monitor 230, adapted to obtain the bandwidth of the bandwidth monitoring data stream according to the current continuous traffic size and the current predetermined time window.
Therefore, the bandwidth monitoring circuit provided by the embodiment of the application has continuity between the flow of the current predetermined time window and the flow of the previous predetermined time window, which is equivalent to passing a bandwidth monitoring data stream through a unique fixed time window, counting the flow in the fixed time window and calculating the bandwidth, thereby improving the continuity of bandwidth monitoring on the bandwidth monitoring data stream; meanwhile, due to the improvement of the continuity of the bandwidth monitoring, the smoothness of the bandwidth monitoring can be enhanced when the bandwidth is visually presented; furthermore, the number of each current preset time window and the frequency of acquiring the bandwidth can be increased based on the flow of the overlapped common clock cycle, so that the bandwidth monitoring error caused by acquiring the bandwidth based on the flow of each independent preset time window due to independent division of the preset time windows is prevented, and the accuracy of bandwidth monitoring is improved; finally, after the bandwidth is acquired every time, the bandwidth of the next current scheduled time window can be acquired under the condition that a scheduled time window is not enough, the bandwidth can be found to be not satisfied with the preset bandwidth threshold more quickly, and the alarm delay can be shortened.
In some embodiments, the current continuous traffic size obtainer 220 includes:
a fifo 221, preconfigured to have an initial write pointer greater than an initial read pointer, and a difference between predetermined addresses of the initial write pointer and the initial read pointer is equal to a current predetermined time window size, and adapted to store the traffic size information of the current clock cycle received from the extractor.
A counter 222 adapted to perform an accumulation operation according to the traffic size information received from the extractor and to perform a subtraction operation according to the traffic size information received from the first-in first-out memory.
The embodiment of the present application further provides an electronic device, which may include the bandwidth monitoring apparatus provided in the embodiment of the present application.
Therefore, in the electronic device provided in the embodiment of the present application, the current predetermined time window includes at least one common clock cycle with the previous predetermined time window, so that continuity exists between the traffic of the current predetermined time window and the traffic of the previous predetermined time window, which is equivalent to letting the bandwidth monitoring data stream pass through the unique fixed time window, counting the traffic in the fixed time window and calculating the bandwidth, thereby improving the continuity of bandwidth monitoring on the bandwidth monitoring data stream; meanwhile, because the continuity of bandwidth monitoring is improved, the smoothness of bandwidth monitoring can be enhanced when the bandwidth is visually presented; furthermore, the number of each current preset time window and the frequency of acquiring the bandwidth can be increased based on the flow of the overlapped common clock period, so that bandwidth monitoring errors caused by the fact that the bandwidth is acquired based on the flow of each independent preset time window due to independent division of the preset time windows are prevented, and the accuracy of bandwidth monitoring is improved; finally, after the bandwidth is acquired every time, the bandwidth of the next current scheduled time window can be acquired under the condition that a scheduled time window is not enough, the bandwidth can be found to be not satisfied with the preset bandwidth threshold more quickly, and the alarm delay can be shortened.
While various embodiments have been described above in connection with what are presently considered to be the embodiments of the disclosure, the various alternatives described in the various embodiments can be readily combined and cross-referenced without conflict to extend the variety of possible embodiments that can be considered to be the disclosed and disclosed embodiments of the disclosure.
Although the embodiments of the present application are disclosed above, the present application is not limited thereto. Various changes and modifications may be effected therein by one of ordinary skill in the pertinent art without departing from the scope or spirit of the present disclosure, and it is intended that the scope of the present disclosure be defined by the appended claims.

Claims (23)

1. A method for bandwidth monitoring, comprising:
acquiring the flow of a bandwidth monitoring data stream in a current preset time window to obtain the current continuous flow of the bandwidth monitoring data stream, wherein the current preset time window and a previous preset time window comprise at least one common clock period;
and acquiring the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window.
2. The method for monitoring bandwidth according to claim 1, wherein the step of obtaining the current continuous traffic of the bandwidth monitoring data stream according to the traffic of the bandwidth monitoring data stream within the current predetermined time window comprises:
acquiring the current period flow of each clock period of the bandwidth monitoring data stream in the current preset time window;
and obtaining the sum of the flow of the current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
3. The method of claim 2, wherein the step of obtaining the current period traffic size of each clock cycle of the bandwidth monitoring data stream within the current predetermined time window comprises:
extracting and storing the traffic size information of the current clock period from the bandwidth monitoring data stream to obtain the traffic size of the current clock period;
and acquiring the stored traffic size information of each early clock cycle in the current preset time window to obtain the traffic size of each early clock cycle, wherein the early clock cycle comprises each clock cycle which is earlier than the current clock cycle in the current preset time window.
4. The method for monitoring bandwidth as claimed in claim 1, wherein the step of obtaining the current continuous traffic of the bandwidth monitoring data stream by obtaining the traffic of the bandwidth monitoring data stream within the current predetermined time window comprises:
acquiring the previous continuous flow of the bandwidth monitoring data stream in the previous preset time window;
acquiring the flow of each previous cycle of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous preset time window, and acquiring the flow of each current cycle of each current non-common clock cycle of the bandwidth monitoring data stream in the current preset time window;
and acquiring the flow difference between the previous continuous flow and each previous period flow, and acquiring the sum of the flow difference and each current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
5. The method of claim 4, wherein the number of previous non-common clock cycles and the number of current non-common clock cycles are each 1.
6. The method of claim 4, wherein the step of obtaining the previous period traffic size of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous predetermined time window and obtaining the current period traffic size of each current non-common clock cycle of the bandwidth monitoring data stream in the current predetermined time window comprises:
acquiring pre-stored previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream within the previous preset time window, wherein the previous period traffic is acquired and stored in each corresponding previous clock cycle of the previous preset time window;
and obtaining and storing the current period flow of each current non-common clock period of the bandwidth monitoring data stream in a current preset time window, wherein the flow of each current period is obtained and stored in each corresponding current non-common clock period of the current preset time window.
7. The method of bandwidth monitoring according to claim 6, wherein the previous continuous traffic size is stored in a counter.
8. The method of bandwidth monitoring according to claim 7, wherein each of the previous cycle traffic sizes and each of the current cycle traffic sizes are stored in a first-in-first-out memory, the first-in-first-out memory is pre-configured such that an initial write pointer is larger than an initial read pointer, and a predetermined address difference between the initial write pointer and the initial read pointer is equal to a size of the current predetermined time window.
9. The bandwidth monitoring method of any one of claims 1-8, further comprising:
and visually displaying the bandwidth.
10. The bandwidth monitoring method of any one of claims 1-8, further comprising:
and when the bandwidth is larger than a preset maximum bandwidth value or smaller than a preset minimum bandwidth value, alarming.
11. A bandwidth monitoring device, comprising:
a current continuous traffic size obtaining module, adapted to obtain a traffic size of a bandwidth monitoring data stream within a current predetermined time window, to obtain a current continuous traffic size of the bandwidth monitoring data stream, where the current predetermined time window and a previous predetermined time window include at least one common clock cycle;
and the bandwidth obtaining module is suitable for obtaining the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window.
12. The apparatus for bandwidth monitoring according to claim 11, wherein the module for obtaining the current continuous traffic size is adapted to obtain the traffic size of the bandwidth monitoring data stream within the current predetermined time window, and obtain the current continuous traffic size of the bandwidth monitoring data stream, including:
acquiring the current period flow of each clock period of the bandwidth monitoring data stream in the current preset time window;
and obtaining the sum of the flow of the current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
13. The apparatus for bandwidth monitoring according to claim 12, wherein the means for obtaining the current continuous traffic size is adapted to obtain the current periodic traffic size of each clock cycle of the bandwidth monitoring data stream in the current predetermined time window, and comprises:
extracting and storing the traffic size information of the current clock period from the bandwidth monitoring data stream to obtain the traffic size of the current clock period;
and acquiring the stored traffic size information of each early clock cycle in the current preset time window to obtain the traffic size of each early clock cycle, wherein the early clock cycle comprises each clock cycle which is earlier than the current clock cycle in the current preset time window.
14. The apparatus for bandwidth monitoring according to claim 11, wherein the module for obtaining the current continuous traffic size is adapted to obtain the traffic size of the bandwidth monitoring data stream within the current predetermined time window, and obtain the current continuous traffic size of the bandwidth monitoring data stream, including:
acquiring the previous continuous flow of the bandwidth monitoring data stream in the previous preset time window;
acquiring the flow of each previous cycle of each previous non-common clock cycle of the bandwidth monitoring data stream in the previous preset time window, and acquiring the flow of each current cycle of each current non-common clock cycle of the bandwidth monitoring data stream in the current preset time window;
and acquiring the flow difference between the previous continuous flow and each previous period flow, and acquiring the sum of the flow difference and each current period flow to obtain the current continuous flow of the bandwidth monitoring data flow.
15. The bandwidth monitoring device of claim 14, wherein the number of previous non-common clock cycles and the number of current non-common clock cycles are each 1.
16. The apparatus for bandwidth monitoring according to claim 14, wherein the means for obtaining the current continuous traffic size is adapted to obtain a previous period traffic size of each previous non-common clock cycle of the bandwidth monitoring data flow in the previous predetermined time window, and obtain a current period traffic size of each current non-common clock cycle of the bandwidth monitoring data flow in the current predetermined time window, and comprises:
acquiring pre-stored previous period traffic of each previous non-common clock cycle of the bandwidth monitoring data stream within the previous preset time window, wherein the previous period traffic is acquired and stored in each corresponding previous clock cycle of the previous preset time window;
and obtaining and storing the current period flow of each current non-common clock period of the bandwidth monitoring data stream in a current preset time window, wherein the flow of each current period is obtained and stored in each corresponding current non-common clock period of the current preset time window.
17. The bandwidth monitoring device of claim 16, wherein the previous continuous traffic size is stored in a counter.
18. The bandwidth monitoring device of claim 17, wherein each of the previous cycle traffic sizes and each of the current cycle traffic sizes are stored in a first-in-first-out memory that is preconfigured with an initial write pointer that is larger than an initial read pointer, and wherein the predetermined address difference between the initial write pointer and the initial read pointer is equal to the size of the current predetermined time window.
19. The bandwidth monitoring device of any one of claims 11-18, further comprising:
and the visual display module is suitable for visually displaying the bandwidth.
20. The bandwidth monitoring device of any one of claims 11-18, further comprising:
and the alarm module is suitable for giving an alarm when the bandwidth is larger than a preset maximum bandwidth value or smaller than a preset minimum bandwidth value.
21. A bandwidth monitoring circuit, comprising:
the extractor is suitable for extracting the flow size information of the current clock period from the bandwidth monitoring data stream;
a current continuous flow size acquirer, adapted to acquire a flow size of a bandwidth monitoring data flow within a current predetermined time window to obtain a current continuous flow size of the bandwidth monitoring data flow, where the current predetermined time window and a previous predetermined time window include at least one common clock cycle;
and the bandwidth monitor is suitable for acquiring the bandwidth of the bandwidth monitoring data stream according to the current continuous flow and the current preset time window.
22. The bandwidth monitoring circuit of claim 21, wherein the current continuous traffic size obtainer comprises:
a first-in first-out memory, which is configured in advance that an initial write pointer is larger than an initial read pointer, and the difference between the predetermined addresses of the initial write pointer and the initial read pointer is equal to the size of the current predetermined time window, and is suitable for storing the flow size information of the current clock cycle received from the extractor;
a counter adapted to perform an accumulation operation according to the traffic size information received from the extractor and to perform an accumulation operation according to the traffic size information received from the first-in first-out memory.
23. An electronic device comprising a bandwidth monitoring apparatus according to any one of claims 11 to 20 or a bandwidth monitoring circuit according to claim 21 or 22.
CN202210617463.7A 2022-06-01 2022-06-01 Bandwidth monitoring method, device, circuit and electronic equipment Active CN115022212B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210617463.7A CN115022212B (en) 2022-06-01 2022-06-01 Bandwidth monitoring method, device, circuit and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210617463.7A CN115022212B (en) 2022-06-01 2022-06-01 Bandwidth monitoring method, device, circuit and electronic equipment

Publications (2)

Publication Number Publication Date
CN115022212A true CN115022212A (en) 2022-09-06
CN115022212B CN115022212B (en) 2024-04-16

Family

ID=83073474

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210617463.7A Active CN115022212B (en) 2022-06-01 2022-06-01 Bandwidth monitoring method, device, circuit and electronic equipment

Country Status (1)

Country Link
CN (1) CN115022212B (en)

Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000016526A (en) * 1998-12-10 2000-03-25 포만 제프리 엘 Method for determining the used bandwidth on a connection and a bandwidth determination means
US6772217B1 (en) * 2000-08-23 2004-08-03 International Business Machines Corporation Internet backbone bandwidth enhancement by initiating an additional data stream when individual bandwidth are approximately equal to the backbone limit
EP2280503A2 (en) * 2009-07-28 2011-02-02 Diehl BGT Defence GmbH & Co.KG Method for wireless transmission of information composed of data packets
CN102130915A (en) * 2005-02-15 2011-07-20 思科技术公司 Clock-based replay protection
US20120331187A1 (en) * 2011-06-24 2012-12-27 Kun Xu Bandwidth control for a direct memory access unit within a data processing system
US8839051B1 (en) * 2011-02-25 2014-09-16 Sk Hynix Memory Solutions Inc. Advance clocking scheme for ECC in storage
US20160072723A1 (en) * 2014-09-09 2016-03-10 Vmware, Inc. Method and system for determining bandwidth demand
CN106603210A (en) * 2015-10-19 2017-04-26 上海朗帛通信技术有限公司 Scheduling method and device for narrow-band transmission
CN108270647A (en) * 2018-01-24 2018-07-10 北京奇艺世纪科技有限公司 A kind of bandwidth calculation method and device
CN108462647A (en) * 2018-01-31 2018-08-28 青岛海信宽带多媒体技术有限公司 bandwidth adjusting method and gateway
US20190011586A1 (en) * 2015-12-29 2019-01-10 Westerngeco Llc Data-Driven Clock Drift Adjustment
CN111930578A (en) * 2020-07-14 2020-11-13 杭州电子科技大学 Onboard DDR (double data Rate) bandwidth testing method and system based on FPGA (field programmable Gate array)
CN112154503A (en) * 2018-05-31 2020-12-29 辛纳普蒂克斯公司 Low power, high bandwidth, low latency data bus
CN112187870A (en) * 2020-09-04 2021-01-05 网宿科技股份有限公司 Bandwidth smoothing method and device
CN113852789A (en) * 2021-09-09 2021-12-28 广州瀚信通信科技股份有限公司 Monitoring system, method and device based on 5G mobile communication

Patent Citations (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20000016526A (en) * 1998-12-10 2000-03-25 포만 제프리 엘 Method for determining the used bandwidth on a connection and a bandwidth determination means
US6772217B1 (en) * 2000-08-23 2004-08-03 International Business Machines Corporation Internet backbone bandwidth enhancement by initiating an additional data stream when individual bandwidth are approximately equal to the backbone limit
CN102130915A (en) * 2005-02-15 2011-07-20 思科技术公司 Clock-based replay protection
EP2280503A2 (en) * 2009-07-28 2011-02-02 Diehl BGT Defence GmbH & Co.KG Method for wireless transmission of information composed of data packets
US8839051B1 (en) * 2011-02-25 2014-09-16 Sk Hynix Memory Solutions Inc. Advance clocking scheme for ECC in storage
US20120331187A1 (en) * 2011-06-24 2012-12-27 Kun Xu Bandwidth control for a direct memory access unit within a data processing system
US20160072723A1 (en) * 2014-09-09 2016-03-10 Vmware, Inc. Method and system for determining bandwidth demand
CN106603210A (en) * 2015-10-19 2017-04-26 上海朗帛通信技术有限公司 Scheduling method and device for narrow-band transmission
US20190011586A1 (en) * 2015-12-29 2019-01-10 Westerngeco Llc Data-Driven Clock Drift Adjustment
CN108270647A (en) * 2018-01-24 2018-07-10 北京奇艺世纪科技有限公司 A kind of bandwidth calculation method and device
CN108462647A (en) * 2018-01-31 2018-08-28 青岛海信宽带多媒体技术有限公司 bandwidth adjusting method and gateway
CN112154503A (en) * 2018-05-31 2020-12-29 辛纳普蒂克斯公司 Low power, high bandwidth, low latency data bus
CN111930578A (en) * 2020-07-14 2020-11-13 杭州电子科技大学 Onboard DDR (double data Rate) bandwidth testing method and system based on FPGA (field programmable Gate array)
CN112187870A (en) * 2020-09-04 2021-01-05 网宿科技股份有限公司 Bandwidth smoothing method and device
CN113852789A (en) * 2021-09-09 2021-12-28 广州瀚信通信科技股份有限公司 Monitoring system, method and device based on 5G mobile communication

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
"计算机学报第30卷总目次", 计算机学报, no. 12, 15 December 2007 (2007-12-15) *
于存谦;唐明珠;何荣希;: "TWDM-PON中时延约束节能动态波长带宽分配算法", 通信学报, no. 09, 25 September 2018 (2018-09-25) *
尚研峰;黄玉清;陈馨;: "分段计算密度的瓶颈带宽测量方法", 计算机工程与设计, no. 15 *
隽志才, 孙剑: "基于保守时间窗的交通分布式仿真同步算法研究与实现", 公路交通科技, no. 06 *

Also Published As

Publication number Publication date
CN115022212B (en) 2024-04-16

Similar Documents

Publication Publication Date Title
CN110912784B (en) Ethernet bus network test equipment
WO2020238065A1 (en) Media file downloading method and apparatus, and terminal and medium
CN111177201B (en) Data stream processing method and related device
CN105897501A (en) Data monitoring method and device
CN109428786B (en) Network performance monitoring method and device and computer readable storage medium
CN112491652A (en) Network flow sample processing method and device for testing
CN108712299A (en) A kind of method, apparatus, equipment and the computer storage media of monitoring live streaming delay
CN114020511A (en) FPGA-based fault detection method, device, equipment and readable storage medium
CN110636283A (en) Video transmission test method and device and terminal equipment
CN115022212A (en) Bandwidth monitoring method, device, circuit and electronic equipment
CN107566794A (en) A kind of processing method of video data, system and terminal device
US8452910B1 (en) Capture of USB packets into separate USB protocol streams based on different USB protocol specifications
CN117130851B (en) High-performance computing cluster operation efficiency evaluation method and system
CN110248205B (en) Method and device for packing video recording data
CN104219102B (en) A kind of methods, devices and systems of network data compression statistics
CN106487608B (en) The method and apparatus for measuring distal end timestamp unit
CN114189480A (en) Flow sampling method and device, electronic equipment and medium
CN113760989A (en) Method, device and equipment for processing unbounded stream data and storage medium
CN113242151A (en) Specific data extraction method and system based on massive network data
CN118138503A (en) Industrial control network visualization and anomaly detection method, electronic equipment and medium based on programmable switch
CN111111211A (en) Method, device, system, equipment and storage medium for reporting game data
CN114124754B (en) Method for processing media data packets in a multimedia network and related products
EP2110750B1 (en) Data access tracing
EP4198803A1 (en) Fault processing method and apparatus, network device and storage medium
WO2023174346A1 (en) Collision detection method, electronic device, and computer readable medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant