The upgrade-system and method of ONU equipment
Technical field
The present invention relates to the upgrade-system and method of a kind of ONU equipment, more particularly to one kind can transmitted in parallel be used for
Upgrade-system and a kind of upgrading using the upgrade-system realized of the image file of upgrading to the ONU equipment of ONU equipment
Method.
Background technology
In now more mature and practical EPON(Ethernet passive optical network)In system and industry realizes standard
In, OLT(Optical line terminal)To ONU(Optical network unit)Remote upgrade be broadly divided into four steps:OLT sends upgrade image
To the ONU to be upgraded;ONU programmings upgrade image is to FLASH(Nonvolatile memory);ONU is activated, makes ONU good simultaneously with programming
And the upgrade image for being stored in spare memory area is started;Send commit orders(For by the main storage area of ONU equipment with it is standby
Exchanged with memory block)To ONU, allow the standby usage memory block of ONU to be interchangeable, treat that ONU can be realized as ONU equipment after restarting
Upgrading.
In this four steps, when OLT sends mirror image and to take many to ONU and ONU programmings upgrade image to FLASH
Between.And in the two steps, the performance of ONU programmings upgrade image and ONU itself is related, so in EPON system,
It is exactly to save the time that OLT sends upgrade image to ONU to improve the upgrading efficiency of ONU and save the main task of update time.
And in the prior art, OLT is using the form that serially sends, upgrade image is sent one by one to be upgraded more
In a ONU, namely after OLT sends upgrade image into an ONU completely, it could send into next ONU.Cause
This, is lost time very much using traditional upgrade method, and the efficiency of upgrading is also very low.
The content of the invention
The technical problem to be solved in the present invention is in order to when overcoming the upgrading of ONU in the prior art OLT using serially sending
The defects of form sends upgrade image into ONU one by one, causes upgrading to be lost time very much, and the efficiency of upgrading is also very low, carries
The transmitted in parallel upgrade-system of ONU equipment of the image file to ONU equipment that is used to upgrade and a kind of it can be utilized for a kind of
The upgrade method that the upgrade-system is realized.
The present invention is to solve above-mentioned technical problem by following technical proposals:
The present invention provides a kind of upgrade method of ONU equipment, its feature is, its OLT being used in EPON system is set
The upgrading of at least one ONU equipment of standby lower carry, the upgrade method comprise the following steps:
S1, will be downloaded to for the image file of at least one ONU equipment upgrading in the OLT device;
S2, by the MAC Address of at least one ONU equipment(Hardware address)It is tied to same SessionID(Session
Mark)In;
S3, the control OLT device read the MAC Address of at least one ONU equipment in the SessionID,
And the image file transmitted in parallel at least one ONU is set according to the MAC Address of at least one ONU equipment
It is standby;
S4, control is properly received the ONU equipment of the image file and writes the image file in FLASH to be risen
Level.
The image file that will can be upgraded using the upgrade method of the present invention by the way of transmitted in parallel for ONU equipment
Send at least one ONU equipment to be upgraded, wherein, in step S2It is middle can by the MAC of at least one ONU equipment
Location is tied in same SessionID, then in step S3The middle control OLT device reads the MAC recorded in SessionID
Address, can send image file at least one ONU equipment at the same time.
In this way, can just be saved using the upgrade method of the present invention when ONU equipment upgrades the substantial amounts of time, and this hair
Bright method is to have very much application necessary on large-scale machine frame, rack-mount unit, because with the lifting of equipment performance, OLT
The quantity of the ONU equipment of carry also can be more and more under equipment, and method using the present invention can be saved needed for ONU equipment upgrading
The time wanted, substantially increases the efficiency of long-range ONU equipment upgrading.
It is preferred that step S3Further comprise:
S31, the image file is in turn divided into N number of segmentation according to order from the beginning to the end, the sequence number of segmentation is followed successively by
1 arrives N, and wherein N is positive integer, and sets n to be equal to 1;
S32, the control OLT device read the MAC Address of at least one ONU equipment in the SessionID,
And the image file transmitted in parallel of n will be segmented at least one ONU according to the MAC Address of at least one ONU equipment
Equipment;
S33, judge each ONU equipment whether within a period send one be used for characterize be properly received segmentation n mirror image
The feedback command of file is to the OLT device, if so, then performing step S34, if it is not, then performing step S36;
S34, judge whether n is equal to N, if so, then performing step S4;If it is not, then perform step S35;
S35, n is assigned a value of n+1, be then back to step S32;
S36, the MAC Address of the ONU equipment for not sending the feedback command is deleted from the SessionID, then perform
Step S34。
Wherein, step S31In n be only a characterization segments numerical value, and n is arranged to since equal to 1,
N is gradually increased to during execution method.
During the OLT device transmission image file is controlled, according to《China Telecom's EPON equipment technical requirements
V3.0》In regulation description, OLT device to ONU equipment send image file be is sent with segmented version, and segmentation it is big
It is small to wait until to receive ONU equipment reception preferably not more than 1400 bytes, and after the image file of one segmentation of transmission
To after the response of the image file of segmentation, it just may proceed to send the image file of next segmentation.
Based on above-mentioned regulation, by step S3Above-mentioned circulation process is divided into detail to perform, and ensure that transmitted in parallel
While image file to ONU equipment, it also ensure that and segmentation transmission is carried out to image file, meet the standard in industry,
Smoothly perform the upgrade method of the present invention.
It is preferred that step S4A step S is further included afterwards5:The OLT device activation is controlled to be properly received the mirror image text
The ONU equipment of part, and send a commit orders to the ONU equipment after activation(Order is switched, for by the main memory of ONU equipment
Storage area is exchanged with spare memory area), the main storage area of the ONU equipment after the activation and spare memory area are exchanged.
Step S is completed performing4Afterwards, the image file for ONU equipment upgrading will be stored in the spare of ONU equipment
In memory block, at this time followed by execution step S5, the ONU equipment for being properly received the image file is activated first, in this way it is ensured that
Image file for upgrading can successfully start up and behave in ONU equipment, then through transmission commit orders
ONU equipment after to activation, it becomes possible to the main storage area of the ONU equipment after activation and spare memory area are exchanged, it is described
After commit orders run succeeded, the main storage area of the ONU equipment after activation will store the mirror image text for being used to upgrade
Part, and then ensure that ONU equipment operation is exactly the image file for being used to upgrade, it is achieved thereby that to ONU equipment
Remote upgrade.
It is preferred that step S32In will be segmented n image file write OAM(Operation management maintainance)It is parallel after in data frame
Send at least one ONU equipment.
Since the size of image file is typically much deeper than the maximum transmission unit of OAM data frame, the biography of image file
It is defeated to have to segmentation completion.
It is preferred that step S1In from FTP(File Transfer Protocol)The image file is downloaded in server.
It is an object of the invention to additionally provide a kind of upgrade-system of ONU equipment, its feature is that it is used for EPON systems
The upgrading of at least one ONU equipment of carry, the upgrade-system include under OLT device in system:
One image file download module, for will be downloaded to for the image file of at least one ONU equipment upgrading
In the OLT device;
One address binding module, it is same for the MAC Address of at least one ONU equipment to be tied to
In SessionID;
One image file sending module, for control the OLT device read in the SessionID described at least one
The MAC Address of a ONU equipment, and according to the MAC Address of at least one ONU equipment by the image file transmitted in parallel extremely
At least one ONU equipment;
One image file writing module, the ONU equipment that the image file is properly received for controlling are literary by the mirror image
Part is write in FLASH to be upgraded.
It is preferred that the image file sending module include a division unit, a transmitting element, one first judging unit,
One second judging unit, an assignment unit and one delete unit;
The division unit is used to the image file being in turn divided into N number of segmentation according to order from the beginning to the end, point
The sequence number of section is followed successively by 1 and arrives N, and wherein N is positive integer, and sets n to be equal to 1;
At least one ONU that the transmitting element is used to control the OLT device to read in the SessionID is set
Standby MAC Address, and the image file transmitted in parallel of n will be segmented to described according to the MAC Address of at least one ONU equipment
At least one ONU equipment;Then first judging unit is called to judge whether each ONU equipment sends within a period
One is used to characterize the feedback command for being properly received the image file for being segmented n to the OLT device;
If so, then calling second judging unit to judge whether n is equal to N, if being equal to, enable the image file and write
Enter module, if being not equal to, call the assignment unit that n is assigned a value of n+1, then reactivate the transmitting element;
If it is not, then calling the deletion unit to be deleted from the SessionID ONU of the feedback command is not sent set
Standby MAC Address, then reactivates second judging unit.
It is preferred that the upgrade-system further includes an active module, for controlling the OLT device activation to be properly received institute
The ONU equipment of image file is stated, and a commit orders are sent to the ONU equipment after activation, the ONU after the activation is set
Standby main storage area is exchanged with spare memory area.
It is preferred that the transmitting element be used for will be segmented n image file write-in OAM data frame in after transmitted in parallel extremely
At least one ONU equipment.
It is preferred that the image file download module is used to download the image file from ftp server.
The positive effect of the present invention is:The present invention can will be used for ONU equipment liter by the way of transmitted in parallel
The image file of level is sent into ONU equipment to complete the upgrading of ONU equipment, big so as to be saved when ONU equipment upgrades
The time of amount, and the present invention is to have very much application necessary on large-scale machine frame, rack-mount unit, because with equipment performance
Lifting, the quantity of the ONU equipment of carry also can be more and more under OLT device, and ONU equipment upgrading can be saved using the present invention
The required time, substantially increases the efficiency of long-range ONU equipment upgrading.
Brief description of the drawings
Fig. 1 is the structure diagram of the upgrade-system of the ONU equipment of the preferred embodiment of the present invention.
Fig. 2 is the flow chart of the upgrade method of the ONU equipment of the preferred embodiment of the present invention.
Fig. 3 is stream the step of sending image file in the upgrade method of the ONU equipment of the preferred embodiment of the present invention
Cheng Tu.
Embodiment
Present pre-ferred embodiments are provided below in conjunction with the accompanying drawings, with the technical solution that the present invention will be described in detail.
As shown in Figure 1, the upgrade-system of the ONU equipment of the present invention includes 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.
It can realize that at least one ONU of carry under the OLT device in EPON system is set using the upgrade-system of the present invention
Standby remote upgrade.Wherein described image file download module 1 can be by the mirror image at least one ONU equipment upgrading
File download is into the OLT device, specifically, can issue a download command, the mirror image text by a webmaster computer first
Part download module 1 will download the image file to the master of the OLT device after receiving download command from ftp server
In manipulating stock quotations.
After the completion upgrade image is downloaded, the webmaster computer can issue batch upgrade command to the OLT
The line card of equipment, allows line card to upgrade the ONU equipment of the OLT device carry.And line card is receiving the batch upgrade instruction
Afterwards, the image file can be downloaded in the memory of the line card from the main control unit, mould is then bound by described address
Block 2 carries out once binding at least one ONU equipment to be upgraded and acts, by the MAC of at least one ONU equipment
Location is tied in same SessionID, in this way, at least one ONU equipment under the SessionID just can be at the same time
Conversate.
Then, the image file sending module 3 can just control the OLT device to read in the SessionID
The MAC Address of at least one ONU equipment, and according to the MAC Address of at least one ONU equipment by the image file
Transmitted in parallel is at least one ONU equipment.
And during the image file sending module 3 controls the OLT device transmission image file, according to《In
State telecommunications EPON equipment technical requirements V3.0》In regulation description, OLT device to ONU equipment send image file be be segmented
What form was sent, and the size being segmented is preferably not more than 1400 bytes, and after sending the image file of a segmentation
After having to the response when receiving the image file that ONU equipment receives segmentation, it just may proceed to send next segmentation
Image file.
As shown in Figure 1, the image file sending module 3 specifically further includes a division unit 31, a transmitting element 32, one
First judging unit 33, one second judging unit 34, an assignment unit 35 and one delete unit 36.
The image file is in turn divided into N number of segmentation by the division unit 31 according to order from the beginning to the end first,
The sequence number of segmentation is followed successively by 1 and arrives N, and wherein N is positive integer, while sets n to be equal to 1, and n here is only a characterization segments
Numerical value, and n is arranged to since equal to 1, N is gradually increased to during execution.
At least one ONU that the transmitting element 32 then controls the OLT device to read in the SessionID is set
Standby MAC Address, and meeting is carried out at the same time according to the MAC Address and at least one ONU equipment of at least one ONU equipment
Words, and the image file transmitted in parallel of n will be segmented at least one ONU equipment.Then first judging unit is called
33 judge whether each ONU equipment sends the anti-of an image file for being used for characterization successful reception segmentation n within a period
Feedback is instructed to the OLT device.
If so, then showing that each ONU equipment is properly received the image file of segmentation n, described second is recalled at this time and is sentenced
Disconnected unit 34 judges whether n is equal to N.If being equal to, illustrate that all segmentations of the image file are successfully transmitted to all ONU
Equipment, enables the image file writing module 4 control and is properly received the ONU equipment of the image file by the mirror with that
As file write-in ONU equipment FLASH in be upgraded;If being not equal to, illustrate the institute of the image file not
There is segmentation to send to ONU equipment, just call the assignment unit 35 that n is assigned a value of n+1 at this time, then reactivate the hair
Unit 32 is sent to be segmented next segmentation of n(It is segmented n+1)Send to ONU equipment, then carry out above-mentioned judgement again, until institute
All segmentations for stating image file are successfully transmitted untill ONU equipment.
If it is not, then explanation has part ONU equipment not in the period(The period can be according to actual needs
Sets itself)The interior image file for being properly received segmentation n, specifically can be not received by the mirror image completely including ONU equipment
File, either ONU equipment receive a part of image file but since network or other reasons cause not to be properly received
To whole image files, ONU equipment can also send a characterization image file and send the instruction of failure to OLT device at this time
In.This part of ONU equipment is for, the image file for being segmented n sends failure, at this time in order to save the time, raising efficiency,
With the calling deletion unit 36 being deleted from the SessionID to the MAC for the ONU equipment for not sending the feedback command
Location, the ONU equipment that the image file of segmentation n will cannot be also properly received within the period are deleted, and will not be this again
Partial ONU equipment sends image file.Then reactivate second judging unit 34 and judge whether n is equal to N, to ensure
All segmentations of the image file can be successfully transmitted to ONU equipment.
And the transmitting element 32 specifically can be first write the image file for being segmented n in OAM data frame, then transmitted in parallel
To at least one ONU equipment.
Then, the image file writing module 4 will control the ONU equipment for being properly received the image file by described in
Image file is write in FLASH to be upgraded.And after image file is sent successfully, the line card can send inquiry life
Order, inquires about the transmission state of all ONU equipments under the SessionID, the mirror image text as described in being properly received which ONU equipment
All segmentations of part, and which ONU equipment is not properly received image file, and the state of inquiry is recorded in the line
In card.
Meanwhile the line card can also send querying command to inquire about the state of ONU equipment programming image file, to ensure into
The ONU equipment that work(receives image file enters the image file programming in the FLASH of ONU equipment.After success programming,
The active module 5 will control OLT device activation to be properly received the ONU equipment of the image file, and to after activation
ONU equipment send a commit orders, by the main storage area of the ONU equipment after the activation and spare memory area exchange.
Wherein, the ONU equipment of the image file is properly received by activating first, in this way it is ensured that the mirror image for upgrading
File can be successfully started up and behaved in ONU equipment, be set then through the ONU after transmission commit orders to activation
It is standby, it becomes possible to exchange the main storage area of the ONU equipment after activation and spare memory area, the commit orders run succeeded it
Afterwards, the main storage area of the ONU equipment after activation will store the image file for being used to upgrade, and then ensure that ONU is set
Received shipment row is exactly the image file for being used to upgrade, it is achieved thereby that the remote upgrade to ONU equipment.
As shown in Fig. 2, the upgrading side for the ONU equipment that the present invention is realized using the upgrade-system of the ONU equipment of the present embodiment
Method specifically includes following steps:
Step 100, will be downloaded in the OLT device for the image file of at least one ONU equipment upgrading.
The MAC Address of at least one ONU equipment, be tied in same SessionID by step 101.
Step 102, the control OLT device read the MAC of at least one ONU equipment in the SessionID
Address, and according to the MAC Address of at least one ONU equipment by the image file transmitted in parallel to described at least one
ONU equipment.
Step 103, control be properly received the ONU equipment of the image file by the image file write in FLASH with
Upgraded.
Step 104, control OLT device activation are properly received the ONU equipment of the image file, and to after activation
ONU equipment sends a commit orders, and the main storage area of the ONU equipment after the activation and spare memory area are exchanged.
As shown in figure 3, the step of image file is sent in the upgrade method of the ONU equipment of the present embodiment is specific as follows(I.e.
Step 102 specifically includes following steps):
Step 1021, by the image file be in turn divided into N number of segmentation, the sequence number of segmentation according to order from the beginning to the end
It is followed successively by 1 and arrives N, wherein N is positive integer, and sets n to be equal to 1.
Step 1022, the control OLT device read the MAC of at least one ONU equipment in the SessionID
Address, and the image file transmitted in parallel of n will be segmented to described at least one according to the MAC Address of at least one ONU equipment
A ONU equipment.
Step 1023, judge whether each ONU equipment sends one within a period and be used to characterize successful reception segmentation n
Image file feedback command to the OLT device, if so, then perform step 1024, if it is not, then perform step 1026.
Step 1024, judge whether n is equal to N, if so, then performing step 103;If it is not, then perform step 1025;
Step 1025, by n be assigned a value of n+1, is then back to step 1022.
Step 1026, the MAC Address that the ONU equipment for not sending the feedback command is deleted from the SessionID, so
Step 1024 is performed afterwards.
Although the foregoing describing the embodiment of the present invention, it will be appreciated by those of skill in the art that these
It is merely illustrative of, protection scope of the present invention is defined by the appended claims.Those skilled in the art is not carrying on the back
On the premise of from the principle of the present invention and essence, various changes or modifications can be made to these embodiments, but these are changed
Protection scope of the present invention is each fallen within modification.