The content of the invention
The present invention is directed to the problem of existing, provides a kind of OLT (Optical Line Terminal, optical line terminal) property
The processing method of energy statistics, user arbitrarily can set the cycle of performance statistic long at OLT ends according to actual needs
Degree, enhances user experience.
In order to realize more than goal of the invention, the present invention is achieved by the following technical solutions:
A kind of processing method of OLT (Optical Line Terminal, optical line terminal) performance statistic, the party
Method includes:
Determine the real time data basic point at OLT ends;Real time data basic point is equal to the real time data basic point and ONU stored before
The sum of the real time data of (Optical Network Unit optical network units);
Judge whether OLT ends performance statistics history cycle terminates;OLT ends performance statistics history cycle by user according to demand
Arbitrary setting;
If it is, the historical data basic point and historical data at update OLT ends;
Wherein, the historical data basic point at the OLT ends be equal to OLT ends real time data basic point and ONU end real time data it
With;
Wherein, the historical data at OLT ends subtracts described equal to the sum of the real time data basic point and the ONU real time datas
The historical data basic point at OLT ends.
Preferably, the real time data basic point for determining the OLT ends specifically includes:
The ONU end history cycle data are inquired about by PON (Passive Optical Network passive optical network),
If different from the history cycle data of caching, it is determined as the performance statistics end cycle of the ONU, then updates the OLT
The real time data basic point at end.
Preferably, the method is further included:
Update the real time data at the OLT ends;The real time data at the OLT ends be equal to the real time data basic point with it is described
The sum of ONU real time datas.
Preferably, it is described to judge whether OLT ends performance statistics history cycle terminates to specifically include:
One cycle timer and a variable roundStart are set to determine an OLT ends performance statistics history cycle
Whether terminate;
When the variable roundStart is true, the new OLT cycles are represented, if false, representing still in an OLT
In cycle.
The embodiment of the present invention also provides a kind of OLT device, for passive optical network, which is characterized in that including:
OLT ends real time data basic point determining module, for determining the real time data basic point at the OLT ends;The real-time number
It is equal to the real-time of the real time data basic point that stores before and ONU (Optical Network Unit optical network units) according to basic point
The sum of data;
OLT cycle judgment modules, for judging whether OLT ends performance statistics history cycle terminates;OLT ends performance system
Meter history cycle is arbitrarily set according to demand by user;
If it is, update the historical data basic point and historical data at the OLT ends;
Wherein, the historical data basic point at the OLT ends counts in real time equal to the real time data basic point at the OLT ends with ONU end
The sum of according to;
Wherein, the historical data at the OLT ends is equal to the sum of the real time data basic point and described ONU real time datas and subtracts
The historical data basic point at the OLT ends.
Preferably, the OLT real time datas basic point determining module is specifically used for through PON (Passive Optical
Network passive optical network) the inquiry ONU end history cycle data, if different from the history cycle data of caching, sentence
It is set to the performance statistics end cycle of the ONU, then updates the real time data basic point at the OLT ends.
Preferably, which further comprises;
OLT ends real time data update module, for updating the real time data at the OLT ends;The real time data at the OLT ends
Equal to the sum of the real time data basic point and the ONU real time datas.
Preferably, the OLT cycles judgment module, for setting a cycle timer and a variable roundStart
To determine whether an OLT ends performance statistics history cycle terminates;
When the variable roundStart is true, the new OLT cycles are represented, if false, representing still in an OLT
In cycle.
Using technical solution provided in an embodiment of the present invention, user can be according to actual needs in OLT ends arbitrarily setting property
The time span in energy statistics cycle.It, still can be with although OLT ends and ONU end set the different performance data statistics cycle
Real-time query significantly enhances user experience to OLT ends and the real time data and historical data of ONU end.
Specific embodiment
It in order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing
There is attached drawing needed in technology description to be briefly described, it should be apparent that, explanation and attached drawing are for the present invention below
It is exemplary, and is understood not to the limitation present invention.Following description describe numerous details to facilitate to this hair
Sensible solution.However, in some instances, well known or conventional details does not specify simultaneously, to meet the succinct requirement of specification.
In passive optical network, an OLT device can be connected with multiple ONU equipments.In GPON, ONU is generally fixed
Performance statistics history cycle is 15 minutes, and real time data will start from scratch after each end cycle, the accumulation of a upper history cycle
Data will be recorded.It then needs to turn for the history cycle length on OLT when history cycle length is not 15 minutes on OLT
Change ONU end data.
The embodiment of the present invention provides a kind of OLT (Optical Line Terminal, optical line terminal) performance statistic
Processing method, which is characterized in that the described method includes:
Determine the real time data basic point at the OLT ends;The real time data basic point is equal to the real time data base stored before
Point is the sum of with the real time data of ONU (Optical Network Unit optical network units);
Judge whether OLT ends performance statistics history cycle terminates;The OLT ends performance statistics history cycle by user according to
Demand is arbitrarily set;
If it is, update the historical data basic point and historical data at the OLT ends;
Wherein, the historical data basic point at the OLT ends counts in real time equal to the real time data basic point at the OLT ends with ONU end
The sum of according to;
Wherein, the historical data at the OLT ends is equal to the sum of the real time data basic point and described ONU real time datas and subtracts
The historical data basic point at the OLT ends.
Preferably, the real time data basic point for determining the OLT ends specifically includes:
The ONU end history cycle data are inquired about by PON (Passive Optical Network passive optical network),
If different from the history cycle data of caching, it is determined as the performance statistics end cycle of the ONU, then updates the OLT
The real time data basic point at end.
Preferably, the method is further included:
Update the real time data at the OLT ends;The real time data at the OLT ends be equal to the real time data basic point with it is described
The sum of ONU real time datas.
Preferably, it is described to judge whether OLT ends performance statistics history cycle terminates to specifically include:
One cycle timer and a variable roundStart are set to determine an OLT ends performance statistics history cycle
Whether terminate;
When the variable roundStart is true, the new OLT cycles are represented, if false, representing still in an OLT
In cycle.
The specific technical solution of the embodiment of the present invention is described in further detail below in conjunction with the accompanying drawings.It refer to figure
1, as shown in Figure 1:
One real time data basic point (realtimeBase) of system maintenance, a historical data basic point (historyBase)
With last time history cycle data (previousHistory).
Whether one timer and flag variables roundStart of Xun Huan of system maintenance is tied with a definite OLT cycle
Beam:
RoundStart is the true respresentation new OLT cycles, is false represent still in the same OLT cycles.Each time
RoundStart is set to very, vacation is always set in the case of other when timer starts.
System starts timer, regular (such as 5 seconds) poll ONU, to obtain history cycle data;
If history cycle data are different from the upper history cycle data cached, it is determined as ONU end cycles, it will more
New real time data basic point and upper history cycle data:
RealtimeBase=realtimeBase+ONU real time datas
PreviousHistory=newly obtains historical data
Historical data history and historical data base are updated if an OLT end cycle (roundStart is true)
Quasi- historyBase:
History=realtimeBase+ONU real time datas-historyBase;
HistoryBase=realtimeBase+ONU real time datas.
Calculating for the real time data and historical data that are presented to the user:
Real time data realtime:
Realtime=realtimeBase+ONU real time datas
Historical data History:
As above-mentioned middle OLT end cycles when the historical data History that obtains.
The embodiment of the present invention also provides a kind of OLT device, for passive optical network, which is characterized in that including:
OLT ends real time data basic point determining module, for determining the real time data basic point at the OLT ends;The real-time number
It is equal to the real-time number of the real time data basic point and ONU (Optical Network Unit optical network units) stored before according to basic point
The sum of according to;
OLT cycle judgment modules, for judging whether OLT ends performance statistics history cycle terminates;OLT ends performance system
Meter history cycle is arbitrarily set according to demand by user;
If it is, update the historical data basic point and historical data at the OLT ends;
Wherein, the historical data basic point at the OLT ends counts in real time equal to the real time data basic point at the OLT ends with ONU end
The sum of according to;
Wherein, the historical data at the OLT ends is equal to the sum of the real time data basic point and described ONU real time datas and subtracts
The historical data basic point at the OLT ends.
Preferably, the OLT real time datas basic point determining module is specifically used for through PON (Passive Optical
Network passive optical network) the inquiry ONU end history cycle data, if different from the history cycle data of caching, sentence
It is set to the performance statistics end cycle of the ONU, then updates the real time data basic point at the OLT ends.
Preferably, which further comprises;
OLT ends real time data update module, for updating the real time data at the OLT ends;The real time data at the OLT ends
Equal to the sum of the real time data basic point and the ONU real time datas.
Preferably, the OLT cycles judgment module, for setting a cycle timer and a variable roundStart
To determine whether an OLT ends performance statistics history cycle terminates;
When the variable roundStart is true, the new OLT cycles are represented, if false, representing still in an OLT
In cycle.
Using technical solution provided in an embodiment of the present invention, user can be according to actual needs in OLT ends arbitrarily setting property
The time span in energy statistics cycle.It, still can be with although OLT ends and ONU end set the different performance data statistics cycle
Real-time query significantly enhances user experience to OLT ends and the real time data and historical data of ONU end.
Illustrate, in the claim and specification of this patent, relational terms such as first and second and the like
It is used merely to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying these
There are any actual relationship or orders between entity or operation.Moreover, term " comprising ", "comprising" or its is any
Other variants are intended to non-exclusive inclusion, so that process, method, article or equipment including a series of elements
Not only include those elements, but also including other elements that are not explicitly listed or further include as this process, side
Method, article or the intrinsic element of equipment.In the absence of more restrictions, it is wanted by what sentence limited " including one "
Element, it is not excluded that also there are other identical elements in the process, method, article or apparatus that includes the element.It is above-mentioned
Embodiment can be freely combined as needed.The above is only the preferred embodiment of the present invention, it is noted that for this skill
For the those of ordinary skill in art field, without departing from the principle of the present invention, can also make it is several omit, improve and
Retouching, these improvements and modifications also should be regarded as protection scope of the present invention.