CN104219157A - Determining method and determining equipment for counting time intervals - Google Patents

Determining method and determining equipment for counting time intervals Download PDF

Info

Publication number
CN104219157A
CN104219157A CN201410380854.7A CN201410380854A CN104219157A CN 104219157 A CN104219157 A CN 104219157A CN 201410380854 A CN201410380854 A CN 201410380854A CN 104219157 A CN104219157 A CN 104219157A
Authority
CN
China
Prior art keywords
time interval
statistics
statistics time
message matching
current time
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
CN201410380854.7A
Other languages
Chinese (zh)
Other versions
CN104219157B (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.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies 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 Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201410380854.7A priority Critical patent/CN104219157B/en
Publication of CN104219157A publication Critical patent/CN104219157A/en
Application granted granted Critical
Publication of CN104219157B publication Critical patent/CN104219157B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention discloses a determining method and determining equipment for counting time intervals. The method comprises the following steps of determining first message matching frequency information and second message matching frequency information by using network equipment; calculating a difference value between the first message matching frequency information and the second message matching frequency information and judging whether the absolute value of the difference value is greater than a preset numerical value or not by using the network equipment; reducing a first counted time interval before current time by using the network equipment if the absolute value of the difference value is greater than the preset numerical value; and determining the counted time interval of the current time by using the reduced counted time interval. In an embodiment, the counted time interval of the current time can be dynamically adjusted by the network equipment, so that the reasonable counted time interval can be set.

Description

A kind of determination method and apparatus of statistics time interval
Technical field
The present invention relates to communication technical field, especially a kind of determination method and apparatus of statistics time interval.
Background technology
OpenFlow is define in SDN (Software Defined Network, software defined network) framework one communication interface standard between controller and forwarding.The thought of OpenFlow is separated control plane and datum plane, uses the protocol communication of standard therebetween.In OpenFlow network, comprise the network equipment (as OpenFlow Switch) and controller (as OpenFlow Controller), and by OpenFlow tunneling traffic between the network equipment and controller.Wherein, controller is used for according to the configuration of user or the protocol generation stream table (Flow Table) of dynamic operation, and stream table is sent to the network equipment.The network equipment for receiving the stream table of self-controller, and mates according to stream table and processes message.
Controller, when issuing stream table to the network equipment, can comprise one or more stream list item in stream table, and each stream list item comprises match options field, counter field and Timer field.Wherein, match options field comprises object MAC (Media Access Control), medium access control) content such as address, object IP address.The initial value of counter field is 0, and when matching message, the numerical value of counter field adds 1 at every turn.The initial value of Timer field is list item time-to-live maximum, and when the timer expires (when namely the value of Timer field is reduced to 0), the stream list item that this Timer field is corresponding needs deleted.
The network equipment is when receiving the stream table that controller issues, at CPU (Central Processing Unit, central processing unit) and hardware forwarding chip on each safeguard a stream table, on CPU and hardware forwarding chip, safeguard stream table a as shown in table 1 for the network equipment respectively.After the hardware forwarding chip of the network equipment receives at every turn and carries target MAC (Media Access Control) address 1 and object IP address 1 message, the numerical value of the counter field in the stream list item 1 safeguard hardware forwarding chip adds 1.Further, the CPU of the network equipment obtains the numerical value of counter field from the stream list item of hardware forwarding chip according to statistics time interval (i.e. list item time-to-live maximum 1/5); If the numerical value of the counter field in the stream list item of hardware forwarding chip is greater than the numerical value of the counter field in the stream list item of CPU, then CPU upgrades the numerical value of the counter field in the stream list item of this CPU, and the value of the Timer field in the stream list item of CPU is updated to list item time-to-live maximum, and the value of the Timer field in the stream list item of hardware forwarding chip is updated to list item time-to-live maximum.
Table 1
Stream list item Target MAC (Media Access Control) address Object IP address Counter Timer field
Stream list item 1 Target MAC (Media Access Control) address 1 Object IP address 1 0 500s
Stream list item 2 Target MAC (Media Access Control) address 2 Object IP address 2 0 500s
In aforesaid way, statistics time interval is fixed time interval, and this statistics time interval is 1/5 of list item time-to-live maximum, and this statistics time interval can not change.When the CPU of the network equipment obtains the numerical value of counter field according to fixing statistics time interval (1/5 of list item time-to-live maximum) from the stream list item of hardware forwarding chip, if the list item time-to-live is excessive, the error of the time that stream list item can be caused deleted is very large.
Such as, at the stream table shown in time A Maintenance Table 1, hardware forwarding chip time A+1s receive carry target MAC (Media Access Control) address 1 and object IP address 1 message time, if hardware forwarding chip does not receive in the time period of (time A+1s) to (time A+501s) and carries target MAC (Media Access Control) address 1 and object IP address 1 message, then flowing the list item 1 actual deleted time should be time A+501s.But because CPU can obtain the numerical value of counter field when time A+100s from the stream list item of hardware forwarding chip, and upgrade the value of Timer field.Therefore, if hardware forwarding chip does not receive within (time A+501s) time period to (time A+600s) carry target MAC (Media Access Control) address 1 and object IP address 1 message, then the time of flowing list item 1 deleted is time A+600s.Obviously, the time of flowing list item 1 deleted has postponed 99s.Further, if hardware forwarding chip receives again and carries target MAC (Media Access Control) address 1 and object IP address 1 message within (time A+501s) time period to (time A+600s), then flowing list item 1 also can not be deleted at time A+600s, compared with the time (time A+501s) that stream list item 1 is actual deleted, the error of the time that stream list item is deleted is very large.
Summary of the invention
The embodiment of the present invention provides a kind of defining method of statistics time interval, and the method comprises the following steps:
The second message matching times information before the first message matching times information before network equipment determination current time in first statistics time interval and current time in second statistics time interval;
First message matching times information described in described network device computes and the difference between described second message matching times information, and judge whether the absolute value of described difference is greater than default value;
If the absolute value of described difference is greater than default value, then the described network equipment reduces by first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
The described network equipment reduces by first statistics time interval before current time, and utilizes the process of the statistics time interval of the statistics time interval determination current time after reducing, and specifically comprises:
Statistics time interval after described network device computes reduces is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information;
When the statistics time interval after described reduction is less than default first statistics time interval, the statistics time interval of described network equipment determination current time is described default first statistics time interval;
When the statistics time interval after described reduction is not less than default first statistics time interval, the statistics time interval of described network equipment determination current time is the statistics time interval after described reduction.
After the described network equipment judges whether the absolute value of described difference is greater than default value, described method comprises further: if the absolute value of described difference is not more than described default value, then the statistics time interval of described network equipment maintenance current time is first statistics time interval before current time.
After the described network equipment judges whether the absolute value of described difference is greater than default value, described method comprises further: if the absolute value of described difference is not more than described default value, message matching times information in a continuous N statistics time interval then before described network equipment determination current time, wherein, M be greater than 2 integer;
Difference between the second message matching times information before the first message matching times information before described network device computes current time in first statistics time interval and current time in second statistics time interval, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, the difference between the M message matching times information before calculating the first message matching times information and current time in M statistics time interval;
If the difference between the absolute value of any two differences in (M-1) the individual difference calculated is positioned between designation area, then the described network equipment improves first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after improving.
The described network equipment improves first statistics time interval before current time, and utilizes the process of the statistics time interval of the statistics time interval determination current time after improving, and specifically comprises:
Statistics time interval after described network device computes improves is: T+M/N*T; Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the value of M is not more than the value of N;
When the statistics time interval after described raising is greater than default second statistics time interval, the statistics time interval of described network equipment determination current time is described default second statistics time interval;
When the statistics time interval after described raising is not more than default second statistics time interval, the statistics time interval of described network equipment determination current time is the statistics time interval after described raising.
Message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.
The embodiment of the present invention provides a kind of network equipment, and the described network equipment specifically comprises:
First determination module, for the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before determining current time and current time;
Judge module, for calculating the difference between described first message matching times information and described second message matching times information, and judges whether the absolute value of described difference is greater than default value;
Second determination module, for when the absolute value of described difference is greater than default value, reduces by first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
Described second determination module, specifically for calculating the statistics time interval after reducing is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information; When the statistics time interval after described reduction is less than default first statistics time interval, determine that the statistics time interval of current time is described default first statistics time interval; When the statistics time interval after described reduction is not less than default first statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described reduction.
Described second determination module, also for when the absolute value of described difference is not more than described default value, the statistics time interval of maintenance current time is first statistics time interval before current time.
Described first determination module, also for when the absolute value of described difference is not more than described default value, the message matching times information in the continuous N statistics time interval before determining current time, wherein, M be greater than 2 integer;
Described second determination module, also for the difference between the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before calculating current time and current time, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, difference between M message matching times information before calculating the first message matching times information and current time in M statistics time interval,
If the difference between the absolute value of any two differences in (M-1) the individual difference calculated is positioned between designation area, then improve first statistics time interval before current time, and utilize the statistics time interval of the statistics time interval determination current time after improving.
Described second determination module, being further used for the statistics time interval after calculating raising is: T+M/N*T; Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the value of M is not more than the value of N; When the statistics time interval after described raising is greater than default second statistics time interval, determine that the statistics time interval of current time is described default second statistics time interval; When the statistics time interval after described raising is not more than default second statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described raising.
Message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.
Based on technique scheme, in the embodiment of the present invention, the network equipment can the statistics time interval of dynamic conditioning current time, and no longer statistics time interval is fixed on 1/5 of list item time-to-live maximum, thus can the most rational statistics time interval be set, the problem that when avoiding statistics time interval to arrange larger, the error of the time that the stream list item that causes is deleted is very large, and the problem such as the network equipment caused when avoiding statistics time interval to arrange less is busy, performance of network equipments is poor.Concrete, when the changes in flow rate of mating stream list item is comparatively stablized, the network equipment by suitable increase statistics time interval, to avoid the problems such as the network equipment is busy, performance of network equipments is poor; When the changes in flow rate amplitude of mating stream list item is larger, the network equipment, by suitable reduction statistics time interval, is not affecting on the basis of performance of network equipments as far as possible, reduces the error of stream list item deleted time, and the time that accurately stream list item is deleted.
Accompanying drawing explanation
Fig. 1 is the determination method flow schematic diagram of a kind of statistics time interval that the embodiment of the present invention provides;
Fig. 2 is the structural representation of a kind of network equipment that the embodiment of the present invention provides.
Embodiment
For problems of the prior art, the embodiment of the present invention provides a kind of defining method of statistics time interval, and the method is applied to and comprises in the OpenFlow network of the network equipment and controller.The network equipment is after the stream table shown in time A Maintenance Table 1, and the network equipment can obtain the numerical value of counter field from the stream list item of hardware forwarding chip according to statistics time interval, and the numerical value of counter field is message matching times.Based on this, in the embodiment of the present invention, when the network equipment obtains message matching times according to statistics time interval at every turn from the stream list item of hardware forwarding chip, all can record this statistics time interval and this message matching times.Such as, for same flow list item, the statistics time interval of first record is A1, and message matching times is B1; The statistics time interval of second time record is A2, and message matching times is B2; Third time, the statistics time interval of record was A3, and message matching times is B3; The statistics time interval of the 4th record is A4, and message matching times is B4, by that analogy.Suppose that current time is recorded to A4 and B4, then: as shown in Figure 1, the defining method of this statistics time interval specifically can comprise the following steps:
Step 101, the second message matching times information before the first message matching times information before network equipment determination current time in first statistics time interval and current time in second statistics time interval.Wherein, the message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.In actual applications, message matching times information in statistics time interval can also be on average every two seconds message matching times corresponding to the message matching times that obtains in statistics time interval, the on average every three seconds message matching times that the message matching times obtained in statistics time interval is corresponding, repeat no longer in detail to this.
Such as, suppose the network equipment is recorded to A4 and B4, before current time, first statistics time interval is A4, and the first message matching times information in first statistics time interval is B4/A4 (the message matching times average per second that the message matching times obtained in statistics time interval is corresponding); Further, before current time, second statistics time interval is A3, and the second message matching times information in second statistics time interval is B3/A3.
Step 102, the difference between network device computes first message matching times information and the second message matching times information, and judge whether the absolute value of difference is greater than default value; If so, step 103 is performed.
In the embodiment of the present invention, default value can be arranged according to practical experience.When the absolute value of the difference between the first message matching times information and the second message matching times information is greater than this default value, represent that the changes in flow rate amplitude of coupling stream list item is larger, now need suitable reduction statistics time interval, do not affecting on the basis of performance of network equipments as far as possible, reduce the error of stream list item deleted time, and the time that accurately stream list item is deleted.When the absolute value of the difference between the first message matching times information and the second message matching times information is not more than this default value, represent that the changes in flow rate of coupling stream list item is more stable, the increase statistics time interval that statistics time interval is constant or suitable can be kept, to avoid the problems such as the network equipment is busy, performance of network equipments is poor.
Such as, whether the absolute value of the difference between network device computes B4/A4 and B3/A3 is greater than default value, if so, then performs step 103.
Step 103, the network equipment reduces by first statistics time interval (as A4) before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
In the embodiment of the present invention, the network equipment reduces by first statistics time interval before current time, and utilize the process of the statistics time interval of the statistics time interval determination current time after reducing, specifically include but not limited to as under type: the statistics time interval after network device computes reduces is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information; Further, when the statistics time interval after reducing is less than default first statistics time interval, then the statistics time interval of network equipment determination current time is for presetting the first statistics time interval; When the statistics time interval after reducing is not less than default first statistics time interval, then the statistics time interval of network equipment determination current time is the statistics time interval after reducing.
Wherein, presetting the first statistics time interval is the minimum interval configured on network devices in advance, and the statistics time interval namely on the network equipment can not be less than this and preset the first statistics time interval.
Such as, the statistics time interval A5 ' after network device computes reduction is: A4-| (B4/A4-B3/A3) |/max (B4/A4, B3/A3) * A4.Further, when the statistics time interval A5 ' after reducing is less than default first statistics time interval, then the statistics time interval A5 of network equipment determination current time is for presetting the first statistics time interval; When the statistics time interval A5 ' after reducing is not less than default first statistics time interval, then the statistics time interval A5 of network equipment determination current time is the statistics time interval A5 ' after reducing.
In a kind of specific implementation of the embodiment of the present invention, after the network equipment judges whether the absolute value of difference is greater than default value, if the absolute value of difference is not more than this default value, then the statistics time interval of network equipment maintenance current time is first statistics time interval before current time.Such as, when the absolute value of the difference between B4/A4 and B3/A3 is not more than default value, then the statistics time interval A5 of network equipment maintenance current time is first statistics time interval A4 before current time.
In the another kind of specific implementation of the embodiment of the present invention, after the network equipment judges whether the absolute value of difference is greater than default value, if the absolute value of difference is not more than this default value, message matching times information in a continuous N statistics time interval then before network equipment determination current time, wherein M be greater than 2 integer; If the comparative result between the message matching times information in a continuous N statistics time interval meets preset rules, then the network equipment improves first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after improving; If the comparative result between the message matching times information in a continuous N statistics time interval does not meet preset rules, then the statistics time interval of network equipment maintenance current time is first statistics time interval before current time.
Such as, the absolute value of the difference between B4/A4 and B3/A3 is not more than default value, and the comparative result between message matching times information in a continuous N statistics time interval is when meeting preset rules, the network equipment improves first statistics time interval (as A4) before current time, and utilizes the statistics time interval (as A5) of the statistics time interval determination current time after improving.
In the embodiment of the present invention, whether the comparative result between the message matching times information in a network equipment determination continuous N statistics time interval meets preset rules, specifically includes but not limited to as under type:
Difference between the second message matching times information before the first message matching times information before network device computes current time in first statistics time interval and current time in second statistics time interval, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, the difference between the M message matching times information before calculating the first message matching times information and current time in M statistics time interval.Afterwards, the network equipment judge any two differences in (M-1) the individual difference calculated absolute value between difference whether be positioned at (as-3 to 3) between designation area; If be positioned between designation area, the comparative result between the message matching times information in a network equipment determination continuous N statistics time interval meets preset rules; If be not positioned between designation area, the comparative result between the message matching times information in a network equipment determination continuous N statistics time interval does not meet preset rules.
Such as, when M is 4, when message matching times information in continuous 4 statistics time intervals before current time is followed successively by B4/A4, B3/A3, B2/A2, B1/A1, then: (M-1) individual difference that network device computes goes out is respectively B4/A4-B3/A3, B4/A4-B2/A2, B4/A4-B1/A1.Further, the network equipment judges | B4/A4-B3/A3| and | the difference of B4/A4-B2/A2|, | B4/A4-B3/A3| and | the difference of B4/A4-B1/A1|, | B4/A4-B2/A2| with | whether B4/A4-B1/A1| difference, be all positioned at (as-3 to 3) between designation area; If so, then determine that the comparative result between the message matching times information in a continuous N statistics time interval meets preset rules; If not, then determine that the comparative result between the message matching times information in a continuous N statistics time interval does not meet preset rules.
In the embodiment of the present invention, the network equipment improves first statistics time interval before current time, and utilize the process of the statistics time interval of the statistics time interval determination current time after improving, specifically include but not limited to as under type: the statistics time interval after network device computes improves is: T+M/N*T.Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the numerical value of N can be arranged according to practical experience, and as the quantity of statistics time interval being set to the network equipment records by N, and the value of M is not more than the value of N.Further, when the statistics time interval after improving is greater than default second statistics time interval, then the statistics time interval of network equipment determination current time is for presetting the second statistics time interval; When the statistics time interval after improving is not more than default second statistics time interval, then the statistics time interval of network equipment determination current time is the statistics time interval after improving.
Wherein, presetting the second statistics time interval is the maximum time interval configured on network devices in advance, and the statistics time interval namely on the network equipment can not be greater than this and preset the second statistics time interval.Further, the numerical value presetting the second statistics time interval needs the numerical value being greater than default first statistics time interval.
Such as, the statistics time interval A5 ' after network device computes raising is: A4+M/N*A4.Further, when the statistics time interval A5 ' after improving is greater than default second statistics time interval, then the network equipment can determine that the statistics time interval A5 of current time is for presetting the second statistics time interval; When the statistics time interval A5 ' after improving is not more than default second statistics time interval, then the network equipment can determine that the statistics time interval A5 of current time is the statistics time interval A5 ' after improving.
In the embodiment of the present invention, the network equipment is after the stream table shown in time A Maintenance Table 1, and primary statistics time interval and secondary statistics time interval can be initial interval, and this initial interval can be 1/5 of list item time-to-live maximum.From the statistics time interval of third time, by adopting the size of technique scheme Dynamic Acquisition statistics time interval, namely adopt the statistics time interval of above-mentioned handling process determination current time.Further, the network equipment is after the statistics time interval determining current time, the network equipment obtains message matching times by according to this statistics time interval from the stream list item of hardware forwarding chip, and the statistics time interval (as A5) recording current time on present networks equipment and the message matching times (as B5) got at the statistics time interval of current time.
Based on technique scheme, in the embodiment of the present invention, the network equipment can the statistics time interval of dynamic conditioning current time, and no longer statistics time interval is fixed on 1/5 of list item time-to-live maximum, thus can the most rational statistics time interval be set, the problem that when avoiding statistics time interval to arrange larger, the error of the time that the stream list item that causes is deleted is very large, and the problem such as the network equipment caused when avoiding statistics time interval to arrange less is busy, performance of network equipments is poor.Concrete, when the changes in flow rate of mating stream list item is comparatively stablized, the network equipment by suitable increase statistics time interval, to avoid the problems such as the network equipment is busy, performance of network equipments is poor; When the changes in flow rate amplitude of mating stream list item is larger, the network equipment, by suitable reduction statistics time interval, is not affecting on the basis of performance of network equipments as far as possible, reduces the error of stream list item deleted time, and the time that accurately stream list item is deleted.
Based on the inventive concept same with said method, additionally provide a kind of network equipment in the embodiment of the present invention, as shown in Figure 2, the described network equipment specifically comprises:
First determination module 11, for the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before determining current time and current time;
Judge module 12, for calculating the difference between described first message matching times information and described second message matching times information, and judges whether the absolute value of described difference is greater than default value;
Second determination module 13, for when the absolute value of described difference is greater than default value, reduces by first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
Described second determination module 13, specifically for calculating the statistics time interval after reducing is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information; When the statistics time interval after described reduction is less than default first statistics time interval, determine that the statistics time interval of current time is described default first statistics time interval; When the statistics time interval after described reduction is not less than default first statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described reduction.
Described second determination module 13, also for when the absolute value of described difference is not more than described default value, the statistics time interval of maintenance current time is first statistics time interval before current time.
Described first determination module 11, also for when the absolute value of described difference is not more than described default value, the message matching times information in the continuous N statistics time interval before determining current time, wherein M be greater than 2 integer;
Described second determination module 13, also for the difference between the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before calculating current time and current time, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, difference between M message matching times information before calculating the first message matching times information and current time in M statistics time interval,
If the difference between the absolute value of any two differences in (M-1) the individual difference calculated is positioned between designation area, then improve first statistics time interval before current time, and utilize the statistics time interval of the statistics time interval determination current time after improving.
Described second determination module 13, being further used for the statistics time interval after calculating raising is: T+M/N*T; Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the value of M is not more than the value of N; When the statistics time interval after described raising is greater than default second statistics time interval, determine that the statistics time interval of current time is described default second statistics time interval; When the statistics time interval after described raising is not more than default second statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described raising.
In the embodiment of the present invention, the message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.
Wherein, the modules of apparatus of the present invention can be integrated in one, and also can be separated deployment.Above-mentioned module can merge into a module, also can split into multiple submodule further.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required general hardware platform by software and realize, and can certainly pass through hardware, but in a lot of situation, the former is better execution mode.Based on such understanding, technical scheme of the present invention can embody with the form of software product the part that prior art contributes in essence in other words, this computer software product is stored in a storage medium, comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention.It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the module in accompanying drawing or flow process might not be that enforcement the present invention is necessary.It will be appreciated by those skilled in the art that the module in the device in embodiment can carry out being distributed in the device of embodiment according to embodiment description, also can carry out respective change and be arranged in the one or more devices being different from the present embodiment.The module of above-described embodiment can merge into a module, also can split into multiple submodule further.The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.Be only several specific embodiment of the present invention above, but the present invention is not limited thereto, the changes that any person skilled in the art can think of all should fall into protection scope of the present invention.

