CN109412879A - Port status parameter acquiring method, device and transmission device, storage medium - Google Patents
Port status parameter acquiring method, device and transmission device, storage medium Download PDFInfo
- Publication number
- CN109412879A CN109412879A CN201710703715.7A CN201710703715A CN109412879A CN 109412879 A CN109412879 A CN 109412879A CN 201710703715 A CN201710703715 A CN 201710703715A CN 109412879 A CN109412879 A CN 109412879A
- Authority
- CN
- China
- Prior art keywords
- port
- performance data
- transmission performance
- transmission
- data
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
- H04L43/022—Capturing of monitoring data by sampling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0876—Network utilisation, e.g. volume of load or congestion level
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Small-Scale Networks (AREA)
Abstract
The embodiment of the present invention provides a kind of port status parameter acquiring method, device and transmission device, storage medium, it is acquired by the transmission performance data to transmission device port, then when abnormal caused by determining that current collected transmission performance data occur because of inaccuracy of data acquisition itself, processing is optimized to obtain the current state parameter in port in preceding state parameter to the port.When determining that transmission performance data exception is caused by data acquisition results inaccuracy itself, the current state parameter in port directly will not be calculated according to the result, but obtain current state parameter according to processing is optimized in preceding state parameter.So, the program can be avoided data acquisition results inaccuracy itself and cause the problem of port status parameter inaccuracy, and then the port status parameter of inaccuracy is avoided to influence the network planning or network operation quality, so that the result of the network planning or network operation is mutually agreed with real network situation.
Description
Technical field
The present invention relates to the communications field more particularly to a kind of port status parameter acquiring method, device and transmission device, deposit
Storage media.
Background technique
With the development of data service, private line service and band width service, it is carried on PTN (Packet Optical
Transport Network, grouping conveying network) on portfolio increasingly increase, to the network planning and maintenance management also band
Significant challenge is carried out.The network planning and network operation management require the progress of the data on flows based on network link upper port, because
This, in order to guarantee the quality of the network planning and network operation, allow network management personnel according to the flow control of port flow real-time perfoming and
Flow planning, avoids port flow congestion from leading to service exception failure, it is desirable to which the traffic statistics of network link upper port can use up
It is possibly accurate.
Current port flow statistical project is basically the chip data periodically counted on transmission device, and root
Port flow and transmission rate are calculated according to collected data.But if when the CPU of transmission device is busy, statistics
The priority of performance tasks will reduce, therefore will appear during data statistics task carries out often by other high-priority tasks
It interrupts, the incomplete situation of data for causing statistics to obtain.Even, when transmission device is busy with executing high-priority task for a long time
When, also resulting in low priority task cannot get poll, the case where so as to cause data result being always 0 generation.In addition, due to
The defect of chip itself, it is possible that chip measurement period and the nonsynchronous situation of transmission device upper layer application measurement period,
It is abnormal that such case also results in statistical data.
It can be seen that the above two situation for leading to statistical data exception, is not by network state or transmission device sheet
It dies caused by hindering, but because caused by data statistics or data acquisition itself are inaccurate.In other words, transmission device sheet
The flow and transmission rate of body are normal, but the inaccuracy of data acquisition itself results in data acquisition results exception.
So this abnormal data acquisition results should not be taken as the foundation of the network planning and maintenance, but existing port flow is united
, can be directly using data acquisition results as the foundation of the network planning and maintenance in meter scheme, and then lead to the network planning and maintenance
Poor quality, do not meet actual conditions.
Summary of the invention
Port status parameter acquiring method, device and transmission device provided in an embodiment of the present invention, storage medium, it is main to solve
Certainly the technical issues of, is: providing a kind of new port status parameter acquisition scheme, directly reads biography in existing scheme to solve
Data lead to subsequent network planning and network operation poor quality to calculate port status parameter on transfer device chip, do not meet reality
The problem of border situation.
In order to solve the above technical problems, the embodiment of the present invention provides a kind of port status parameter acquiring method, comprising:
The transmission performance data of transmission device port are acquired;
Determine that current collected transmission performance data exception, the exception are caused by inaccuracy of data acquisition itself;
The current state parameter in the processing acquisition port, the shape are optimized in preceding state parameter to the port
State parameter includes the actual flow and/or transmission rate of the port.
The embodiment of the present invention also provides a kind of port status parameter obtaining device, comprising:
Data acquisition module is acquired for the transmission performance data to transmission device port;
Abnormal determination module, for determining that current collected transmission performance data exception, the exception are acquired by data
Itself is inaccurate and causes;
State acquisition module, for optimizing processing in preceding state parameter to the port, to obtain the port current
State parameter, the state parameter includes the actual flow and/or transmission rate of the port.
The embodiment of the present invention also provides a kind of transmission device, and the transmission device includes that processor, memory and communication are total
Line;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize port as described above
The step of state parameter acquisition methods.
The embodiment of the present invention also provides a kind of storage medium, and the storage medium is stored with one or more program, institute
Stating one or more program can be executed by one or more processor, to realize that port status parameter as described above obtains
The step of method.
The beneficial effects of the present invention are:
The embodiment of the present invention provides a kind of port status parameter acquiring method, device and transmission device, storage medium, at this
It in port status parameter acquiring method, is acquired by the transmission performance data to transmission device port, is then worked as in determination
When preceding collected transmission performance data are abnormal caused by occurring because of inaccuracy of data acquisition itself, to the port in preceding shape
State parameter optimizes processing to obtain the current state parameter in port.Due to determining transmission performance number in the embodiment of the present invention
According to it is abnormal be that directly can't calculate port by data acquisition results inaccuracy itself and when causing according to data acquisition results and work as
Preceding state parameter, but processing can be optimized in preceding state parameter according to the port, so that it is current to obtain the port
State parameter.So this scheme can be avoided data acquisition results inaccuracy itself and cause port status parameter inaccurate
The problem of, and then the port status parameter of this inaccuracy is avoided to influence the network planning or network operation quality, so that network is advised
It draws or the result of network operation is mutually agreed with real network situation, to provide good user experience with network users.
Other features of the invention and corresponding beneficial effect are described in the aft section of specification, and should be managed
Solution, at least partly beneficial effect is apparent from from the record in description of the invention.
Detailed description of the invention
Fig. 1 is a kind of flow chart for the port status parameter acquiring method that the embodiment of the present invention one provides;
Fig. 2 be the embodiment of the present invention one provide in preceding state parameter processing is optimized to port to obtain port current
A kind of flow chart of state parameter;
Fig. 3 is a kind of flow chart of port status parameter acquiring method provided by Embodiment 2 of the present invention;
Fig. 4 is provided by Embodiment 2 of the present invention to optimize processing in preceding state parameter to port to obtain port current
A kind of flow chart of state parameter;
Fig. 5 is a kind of structural schematic diagram for the port status parameter obtaining device that the embodiment of the present invention three provides;
Fig. 6 is a kind of hardware structural diagram for the transmission device that the embodiment of the present invention five provides;
Fig. 7 is a kind of flow chart for the port status parameter acquiring method that the embodiment of the present invention five provides.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, below by specific embodiment knot
Attached drawing is closed to be described in further detail the embodiment of the present invention.It should be appreciated that specific embodiment described herein is only used to
It explains the present invention, is not intended to limit the present invention.
Embodiment one:
In order to solve directly to calculate port status according to the data acquisition results to chip in transmission device in the prior art
In the scheme of parameter, the state parameter inaccuracy of port can be led to because of inaccuracy of data acquisition itself, and then lead to basis
The problem of quality of the network planning and maintenance that the port status parameter carries out is not high, does not meet actual conditions, the present embodiment mentions
For a kind of port status parameter acquiring method, the flow chart of the port status parameter acquiring method shown referring to Figure 1:
S102, the transmission performance data of transmission device port are acquired.
In the present embodiment, port status parameter obtaining device is acquired the transmission performance data of transmission device port,
Can be by the way of periodic data acquisition: when data collection cycle reaches, port status parameter obtaining device be to port
Transmission performance data be acquired.Transmission performance data may include transmission totalframes and transmission total byte in receiving direction
Number also may include transmission totalframes and transmission total bytes on sending direction, and certainly, port status parameter obtaining device is also
The transmission totalframes and transmission total bytes in port sending direction and receiving direction can be acquired simultaneously.It is beyond all doubt,
For a port, there is no direct incidence relations for the state parameter of receiving direction and sending direction, therefore, big absolutely
In most cases, for the same port, port status parameter obtaining device is respectively on sending direction and receiving direction
State parameter is obtained, so, for the transmission performance data of each receiving direction of sending direction, port status parameter obtains dress
Set to obtain respectively.
Described port can be ethernet port in the present embodiment, however it should be appreciated that in addition to ethernet port
In addition, it can also be the other kinds of port for assuming responsibility for data transfer task.
S104, current collected transmission performance data exception is determined.
After collecting the transmission performance data of port, port status parameter obtaining device can acquire feelings according to data
Condition determines whether current collected transmission performance data are abnormal.It is worth noting that, exception signified in the present embodiment be by
Caused by inaccuracy of data acquisition itself.So port status parameter obtaining device determines current collected transmission performance
Whether data are abnormal, and actually namely whether judgement is accurate for the acquisition of transmission performance data.In other words, port status is joined
Number acquisition device is when determining current collected transmission performance data exception, end caused by excluding because of live network situation etc.
Port transmission performance data abnormal conditions.For example, if the current transmission performance data of ethernet port differ very with normal level
Far, but this is because then this is not belonging to so-called in the present embodiment caused by the reasons such as the network state difference at data acquisition moment
Abnormal conditions;If collected transmission performance data differ greatly with normal level, but this is because data acquisition inaccuracy
Caused by, that is to say, that collected transmission performance data can not characterize the current actual conditions of ethernet port, then this belongs to
Abnormal conditions in this present embodiment.
By the agency of mistake in front, cause the possibility of data acquisition results exception have in this way of both reason: one, data
Acquisition tasks are seized by other high-priority tasks, cause data acquisition results not comprehensive, inaccurate;Two, port status parameter
The data collection cycle of acquisition device is asynchronous with the measurement period of port ARM chip.Certainly, it only lists here and compares allusion quotation
Type, than major two reasons, can also include other reasons other than above-mentioned both sides reason.
In the present embodiment, data acquisition situation includes the collection process and collection result to transmission performance data, institute
Being acquired when situation determines collected transmission performance data exception with, port status parameter obtaining device according to data at least can be with
Including both sides meaning in this way: first, port status parameter obtaining device is determined according to the collection result of transmission performance data
Current data acquisition itself is inaccurate;Second, port status parameter obtaining device is according to the collection process of transmission performance data
Determine that current data acquisition itself is inaccurate.
For above-mentioned in a first aspect, port status parameter obtaining device determines according to the collection result to transmission performance data
Transmission performance data exception out, for example, port status parameter obtaining device determines that collected transmission performance data are exceptional value,
And determine that transmission performance data are that the continuous integration number of exceptional value has reached preset threshold according in preceding data acquisition situation.This
In " the acquiring situation in preceding data " refer to the acquisition of this data before data acquire situation.It is assumed that being currently M
The secondary acquisition for carrying out transmission performance data, then in the acquisition of preceding data it may be the case that the 1st time to the M-1 time data acquire in one
Secondary or multiple situation.
In a kind of embodiment of the present embodiment, when port status parameter obtaining device collect transmission performance data it
Afterwards, can determine whether collected transmission performance data are exceptional values, it, can be to characterization if transmission performance data are exceptional values
The continuous integration number for continuously exceptional value occur is increased.If transmission performance data are not exceptional values, by current company
Continuous cumulative number is reset.For example, be currently the acquisition that the 5th carries out transmission performance data, before this, the 3rd time and the 4th number
It is exceptional value according to transmission performance data in collection result, then before carrying out the acquisition of the 5th transmission performance data, continuous integration
The value of number is " 2 ".If the collection result of the 5th characterizes transmission performance data exception, continuous integration number will be further added by 1
Become " 3 ".If subsequent and carried out the acquisition of the 6th transmission performance data to port, and the value of transmission performance data is not
Exceptional value, then after the 6th data acquire, continuous integration time numerical value will become " 0 ".
According to above-mentioned introduction it is found that port status parameter obtaining device is determining transmission performance number according to data acquisition results
According to it is abnormal when, need to meet two such condition: firstly, in current data acquisition results transmission performance data be exceptional value.
Transmission performance data include transmission totalframes and transmission total bytes on reception and/or sending direction, as long as transmission totalframes
It is exceptional value with the value of any one in transmission total bytes, then port status parameter obtaining device can be assumed that transmission performance
Data are exceptional value.In an example of the present embodiment, exceptional value 0, as long as then transmission totalframes and transmission total byte
The value of any one in number is 0, then it can be assumed that the value of transmission performance data is exceptional value.Currently acquiring resulting transmission
On the basis of performance data meets the condition for exceptional value, port status parameter obtaining device also needs to acquire according in preceding data
Situation determines that transmission performance data are whether the continuous integration number of exceptional value has had reached preset threshold.
For example it is assumed that the size of preset threshold is 3, then it is directed to above-mentioned example, is carried out in port status parameter obtaining device
After the acquisition of the 5th transmission performance data, data acquisition results have just met above-mentioned two condition simultaneously, therefore, port shape
State parameter obtaining device can be determined that inaccuracy itself is influenced current collected transmission performance data by data acquisition
Exception is showed.
S106, the current state parameter in processing acquisition port is optimized in preceding state parameter to port.
When port status parameter obtaining device is determining current collected according to data acquisition results or data acquisition
Transmission performance data are acquired by data when itself being influenced and occurring abnormal, and port status parameter obtaining device is calculating port
When current state parameter, processing can be optimized to obtain the current state parameter in port according in preceding state parameter.Benefit
Resulting current state parameter after handling is optimized used in preceding state parameter, relative to directly according to abnormal transmission performance number
For calculating the state parameter obtained, it is more nearly the current truth in port, can be excluded directly according to exception in this way
Transmission performance data calculate the problem of inaccuracy caused by port status parameter.
For the scene for determining transmission performance data exception according to data acquisition results, port status parameter obtaining device exists
Port current state parameter is obtained, such as when the currently practical flow in port, it can be according to being obtained in preceding data acquisition
Port actual flow optimizes processing, so that obtaining this data acquires corresponding port actual flow, as shown in Figure 2:
Practical stream corresponding at least one of S202, the M-N times to the M-1 times transmission performance data acquisition of acquisition
Amount.
It is assumed that this time data acquisition is to be acquired to the transmission performance data of port for the M times, then firstly, port status
The corresponding actual flow of M-1 to the M-N times data acquisition before parameter obtaining device obtains the acquisition of this data.Wherein, N
Value be more than or equal to 1.It is understood that the data that port status parameter obtains can be M-1 to the M-N times data and acquire
Actual flow corresponding to middle one or more.
S204, the current actual flow in port is calculated in preceding actual flow according to what is got using smoothing algorithm.
In some examples of the present embodiment, port status parameter obtaining device can be acquired only with this data
Time does optimization processing according to smoothing algorithm in preceding actual flow closest to one or more, to obtain this number
Port actual flow when according to acquisition.But in other examples, port status parameter obtaining device also available time
From the farther away one or more of this data acquisition in preceding actual flow.Continue to assume that the acquisition of this data is the 5th, if the
The collected transmission performance data exceptions of 5 data acquisition institute, then port status parameter obtaining device can be according to the 4th and the
3 data acquisition corresponding port actual flow determines the current actual flow in port, can also according to the 1st time and/or
2nd actual flow carrys out smoothing computation, obtains current actual flow.
The number selected in preceding actual flow is not limited in the present embodiment, it can be by the customized setting of gateway personnel.No
It crosses theoretically, smoothing algorithm is being used to optimize processing in preceding actual flow to obtain the current actual flow in port
When, selection it is more in preceding actual flow, calculated result with actual conditions to agree with degree also higher.
It should be understood that the acquisition of the present embodiment middle port state parameter acquisition device should be energy in preceding actual flow
Enough as close possible to port in the data for corresponding to moment truth.That is, participate in smooth optimization processing in preceding reality
What flow was not necessarily calculated according to data acquisition results, it is also possible to before being basis in preceding actual port flow
What optimization processing obtained.For example it is assumed that being currently that the 5th carries out the acquisition of transmission performance data, port status parameter obtaining device
It, can each reality in conjunction with corresponding to the 4th to the 1st data acquisition after determining transmission performance data exception according to collection result
One or more of border flow optimizes processing and obtains the actual flow of port when the data acquisition of the 5th.It is assumed that port
What state parameter acquisition device utilized is that the 3rd data acquire reality corresponding to corresponding actual flow and the acquisition of the 4th data
The corresponding actual flow of the 5th data acquisition is calculated to optimize in border flow, but the practical stream that the 3rd data acquisition is corresponding
Amount is actually also likely to be to be calculated according to the corresponding actual flow optimization of the 1st data acquisition and the 2nd data acquisition
's.Because acquiring the port actual flow at moment by resulting 3rd data of optimization processing, than being acquired according to the 3rd data
Port flow when the port flow magnitude that resulting transmission performance data are calculated can more be reflected in the 3rd data acquisition of progress
Truth.Similarly, if needing the 5th data acquiring corresponding actual flow as preceding in the follow-up process
Actual flow, to calculate the port actual flow at corresponding moment, the then corresponding actual flow of the 5th data acquisition of its selection
It should also be as being to optimize processing by smoothing algorithm to obtain, rather than acquire resulting abnormal transmission according to the 5th data
What performance data was directly calculated.
Although not illustrating directly in aforementioned exemplary, it should be understood that, present port is determined every time
After actual flow, which should be associated storage with the serial number of corresponding data times of collection, with after an action of the bowels
Continuous needs are to extract to use.
Port status parameter acquiring method provided in this embodiment is acquired it in the transmission performance data to port
Afterwards, it can determine whether current collected transmission performance data receive data according to data acquisition results or data acquisition
The influence of acquisition inaccuracy itself.If it is determined that causing data acquisition results inaccurate because of inaccuracy of data acquisition itself, then
Directly will not determine the current state parameter in port according to data acquisition results, but combine the port in preceding state parameter,
The state parameter for being more bonded practical situation is calculated using smoothing algorithm optimization, to evade abnormal transmission performance data opposite end
The negative effect that mouth state parameter calculates, promotes the accuracy of port status parameter.
Embodiment two:
The present embodiment will continue to carry out the port status parameter acquiring method in the present invention on the basis of example 1
It introduces, refers to the flow chart shown in Fig. 3:
S302, port status parameter obtaining device are acquired the transmission performance data of transmission device port.
In the present embodiment, port status parameter obtaining device is periodically to the transmission performance data of transmission device port
It is acquired.It is assumed that the period of data collection cycle is 1s, that is to say, that in every 1s, port status parameter obtaining device will
One acquisition is carried out to the transmission performance data of port.In 1 minute, there are 60 data collection cycles, so, port status ginseng
The transmission performance data that number acquisition device can carry out 60 times to port acquire.
It, can be according to number when determining whether collected transmission performance data are abnormal due to port status parameter obtaining device
Determined according to collection process, that is, the second aspect referred in embodiment one.So being obtained for the ease of port status parameter
Take device determine collected transmission performance data whether the influence by data acquisition inaccuracy, in the present embodiment, port shape
State parameter obtaining device will record down the start/stop time of this transmission performance data acquisition, that is, starting transmission performance data
When acquisition, at the beginning of port status parameter obtaining device will record lower data acquisition;It acquires and completes in transmission performance data
When, port status parameter obtaining device will record the finish time of lower data acquisition again.
S304, port status parameter obtaining device judge whether collected transmission performance data are abnormal.
In the present embodiment, it mainly introduces port status parameter obtaining device and transmission performance is determined according to data acquisition
Data whether Yi Chang scheme, provide an example here: it is assumed that being currently the M times progress data acquisition, then according to front
It introduces, will record the M times data acquisition before port status parameter obtaining device carries out the acquisition of transmission performance data to port
At the beginning of tM, and data acquisition finish time t when collecting dataM', to be determined according to the time at two moment
This data acquires the time it takes d t outM, i.e. tM’-tM.Such as be currently the 5th progress transmission performance data acquisition,
At the time of this time data acquisition starts, port status parameter obtaining device will record t5 of lower start time.When the 5th data acquire
At the end of, port status parameter obtaining device will record t5 ' of lower finish time again, then according to start time t5 and finish time
T5 ' determines the current acquisition duration dt5 of the 5th data acquisition.Simultaneously as in front 4 progress data acquisitions when,
Port status parameter obtaining device also will record lower each time at the beginning of with finish time, and calculate each secondary data acquisition and spend
The acquisition duration taken.So in the present embodiment, port status parameter obtaining device can judge currently according to the following conditions
Whether by data acquisition, inaccuracy is influenced and exception occurs collected transmission performance data in itself:
The acquisition of preceding transmission performance data spent in preceding acquisition duration dtM-1More than or equal to the first duration threshold value;
When previous transmission performance data acquire the current acquisition duration dt spentMMore than or equal to the second duration threshold value;
When previous transmission performance data acquire finish time tM' the same transmission performance data acquire finish time tM-1’
Between interval be not equal to transmission performance data collection cycle T.Since in each transmission performance data collection cycle T, port
State parameter acquisition device will do it a data acquisition, so, under normal circumstances, T=tM′-tM-1′。
In above three condition, if this time data acquisition meet wherein any one, port status parameter obtains
It takes device i.e. and can determine that inaccuracy is influenced and exception occurs current collected transmission performance data in itself by data acquisition.
In other words, if port status parameter obtaining device determine preceding transmission performance data acquire spent in preceding acquisition duration
dtM-1Less than the first duration threshold value, and the current acquisition duration dt that previous transmission performance data collection is spentMWhen less than second
Long threshold value, and previous transmission performance data collection finish time tM' the same transmission performance data acquire finish time
tM-1' between interval be equal to transmission performance data collection cycle T, just can be determined that Current data acquisition result not by data
The influence of acquisition is normal.
For example, be directed to above-mentioned example, port status parameter obtaining device need to determine the 4th data acquisition spent
Relationship between preceding acquisition duration dt4 and the first duration threshold value, this data current acquisition duration dt5 for being spent of acquisition and the
Between relationship and the 5th data acquisition finish time t5 ' between two duration threshold values and the 4th data acquisition finish time t4 '
Interval with the relationship between data collection cycle T.The present embodiment does not limit sentencing for port status parameter obtaining device specifically
Timing sequence, such as in a kind of example, port status parameter obtaining device first determines whether dt5 is more than or equal to the second duration threshold
Then value determines whether dt4 is more than or equal to the first duration threshold value, finally determine whether t5 '-t4 ' is equal to T again;But in this implementation
In another example of example, port status parameter obtaining device first determines whether dt4 is more than or equal to the first duration threshold value, finally
Determine whether dt5 is more than or equal to the second duration threshold value.
It should be appreciated that when port status parameter obtaining device is when determining that any one above-mentioned condition meets,
It can not continue to determine whether residue condition meets, determine the time to save.
It is understood that being said if current data acquisition meets any one in above three condition
Bright the M times data take time longer than the normal acquisition time, therefore port status parameter obtaining device when acquisition
Determine whether transmission performance data are actually at the time of determining to carry out data acquisition extremely according to data acquisition, if
The situation that high-priority task seizes data acquisition session has occurred.If the judgement result of port status parameter obtaining device is
It is then to execute S306;Otherwise, S308 is executed.
S306, port status parameter obtaining device optimize the current state in processing acquisition port in preceding state parameter
Parameter.
If determining current collected transmission performance data exception, port shape according to the collection process that data acquire
State parameter obtaining device needs to optimize processing in preceding state parameter to obtain the current state in the port and join to the port
Number.In the following, being illustrated by taking the transmission rate for obtaining the port as an example, Fig. 4 is referred to:
S402, at least one of corresponding transmission rate is acquired according to the M-N times to the M-1 times transmission performance data
It determines in preceding rate.
Due to, this time data acquisition be the M times the transmission performance data of port are acquired, so, optionally, if
The transmission rate obtained after the M-1 times transmission performance data acquisition is 0, then port status parameter obtaining device obtains M-N
The corresponding transmission rate of secondary to the M-1 times transmission performance data acquisition, and the average value for calculating N number of transmission rate is used as preceding
Rate, N are greater than 1.If the transmission rate obtained after the M-1 times transmission performance data acquisition is not 0, port status parameter
The transmission performance data that acquisition device directly acquires the M-1 times acquire corresponding transmission rate and are used as in preceding rate.
It is assumed that being currently that the 5th carries out the acquisition of transmission performance data, if port status parameter obtaining device is adopted according to data
When collection process determines the acquisition of this data, data acquisition session is seized by high-priority task, then port status parameter obtains
The transmission rate for taking the available the 4th data acquisition of device corresponding is used as in preceding rate.If the transmission rate of the 4th is
0, then the corresponding transmission speed of port status parameter obtaining device available 2nd time, the 3rd time and the acquisition of the 4th data
Rate, and averaged as the 5th data acquire when in preceding rate.
S404, the current transmission rate in port is obtained according in preceding rate calculations using smoothing algorithm.
When port status parameter obtaining device get current data acquisition it is corresponding after preceding rate, Ke Yigen
Current transmission rate is calculated according to following formula:
Wherein, SMFor current transmission rate, SM-1For in preceding rate.K is adjustment deviation, and value is equal toThe size of value is between 0~1, tM' the finish time acquired for the M times data, the tM-1' be
The finish time of the M-1 times data acquisition.AMFor the current actual flow in port, the value of the actual flow be can be according to implementation
What the optimization processing scheme introduced in example one obtained, it is also possible to according to when previous collected transmission performance data are calculated
's.Specifically, if in calculating port when current actual flow, port status parameter obtaining device determines transmission performance number
According to exception, then smooth optimization processing can be carried out in preceding actual flow according to the scheme provided in previous embodiment, and then obtain
To the A when acquisition of this dataM.If port status parameter obtaining device determines that transmission performance data are normal, then it can be straight
It connects and A is calculated according to collected transmission performance data combination following formulaM:
AM=transmission total bytes+(the transmission port totalframes * frame gap)
It should be appreciated that for the actual flow of port sending direction, should according to the total bytes of sending direction with
Totalframes is calculated, then should be according to the total joint number and totalframes of receiving direction for the actual flow of port receiving direction
It is calculated.
It is current that S308, port status parameter obtaining device directly calculate exit port according to collected transmission performance data
State parameter.
If port status parameter obtaining device is currently collected according to data acquisition results or data acquisition determination
Transmission performance data it is normal, influenced whether inaccurate by data acquisition itself, then port status parameter obtaining device
Can the current state parameter of exit port directly be calculated according to collected transmission performance data.Such as the biography current for port
Defeated rate can calculate according to the following formula:
In the present embodiment, no matter port status parameter obtaining device is which kind of mode to have got port by currently
The transmission rate can all be associated with port numbers and save by transmission rate.It should be understood that when saving, also
Should associated storage can characterize data corresponding to the transmission rate acquisition serial number information.
Port status parameter acquiring method provided in an embodiment of the present invention is acquired in the transmission performance data to port
Later, it can determine whether current collected transmission performance data receive number according to data acquisition results or data acquisition
According to the influence of acquisition inaccuracy itself, objective judgement is carried out to data acquisition results.Determining current collected transmission performance
Data are normal datas, when not acquired itself by data is influenced, directly calculate that obtain port current according to the data
State parameter.When determining that collected transmission performance data have received the inaccurate influence of receipt acquisition itself, not directly
It is calculated according to this transmission performance data for being unable to characterize port actual conditions and obtains the current state parameter in port, but according to
The port optimizes processing in preceding state parameter, thus acquisition and the closer state parameter of actual conditions, and then be subsequent
The network planning and maintenance more believable basis is provided, promote the quality of the network planning and maintenance.
Embodiment three:
The present embodiment provides a kind of port status parameter obtaining devices, refer to Fig. 5:
Port status parameter obtaining device 50 includes that data acquisition module 502, abnormal determination module 504 and state obtain
Module 506, wherein data acquisition module 502 is for being acquired the transmission performance data of transmission device port;Abnormal determination
Module 504 is for determining current collected transmission performance data exception;And state acquisition module 506 is used for port preceding
State parameter optimizes processing and obtains the current state parameter in port.
In the present embodiment, data acquisition module 502 is acquired the transmission performance data of transmission device port, can adopt
The mode acquired with periodic data: when data collection cycle reaches, transmission performance number of the data acquisition module 502 to port
According to being acquired.Transmission performance data may include transmission totalframes and transmission total bytes in receiving direction, also can wrap
The transmission totalframes and transmission total bytes on sending direction are included, certainly, data acquisition module 502 can also acquire port simultaneously
Transmission totalframes and transmission total bytes on sending direction and receiving direction.It is beyond all doubt, for a port,
There is no direct incidence relations for the state parameter of receiving direction and sending direction, therefore, in most cases, for same
A port, data acquisition module 502 be the state parameter on sending direction and receiving direction is obtained respectively, so,
For the transmission performance data of each receiving direction of sending direction, data acquisition module 502 can also obtain respectively.
Described port can be ethernet port in the present embodiment, however it should be appreciated that in addition to ethernet port
In addition, it can also be the other kinds of port for assuming responsibility for data transfer task.
After data acquisition module 502 collects the transmission performance data of port, abnormal determination module 504 can basis
Data acquire situation and determine whether current collected transmission performance data are abnormal.It is worth noting that, signified in the present embodiment
Exception be as data acquisition itself inaccuracy caused by.So abnormal determination module 504 determines current collected transmission
Whether performance data is abnormal, and actually namely whether judgement is accurate for the acquisition of transmission performance data.In other words, sentence extremely
Cover half block 504 is when determining current collected transmission performance data exception, end caused by excluding because of live network situation etc.
Port transmission performance data abnormal conditions.For example, if the current transmission performance data of ethernet port differ very with normal level
Far, but this is because then this is not belonging to so-called in the present embodiment caused by the reasons such as the network state difference at data acquisition moment
Abnormal conditions;If collected transmission performance data differ greatly with normal level, but this is because data acquisition inaccuracy
Caused by, that is to say, that collected transmission performance data can not characterize the current actual conditions of ethernet port, then this belongs to
Abnormal conditions in this present embodiment.
By the agency of mistake in front, cause the possibility of data acquisition results exception have in this way of both reason: one, data
Acquisition tasks are seized by other high-priority tasks, cause data acquisition results not comprehensive, inaccurate;Two, data acquisition module
502 data collection cycle is asynchronous with the measurement period of port ARM chip.Certainly, it only lists here than more typical, ratio
Major two reasons can also include other reasons other than above-mentioned both sides reason.
In the present embodiment, data acquisition situation includes the collection process and collection result to transmission performance data, institute
With abnormal determination module 504 acquires situation and determine when collected transmission performance data exception according to data at least may include
Meaning of both in this way: first, abnormal determination module 504 determines current data according to the collection result of transmission performance data
Acquisition inaccuracy itself;Second, abnormal determination module 504 determines that current data are adopted according to the collection process of transmission performance data
Collection inaccuracy itself.
For above-mentioned in a first aspect, abnormal determination module 504 determines biography according to the collection result to transmission performance data
Defeated performance data is abnormal, for example, abnormal determination module 504 determines that collected transmission performance data are exceptional value, and according to
Preceding data acquisition situation determines that transmission performance data are that the continuous integration number of exceptional value has reached preset threshold.Described here
Data before " acquiring situation in preceding data " refers to the acquisition of this data acquire situation.It is assumed that being currently to be passed for the M times
The acquisition of defeated performance data, then in the acquisition of preceding data it may be the case that one or many in the 1st time to the M-1 times data acquisition
The case where.
It is abnormal after data acquisition module 502 collects transmission performance data in a kind of embodiment of the present embodiment
Determination module 504 can determine whether collected transmission performance data are exceptional values, if transmission performance data are exceptional values,
The continuous integration number that continuously exceptional value can occur to characterization increases.It, will if transmission performance data are not exceptional values
Current continuous integration number is reset.For example, being currently the acquisition that the 5th carries out transmission performance data, before this, the 3rd time
It is exceptional value with transmission performance data in the 4th data acquisition results, then acquires it in progress the 5th transmission performance data
Before, the value of continuous integration number is " 2 ".If the collection result of the 5th characterizes transmission performance data exception, continuous integration number
1 will be further added by and become " 3 ".If subsequent and carried out the acquisition of the 6th transmission performance data to port, and transmission performance data
Value be not exceptional value, then after the 6th data acquire, continuous integration time numerical value will become " 0 ".
According to above-mentioned introduction it is found that abnormal determination module 504 is determining that transmission performance data are different according to data acquisition results
Chang Shi needs to meet two such condition: firstly, transmission performance data are exceptional value in current data acquisition results.Transmission
Performance data includes transmission totalframes and transmission total bytes on reception and/or sending direction, as long as transmission totalframes and biography
The value of any one in defeated total bytes is exceptional value, then abnormal determination module 504 is it can be assumed that transmission performance data are different
Constant value.In an example of the present embodiment, exceptional value 0, as long as then appointing in transmission totalframes and transmission total bytes
The value of meaning one is 0, then it can be assumed that the value of transmission performance data is exceptional value.Currently acquiring resulting transmission performance data
On the basis of meeting the condition for exceptional value, abnormal determination module 504 also needs to determine transmission according in preceding data acquisition situation
Performance data is whether the continuous integration number of exceptional value has had reached preset threshold.
For example it is assumed that the size of preset threshold is 3, then it is directed to above-mentioned example, carries out the 5th in data acquisition module 502
After the acquisition of transmission performance data, data acquisition results have just met above-mentioned two condition simultaneously, therefore, abnormal determination module
504 can be determined that inaccuracy is influenced and exception occurs current collected transmission performance data in itself by data acquisition.
When abnormal determination module 504 determines current collected transporting according to data acquisition results or data acquisition
Energy data are acquired by data when itself being influenced and occurring abnormal, and state acquisition module 506 is calculating the current state in port
When parameter, processing can be optimized to obtain the current state parameter in port according in preceding state parameter.Using in preceding state
Parameter optimizes resulting current state parameter after processing, obtains relative to directly being calculated according to abnormal transmission performance data
State parameter for, be more nearly the current truth in port, can exclude so directly according to abnormal transmission performance number
According to the problem for calculating inaccuracy caused by port status parameter.
For the scene for determining transmission performance data exception according to data acquisition results, state acquisition module 506 is being obtained
Port current state parameter, such as when the currently practical flow in port, it can be according to the port obtained in preceding data acquisition
Actual flow optimizes processing, so that obtaining this data acquires corresponding port actual flow.
Firstly, state acquisition module 506 obtains at least one of the M-N times to the M-1 times transmission performance data acquisition
Corresponding actual flow.It is assumed that this time data acquisition is to be acquired to the transmission performance data of port for the M times, then firstly,
The corresponding actual flow of M-1 to the M-N times data acquisition before state acquisition module 506 obtains the acquisition of this data.Its
In, the value of N is more than or equal to 1.It is understood that the data that port status parameter obtains can be M-1 to the M-N times data
Actual flow corresponding to one or more in acquisition.
Then, port is calculated in preceding actual flow according to what is got using smoothing algorithm in state acquisition module 506
Current actual flow.In some examples of the present embodiment, state acquisition module 506 can be adopted only with this data
The collection time does optimization processing according to smoothing algorithm in preceding actual flow closest to one or more, to obtain this
Port actual flow when data acquire.But in other examples, state acquisition module 506 also the available time from this
The secondary farther away one or more of data acquisition is in preceding actual flow.Continue to assume that the acquisition of this data is the 5th, if the 5th
The collected transmission performance data exception of data acquisition institute, then state acquisition module 506 can be according to the 4th and the 3rd data
Acquisition corresponding port actual flow determines the current actual flow in port, can also be according to the 1st time and/or the 2nd time
Actual flow carrys out smoothing computation, obtains current actual flow.
The number selected in preceding actual flow is not limited in the present embodiment, it can be by the customized setting of gateway personnel.No
It crosses theoretically, smoothing algorithm is being used to optimize processing in preceding actual flow to obtain the current actual flow in port
When, selection it is more in preceding actual flow, calculated result with actual conditions to agree with degree also higher.
It should be understood that in the present embodiment state acquisition module 506 obtain should can use up in preceding actual flow
Port be may be close in the data of corresponding moment truth.That is, participate in smooth optimization processing in preceding actual flow
Not necessarily calculated according to data acquisition results, it is also possible to before being basis in preceding actual port flow optimization
What processing obtained.For example it is assumed that being currently that the 5th carries out the acquisition of transmission performance data, abnormal determination module 504 is tied according to acquisition
It, can be in conjunction with the 4th into the corresponding each actual flow of the 1st data acquisition after fruit determines transmission performance data exception
One or more optimizes processing and obtains the actual flow of port when the data acquisition of the 5th.It is assumed that state acquisition module 506
What is utilized is that the 3rd data acquire actual flow corresponding to corresponding actual flow and the acquisition of the 4th data to optimize calculating
It obtains the 5th data and acquires corresponding actual flow, but the 3rd corresponding actual flow of data acquisition is actually also likely to be
It is calculated according to the corresponding actual flow optimization of the 1st data acquisition and the 2nd data acquisition.Because by optimization
The port actual flow for managing the resulting 3rd data acquisition moment, than acquiring resulting transmission performance data according to the 3rd data
The port flow magnitude calculated can more be reflected in the truth of port flow when carrying out the 3rd data acquisition.Similarly,
It is used as if needing the 5th data acquiring corresponding actual flow in the follow-up process in preceding actual flow, with calculating pair
The port actual flow at moment is answered, then the actual flow that the 5th data acquisition of its selection is corresponding should also be as being by smooth
Algorithm optimizes what processing obtained, rather than acquires resulting abnormal transmission performance data according to the 5th data and directly calculate
Out.
Although not illustrating directly in aforementioned exemplary, it should be understood that, present port is determined every time
After actual flow, which should be associated storage with the serial number of corresponding data times of collection, with after an action of the bowels
Continuous needs are to extract to use.
Port status parameter obtaining device provided in this embodiment is acquired it in the transmission performance data to port
Afterwards, it can determine whether current collected transmission performance data receive data according to data acquisition results or data acquisition
The influence of acquisition inaccuracy itself.If it is determined that causing data acquisition results inaccurate because of inaccuracy of data acquisition itself, then
Directly will not determine the current state parameter in port according to data acquisition results, but combine the port in preceding state parameter,
The state parameter for being more bonded practical situation is calculated using smoothing algorithm optimization, to evade abnormal transmission performance data opposite end
The negative effect that mouth state parameter calculates, promotes the accuracy of port status parameter.
Example IV:
The present embodiment will be introduced the port status parameter obtaining device 50 in the present invention continuing with Fig. 5:
In the present embodiment, data acquisition module 502 periodically carries out the transmission performance data of transmission device port
Acquisition.It is assumed that the period of data collection cycle is 1s, that is to say, that in every 1s, data acquisition module 502 will be to the biography of port
Defeated performance data carries out one acquisition.In 1 minute, there are 60 data collection cycles, so, the meeting pair of data acquisition module 502
Port carries out 60 transmission performance data acquisitions.
When determining whether collected transmission performance data are abnormal due to abnormal determination module 504, it can be adopted according to data
Collection process is determined, that is, the second aspect referred in embodiment one.So true for the ease of abnormal determination module 504
Whether fixed collected transmission performance data are influenced by data acquisition inaccuracy, in the present embodiment, data acquisition module 502
It will record down the start/stop time of this transmission performance data acquisition, that is, when starting the acquisition of transmission performance data, data acquisition
At the beginning of module 502 will record lower data acquisition;When transmission performance data acquire completion, data acquisition module 502 is again
It will record the finish time of lower data acquisition.
In the present embodiment, it mainly introduces abnormal determination module 504 and transmission performance data is determined according to data acquisition
Whether Yi Chang scheme, provide an example here: it is assumed that be currently the M times progress data acquisition, then according to the introduction of front,
At the beginning of will record the M times data acquisition before data acquisition module 502 carries out the acquisition of transmission performance data to port
tM, and data acquisition finish time t when collecting dataM', to determine this data according to the time at two moment
Acquire the time it takes d tM, i.e. tM’-tM.Such as currently be the 5th carry out the acquisition of transmission performance data, adopted in this secondary data
At the time of collection starts, data acquisition module 502 will record t5 of lower start time.At the end of the acquisition of the 5th data, data acquisition
Module 502 will record t5 ' of lower finish time again, then determine that the 5th data are adopted according to start time t5 and finish time t5 '
The current acquisition duration dt5 of collection.Simultaneously as in front 4 progress data acquisitions when, data acquisition module 502 also can
At the beginning of recording each time with finish time, and calculate each secondary data and acquire spent acquisition duration.So in this reality
It applies in example, abnormal determination module 504 can judge whether current collected transmission performance data are counted according to the following conditions
There is exception according to the influence of acquisition inaccuracy itself:
The acquisition of preceding transmission performance data spent in preceding acquisition duration dtM-1More than or equal to the first duration threshold value;
When previous transmission performance data acquire the current acquisition duration dt spentMMore than or equal to the second duration threshold value;
When previous transmission performance data acquire finish time tM' the same transmission performance data acquire finish time tM-1’
Between interval be not equal to transmission performance data collection cycle T.Since in each transmission performance data collection cycle T, port
State parameter acquisition device will do it a data acquisition, so, under normal circumstances, T=tM′-tM-1′。
In above three condition, if this time data acquisition meet wherein any one, abnormal determination module 504
It can determine that inaccuracy is influenced and exception occurs current collected transmission performance data in itself by data acquisition.Change speech
It, if abnormal determination module 504 determine preceding transmission performance data acquire spent in preceding acquisition duration dtM-1It is less than
First duration threshold value, and the current acquisition duration dt that previous transmission performance data collection is spentMLess than the second duration threshold value, and
And previous transmission performance data collection finish time tM' the same transmission performance data acquire finish time tM-1' between
Every being equal to transmission performance data collection cycle T, it just can be determined that Current data acquisition result is not influenced by data acquisition, be
Normally.
For example, be directed to above-mentioned example, abnormal determination module 504 need to determine the 4th data acquisition spent adopted preceding
Collect the relationship between duration dt4 and the first duration threshold value, when this data acquires the current acquisition duration dt5 and second spent
Between between relationship and the 5th data acquisition finish time t5 ' between long threshold value and the 4th data acquisition finish time t4 '
Relationship between same data collection cycle T.The present embodiment does not limit the judgement timing of abnormal determination module 504, example specifically
Such as in a kind of example, abnormal determination module 504 first determines whether dt5 is more than or equal to the second duration threshold value, then determines dt4
Whether it is more than or equal to the first duration threshold value, finally determines whether t5 '-t4 ' is equal to T again;But in another example of the present embodiment
In the middle, abnormal determination module 504 first determines whether dt4 is more than or equal to the first duration threshold value, finally determines whether dt5 is more than or equal to
Second duration threshold value.
It should be appreciated that when abnormal determination module 504 is when determining that any one above-mentioned condition meets, it can not
It is further continued for determining whether residue condition meets, determines the time to save.
It is understood that being said if current data acquisition meets any one in above three condition
Bright the M times data take the time longer than the normal acquisition time when acquisition, therefore hold 504 basis of abnormal determination module
Data acquisition determines whether transmission performance data are actually at the time of determining to carry out data acquisition extremely, if occurs
High-priority task seizes the situation of data acquisition session.If the judgement result of abnormal determination module 504 is yes, state
It obtains module 506 and optimizes the current state parameter in processing acquisition port in preceding state parameter;Otherwise state acquisition module
506 directly calculate the current state parameter of exit port according to collected transmission performance data.
If determining that current collected transmission performance data exception, state obtain according to the collection process that data acquire
Modulus block 506 needs to optimize processing in preceding state parameter to the port to obtain the current state parameter in the port.Under
Face is illustrated by taking the transmission rate for obtaining the port as an example:
Firstly, the transmission that state acquisition module 506 is corresponding according to the M-N times to the M-1 times transmission performance data acquisition
At least one of rate is determined in preceding rate.Due to, this time data acquisition be the M times transmission performance data to port into
Row acquisition, so, optionally, if the transmission rate obtained after the M-1 times transmission performance data acquisition is 0, state is obtained
Modulus block 506 obtains the M-N times to the M-1 times corresponding transmission rate of transmission performance data acquisition, and calculates N number of transmission speed
The average value of rate is used as in preceding rate, and N is greater than 1.If the transmission rate obtained after the M-1 times transmission performance data acquisition is not
It is 0, then the transmission performance data that state acquisition module 506 directly acquires the M-1 times acquire corresponding transmission rate and are used as
Preceding rate.
It is assumed that being currently that the 5th carries out the acquisition of transmission performance data, if abnormal determination module 504 is according to data acquisition
When determining the acquisition of this data, data acquisition session is seized by high-priority task, then state acquisition module 506 can obtain
The transmission rate for taking the acquisition of the 4th data corresponding is used as in preceding rate.If the transmission rate of the 4th is 0, state is obtained
Module 506 it is available 2nd time, the 3rd time and the 4th data acquisition corresponding transmission rate, and averaged make
For the 5th data acquisition when in preceding rate.
When state acquisition module 506 is got corresponding to currently time data acquisition after preceding rate, using smooth calculation
Method obtains the current transmission rate in port according in preceding rate calculations.Optionally state acquisition module 506 can be according to following public affairs
Formula calculates current transmission rate:
Wherein, SMFor current transmission rate, SM-1To be adjustment deviation in preceding rate k, value is equal toThe size of value is between 0~1, the tMIt is ' the finish time acquired for the M times data, described
tM-1' the finish time acquired for the M-1 times data.AMFor the current actual flow in port, the value of the actual flow can be root
It obtains, is also possible to according to when previous collected transmission performance data meter according to the optimization processing scheme introduced in embodiment one
It obtains.Specifically, if in calculating port when current actual flow, abnormal determination module 504 determines transmission performance number
According to exception, then state acquisition module 506 can be smooth to carrying out in preceding actual flow according to the scheme provided in previous embodiment
Optimization processing, and then obtain the A when acquisition of this dataM.If abnormal determination module 504 determines that transmission performance data are normal,
Then can A directly be calculated according to collected transmission performance data combination following formula in state acquisition module 506M:
AM=transmission total bytes+(the transmission port totalframes * frame gap)
It should be appreciated that for the actual flow of port sending direction, should according to the total bytes of sending direction with
Totalframes is calculated, then should be according to the total joint number and totalframes of receiving direction for the actual flow of port receiving direction
It is calculated.If abnormal determination module 504 determines current collected biography according to data acquisition results or data acquisition
Defeated performance data is normal, is influenced whether inaccurate by data acquisition itself, then state acquisition module 506 can direct root
The current state parameter of exit port is calculated according to collected transmission performance data.Such as the transmission rate current for port, it can
To calculate according to the following formula:
In the present embodiment, no matter state acquisition module 506 is which kind of mode to have got the current transmission in port by
The transmission rate can all be associated with port numbers and save by rate.It should be understood that should also when saving
Associated storage can characterize the information of the acquisition serial number of data corresponding to the transmission rate.
Port status parameter obtaining device provided in an embodiment of the present invention is acquired in the transmission performance data to port
Later, it can determine whether current collected transmission performance data receive number according to data acquisition results or data acquisition
According to the influence of acquisition inaccuracy itself, objective judgement is carried out to data acquisition results.Determining current collected transmission performance
Data are normal datas, when not acquired itself by data is influenced, directly calculate that obtain port current according to the data
State parameter.When determining that collected transmission performance data have received the inaccurate influence of receipt acquisition itself, not directly
It is calculated according to this transmission performance data for being unable to characterize port actual conditions and obtains the current state parameter in port, but according to
The port optimizes processing in preceding state parameter, thus acquisition and the closer state parameter of actual conditions, and then be subsequent
The network planning and maintenance more believable basis is provided, promote the quality of the network planning and maintenance.
5th embodiment:
Port status parameter obtaining device 50 in previous embodiment can be deployed on transmission device, can also be deployed in
Other than transmission device, different physical entities are enjoyed respectively from transmission device.Below with 50 quilt of port status parameter obtaining device
It is illustrated for being deployed on transmission device:
Please further combined with Fig. 6, transmission device 60 includes processor 61, memory 62 and communication bus 63, wherein communicating
Bus 63 is for realizing the connection communication between processor 61 and memory 62.It is understood that embodiment one and embodiment
Port status parameter acquiring method in two can realize that the present embodiment also provides a kind of storage Jie by computer program
Matter, i.e. memory 62.Memory 62 is used as a kind of computer readable storage medium, wherein being stored at least one computer journey
Sequence, these computer programs can read, compile and execute for processor 61, to realize corresponding process flow.For example,
In the present embodiment, port status parameter retrieval process is stored in memory 62, processor 61 can be by executing the computer
Program realizes the port status parameter acquiring method introduced in previous embodiment.Data acquisition module 502 shown in Fig. 5,
The function of abnormal determination module 504 and state acquisition module 506 can be executed in memory 62 by the processor 61 in Fig. 6
Port status parameter retrieval process realize.
It is specific for the two of the execution port state parameter acquisition program realization port status parameter acquiring method of processor 61
Process, the detailed introduction compared with having done in embodiment two in embodiment one, which is not described herein again.It will but tie below
Specific example is closed the port status parameter acquisition scheme in previous embodiment is further elaborated:
It is assumed that this time to port carry out data acquisition serial number be M, that is, be currently for port numbers be 001 port into
Capable the M times transmission performance data acquisition.It is assumed that the timing length of the timer of control data acquisition is 1s namely data acquire
Cycle T=1s starts to carry out some port in transmission device data acquisition and count then when data collection cycle reaches
The state parameter for calculating the port, refers to Fig. 7:
S701, record the M time to port progress the acquisition of transmission performance data at the beginning of tM。
In the present embodiment, the t at the beginning of determining that the M times carries out the acquisition of transmission performance data to portMWhen, it can be with
Storage will be associated with port numbers 001.
S702, record the M time to port progress the acquisition of transmission performance data at the beginning of tM’。
It is similar with record data acquisition start time, when the M times data acquisition terminates to complete, also to record corresponding
Time.It is also required to be associated storage with port numbers similarly, for finish time.In a kind of example of the present embodiment,
Can in the form of following table come associated storage port numbers and data acquisition at the beginning of, finish time:
Table 1
S703, judge whether the M times data acquires obtained transmission performance data abnormal.
If in the M times collected transmission performance data, transmitted in total bytes or transmission the two data of totalframes
The value for arbitrarily having one is 0, then the value that will characterize the continuous integration number of transmission performance data continuous abnormal increases by 1.Sentence simultaneously
Whether the current continuous integration number that breaks has been above equal to preset threshold, if being judged as YES, execution is S704;Otherwise it executes
S705.If in the M times collected transmission performance data, transmission total bytes and transmission totalframes are uniformly 0, then will continuously tire out
The value of metering number is reset, and is performed simultaneously S705.
S704, the port obtained when preceding actual flow obtains the M times data acquisition using smoothing algorithm optimization processing are real
Border flow.
The end when actual flow of port is acquired directly as the M times data when can directly acquire the M-1 times data acquisition
The actual flow of mouth.It is of course also possible to after port flow when obtaining the M-1 times to the M-N times data acquisition carries out smoothly
The actual flow of port when acquiring as the M times data, wherein N is greater than 1.
S705, port actual flow when the M time data acquire is calculated according to collected transmission performance data.
If it is determined that the M times collected transmission performance data is normal, then can normally calculate port current receiver to
And/or the actual flow of sending direction.Such as receiving direction:
AMThe total bytes of=receiving direction+(port the totalframes * frame gap of receiving direction).
S706, judge to seize between the M times data Harvest time with the presence or absence of task.
If determining that data acquisition meets condition according to the data recorded in table 1:
“(dtM-1< the first duration threshold value) && (dtM< the second duration threshold value) && (tM’-tM-1'==T) ", then determine the M times
There is no the situations that task is seized during data acquire, and execute S707;If the determination result is YES, then S708 is executed.
S707, the biography that port when the M times data acquires directly is calculated according to the actual flow of port when the M times data acquisition
Defeated rate.
If determining that there is no tasks to seize between the M times data Harvest time according to data acquisition results or data acquisition
Situation, then can directly according to collected transmission performance data calculate exit port transmission rate:
Wherein, AMThe actual flow of port when being acquired for the M times data.
S708, the port transmission obtained when preceding rate obtains the M times data acquisition using smoothing algorithm optimization processing are fast
Rate.
It is seized there are task between the M times data Harvest time if determined according to data acquisition results or data acquisition
Situation then needs to obtain in preceding rate, and port transmission speed when the M times data acquires is obtained using smoothing algorithm optimization processing
Rate:
Firstly, adjustment deviation k is calculated,Then according to formula:
Calculate SM, i.e. the transmission rate of port 001 when the M times data acquisition, wherein SM-1For in preceding rate.
After the transmission rate of port actual flow and port is computed, it is also desirable to be associated and deposit with port numbers
Storage, so as to subsequent use.
Storage medium, transmission device and port status parameter provided in this embodiment obtain scheme, by recording opposite end
The start/stop time for mouthful carrying out data acquisition, may thereby determine that in data acquisition task whether occur and seize to lead to data
Collection result inaccuracy.On the other hand, the read-around ratio that data acquisition results are exceptional value can also be recorded and carry out bulk registration,
And when determining the value for currently collecting transmission performance data is exceptional value, by the number of transmission performance data continuous abnormal and in advance
If threshold value is compared, and then determines whether collected transmission performance data are abnormal.Pass through above-mentioned two aspect, it is ensured that
When data acquire inaccuracy itself and lead to data acquisition results exception, can abnormal results be optimized with correction, avoided straight
The negative effect for calculating port status parameter according to abnormal transmission performance data is connect, the accuracy of port status parameter is promoted, into
And more believable basis is provided for the subsequent network planning and maintenance, promote the quality of the network planning and maintenance.
Obviously, those skilled in the art should be understood that each module of the embodiments of the present invention or each step can be used
General computing device realizes that they can be concentrated on a single computing device, or be distributed in multiple computing device institutes
On the network of composition, optionally, they can be realized with the program code that computing device can perform, it is thus possible to by them
It is stored in computer storage medium (ROM/RAM, magnetic disk, CD) and is performed by computing device, and in some cases, it can
With the steps shown or described are performed in an order that is different from the one herein, or they are fabricated to each integrated circuit dies
Block, or single integrated circuit module is maked multiple modules or steps in them to realize.So the present invention does not limit
It is combined in any specific hardware and software.
The above content is combining specific embodiment to be further described to made by the embodiment of the present invention, cannot recognize
Fixed specific implementation of the invention is only limited to these instructions.For those of ordinary skill in the art to which the present invention belongs,
Without departing from the inventive concept of the premise, a number of simple deductions or replacements can also be made, all shall be regarded as belonging to the present invention
Protection scope.
Claims (12)
1. a kind of port status parameter acquiring method, comprising:
The transmission performance data of transmission device port are acquired;
Determine that current collected transmission performance data exception, the exception are caused by inaccuracy of data acquisition itself;
The current state parameter in the processing acquisition port, the state ginseng are optimized in preceding state parameter to the port
Number includes the actual flow and/or transmission rate of the port.
2. port status parameter acquiring method as described in claim 1, which is characterized in that the biography to transmission device port
Defeated performance data, which is acquired, includes:
When data collection cycle reaches, the transmission performance data of ethernet port on the transmission device are acquired, institute
Stating transmission performance data includes the transmission totalframes and the total word of transmission on the ethernet port receiving direction and/or sending direction
Joint number.
3. port status parameter acquiring method as described in claim 1, which is characterized in that port status parameter acquisition side
Method further include:
Determine that current collected transmission performance data are normal;
The current state parameter in the port is calculated according to the collected transmission performance data.
4. port status parameter acquiring method as described in any one of claims 1-3, which is characterized in that the determination is currently adopted
The transmission performance data exception collected includes:
It determines that the collected transmission performance data are exceptional value, and determines the transporting according in preceding data acquisition situation
Energy data are that the continuous integration number of exceptional value has reached preset threshold.
5. port status parameter acquiring method as claimed in claim 4, which is characterized in that the state parameter includes the end
The current actual flow of mouth, it is described that the current shape in the processing acquisition port is optimized in preceding state parameter to the port
State parameter includes:
Actual flow corresponding at least one of the M-N times to the M-1 times transmission performance data acquisition is obtained, the M is
The sequence number value of current transmission performance data collection, the N are more than or equal to 1;
The current actual flow in the port is calculated in preceding actual flow according to what is got using smoothing algorithm.
6. port status parameter acquiring method as described in any one of claims 1-3, which is characterized in that the determination is currently adopted
The transmission performance data exception collected includes: when transmission performance data acquisition meets any one in following three conditions
When, determine current collected transmission performance data exception:
Determine preceding transmission performance data acquire spent in preceding acquisition duration dtM-1More than or equal to the first duration threshold value;
It determines when previous transmission performance data acquire the current acquisition duration dt spentMMore than or equal to the second duration threshold value;
It determines when previous transmission performance data acquire finish time tM' the same transmission performance data acquire finish time tM-1’
Between interval be not equal to transmission performance data collection cycle T, the M be current transmission performance data collection sequence number value.
7. port status parameter acquiring method as claimed in claim 6, which is characterized in that the state parameter includes the end
The current transmission rate of mouth, it is described that the current shape in the processing acquisition port is optimized in preceding state parameter to the port
State parameter includes:
It is determined according to the M-N times to the M-1 times corresponding at least one of the transmission rate of transmission performance data acquisition
Preceding rate, the N are more than or equal to 1;
The current transmission rate in the port is obtained in preceding rate calculations according to described using smoothing algorithm.
8. port status parameter acquiring method as claimed in claim 7, which is characterized in that described according to the M-N times to M-1
Corresponding at least one of the transmission rate of secondary transmission performance data acquisition is determined
If the transmission rate obtained after the M-1 times transmission performance data acquisition is 0, the M-N times to the M-1 times transmission is obtained
Transmission rate corresponding to performance data collection, and the average value conduct for calculating N number of transmission rate is described in preceding rate, institute
N is stated greater than 1;
If the transmission rate obtained after the M-1 times transmission performance data acquisition is not 0, the M-1 times transmission is directly acquired
Transmission rate corresponding to performance data collection is as described in preceding rate.
9. port status parameter acquiring method as claimed in claim 7, which is characterized in that described to use smoothing algorithm according to institute
Stating and obtaining the current transmission rate in the port in preceding rate calculations includes calculating current transmission rate according to the following formula:
The SMFor current transmission rate, the SM-1To be described in preceding rate, the k is adjustment deviation, and value is equal toThe tM' the finish time acquired for the M times data, the tM-1' acquired for the M-1 times data
Finish time, the AMFor current actual flow.
10. a kind of port status parameter obtaining device, which is characterized in that the port status parameter obtaining device includes:
Data acquisition module is acquired for the transmission performance data to transmission device port;
Abnormal determination module, for determining current collected transmission performance data exception, the exception is by data acquisition itself
Inaccuracy and cause;
State acquisition module, for optimizing the current shape in the processing acquisition port in preceding state parameter to the port
State parameter, the state parameter include the actual flow and/or transmission rate of the port.
11. a kind of transmission device, which is characterized in that the transmission device includes processor, memory and communication bus;
The communication bus is for realizing the connection communication between processor and memory;
The processor is for executing one or more program stored in memory, to realize as appointed in claim 1 to 9
The step of port status parameter acquiring method described in one.
12. a kind of storage medium, which is characterized in that the storage medium is stored with one or more program, it is one or
The multiple programs of person can be executed by one or more processor, to realize port shape as claimed in any one of claims 1-9 wherein
The step of state parameter acquiring method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710703715.7A CN109412879B (en) | 2017-08-16 | 2017-08-16 | Port state parameter acquisition method and device, transmission equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710703715.7A CN109412879B (en) | 2017-08-16 | 2017-08-16 | Port state parameter acquisition method and device, transmission equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109412879A true CN109412879A (en) | 2019-03-01 |
CN109412879B CN109412879B (en) | 2023-02-21 |
Family
ID=65454656
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710703715.7A Active CN109412879B (en) | 2017-08-16 | 2017-08-16 | Port state parameter acquisition method and device, transmission equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109412879B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767039A (en) * | 2020-06-29 | 2020-10-13 | 重庆市勘测院 | Industrial acquisition gateway based on script file and data acquisition method |
CN113849355A (en) * | 2021-08-30 | 2021-12-28 | 苏州浪潮智能科技有限公司 | I2C rate self-adaptive adjusting method, system, terminal and storage medium |
CN114500315A (en) * | 2021-12-31 | 2022-05-13 | 深圳云天励飞技术股份有限公司 | Equipment state monitoring method and device, computer equipment and storage medium |
CN114661017A (en) * | 2022-05-24 | 2022-06-24 | 深圳市德航智能技术有限公司 | Industrial field acquisition system with 5G transmission |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110085494A1 (en) * | 2009-10-09 | 2011-04-14 | At&T Intellectual Property I, L.P. | Data routing in hybrid wireless communication networks |
CN102438208A (en) * | 2011-10-20 | 2012-05-02 | 中兴通讯股份有限公司 | Method and system for controlling common channel of trunking communication system |
CN103532940A (en) * | 2013-09-30 | 2014-01-22 | 广东电网公司电力调度控制中心 | Network security detection method and device |
CN105681123A (en) * | 2015-12-25 | 2016-06-15 | 北京信息控制研究所 | Spacewire network delay testing and optimizing system |
CN106059830A (en) * | 2016-07-18 | 2016-10-26 | 安徽农业大学 | Automatic analysis method for traffic performance of PTN (Packet Transport Network) ring network |
US20170111233A1 (en) * | 2015-10-15 | 2017-04-20 | Citrix Systems, Inc. | Systems and methods for determining network configurations using historical and real-time network metrics data |
-
2017
- 2017-08-16 CN CN201710703715.7A patent/CN109412879B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110085494A1 (en) * | 2009-10-09 | 2011-04-14 | At&T Intellectual Property I, L.P. | Data routing in hybrid wireless communication networks |
CN102438208A (en) * | 2011-10-20 | 2012-05-02 | 中兴通讯股份有限公司 | Method and system for controlling common channel of trunking communication system |
CN103532940A (en) * | 2013-09-30 | 2014-01-22 | 广东电网公司电力调度控制中心 | Network security detection method and device |
US20170111233A1 (en) * | 2015-10-15 | 2017-04-20 | Citrix Systems, Inc. | Systems and methods for determining network configurations using historical and real-time network metrics data |
CN105681123A (en) * | 2015-12-25 | 2016-06-15 | 北京信息控制研究所 | Spacewire network delay testing and optimizing system |
CN106059830A (en) * | 2016-07-18 | 2016-10-26 | 安徽农业大学 | Automatic analysis method for traffic performance of PTN (Packet Transport Network) ring network |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111767039A (en) * | 2020-06-29 | 2020-10-13 | 重庆市勘测院 | Industrial acquisition gateway based on script file and data acquisition method |
CN111767039B (en) * | 2020-06-29 | 2023-11-24 | 重庆市勘测院 | Industrial acquisition gateway and data acquisition method based on script file |
CN113849355A (en) * | 2021-08-30 | 2021-12-28 | 苏州浪潮智能科技有限公司 | I2C rate self-adaptive adjusting method, system, terminal and storage medium |
CN113849355B (en) * | 2021-08-30 | 2023-08-08 | 苏州浪潮智能科技有限公司 | I2C rate self-adaptive adjustment method, system, terminal and storage medium |
CN114500315A (en) * | 2021-12-31 | 2022-05-13 | 深圳云天励飞技术股份有限公司 | Equipment state monitoring method and device, computer equipment and storage medium |
CN114500315B (en) * | 2021-12-31 | 2024-09-27 | 深圳云天励飞技术股份有限公司 | Equipment state monitoring method and device, computer equipment and storage medium |
CN114661017A (en) * | 2022-05-24 | 2022-06-24 | 深圳市德航智能技术有限公司 | Industrial field acquisition system with 5G transmission |
Also Published As
Publication number | Publication date |
---|---|
CN109412879B (en) | 2023-02-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109412879A (en) | Port status parameter acquiring method, device and transmission device, storage medium | |
CN104584483B (en) | Method and apparatus for automatically determining the reason for service quality degrades | |
CN103561354B (en) | Method and device for calculating and processing video smoothness | |
CN104598551B (en) | A kind of data statistical approach and device | |
CN106921665A (en) | A kind of message processing method and the network equipment | |
CN106131083A (en) | A kind of attack message detection and take precautions against method and switch | |
CN112730938A (en) | Electricity stealing user judgment method based on electricity utilization collection big data | |
CN109688063A (en) | A kind of large-scale setting method and device for receiving offloading functions | |
CN109743356A (en) | Industry internet collecting method and device, readable storage medium storing program for executing and terminal | |
CN104852863A (en) | Method and device for managing dynamic threshold in switch of shared cache | |
CN105791008A (en) | Method and device for determining packet loss location and reason | |
CN105791144A (en) | Method and apparatus for sharing link traffic | |
CN112054968A (en) | Scheduling method and device for large-scale time-sensitive network and electronic equipment | |
CN103716187A (en) | Network topology structure determination method and system | |
CN113890842A (en) | Information transmission delay upper bound calculation method, system, equipment and storage medium | |
CN102550070B (en) | The method of estimation of Loss Rate in packetized network | |
CN109375146A (en) | A kind of filling mining method, system and the terminal device of electricity consumption data | |
CN102739508B (en) | A kind of method and system of express network data transmission | |
WO2024021559A1 (en) | Power data synchronous uploading method and system, storage and computing device | |
CN110690980A (en) | Sending algorithm of market data | |
CN103701634A (en) | Method and device for transmitting multimedia data | |
TW201528725A (en) | Abnormal network traffic monitoring system with respect to normal distribution mode | |
CN106911531A (en) | A kind of data packetloss rate statistical method of many distribution scenes | |
CN105337784B (en) | A kind of loss packet test method, test device and system | |
CN111682929A (en) | Low real-time optical longitudinal synchronization method and special electric power CPU chip |
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 |