Optical line local side system and data statistical method therein
Technical Field
The invention relates to the field of optical communication, in particular to an optical line local side system and a data statistical method based on a timer in the optical line local side system.
Background
The rack-mounted OLT device mainly comprises a main control board, an upper connection board and a service board (such as various board cards of an Ethernet Passive Optical Network (EPON), a gigabit-capable passive optical network (GPON) and the like), has high-efficiency bandwidth utilization rate and Ethernet service support capacity, and helps operators to provide reliable service quality guarantee for users. The main control board (SMC) is the core control board of the whole device, and the main function is to control and process the broadband service. The main control board communicates with the service board through the bus interface of the bandwidth GE/10GE to complete the configuration, management and control of the equipment, meanwhile, the system alarm and performance information processing are realized through the in-band network management channel, and the main control board manages each service board in the system through the TCP/IP protocol, so that any function which needs to be realized by each service board needs to be controlled by the main control board through the network element management system or the command line.
In order to fully ensure the service quality of network operation and facilitate the daily maintenance and fault diagnosis of equipment by a user, an EPON system should support packet performance statistics on a PON (passive optical network) port and an add-on port of an OLT (optical line terminal) and on a PON port and an ethernet port of an ONU (optical network unit), respectively. The OLT may query the performance statistics information of the PON interface through an extended OAM (operation administration maintenance) message, and the SFU (single home unit) -type ONU may query the performance statistics information of the ethernet port through an OAM message by the OLT.
At the present stage, statistics of port service flow by OLT equipment is divided into real-time statistics and historical statistics every 15 minutes or every 15 minutes, when a user needs to check data information of a corresponding port, a data statistics enabling command needs to be issued through a main control board or a network element management system, and when an EPON service board receives the command, a statistics switch of the real-time statistics or the historical statistics is started according to the requirement to drag for required port data and report the port data to the main control board; unless the main control board issues the corresponding execution command, the service board will not perform any operation on the obtained data.
However, the implementation of the existing performance statistics function is only applicable to the statistics of a small batch of ports. When a user needs to detect port data of a plurality of current ONUs, the main control board needs to send a configuration command to the service board, so that the service board and the ONUs can interact, and data obtained through the chip is reported to the main control board in real time to be displayed. Therefore, when the number of the counted ONUs is large and the number of the counted ONU ports is large, the information interaction between the main control board and the service board is over time, which causes a large burden on the communication between the service board and the main control board, which not only fails to achieve the purpose of real-time monitoring of the user, but also may cause information loss and board communication failure, which is not favorable for the real-time performance and accuracy of the user detection data.
Disclosure of Invention
The invention aims to provide an optical line local side system and a data statistical method thereof aiming at the defects of the prior art, wherein the data statistical mechanism is improved, and the timing reporting mechanism is realized by adopting the control of a timer so as to avoid the communication overtime phenomenon between board cards.
In order to achieve the above object, an aspect of the present invention provides a data statistics method in an optical line local end system, wherein:
issuing a corresponding configuration command to the operation of port performance statistics through a main control board in the optical line office system;
after receiving and analyzing the port to be counted and the on-off state information thereof in the configuration command through a service board of the optical line office system, starting a timer of the service board for timing; when the timing time of the timer reaches a preset value or the accumulated time reaches a preset period, the service board acquires port performance statistical data corresponding to the configuration command requirement, and reports the port performance statistical data to the main control board for storage;
and when the main control board responds to the command of checking the statistical data, acquiring the statistical data from the port performance locally stored by the main control board.
Optionally, the port to be counted is a PON port of the OLT device, or a PON port of the ONU device, or an ethernet port of the ONU device.
Optionally, the switch state information in the configuration command includes: information for selecting an enable switch for opening or closing a port, and information for selecting a statistic switch for performing real-time statistics or historical statistics on the port.
Optionally, when the statistical switch of the configuration command selects to perform real-time statistical timing, the timer is started cyclically, and when the timing time of each timer reaches a preset value, the service board performs the operation of collecting port performance statistical data and reporting the port performance statistical data to the main control board according to the configuration command.
Optionally, when a statistic switch of the configuration command is selected to perform historical statistics, setting an integer variable which is initially 0, starting the timer in a circulating manner, and adding one to the value of the variable when the timing time of the timer reaches a preset value each time;
when the timing time accumulation of each timer reaches a preset period, namely the product of the preset values of the variable and the timing time is a multiple of the preset period, the service board collects port performance statistical data once according to the configuration command and reports the port performance statistical data to the main control board.
In a preferred example, a method for data statistics in an optical line local side system is provided, including the following steps:
the main control board sends a configuration command of port performance statistics operation to the service board, and the service board starts to start a timer after receiving and analyzing information of the port to be counted, the enabling switch and the counting switch in the configuration command;
when the timer is overtime, the service board executes a timer overtime processing function: sending a message queue containing port information to be counted, receiving and analyzing the message queue by a performance counting task, and carrying out real-time counting or historical counting on a corresponding port according to the state of selecting a counting switch in a configuration command;
in the real-time statistics, the service board performs statistics on the number of all data packets of the corresponding port in the timing time every other preset timing time; in the history statistics, the service board performs statistics on the number of all data packets of the corresponding port in a preset period every other period, wherein the period is integral multiple of the timing time;
the service board reports the port performance statistical data obtained through real-time statistics or historical statistics to the main control board and stores the port performance statistical data in the memory space of the main control board; after the report is finished, the service board restarts the timer, and after the timer is overtime again, the overtime processing function of the timer is executed again, and the process is circulated;
and the main control board acquires the locally stored port performance statistical data for checking.
Another technical solution of the present invention is to provide an optical line local side system, which is provided with a main control board and a service board;
the main control board further comprises:
a statistic command configuration module for forming a configuration command for controlling the service board to perform port performance statistic operation;
the memory space is used for storing port performance statistical data reported by the service board;
the statistical data query module is used for directly reading the information stored in the memory space to respond to a command for checking the statistical data;
the service board further comprises:
and the timer is used for controlling the interval time of the port performance statistical data reported by the service board.
Optionally, the master control board is provided with a master communication module, which interacts with a slave communication module provided by the service board to implement issuing of a configuration command and reporting of port performance statistical data.
Optionally, the service board further includes:
the real-time counting module is used for carrying out port performance counting operation once according to the configuration command when the timing time of the timer reaches a preset value every time; alternatively, the first and second electrodes may be,
and the history counting module is used for carrying out port performance counting operation once according to the configuration command when the timing time accumulation of each timer reaches a preset period.
Compared with the prior art, the optical line local side system and the data statistical method thereof have the advantages that: the invention can make the service board report the statistical information of the device port in a timing and active way through the control of the timer, and the main control board receives the statistical information to store the statistical information in a local real-time way; when the main control board needs to check the port statistical information, the port statistical information is only acquired from the data storage area of the main control board, and the port statistical information is not required to be fished through the service board when the port statistical information needs to be checked, so that communication overtime between the main control board and the service board is avoided, delay of checking data is reduced, meanwhile, the service board counts the data in a message queue mode, system resources are saved, and process burden is reduced.
Drawings
FIG. 1 is a schematic diagram of the architecture of a fiber optic line-in-the-office system according to the present invention;
FIG. 2 is a schematic diagram illustrating timing of real-time statistics performed by the data statistics method according to the present invention;
FIG. 3 is a timing diagram illustrating historical statistics performed by the data statistics method of the present invention;
FIG. 4 is a schematic flow chart of a data statistics method according to the present invention;
FIG. 5 is a flow chart illustrating the execution of a timer timeout handling function in the statistics method of FIG. 4 according to the present invention;
fig. 6 is a schematic diagram of a main control board querying statistical data in the data statistical method of the present invention.
Detailed Description
The invention provides an optical line local side system and a data statistical method thereof.A timer is utilized in a service board to realize a timing reporting mechanism according to a configuration command issued by a main control board, when the timing time of the timer reaches a preset value or reaches a preset period in an accumulated way, the service board can automatically report the statistical information of an equipment port of an OLT or an ONU to the main control board, and the main control board stores the statistical information reported by the service board in real time; when the main control board needs to be checked, the data only needs to be acquired from the data stored locally in the main control board, and the data does not need to be acquired through the service board, so that the phenomenon of communication overtime between the board cards is effectively avoided.
Fig. 1 shows an application example of the optical line office system according to the present invention, a main control board 10 forms a configuration command for controlling a service board to perform port performance statistics through a statistics command configuration module 11, where the configuration command includes, for example, information of a port to be counted, control information of an enable switch, control information of a statistics switch, and the like. The port may be a PON port of a service board in the OLT device, or a PON port or an ethernet port in the ONU device, or the like; the enabling switch is used for controlling the opening or closing of the port; the statistical switch is used for selecting real-time statistics or historical statistics. The main control board 10 issues the configuration command to the service board 20 through the set main communication module 12. The main communication module 12 can also store the port performance statistical data reported by the service board 20 into the memory space 13 locally set by the main control board 10; when the main control board 10 issues a command to obtain port performance statistics data, the set statistics data query module 14 directly obtains information stored in the memory space 13.
In the service board 20 of this embodiment, the slave communication module 21 is configured to interact with the master control board 10, and receive a configuration command of port performance statistics sent down, or report port performance statistics data to the master control board 10; a timer 22 is arranged in the service board 20 to control the interval time of reporting port performance statistical data; when the timing time of the timer reaches a preset value or after the accumulation reaches a preset period, according to the information analyzed in the configuration command, the real-time statistical module 23 or the history statistical module 24 configured by the service board 20 performs port performance statistics on the corresponding port, and reports the port performance statistics to the main control board 10 via the slave communication module 21 for data storage.
The real-time statistics refers to taking a timing time (set to 10s in the example of fig. 2) specified by the timer as a unit, that is, every other timing time (10 s), the service board performs an operation of acquiring port performance statistics data and reporting the port performance statistics data to the main control board, and after the operation is completed once, the service board restarts the timer, and when the timing time reaches a preset value again, performs the next data acquisition and reporting operation, so that polling is not stopped.
The historical statistics refers to that the service board performs port performance statistics data collection once and reports the port performance statistics data to the main control board every other preset period, and each period is set to be an integer multiple of the timing time (in the example of fig. 3, the timing time is set to be 10s, and the period is set to be 15 minutes, that is, 90 timing times).
Referring to fig. 4, 5, and 6, the data statistics method includes the following steps:
and S1, after the master control board issues the start command of the enable switch of the port performance statistics, forming a corresponding configuration command according to the port information and the port state, and issuing the configuration command to the service board through the interaction of the master communication module and the slave communication module. The port may be a PON port of an OLT, a PON port of an ONU, an ethernet port, or the like.
S2, the service board starts to start a timer after receiving and analyzing the information of the port, the enable switch, the statistic switch and the like to be counted in the configuration command; when the timing time of the timer reaches a preset value (such as 10 s), the timeout processing function of the timer is triggered to execute corresponding operation.
A. When the overtime processing function of the timer is executed, firstly, a message queue containing information such as the type of the port to be counted, the port address and the like is sent, after the message queue is received and analyzed by the performance counting task, the corresponding port is counted in real time or is counted in history according to the counting switch state in the configuration command.
And B1, performing real-time statistics, namely performing port performance statistics every other timing time, namely calling a data real-time statistics interface function when the timer is overtime every time, and performing statistics on the number of all data packets of the corresponding port within the timing time.
B2, when counting the history, counting the port performance every other period, and defining an unsigned integer variable which is initially 0: signaled int gTimeCount = 0; each time the timer is overtime (10 s), the variable gTimeCount is added by 1, and when the time indicated by the variable gTimeCount (i.e. the product of the sum of the variables and the unit timing time) is accumulated to be a multiple of a period (e.g. 15 minutes), the number of all the data packets of the corresponding port in the period is counted once.
And S3, the service board reports the port performance statistical data obtained through real-time statistics or historical statistics to the main control board, and the port performance statistical data is stored in the memory space of the main control board. After that, the service board starts the timer again, and after the timer is overtime, executes a new timer overtime processing function, and so on.
S4, when the main control board needs to check the data statistics information of the port of which type, only the data locally stored in the main control board needs to be acquired, therefore, the data does not need to be fished by the service board when checking, the communication overtime between the main control board and the service board is effectively avoided, and the delay of checking the data is reduced.
While the present invention has been described in detail with reference to the preferred embodiments, it should be understood that the above description should not be taken as limiting the invention. Various modifications and alterations to this invention will become apparent to those skilled in the art upon reading the foregoing description. Accordingly, the scope of the invention should be determined from the following claims.