Claims (12)

1. a defining method for statistics time interval, is characterized in that, said method comprising the steps of:
The second message matching times information before the first message matching times information before network equipment determination current time in first statistics time interval and current time in second statistics time interval;
First message matching times information described in described network device computes and the difference between described second message matching times information, and judge whether the absolute value of described difference is greater than default value;
If the absolute value of described difference is greater than default value, then the described network equipment reduces by first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
2. the method for claim 1, is characterized in that,
The described network equipment reduces by first statistics time interval before current time, and utilizes the process of the statistics time interval of the statistics time interval determination current time after reducing, and specifically comprises:
Statistics time interval after described network device computes reduces is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information;
When the statistics time interval after described reduction is less than default first statistics time interval, the statistics time interval of described network equipment determination current time is described default first statistics time interval;
When the statistics time interval after described reduction is not less than default first statistics time interval, the statistics time interval of described network equipment determination current time is the statistics time interval after described reduction.
3. the method for claim 1, is characterized in that, after the described network equipment judges whether the absolute value of described difference is greater than default value, described method comprises further:
If the absolute value of described difference is not more than described default value, then the statistics time interval of described network equipment maintenance current time is first statistics time interval before current time.
4. the method for claim 1, is characterized in that, after the described network equipment judges whether the absolute value of described difference is greater than default value, described method comprises further:
If the absolute value of described difference is not more than described default value, then the message matching times information in the continuous N statistics time interval before described network equipment determination current time, wherein, M be greater than 2 integer;
Difference between the second message matching times information before the first message matching times information before described network device computes current time in first statistics time interval and current time in second statistics time interval, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, the difference between the M message matching times information before calculating the first message matching times information and current time in M statistics time interval;
If the difference between the absolute value of any two differences in (M-1) the individual difference calculated is positioned between designation area, then the described network equipment improves first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after improving.
5. method as claimed in claim 4, is characterized in that,
The described network equipment improves first statistics time interval before current time, and utilizes the process of the statistics time interval of the statistics time interval determination current time after improving, and specifically comprises:
Statistics time interval after described network device computes improves is: T+M/N*T; Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the value of M is not more than the value of N;
When the statistics time interval after described raising is greater than default second statistics time interval, the statistics time interval of described network equipment determination current time is described default second statistics time interval;
When the statistics time interval after described raising is not more than default second statistics time interval, the statistics time interval of described network equipment determination current time is the statistics time interval after described raising.
6. the method as described in any one of claim 1-5, is characterized in that,
Message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.
7. a network equipment, is characterized in that, the described network equipment specifically comprises:
First determination module, for the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before determining current time and current time;
Judge module, for calculating the difference between described first message matching times information and described second message matching times information, and judges whether the absolute value of described difference is greater than default value;
Second determination module, for when the absolute value of described difference is greater than default value, reduces by first statistics time interval before current time, and utilizes the statistics time interval of the statistics time interval determination current time after reducing.
8. the network equipment as claimed in claim 7, is characterized in that,
Described second determination module, specifically for calculating the statistics time interval after reducing is: T-| (x2-x1) |/max (x1, x2) * T; Wherein, max (x1, x2) represents the maximum of getting between x1 and x2; T is first statistics time interval before current time; X1 is the first message matching times information, and x2 is the second message matching times information; When the statistics time interval after described reduction is less than default first statistics time interval, determine that the statistics time interval of current time is described default first statistics time interval; When the statistics time interval after described reduction is not less than default first statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described reduction.
9. the network equipment as claimed in claim 7, is characterized in that,
Described second determination module, also for when the absolute value of described difference is not more than described default value, the statistics time interval of maintenance current time is first statistics time interval before current time.
10. the network equipment as claimed in claim 7, is characterized in that,
Described first determination module, also for when the absolute value of described difference is not more than described default value, the message matching times information in the continuous N statistics time interval before determining current time, wherein, M be greater than 2 integer;
Described second determination module, also for the difference between the second message matching times information in second statistics time interval before the first message matching times information in first statistics time interval before calculating current time and current time, and the difference between the 3rd message matching times information before calculating the first message matching times information and current time in the 3rd statistics time interval, by that analogy, difference between M message matching times information before calculating the first message matching times information and current time in M statistics time interval,
If the difference between the absolute value of any two differences in (M-1) the individual difference calculated is positioned between designation area, then improve first statistics time interval before current time, and utilize the statistics time interval of the statistics time interval determination current time after improving.
11. network equipments as claimed in claim 10, is characterized in that,
Described second determination module, being further used for the statistics time interval after calculating raising is: T+M/N*T; Wherein, T is first statistics time interval before current time; N is predetermined number of times value, and the value of M is not more than the value of N; When the statistics time interval after described raising is greater than default second statistics time interval, determine that the statistics time interval of current time is described default second statistics time interval; When the statistics time interval after described raising is not more than default second statistics time interval, determine that the statistics time interval of current time is the statistics time interval after described raising.
12. network equipments as described in any one of claim 7-11, is characterized in that,
Message matching times information in statistics time interval is specially: the message matching times average per second that the message matching times obtained in statistics time interval is corresponding.
CN201410380854.7A 2014-08-05 2014-08-05 A kind of determination method and apparatus of statistics time interval Active CN104219157B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410380854.7A CN104219157B (en) 2014-08-05 2014-08-05 A kind of determination method and apparatus of statistics time interval

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410380854.7A CN104219157B (en) 2014-08-05 2014-08-05 A kind of determination method and apparatus of statistics time interval

