Summary of the invention
The invention provides method and device that a kind of IMA delay variance detects, at least to solve in correlation technique, the method that the IMA delay variance detects is comparatively complicated, and the problem of situation that can only the handle link negligible amounts.
According to an aspect of the present invention, a kind of method that provides IMA delay variance to detect, comprising: ATM cell is carried out to serial number; Carry out the delay variance detection according to the ATM cell numbering of ATM cell.
Preferably, carrying out the delay variance detection according to the ATM cell numbering of described ATM cell comprises: in the ATM cell numbering of all links in the IMA group is organized with described IMA, maximum ATM cell numbering compares successively; Determine that whether ATM cell numbering and the difference of the ATM cell numbering of described maximum surpass preset first threshold value, wherein, surpass the ATM cell of preset first threshold value for not detecting by delay variance; All the other ATM cell are to detect by delay variance.
Preferably, before in the ATM cell numbering of all links in the IMA group is organized with described IMA, maximum ATM cell numbering compares successively, also comprise: the ATM cell numbering that reads successively the interior all links of described IMA group; ATM cell numbering to all links in described IMA group is sorted.
Preferably, after to described IMA group, the ATM cell numbering of interior all links is sorted, also comprise: determine that the ATM cell numbering of all links in described IMA group is within preset range.
Preferably, described method also comprises: while in described IMA group, increasing new link, record current maximum ATM cell numbering C in described IMA group
maxWith minimum ATM cell numbering C
minWhether the ATM cell numbering that judges described new link is greater than C
maxWith the difference of default Second Threshold and be less than C
minWith described default Second Threshold sum; If so, confirm that described new link detects by described delay variance.
Preferably, described ATM cell being carried out to serial number comprises: the ima frame sequence number of the ima frame received according to icp cell and ICP deviant generate the ATM cell numbering.
Preferably, after carrying out the delay variance detection according to described ATM cell numbering, also comprise: to the link detected by described delay variance, in described IMA group, have at least a link to enter while activating the Active state, the read pointer of described IMA group is revised as to minimum ATM cell numbering.
Preferably, after the read pointer of described IMA group is revised as to minimum ATM cell numbering, also comprise: detect all ATM cell numberings in described IMA group and whether all be greater than amended read pointer; If not, continue to detect, until all ATM cell numbering all is greater than amended read pointer.
According to a further aspect in the invention, the device that provides a kind of IMA delay variance to detect comprises: the numbering module, for ATM cell is carried out to serial number; Detection module, carry out the delay variance detection for the numbering of the ATM cell according to ATM cell.
Preferably, described detection module comprises: comparing unit, and in organizing with described IMA for the ATM cell numbering by all links in the IMA group, maximum ATM cell numbering compares successively; Whether determining unit, surpass preset first threshold value for determining ATM cell numbering and the difference of the ATM cell numbering of described maximum, wherein, surpasses the ATM cell of preset first threshold value for not detecting by delay variance; All the other ATM cell are to detect by delay variance.
Preferably, described device also comprises: logging modle, during for the new link of increase in described IMA group, record current maximum ATM cell numbering C in described IMA group
maxWith minimum ATM cell numbering C
minWhether judge module, be greater than C for the ATM cell numbering that judges described new link
maxWith the difference of default Second Threshold and be less than C
minWith described default Second Threshold sum; Confirm module, for the numbering of the ATM cell at described new link, be greater than C
maxWith the difference of default Second Threshold and be less than C
minIn described default Second Threshold sum situation, confirm that described new link detects by described delay variance.
Preferably, described device also comprises: modified module, for the link to detecting by described delay variance, in described IMA group, have at least a link to enter in the situation that activates the Active state, the read pointer of described IMA group is revised as to minimum ATM cell numbering.
The present invention has adopted following method: ATM cell is carried out to serial number, and carry out the delay variance detection according to the ATM cell numbering of ATM cell.The present invention carries out the delay variance detection by continuous ATM cell numbering, solved in correlation technique, the method that the IMA delay variance detects is comparatively complicated, and the problem of situation that can only the handle link negligible amounts, and then the methods simplification that makes the IMA delay variance detect, even also can carry out the delay variance detection in the situation that number of links is more, improve systematic function.
Embodiment
Hereinafter with reference to accompanying drawing, also describe the present invention in detail in conjunction with the embodiments.It should be noted that, in the situation that do not conflict, embodiment and the feature in embodiment in the application can combine mutually.
Method based on existing the IMA delay variance to detect in correlation technique is comparatively complicated, and the problem of situation that can only the handle link negligible amounts, the invention provides a kind of method that IMA delay variance detects, the flow process of the method can be as shown in Figure 1, and this flow process comprises that step S102 is to step S104:
Step S102, carry out serial number to ATM cell;
Step S104, carry out the delay variance detection according to the ATM cell numbering of ATM cell.
The present embodiment has adopted said method, carry out the delay variance detection by continuous ATM cell numbering, determine temporal continuity with serial number, no longer need a large amount of and complicated algorithm to generate cell rate and carry out the delay variance detection, solved in correlation technique, the method that the IMA delay variance detects is comparatively complicated, and the problem of situation that can only the handle link negligible amounts, and then the methods simplification that makes the IMA delay variance detect, even also can carry out the delay variance detection in the situation that number of links is more, improve systematic function.Above-mentioned steps S102 has embodied ATM cell has been carried out to serial number, the purpose of this step is the serial number that obtains ATM cell, so no matter by which kind of mode, so long as it is just passable to have obtained serial number, those skilled in the art can carry out different numberings according to actual conditions, for example, relevant information in the icp cell that, can carry by ima frame is numbered.
Preferably, in the process of implementing, can generate the ATM cell numbering according to ima frame sequence number and ICP deviant.In the process that the ATM cell numbering is calculated, can carry out according to the different ATM of team of its bit wide the numbering of different original positions.The process of this numbering is that the initialization of just carrying out when receiving first effective icp cell is calculated, now, calculating be first ATM cell numbering, after this, other non-icp cell can be numbered on basis and add one at this, and the numbering generated according to the method is continuous.
After having obtained continuous ATM cell numbering, execution step S104, this step can comprise following processing procedure:
(1) ATM cell numbering maximum in the ATM cell numbering of all links in the IMA group and IMA group is compared successively;
(2) determine whether the difference that ATM cell numbering and maximum ATM cell are numbered surpasses preset first threshold value.If this difference surpasses preset first threshold value, definite ATM cell now is not for detecting by delay variance; When this difference does not surpass preset first threshold value, determine that now ATM cell is to detect by delay variance.
In judging the process whether ATM cell detects by delay variance, the workload that in the ATM cell numbering of all links in the IMA group is organized with IMA, maximum ATM cell numbering compares successively is larger, in order to reduce the workload of above-mentioned processing procedure (1), can also increase before in processing procedure (1) process of a sequence: the ATM cell numbering that reads successively all links in the IMA group; ATM cell numbering to all links in the IMA group is sorted.After the numbering of the ATM cell to all links is sorted, the ATM cell numbering just becomes neat, now, ATM cell numbering maximum in the numbering of ATM cell and IMA group can be compared successively, if now also found that the difference with maximum ATM cell numbering surpasses the ATM cell of preset first threshold value, abandon this cell, because sequence reason, follow-up ATM cell numbering also can surpass preset first threshold value surely with the difference of maximum ATM cell numbering, also, without carrying out follow-up having compared, saved system resource.
In the process of sequence, because the ATM cell to 32 Member Links numbering is sorted more difficultly, so we have adopted a kind of way of compromise, and the value that limits 32 Member Links just thinks that ranking results is effective in some scopes the time.Based on above-mentioned thought, can be after sequence, determine that the ATM cell numbering of all links in IMA group is whether within preset range.If within preset range, ranking results is effectively, can carry out the delay variance detection according to this ranking results.If not within preset range, think that this ranking results is invalid.
After above-mentioned delay variance test set has been set up and entered normal operation, while in the IMA group, increasing new link, operating procedure can be as follows: record current maximum ATM cell numbering C in the IMA group
maxWith minimum ATM cell numbering C
minWhether the ATM cell numbering that judges new link is greater than C
maxWith the difference of default Second Threshold and be less than C
minWith default Second Threshold sum; If so, confirm that new link detects by delay variance.
In implementation process, because system has very strong compatibility, the ranking results that the original link ATM cell detected by delay variance of can usining is numbered is as benchmark, being judged to be delay variance for the link that is less than the maximum certain value or is greater than the minimum value certain value transfinites, abandon this ima frame, and can select to report (LODS) alarm of transfiniting simultaneously, notifying link increases unsuccessfully.Other newly-increased link is thought by detecting, the Link State redirect after participating in.
After above-mentioned delay variance detection has result, the link detected by delay variance is carried out to delay compensation, with the rear output of ima frame alignment by originally not lining up in same IMA group.While having at least a link to enter activation (Active) state in the IMA group, the read pointer of IMA group is revised as to minimum ATM cell numbering, after this in the group, the read operation of all links is all usingd this read pointer and is carried out as benchmark.
Carry out in the process of differential delay compensation in alignment, also need to detect all ATM cell numberings in the IMA group and whether all be greater than amended read pointer.During all links in processing certain IMA group, if the ATM cell of all Active links is numbered, all be greater than group read pointer now, these all links can be read a cell; Otherwise wait for, until meet above-mentioned condition.In implementation process, the group read pointer has played the effect of the data of recovering original, guarantees that the data that the same time of all links reads out are all to send the same time in data source header, has played the effect of protection in whole process.
After above-mentioned compensation finishes, after being abandoned, other cells of the non-correct data cell in all data of reading recovered original ATM data flow.
Below in conjunction with preferred embodiment, above-described embodiment and preferred implementation are described.
Embodiment mono-
The present embodiment be take an IMA group that comprises 32 Member Links and embodiment is described as example.
Suppose that current I MA group M value is 32, an ima frame comprises 32 ATM cell, wherein there is and only has an icp cell, the ima frame sequence number that has comprised 8bit in this icp cell and the ICP of 8bit skew (offset), wherein, ICP offset is used for specifying the position of ICP in ima frame, and in the present embodiment, this value is more than or equal to 0 and is less than 32, can be in 0 to 31 on arbitrary position.
After above-mentioned parameter is determined, when receiving an effective icp cell, just can initialization calculate an ATM cell numbering (getting the bit wide of 10bit for this value here), computing formula is: ATM cell numbering=ima frame sequence number x32+ICP offset.After this ATM cell of other non-icp cell numbering just adds 1 on the basis of previous cell, has so just formed the continuous ATM cell numbering based on ICP.
When processing this IMA group, press link ID by 0 to 31 all links of order poll, the ATM cell number value that reads each link compares, owing to using, to 32 values, (situation of upset also may appear writing all in these values, such as adding again once having got back to 0 after counting down to 1023) sorted more difficult, therefore to participating in numerical value relatively, once limit here, only have in 32 values and have a value at least at [511-N, 511+N] (value of N can be adjusted as the case may be, relatively good between 10-20) between comparative result just think effectively, like this after the regulation, it is all relatively close 511 that the ATM cell that just can guarantee all links when the delay variance between link while not being excessive is numbered, not there will be the situation of filling it up with upset.Just can carry out delay variance after obtaining effective comparative result has detected.Wherein, what in this process, choose 511 is a numeral comparatively placed in the middle in 1 to 1023, certainly, also can select 506,512 etc.
The patient delay variance of below take is 40ms to the maximum as example, and above-mentioned detection method is described.
When the delay variance test set is set up: if in 32 links, the difference of ATM cell numbering maximum and minimum value is less than or equal to the 181(time of amounting to and is about 40ms), all links all detect by delay variance.If the difference of maximum and minimum value is greater than 181 all ATM cell number value, the link between [maximum-181, maximum] detects by delay variance, other report delay variance LODS alarm.
When normal operation group increases link: from set up immediately differently, during the group normal operation, can not cause the link in group the delay variance appearance of transfiniting to occur because of the link newly added.Therefore, group is during work, needs first the ATM cell numbering of the link to having worked to be sorted, and the max min at this moment obtained is designated as respectively C
max, C
min, what newly-increased link was following several situations detects by delay variance:
1. newly-increased link ATM cell numbering is at [C
min, C
max] between by delay, detect.
2. newly-increased link ATM cell numbering is less than C
min, but at [C
max-181, C
max] between by delay, detect.
3. newly-increased link ATM cell numbering is greater than C
max, but at [C
min, C
minDetecting by delay+181].
Link after detecting by delay is carried out the Link State redirect according to correlated condition, between the link that delay compensation is Active at all Link States, carries out.
Compensation is set up immediately, and the link of ATM cell numbering minimum (link delay maximum) in current all links of take is benchmark, the initialization read pointer, initialization value is that Cmin-4(4 is as buffer protection).Stand the rear compensation that increases link with setting up for unified establishment, employing is following tactful, supposes that current group of read pointer is rd_ptr immediately:
1., if the ATM cell of current group of all Active links numbering is all in [rd_ptr+4, rd_ptr+200], the order that is 0-31 by link Link ID from system is respectively read a cell.
2. if any Active link ATM cell numbering is arranged in [rd_ptr-177, rd_ptr+3], must wait for for current group, until meet the whole conditions of reading in 1.
3. if there are other situations to occur meaning to have occurred extremely.
Wherein, above-mentioned 177 and 200 choose can be calculated by fixing delay variance, and the ICP in the data that finally will read from system fills after (filler) cell abandons and just recovered original ATM data flow.
The present embodiment utilizes the time division multiplexing characteristics of SDH, on the basis of existing technology, the innovation generation the ATM cell numbering, and realized the delay variance detection by this cell number, delay compensation and data are recovered, not only realize jumbo ima protocol processing, also realized the compensation of IMA data delay and recovered, avoided complicated compensating and restoring algorithm.
The device that the embodiment of the present invention also provides a kind of IMA delay variance to detect, the structure of this device as shown in Figure 2, comprising: numbering module 10, for ATM cell is carried out to serial number; Detection module 20, with 10 couplings of numbering module, carry out the delay variance detection for the numbering of the ATM cell according to ATM cell.
In the process of implementing, numbering module 10 can generate asynchronous transfer mode ATM cell numbering for ima frame sequence number and the ICP deviant of the ima frame according to the icp cell reception.
Wherein, Fig. 3 shows the structured flowchart of the device that the IMA delay variance of the internal structure that comprises detection module 20 detects, this detection module 20 comprises: comparing unit 202, and in organizing with IMA for the ATM cell numbering by all links in the IMA group, maximum ATM cell numbering compares successively; Whether determining unit 204, with comparing unit 202 couplings, surpass preset first threshold value for determining the difference that ATM cell numbering and maximum ATM cell are numbered, and wherein, surpasses the ATM cell of preset first threshold value for not detecting by delay variance; All the other ATM cell are to detect by delay variance.
Fig. 4 shows the structured flowchart after the present embodiment is optimized, and this device can also comprise: logging modle 30, with detection module 20 couplings, during for the new link of increase in the IMA group, record current maximum ATM cell numbering C in the IMA group
maxWith minimum ATM cell numbering C
minWhether judge module 40, with logging modle 30 couplings, be greater than C for the ATM cell numbering that judges new link
maxWith the difference of default Second Threshold and be less than C
minWith default Second Threshold sum; Confirm module 50, with judge module 40 couplings, for the numbering of the ATM cell at new link, be greater than C
maxWith the difference of default Second Threshold and be less than C
minIn default Second Threshold sum situation, confirm that new link detects by delay variance.
Preferably, said apparatus also comprises the modified module 60 newly added in Fig. 5, link for to detecting by delay variance has at least a link to enter in the situation of Active state in the IMA group, and the read pointer of IMA group is revised as to minimum ATM cell numbering.
In implementation process, for the device added after modified module 60, also for detection of all ATM cell numberings in the IMA group, whether all be greater than amended read pointer; If not, continue to detect, until all ATM cell numbering all is greater than amended read pointer.
Preferably, this device can also add the module of the ATM cell numbering for reading successively all links in the IMA group; ATM cell for all links in the IMA group is numbered the module sorted; For determining the module of ATM cell numbering within preset range of all links in the IMA group.Certainly, except the above-mentioned module that device is optimized, this device also comprises indispensable reception, memory module etc.
Below in conjunction with preferred embodiment, above-described embodiment is described, the device integral body that the IMA delay variance in preferred embodiment detects is structurally slightly different from said apparatus, but can solve the problem of function, realizes identical function, reaches identical effect.
Embodiment bis-
The present embodiment relates to SDH (Synchronous Digital Hierarchy) (Synchronous Digital Hierarchy, referred to as SDH)/PDH (Pseudo-synchronous Digital Hierarchy) (Plesiochronous Digital Hierarchy, referred to as PDH) IMA of network application, relate in particular to based on SDH/ Synchronous Optical Network (Synchronous Optical Network, referred to as SONET) and realize that the IMA delay variance detects and compensation.
Fig. 6 shows the structural representation of the present embodiment IMA delay variance checkout gear, wherein IMA separates the work that frame (IMA deframer) module has been mainly the solution frame, for example E1 separates frame, ATM separates frame, IMA separates frame etc., and generates the ATM cell number value according to ima frame sequence number (IMA Frame Sequence Number) and the ICP offset value of icp cell in ima frame.This module has realized the function of reception, solution frame and the numbering of the device of above-described embodiment, by the Eight characters in icp cell joint ima frame sequence number, the low 2bit(M value of the 9th byte ICP offset and the 13rd byte) the ATM cell numbering that generates 10bit is used for identifying the position of each ATM cell in data flow.
After generating this numbering, the link number (0-503) of take is high address, be numbered low order address with ATM cell, by in cell data writing buffer, by link number, the ATM cell numbering is delivered to IMA simultaneously and recovers (IMA recovery) module affiliated IMA group number and the Link ID numbering of link in the IMA group of while relays link.
Data buffer (data buffer) is mainly used to store all cell of data by link.
The delay variance that IMA recovery module mainly completes IMA detects, the restore funcitons of delay compensation and IMA data.This module has realized the functions such as Difference test, difference compensation and modification pointer.
Difference test and delay compensation below in conjunction with the device that at least comprises above-mentioned three modules to the present embodiment describe.
Delay variance detects principle: the ATM cell numbering that IMA recovery arrives by the Link ID storing received in group number and group and the numbering of link.Then poll is processed all IMA groups, while processing some IMA groups, and all Member Links in the poll processed group.Read successively the ATM cell numbering that all Member Links are corresponding, and the ATM cell of organizing interior all links is numbered to the processing of sorting.Because the ATM cell numbering of using hardware to maximum 32 Member Links is sorted more difficultly, so we have adopted a kind of way of compromise, and the value that limits 32 Member Links just thinks that ranking results is effective in some scopes the time.
When test set is set up, all links that are configured participate in relatively, after obtaining effective ranking results, the link of the ATM cell of take numbering maximum (postponing minimum) is benchmark, the link that ATM cell numbering is less than the reference link certain value is judged to be the delay variance link that transfinites, report the LODS alarm, other link detects by delay, the state transition after carrying out.
While in the course of work, newly adding incoming link, the ranking results that the original link ATM cell detected by delay variance of usining is numbered is as benchmark, being judged to be delay variance for the link that is less than the maximum certain value or is greater than the minimum value certain value transfinites, and reports the LODS alarm, and link increases unsuccessfully.Other newly-increased link is thought by detecting, the Link State redirect after participating in.
The delay compensation principle: so-called delay compensation is exactly output after the ima frame alignment that each link in same group is not lined up originally.The present embodiment utilizes the ATM cell generated previously to number delay compensation equally, after IMA deframer module completes IMA solution frame and generates the ATM cell numbering, the link No. of usining is usingd ATM cell numbering as high address and as low order address, ATM cell is deposited in data buffer, and IMA recovery module completes after delay variance detects and completes the IMA link state machine according to the result and the relevant information that detect.
While having any link to enter the Active state in certain IMA group, the link that postpones maximum (the ATM cell numbering is minimum) in all Active members of take in current group is benchmark, the read pointer of the whole IMA of initialization group (using the ATM cell numbering as read pointer), after this in the group, the read operation of all links is all usingd this read pointer and is carried out as benchmark.If during all links in processing certain group, the ATM cell numbering of all Active Member Links all is greater than group read pointer 4(protective effect now) more than, these all links can be read a cell, otherwise wait for, until satisfy condition.After being abandoned, other cells of non-correct data cell in all data of reading recovered original ATM data flow.
The present embodiment be take an IMA group that comprises 32 Member Links and embodiment is described as example.
Suppose that current I MA group M value is 32, an ima frame comprises 32 ATM cell, wherein there is and only has an icp cell, the ima frame sequence number that has comprised 8bit in this icp cell and the ICP offset of 8bit, wherein, ICP offset is used for specifying the position of ICP in ima frame, and in the present embodiment, this value is more than or equal to 0 and is less than 32, can be in 0 to 31 on arbitrary position.
After above-mentioned parameter is determined, when receiving an effective icp cell, just can initialization calculate an ATM cell numbering (getting the bit wide of 10bit for this value here), computing formula is: ATM cell numbering=ima frame sequence number x32+ICP offset.After this ATM cell of other non-icp cell numbering just adds 1 on the basis of previous cell, has so just formed the continuous ATM cell numbering based on ICP.
But known according to ima protocol, after compensating, all cells with identical ATM cell numbering align when far-end sends.Take link number as high address, and the ATM cell of take be take ATM cell as unit writes in data buffer as low order address by data, and identify cell is cell of data simultaneously, icp cell or Filler cell.When writing data buffer by write pointer namely ATM cell numbering be delivered to IMA recovery module, and press link and store.
When IMA recovery resume module IMA organizes, press link ID by 0 to 31 all links of order poll, the ATM cell number value that reads each link compares, owing to using, to 32 values, (situation of upset also may appear writing all in these values, such as adding again once having got back to 0 after counting down to 1023) sorted more difficult, therefore to participating in numerical value relatively, once limit here, only have in 32 values and have a value at least at [511-N, 511+N] (value of N can be adjusted as the case may be, relatively good between 10-20) between comparative result just think effectively, like this after the regulation, it is all relatively close 511 that the ATM cell that just can guarantee all links when the delay variance between link while not being excessive is numbered, not there will be the situation of filling it up with upset.Just can carry out delay variance after obtaining effective comparative result has detected.Wherein, what in this process, choose 511 is a numeral comparatively placed in the middle in 1 to 1023, certainly, also can select 506,512 etc.
The present embodiment generates the ATM cell numbering for computing relay difference by the relevant feature of utilizing existing protocol, reach with better simply hardware and realize the purpose that delay variance detects, and realize the compensation of IMA data delay and recover by simple hardware, avoided complicated compensating and restoring algorithm.
As can be seen from the above description, the present invention has realized following technique effect:
In technology, major part all uses the IDCR defined in agreement to control the speed of reading now, used again more complicated mode to carry out delay variance detection and compensation simultaneously, make realization very complicated, the present invention is by utilizing the ATM cell numbering, completed the delay variance detection, also by the ATM cell numbering, realized the control of read-out speed simultaneously, do not needed to control read-out speed with complicated IDCR fully, made to realize more simplifying.The bit wide of the bit wide of ATM cell numbering and write pointer can be inconsistent in addition, like this in the situation that do not need the growth data cache size, can improve the detection range to delay variance by the bit wide that strengthens the ATM cell numbering.
Obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in storage device and be carried out by calculation element, and in some cases, can carry out step shown or that describe with the order be different from herein, perhaps they are made into respectively to each integrated circuit modules, perhaps a plurality of modules in them or step being made into to the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
These are only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.