The upgrade-system of ONU equipment and method
Technical field
The present invention relates to a kind of upgrade-system and method of ONU equipment, particularly relate to a kind of can walking abreast and send image file for upgrading to upgrade-system and a kind of upgrade method of utilizing described upgrade-system to realize of the ONU equipment of ONU equipment.
Background technology
At present comparatively ripe and practical EPON(ethernet passive optical network) in system and the realizing in standard of industry, OLT(optical line terminal) to ONU(optical network unit) remote upgrade be mainly divided into four step: OLT and send upgrade images to the ONU that will upgrade; ONU programming upgrade image is to FLASH(nonvolatile memory); Activate ONU, allow ONU upgrade image good with programming and that be stored in spare memory area start; Send commit order (for the main storage area of ONU equipment and spare memory area are exchanged) and, to ONU, allow the standby usage memory block of ONU exchange, treat that ONU just can realize the upgrading of ONU equipment after restarting.
In these four steps, OLT sends mirror image will take a lot of time to ONU and ONU programming upgrade image to FLASH.And in these two steps, ONU programming upgrade image is relevant to the performance of ONU self, so in EPON system, improve the upgrading efficiency of ONU and save the main task of update time is exactly to save OLT to send the time of upgrade image to ONU.
And in the prior art, OLT is the form that adopts serial to send, upgrade image is sent in a plurality of ONU to be upgraded one by one, also in OLT is sent to an ONU completely by upgrade image after, just can be sent in next ONU.Therefore, adopt traditional upgrade method to lose time very much, the efficiency of upgrading is also very low.
Summary of the invention
The technical problem to be solved in the present invention is that the form that OLT adopts serial to send when overcoming the upgrading of ONU in prior art is sent in ONU by upgrade image one by one, cause upgrading to be lost time very much, the efficiency of upgrading is very low defect also, provides a kind of can walking abreast to send image file for upgrading to upgrade-system and a kind of upgrade method of utilizing described upgrade-system to realize of the ONU equipment of ONU equipment.
The present invention solves above-mentioned technical problem by following technical proposals:
The invention provides a kind of upgrade method of ONU equipment, its feature is, it is for the upgrading of at least one ONU equipment of carry under the OLT equipment of EPON system, and described upgrade method comprises the following steps:
S
1, the image file for described at least one ONU device upgrade is downloaded to described OLT equipment;
S
2, the MAC Address of described at least one ONU equipment (hardware address) is tied to same SessionID(session identification) in;
S
3, control the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and be sent to described at least one ONU equipment according to the MAC Address of described at least one ONU equipment by described image file is parallel;
S
4, control the ONU equipment that successfully receives described image file described image file write in FLASH to upgrade.
Utilize upgrade method of the present invention can adopt the parallel mode sending that the image file for ONU device upgrade is sent to at least one ONU equipment to be upgraded, wherein, at step S
2middle meeting is tied to the MAC Address of described at least one ONU equipment in same SessionID, then at step S
3the described OLT equipment of middle control reads the MAC Address recording in SessionID, image file can be sent to simultaneously to described at least one ONU equipment.
Like this, utilize upgrade method of the present invention just can when ONU device upgrade, save a large amount of time, and method of the present invention is to have very much application necessary on large-scale machine frame, rack-mount unit, because the lifting along with equipment performance, under OLT equipment, the quantity of the ONU equipment of carry also can get more and more, adopt method of the present invention can save the needed time of ONU device upgrade, greatly improved the efficiency of long-range ONU device upgrade.
Preferably, step S
3further comprise:
S
31, described image file is divided into N segmentation successively according to order from the beginning to the end, the sequence number of segmentation is followed successively by 1 to N, wherein N is positive integer, and n is set equals 1;
S
32, control the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and be sent to described at least one ONU equipment according to the MAC Address of described at least one ONU equipment by the image file of segmentation n is parallel;
S
33, judge each ONU equipment whether all within a time period, send one for the feedback command that characterizes the image file that successfully receives segmentation n to described OLT equipment, if so, perform step S
34, if not, perform step S
36;
S
34, judge whether n equals N, if so, perform step S
4; If not, perform step S
35;
S
35, by n assignment, be n+1, then return to step S
32;
S
36, the MAC Address of deleting the ONU equipment do not send described feedback command from described SessionID, then perform step S
34.
Wherein, step S
31in n be only a numerical value that characterizes segments, and n is set to, from equaling in the of 1, be increased to gradually N in the process of manner of execution.
In controlling the process of described OLT device transmission image file, according to the < < EPON of China Telecom equipment and technology, require the regulation in V3.0 > > to describe, OLT equipment sends image file to ONU equipment and sends with segmentation form, and the size of segmentation had better not surpass 1400 bytes, and after sending and must by the time receiving that ONU equipment receives the response of image file of segmentation after the image file of a segmentation, just can continue to send the image file of next segmentation.
Regulation based on above-mentioned, by step S
3be divided in detail above-mentioned circulation process and carry out, when having guaranteed parallel transmission image file to ONU equipment, also guaranteed image file to carry out segmentation transmission, met the standard in industry, also carried out smoothly upgrade method of the present invention.
Preferably, step S
4also comprise afterwards a step S
5: control the ONU equipment that described OLT device activation successfully receives described image file, and to the ONU equipment after activating, send a commit order and (switch order, for the main storage area of ONU equipment and spare memory area are exchanged), so that the main storage area of the ONU equipment after described activation and spare memory area are exchanged.
At complete step S
4afterwards, for the image file of ONU device upgrade, will be stored in the spare memory area of ONU equipment, now then perform step again S
5, first activate the ONU equipment that successfully receives described image file, just guaranteed that the image file for upgrading can successfully start and move at ONU equipment, then again by sending the ONU equipment after commit order extremely activates, just the main storage area of the ONU equipment after activating and spare memory area can be exchanged, after described commit command execution success, the described image file for upgrading will be stored in the main storage area of the ONU equipment after activation, and then what just guaranteed the operation of ONU equipment is exactly the described image file for upgrading, thereby realized the remote upgrade to ONU equipment.
Preferably, step S
32in the image file of segmentation n is being write to OAM(operation management maintain) parallelly after in Frame be sent to described at least one ONU equipment.
Because the size of image file is generally much larger than the MTU of OAM Frame, so the transmission of image file must complete in segmentation.
Preferably, step S
1in from FTP(file transfer protocol (FTP)) download described image file server.
The object of the invention is to also provide a kind of upgrade-system of ONU equipment, its feature is, it is for the upgrading of at least one ONU equipment of carry under the OLT equipment of EPON system, and described upgrade-system comprises:
One image file download module, for being downloaded to the image file for described at least one ONU device upgrade described OLT equipment;
One address binding module, for being tied to same SessionID by the MAC Address of described at least one ONU equipment;
One image file sending module, for controlling the MAC Address that described OLT equipment reads described at least one the ONU equipment of described SessionID, and according to the MAC Address of described at least one ONU equipment, described image file is walked abreast and is sent to described at least one ONU equipment;
One image file writing module, the ONU equipment that successfully receives described image file for controlling writes FLASH to upgrade by described image file.
Preferably, described image file sending module comprises a division unit, a transmitting element, one first judging unit, one second judging unit, an assignment unit and a delete cells;
Described division unit is for described image file is divided into N segmentation successively according to order from the beginning to the end, and the sequence number of segmentation is followed successively by 1 and arrives N, and wherein N is positive integer, and n is set equals 1;
Described transmitting element is used for controlling the MAC Address that described OLT equipment reads described at least one the ONU equipment of described SessionID, and according to the MAC Address of described at least one ONU equipment, the image file of segmentation n is walked abreast and is sent to described at least one ONU equipment; Then call described the first judging unit judge each ONU equipment whether all within a time period, send one for the feedback command that characterizes the image file that successfully receives segmentation n to described OLT equipment;
If so, call described the second judging unit and judge whether n equals N, if equal, enable described image file writing module, if be not equal to, calling described assignment unit is n+1 by n assignment, then reactivates described transmitting element;
If not, call described delete cells and from described SessionID, delete the MAC Address of the ONU equipment that does not send described feedback command, then reactivate described the second judging unit.
Preferably, described upgrade-system also comprises an active module, for controlling the ONU equipment that described OLT device activation successfully receives described image file, and the ONU equipment after activating sends a commit order, with by the main storage area of the ONU equipment after described activation and spare memory area exchange.
Preferably, described transmitting element is at least one ONU equipment described in parallel being sent to after the image file of segmentation n being write to OAM Frame.
Preferably, described image file download module is for downloading described image file from ftp server.
Positive progressive effect of the present invention is: the present invention can adopt the parallel mode sending that the image file for ONU device upgrade is sent to ONU equipment to complete the upgrading of ONU equipment, thereby can when ONU device upgrade, save a large amount of time, and the present invention is at large-scale machine frame, on rack-mount unit, be to have very much application necessary, because the lifting along with equipment performance, under OLT equipment, the quantity of the ONU equipment of carry also can get more and more, adopt the present invention can save the needed time of ONU device upgrade, greatly improved the efficiency of long-range ONU device upgrade.
Accompanying drawing explanation
Fig. 1 is the structural representation of upgrade-system of the ONU equipment of a preferred embodiment of the present invention.
Fig. 2 is the flow chart of upgrade method of the ONU equipment of a preferred embodiment of the present invention.
Fig. 3 sends the flow chart of the step of image file in the upgrade method of ONU equipment of a preferred embodiment of the present invention.
Embodiment
Below in conjunction with accompanying drawing, provide preferred embodiment of the present invention, to describe technical scheme of the present invention in detail.
As shown in Figure 1, the upgrade-system of ONU equipment of the present invention comprises an image file download module 1, an address binding module 2, an image file sending module 3, an image file writing module 4 and an active module 5.
Utilize upgrade-system of the present invention can realize the remote upgrade of at least one ONU equipment of carry under the OLT equipment in EPON system.Wherein said image file download module 1 can be downloaded to the image file for described at least one ONU device upgrade described OLT equipment, particularly, first can issue a download command by a webmaster computer, described image file download module 1 will be downloaded described image file to the main control unit of described OLT equipment after receiving download command from ftp server.
In download, complete after described upgrade image, described webmaster computer can issue one in batches upgrade command to the line card of described OLT equipment, allow the upgrade ONU equipment of described OLT equipment carry of line card.And line card is after receiving described batch upgrade instruction, described image file can be downloaded to the internal memory of described line card from described main control unit, then by 2 pairs of described at least one ONU equipment to be upgraded of described address binding module, once bind action, the MAC Address of described at least one ONU equipment is tied in same SessionID, like this, described at least one the ONU equipment under described SessionID just can carry out session simultaneously.
Then, described image file sending module 3 just can be controlled the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and according to the MAC Address of described at least one ONU equipment, described image file is walked abreast and is sent to described at least one ONU equipment.
And control in the process of described OLT device transmission image file at described image file sending module 3, according to the < < EPON of China Telecom equipment and technology, require the regulation in V3.0 > > to describe, OLT equipment sends image file to ONU equipment and sends with segmentation form, and the size of segmentation had better not surpass 1400 bytes, and after sending and must by the time receiving that ONU equipment receives the response of image file of segmentation after the image file of a segmentation, just can continue to send the image file of next segmentation.
As shown in Figure 1, described image file sending module 3 specifically also comprises a division unit 31, a transmitting element 32, one first judging unit 33, one second judging unit 34, an assignment unit 35 and a delete cells 36.
First described division unit 31 is divided into N segmentation by described image file according to order from the beginning to the end successively, the sequence number of segmentation is followed successively by 1 to N, wherein N is positive integer, n is set simultaneously and equals 1, the n is here only a numerical value that characterizes segments, and n is set to from equaling in the of 1, in the process of carrying out, be increased to gradually N.
32 of described transmitting elements are controlled the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and carry out session according to the MAC Address of described at least one ONU equipment and described at least one ONU equipment simultaneously, and the image file of segmentation n is walked abreast and is sent to described at least one ONU equipment.Then call described the first judging unit 33 judge each ONU equipment whether all within a time period, send one for the feedback command that characterizes the image file that successfully receives segmentation n to described OLT equipment.
If so, show that each ONU equipment all successfully receives the image file of segmentation n, now call again described the second judging unit 34 and judge whether n equals N.If equal, all segmentations that described image file is described are all successfully sent to all ONU equipment, enable with that described image file writing module 4 and control in the FLASH that the ONU equipment that successfully receives described image file writes described image file ONU equipment to upgrade; If be not equal to, explanation is not all sent to ONU equipment by all segmentations of described image file, now just calling described assignment unit 35 is n+1 by n assignment, then reactivate described transmitting element 32 the next segmentation of segmentation n (being segmentation n+1) is sent to ONU equipment, and then carry out above-mentioned judgement, until all segmentations of described image file are all successfully sent to ONU equipment.
If not, explanation has part ONU equipment within the described time period (the described time period can be set according to actual needs voluntarily), successfully not receive the image file of segmentation n, specifically can comprise that ONU equipment does not receive described image file completely, or ONU equipment receives a part of image file but because network or other reasons cause successfully not receiving whole image files, now ONU equipment also can send a sign image file and send failed instruction to OLT equipment.Also for this part of ONU equipment, the image file of segmentation n sends unsuccessfully, now in order to save time, raise the efficiency, just call described delete cells 36 and from described SessionID, delete the MAC Address of the ONU equipment that does not send described feedback command, soon can not within the described time period, successfully receive the ONU unit deletion of the image file of segmentation n, can not be that this part of ONU equipment sends image file more yet.Then reactivate described the second judging unit 34 and judge whether n equals N, to guarantee that all segmentations of described image file all can successfully be sent to ONU equipment.
And described transmitting element 32 specifically can first write the image file of segmentation n in OAM Frame, then at least one ONU equipment described in parallel being sent to.
Then, described image file writing module 4 will be controlled the ONU equipment that successfully receives described image file described image file is write in FLASH to upgrade.And after image file sends successfully, described line card can send querying command, inquire about the transmission state of all ONU equipment under described SessionID, as which ONU equipment successfully receive as described in all segmentations of image file, and which ONU equipment does not successfully receive image file, and the state of inquiry is all recorded in described line card.
Meanwhile, described line card also can send the state that querying command is inquired about ONU equipment programming image file, and the ONU equipment that receives image file to assure success all enters described image file programming in the FLASH of ONU equipment.After successful programming, described active module 5 will be controlled the ONU equipment that described OLT device activation successfully receives described image file, and the ONU equipment after activating sends a commit order, with by the main storage area of the ONU equipment after described activation and spare memory area exchange.
Wherein, first by activating the ONU equipment that successfully receives described image file, just guaranteed that the image file for upgrading can successfully start and move at ONU equipment, then again by sending the ONU equipment after commit order extremely activates, just the main storage area of the ONU equipment after activating and spare memory area can be exchanged, after described commit command execution success, the described image file for upgrading will be stored in the main storage area of the ONU equipment after activation, and then what just guaranteed the operation of ONU equipment is exactly the described image file for upgrading, thereby realized the remote upgrade to ONU equipment.
As shown in Figure 2, the present invention utilizes the upgrade method of the ONU equipment that the upgrade-system of the ONU equipment of the present embodiment realizes specifically to comprise the following steps:
Step 100, the image file for described at least one ONU device upgrade is downloaded to described OLT equipment.
Step 101, the MAC Address of described at least one ONU equipment is tied in same SessionID.
Step 102, control the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and be sent to described at least one ONU equipment according to the MAC Address of described at least one ONU equipment by described image file is parallel.
Step 103, control the ONU equipment that successfully receives described image file described image file is write in FLASH to upgrade.
Step 104, control the ONU equipment that described OLT device activation successfully receives described image file, and the ONU equipment after activating sends a commit order, with by the main storage area of the ONU equipment after described activation and spare memory area exchange.
As shown in Figure 3, in the upgrade method of the ONU equipment of the present embodiment, send the step (being that step 102 specifically comprises the following steps) specific as follows of image file:
Step 1021, described image file is divided into N segmentation successively according to order from the beginning to the end, the sequence number of segmentation is followed successively by 1 to N, and wherein N is positive integer, and n is set equals 1.
Step 1022, control the MAC Address that described OLT equipment reads described at least one the ONU equipment in described SessionID, and be sent to described at least one ONU equipment according to the MAC Address of described at least one ONU equipment by the image file of segmentation n is parallel.
Step 1023, judge each ONU equipment whether all within a time period, send one for the feedback command that characterizes the image file that successfully receives segmentation n to described OLT equipment, if so, perform step 1024, if not, perform step 1026.
Step 1024, judge that whether n equals N, if so, performs step 103; If not, perform step 1025;
Step 1025, by n assignment, be n+1, then return to step 1022.
Step 1026, the MAC Address of deleting the ONU equipment that does not send described feedback command from described SessionID, then perform step 1024.
Although more than described the specific embodiment of the present invention, it will be understood by those of skill in the art that these only illustrate, protection scope of the present invention is limited by appended claims.Those skilled in the art is not deviating under the prerequisite of principle of the present invention and essence, can make various changes or modifications to these execution modes, but these changes and modification all fall into protection scope of the present invention.