Publications (2)

Publication Number Publication Date
CN104219157A true CN104219157A (en) 2014-12-17
CN104219157B CN104219157B (en) 2018-08-03

Family

ID=52100305

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410380854.7A Active CN104219157B (en) 2014-08-05 2014-08-05 A kind of determination method and apparatus of statistics time interval

Country Status (1)

Country Link
CN (1) CN104219157B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106126612A (en) * 2016-06-22 2016-11-16 重庆秒银科技有限公司 A kind of big ETL process dynamically divides the data pick-up method of timeslice
CN106230652A (en) * 2016-07-19 2016-12-14 东北大学 SDN performance measurement method based on OpenFlow agreement
CN107491455A (en) * 2016-06-13 2017-12-19 阿里巴巴集团控股有限公司 Read method and device in a kind of distributed system
CN110535712A (en) * 2019-09-19 2019-12-03 杭州迪普科技股份有限公司 BFD parameter setting method, device, electronic equipment
CN111308140A (en) * 2020-02-28 2020-06-19 宁波三星医疗电气股份有限公司 Difference type active reporting meter reading method

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571381A (en) * 2003-07-12 2005-01-26 华为技术有限公司 Method for timed processing of list item in communication equipment and apparatus thereof
CN1585377A (en) * 2003-08-22 2005-02-23 华为技术有限公司 Method for realizing message retransmission under routing device
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
US20140126393A1 (en) * 2012-11-02 2014-05-08 Brocade Communications Systems, Inc. Algorithm for long-lived large flow identification
CN103944828A (en) * 2014-04-15 2014-07-23 杭州华三通信技术有限公司 Method and equipment for transmitting protocol messages

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1571381A (en) * 2003-07-12 2005-01-26 华为技术有限公司 Method for timed processing of list item in communication equipment and apparatus thereof
CN1585377A (en) * 2003-08-22 2005-02-23 华为技术有限公司 Method for realizing message retransmission under routing device
CN101355570A (en) * 2008-09-19 2009-01-28 杭州华三通信技术有限公司 Control method and control device for reporting aging information
US20140126393A1 (en) * 2012-11-02 2014-05-08 Brocade Communications Systems, Inc. Algorithm for long-lived large flow identification
CN103944828A (en) * 2014-04-15 2014-07-23 杭州华三通信技术有限公司 Method and equipment for transmitting protocol messages

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491455A (en) * 2016-06-13 2017-12-19 阿里巴巴集团控股有限公司 Read method and device in a kind of distributed system
CN107491455B (en) * 2016-06-13 2020-11-20 阿里巴巴集团控股有限公司 Reading method and device in distributed system
CN106126612A (en) * 2016-06-22 2016-11-16 重庆秒银科技有限公司 A kind of big ETL process dynamically divides the data pick-up method of timeslice
CN106230652A (en) * 2016-07-19 2016-12-14 东北大学 SDN performance measurement method based on OpenFlow agreement
CN106230652B (en) * 2016-07-19 2019-04-23 东北大学 SDN network performance measurement method based on OpenFlow agreement
CN110535712A (en) * 2019-09-19 2019-12-03 杭州迪普科技股份有限公司 BFD parameter setting method, device, electronic equipment
CN110535712B (en) * 2019-09-19 2022-08-26 杭州迪普科技股份有限公司 BFD parameter setting method and device and electronic equipment
CN111308140A (en) * 2020-02-28 2020-06-19 宁波三星医疗电气股份有限公司 Difference type active reporting meter reading method

Also Published As

Publication number Publication date
CN104219157B (en) 2018-08-03

Similar Documents

Publication Publication Date Title
CN104219157A (en) Determining method and determining equipment for counting time intervals
EP3852420B1 (en) Method and device for determining load threshold
CN109274557B (en) Intelligent CMDB management and cloud host monitoring method in cloud environment
CN109218216B (en) Link aggregation flow distribution method, device, equipment and storage medium
EP3310093B1 (en) Traffic control method and apparatus
JP2017152852A (en) Communication system, communication apparatus, and communication control method for communication system
CN113014508A (en) Message processing method and device
CN108632863A (en) Flow method for early warning, device and server
CN107659505B (en) SDN network routing method and SDN controller
EP3203693B1 (en) User message forwarding control method and processing node
CN104811403A (en) Openflow-based group table processing method and device and group table configuration unit
CN103607731A (en) Method and device for processing measurement reports
CN108171265A (en) A kind of label preparation method, device and electronic equipment
CN104410962A (en) A terminal user network traffic monitoring method and device
CN103647666A (en) Method and apparatus for counting call detail record (CDR) messages and outputting results in real time
CN105429823A (en) Method and device for detecting multicast traffic in distributed communication equipment
CN109756384B (en) Data source state determination method and device and computer readable storage medium
CN103916278A (en) Method and device for unified management based on LAN and SAN
CN114071149B (en) Distributed video transcoding method and related device
Chen et al. Brownian approximations of multiclass open-queueing networks
WO2020203501A1 (en) Wireless performance evaluation method and wireless performance evaluation system
CN104052665A (en) Method and equipment for determining flow forwarding path
CN103684860A (en) System ID managing method and device
CN108632900A (en) For the flow processing method of the network integration, device, base station and gateway
CN103684884B (en) The method and system of data communication is optimized based on SNMP

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

GR01 Patent grant
GR01 Patent grant