Embodiment
With reference to accompanying drawing, accompanying drawing forms the part of embodiment in the description of following each exemplary embodiment, and illustrates through diagram in the accompanying drawings and can put into practice each exemplary embodiment of the present invention.Should be understood that and can use other embodiment, and can carry out without departing from the scope of the invention on the structure with function on modification.
Embodiment according to various aspects of the present invention is the basis with Stream Control Transmission Protocol stack Hot Spare, is used for the data consistency of guaranteeing that message is synchronous.Fig. 1 shows two examples of Stream Control Transmission Protocol stack Hot Spare framework.As defined among the IETF RFC2960, SCTP is an authentic data newspaper host-host protocol, and it runs on the packet network that unreliable transmission is provided, for example IP network.The principal 120 that carries out the processing of Stream Control Transmission Protocol stack is between SCTP upper layer application 110 and lower floor's transport layer 130, and it is between two upper layer application reliable messaging delivery services to be provided through the coupling of the foundation between two SCTP endpoint.SCTP upper layer application 110 can be that the SCN signaling is used, but also can be other application program.Lower floor's transport layer 130 can be moved TCP, also can move UDP.
Under situation shown in Figure 1, principal 120 is in running order, and as the standby entity 120 of its redundancy backup ' be in monitoring SBR.Though standby entity 120 ' have to 110,130 connectivity, so it does not communicate (being represented by dotted lines) with 110,130 because be in the monitoring SBR.Perhaps, shown in Fig. 1 b, standby entity 120 ' also can have redundancy backup 110 to upper layer application 110 ', the redundancy backup 130 of lower floor's transport layer 130 ' connectivity.In actual product, principal 120 be equipped with entity 120 ' can be in the equipment (for example Media Gateway Controller) that is in identical application SCTP, also can be in the equipment of different application SCTP.Principal 120 and standby entity 120 ' between the transmission of data carry out through the internal system passage, for example system bus, change Ethernet interface, asynchronism transceiver, high speed serial ports arranged, or the like.
Describe principal and standby entity in the Stream Control Transmission Protocol stack Hot Spare framework shown in Figure 1 in detail with reference to Fig. 2 and Fig. 3 below.
Fig. 2 shows the schematic functional block according to the principal of some aspect of the present invention.Transmission buffer 210 is used for the message data that will send of temporary transient storage from upper layer application, and gives transmission processor 220 with the upper layer application message-submission.This message is sent in the processor 220 at SCTP and is converted into SCTP packet, so that transmit through for example IP network.Reception buffer 230 is stored the SCTP packet data that receive from for example IP network, and the SCTP packet that is received is consigned to receiving processor 240.The SCTP packet data that received are translated into the message of upper layer application in receiving processor 240, to consign to upper layer application.In carrying out message synchronous mode Stream Control Transmission Protocol stack Hot Spare process, be mirrored in the transmission buffer and reception buffer of standby entity to the data in real time that transmission buffer and reception buffer 230 will wherein be stored respectively through backup interface unit 250.SCTP sends processor 220 can carry out the processing of Stream Control Transmission Protocol stack with receiving processor 240, and the process that the Stream Control Transmission Protocol stack is handled repeats no more at this for it be known to those skilled in the art that event.
Fig. 3 shows the schematic functional block according to the standby entity of some aspect of the present invention.The upper layer message data that transmission buffer 310 in the standby entity backs up from transmission buffer 210 acquisitions of principal through backup interface unit 350, and consign to SCTP transmission processor 320 to convert SCTP packet to.The SCTP packet data that receive that reception buffer 330 in the standby entity backs up from reception buffer 230 acquisitions of principal through backup interface unit 350, and consign to SCTP receiving processor 340 to be interpreted as upper layer application message.
SCTP in the standby entity sends processor 320 and carries out the Stream Control Transmission Protocol stack processing substantially the same with principal, and the data after just SCTP transmission processor 320 will not handled consign to lower floor's transmission, but finally abandon.SCTP receiving processor 340 in the standby entity is carried out the Stream Control Transmission Protocol stack substantially the same with principal and is handled, and the data after just SCTP receiving processor 340 will not handled consign to upper layer application, but abandon.In addition, in Stream Control Transmission Protocol stack processing procedure, the timer expiry time in the standby entity need not must with principal in full accord.For the ease of distinguishing, can the Stream Control Transmission Protocol stack processing of carrying out in the principal be called main Stream Control Transmission Protocol stack and handle, and being called subsequent use Stream Control Transmission Protocol stack, the Stream Control Transmission Protocol stack processing of carrying out in the standby entity handles.
SCTP in the principal sends the SCTP transmission processor 320 in processor 220, SCTP receiving processor 240 and the standby entity, subsequent use SCTP receiving processor 340 can also be configured to carry out consistency check scheme of the present invention.Below will describe according to consistency check scheme of the present invention.
Is that unit carries out according to consistency check of the present invention with the SCTP coupling, that is to say that it carries out consistency check to the message in the given SCTP coupling.Like defined in the Stream Control Transmission Protocol; The SCTP coupling is actually the corresponding relation between two SCTP endpoint; The SCTP coupling is connected similar with TCP, but conceptive, SCTP coupling ratio TCP connects more extensive: the TCP connection has only a source address and a destination address; And two SCTP endpoint can both provide a SCTP port numbers and an IP address list to the other side, and each SCTP association is identified by two SCTP port numbers and two IP address lists like this.In each SCTP processor (220,240,320,340), possibly only handle a coupling, also possibly handle a plurality of couplings, but what wherein carried out all is to carry out to the SCTP packet in the independent coupling according to consistency check of the present invention.In other words, under the situation of handling a plurality of couplings, the consistency check of each coupling is separate.Active/standby with entity when asynchronous when checking out, can only carry out again synchronously to the coupling of being examined, also can all carry out again synchronous to all couplings wherein.
Like defined in the Stream Control Transmission Protocol, coupling is made up of a plurality of unidirectional streams.Stream is exactly in a SCTP coupling, an one-way logical channel of between two SCTP endpoint, setting up.Relatively independent between each stream, can send data separately and do not receive the influence of other stream, also can realize submitting in order of user data jointly.Can support one or more streams in the SCTP coupling.The quantity of the stream of in a coupling, being supported can be stipulated when coupling is set up.Stream is made up of message sequence, and said message promptly sends to/be received from a series of user messages of upper layer application.All user messages transmit in stream according to the order of sequence, only if submission is unordered business transferring.
In the Stream Control Transmission Protocol stack is handled, can be multiplexed into application message in the SCTP packet more than one.SCTP packet is made up of common header and plurality of data piece (chunk), and these data blocks can comprise control information or user data.Wherein, like defined in the Stream Control Transmission Protocol, each payload (DATA) data block is used two cover serial numbers in agreement: transmit serial number (TSN) and Stream Sequence Number (SSN).The distribution of TSN and SSN is separate.TSN is that coupling one end at SCTP is that each data block that local terminal sends is sequentially distributed 32 serial numbers based on initial TSN.SSN is in each stream of a coupling of SCTP, is 16 serial numbers of each data block order assignment of local terminal transmission in this stream.So just TSN, SSN distribution mechanism provide the feasibility of utilizing scheme of the present invention to carry out consistency check, will describe in detail it after a while.
In order to carry out according to consistency check of the present invention; For the coupling that provides; SCTP sends processor 220 after obtaining the SCTP packet of this coupling through aforesaid Stream Control Transmission Protocol stack processing; Extracting the TSN and the checking information of last the payload data piece in each SCTP packet---it is right that it forms the TSN-check information, with the data as consistency check.The right data of this TSN-check information send standby entity to carry out the real-time consistency check through backup receiving element 250.Backup receiving element 250 can also be used to transmit other data of relevant consistency check, for example consistency check result notification.
In order to carry out according to consistency check of the present invention; For the said coupling that provides; SCTP sends processor 320 and is handling through aforesaid Stream Control Transmission Protocol stack; The upper layer application message that will from transmission buffer 310, be backed up obtains after the SCTP packet of this coupling, and it is right to extract coupling TSN-check information, said coupling TSN-check information to have with the TSN-check information that comes autonomous entity to identical TSN.Whether this coupling TSN-check information is to being transmitted to consistency check module 360, intact complete with the data that are used for this coupling.Backup interface unit 350 will also send consistency check module 360 to from the consistency check data that principal receives.Consistency check is carried out in consistency check module 360.Said coupling TSN-check information is to can obtain like this: the TSN and the check information that extract all the payload data pieces in each SCTP packet---and it is right that it forms the TSN-check information; And therefrom find out have right with the TSN-check information that comes autonomous entity, promptly right to corresponding coupling TSN-check information with the TSN-check information that comes autonomous entity to the TSN-check information of identical TSN.Find out the right process of coupling TSN-check information from the TSN-check information centering of all payload data pieces and also can consistency check module 360, carry out, for example through following operation (referring to Fig. 6 and Fig. 7) the buffer queue Q that describes in detail.
Data for required consistency check form mechanism according to SCTP packet, and a TSN who only needs principal to transmit in the SCTP packet has just enough detected consistency.Why transmitting last TSN in the SCTP packet, is in order to detect the most current mistake.For the coupling that comprises a plurality of streams, it is carried out according to consistency check of the present invention in, above-mentioned check information is preferably the SSN of this data block, and for the coupling that only comprises a stream, above-mentioned check information is preferably the CRC check sign indicating number.SSN can directly be obtained from SCTP packet by the SCTP processor.The CRC check sign indicating number can calculate acquisition to the data division of the corresponding payload data piece in this coupling by the SCTP processor.SCTP sends processor 220,320 can confirm whether only comprise a stream in the given coupling, if words just adopt said CRC check sign indicating number as check information, comprise a plurality of streams in the given else if coupling and then adopt SSN as check information.Said definite can the completion through technology known in the art.Because only check the CRC check sign indicating number of the data division of SSN or payload data piece, but not the CRC of the header of whole message or all data, consistency check speed can be very fast, and make checkout procedure very simple.In practice, in many SCTP used, for example the SIGTRAN signaling transmitted and uses a plurality of streams in the common coupling, and therefore, common situation is only to check SSN just enough.
For the ease of understanding, through the bright TSN-SSN of utilization of as an exampleBSEMGVR takeN-PSVSEMOBJ to carrying out the process of consistency check.Supposing that the TSN-SSN that principal sends to standby entity is to being (100-201), also is 201 if the TSN that is produced through standby entity self Stream Control Transmission Protocol stack processing procedure is the SSN of 100 payload data piece, confirms that then consistency check passes through.Otherwise, confirm problem to have occurred for the data backup of this coupling, cause message asynchronous.So, on the one hand the Hot Spare state of system is updated to asynchronously, revert to synchronous regime on the other hand as early as possible.
In order to make the present invention clearer, illustrate the data sequence on each reference point in principal with reference to Fig. 2 and Fig. 4, a series of data cells that just wherein transmit.
Reference point A representes institute's data in synchronization between transmission buffer 210 and 310, this shows that the data sequence (being sequence 1) on this reference point is actually the application message sequence.Comprise 5 upper layer message (being numbered m1, m2, m3, m4, m5 successively respectively) in chronological sequence in the sequence 1, the message table that links to each other is shown in message very approaching on the time.
Reference point B representes that SCTP sends processor 220 and carries out the SCTP packet sequence that the processing of Stream Control Transmission Protocol stack produces afterwards, is 3 messages (being numbered p1, p2, p3 respectively) in the sequence 2 in this example.Wherein message p1, p2, p3, p4 message are changed into data block D1, D2, D3, D4 respectively, and approaching D1, D2 is merged into message p1 each other, and approaching D3, D4 is merged into message p2 each other.It will be understood by those skilled in the art that this only is an example.According to the variation of aspects such as the size of message, type, the message process result also can be other situation, and the present invention does not limit this.
Reference Point C representes that SCTP sends the sequence of a part of TSN/SSN (situation to contain a plurality of streams in the coupling the is an example) data in the SCTP packet that processor 210 is provided for consistency check.Shown in sequence 3, according to the present invention, last the payload data piece among the message p1 is data block D2, and its TSN-check information is expressed as TSN to being TSN and the SSN of D2
2In like manner, be TSN and the SSN of D4, be expressed as TSN corresponding to the consistency check data of message p2
4For message p5, because wherein only comprise a payload data piece D5, so its last payload data piece is data block D5, its TSN-check information is to being TSN
5If there is not the payload data piece in the SCTP packet, for example only comprise some SCTP packet of control information, then it is not extracted the consistency check data.
In order to make the present invention clearer, illustrate the data sequence on each reference point in standby entity with reference to Fig. 3 and Fig. 5.
Reference point D, D ' represent that corresponding to sequence 4 and sequence 6 SCTP sends processor 320 and carries out two kinds of possibility situation that the Stream Control Transmission Protocol stack is handled the SCTP packet sequence that produces afterwards.The difference of both of these case is caused by the timer expiry asynchronism(-nization) in principal and the standby entity.As shown in the figure; Sequence 4 is basic identical with the sequence 2 among Fig. 4; This is because timer expiry time and the principal in the standby entity substantially the same, thereby approaching D1, D2 is merged into message p1 each other, and mutual approaching D3, D4 is merged into message p2.And under the situation shown in the sequence 6, timer expiry time in the standby entity and principal inequality, cause D1, D2 corresponding upper message on the time enough near so that merged degree, therefore, D1, D2 are formed in the different messages.
Reference point E, E ' are illustrated respectively under the situation of sequence 4 and sequence 6 corresponding to sequence 5 and sequence 7, and SCTP sends the sequence of processor 310 resulting all TSN/ SSN data.By sequence 5 and 7 visible, for standby entity, the TSN/SSN data of all payload data pieces that extract in the SCTP packet to be comprised.
In order further to be expressly understood thought of the present invention, below further to explain through concrete example and to realize the principle of consistency check according to the present invention.For example, when a plurality of stream is used in a coupling,
Correct sequence of message is: D
S1, D
S1, D
S1, D
S1, D
S2... (D
S1, D
S2Represent the data of two stream S1, S2 respectively),
Its corresponding TSN-SSN to sequence is: (1-1), (2-2), (3-3), (4-4), (5-1) ...;
If certain message dropping of stream S1, such as second,
Be that sequence of message becomes: D
S1, D
S2... (second message dropping of stream S1),
Then according to the TSN/SSN distribution mechanism, corresponding TSN-SSN becomes sequence: (1-1), (2-2), (3-3), (4-1) ....
So if message dropping, then TSN-SSN is inconsistent to taking place, for example go up TSN-SSN in the example to (4-1).
Preferably, the above-mentioned TSN-SSN that in consistency check module 360, utilizes implements through formation the process of carrying out consistency check.Formation is maintained in the aforesaid consistency check module, and it is used for buffer memory and is waiting all TSN-check informations that come autonomous entity/standby entity of pending consistency check right.Like what can know through above description, principal only with the TSN-check information of last payload data piece of each SCTP packet to sending to the check formation, and standby entity can be with the TSN-check information of all payload data pieces to sending to the check formation.
Because the speed of principal and standby entity processing message, timer expiry time etc. maybe be inconsistent; The TSN-check information that comes autonomous entity to maybe from the TSN-check information of standby entity to before arrive the consistency check module, also possibly after it, arrive.Therefore, the active/standby TSN-check information with entity that does not carry out consistency check as yet is to being buffered among the formation Q.Because in the practice, active/standby processing speed with entity, timer expiry time phase difference get can be very not big, or even very little, so the required spatial cache of formation Q is generally very little.With reference to figure 6 the right process of TSN-check information of relatively coming autonomous entity and standby entity through a formation is described below.
In step 610, when a TSN-check information arrives the consistency check module to (supposing to be expressed as TSNc), obtain this TSNc.TSNc possibly come autonomous entity, also maybe be from standby entity.
Whether in step 620, judging in formation this moment has buffer memory to have any TSN-check information right.If do not have any TSN-check information of buffer memory in formation this moment to (being that formation is empty), then in step 630, this TSNc is buffered in the formation, and it be right to continue obtaining next TSN-check information to turn back to step 610.
If in formation this moment buffer memory other TSN-check information to (be formation for empty), then in step 640, judge in new TSNc and the formation that whether the TSN-check information of buffer memory to all coming autonomous entity or standby entity.If both originate identical, then forward step 630 to, TSNc is added in the formation, and it is right to continue to obtain next TSN-check information.
Inequality if originate, then in step 650, whole TSN-check informations that TSN of buffer memory is littler than TSNc in the formation are abandoned ejection.This is because be ever-increasing from TSN number of same entity, and the comparison of consistency check actual needs is that the TSN-check information of last payload data piece in the identical SCTP packet is right, and its TSN is maximum.
So,, judge whether remaining TSN-check information centering exists the TSN-check information that equates with the TSN of TSNc right in the formation in step 660.If exist, then in step 670, the TSN-check information that this is corresponding is to ejection, and relatively whether its check information is consistent with the check information of TSNc.Then, process turns back to step 610.
If remaining TSN-check information centering does not exist the TSN-check information that equates with the TSN of TSNc right in the formation,, judge that whether going back buffer memory in the formation has the TSN-check information right then in step 680.If also have the TSN-check information right in the formation, then abandon TSNc and turn back to step 610 in step 690, else process forwards step 630 to.
Through on address process shown in Figure 6, can guarantee that at synchronization all TSN-check information is to all from an entity in the formation.If the processing speed of principal is fast, then the TSN-check information that comes autonomous entity of buffer memory is right.If it is fast to be equipped with the processing speed of entity, the TSN-check information that then should buffer memory be equipped with entity is right.
Fig. 7 explains the workflow of the processing among Fig. 6 through an example, and shown in wherein is the fast situation of processing speed of principal, from time shaft, can find out.Sequence 3 comes the TSN-check information of autonomous entity to sequence, and sequence 5 is that TSN-check information from standby entity is to sequence.The management of formation Q is based on that TSN carries out.Processing in each time period is moved as follows:
1. the TSN-check information of the TSN=2 that sends when principal is to (with a-TSN
2Expression) time: formation Q is empty, so a-TSN
2Be cached among the Q.
2. subsequently, the standby entity TSN-check information of handling the TSN=1 obtain is to (with s-TSN
1Expression) arrives formation Q: because existing a-TSN among itself and the formation Q
2The source different, and its TSN value is less than this a-TSN
2TSN, it is abandoned.
3. next, the TSN-check information of the TSN=4 of principal transmission is to (being expressed as a-TSN
4) arrive: because existing a-TSN among itself and the formation Q
2The source identical, so TSN
4Be cached among the Q.
4. next, the standby entity TSN-check information of handling the TSN=2 obtain is to (with s-TSN
2Expression) arrives formation Q: because existing a-TSN among itself and the formation Q
2, a-TSN
4The source different, and its TSN value equals existing a-TSN among the formation Q
2TSN, therefore with existing TSN among the formation Q
2Eject, and relatively newly to formation Q in existing whether check information is consistent.So a buffer memory has a-TSN among the formation this moment Q
2
5. next, the standby entity TSN-check information of handling the TSN=3 obtain is to (with s-TSN
3Expression) arrives formation Q: because existing a-TSN among itself and the formation Q
4The source different, and its TSN value is less than this a-TSN
4TSN, it is abandoned.
6. next, the TSN-check information of the TSN=5 of principal transmission is to (being expressed as a-TSN
5) arrive: because existing a-TSN among itself and the formation Q
2The source identical, so TSN
5Be cached among the Q.
7. next, the standby entity TSN-check information of handling the TSN=4 obtain is to (with s-TSN
4Expression) arrives formation Q: because existing a-TSN among itself and the formation Q
4, a-TSN
5The source different, and its TSN value equals existing a-TSN among the formation Q
4TSN, therefore with existing TSN among the formation Q
4Eject, and relatively newly to formation Q in existing whether check information is consistent.So a buffer memory has a-TSN among the formation this moment Q
5
8. next, the standby entity TSN-check information of handling the TSN=5 obtain is to (with s-TSN
5Expression) arrives formation Q: because existing a-TSN among itself and the formation Q
5The source different, and its TSN value equals existing a-TSN among the formation Q
5TSN, therefore with existing TSN among the formation Q
5Eject, and relatively newly to formation Q in existing whether check information is consistent.So formation this moment Q is empty.
Although the consistency check module 360 like Fig. 3 is in the standby entity, the present invention is not limited thereto, shown in understand easily like those skilled in the art, also can be separated according to consistency check module of the present invention with standby entity.In addition, though the foregoing description is mainly paid close attention to transmission buffer and SCTP sends the consistency check on the processor direction, in fact, present invention may also be embodied on the receive direction.Only, the SCTP receiving processor can directly obtain the consistency check data from the SCTP packet that is received from reception buffer, handles and need not as sending processor, must carry out in advance the Stream Control Transmission Protocol stack.
The implementation of various technology described here can use digital circuit, computer hardware, firmware, software or their combination to realize.Implementation may be implemented as computer program; The computer program of promptly in information carrier (for example machine readable storage device or transmitting signal), visibly realizing; Carrying out, or control the operation of said data processing equipment by data processing equipment (for example programmable processor, computer or many computers).Computer program (for example aforementioned calculation machine program) can be write as with the programming language of the arbitrary form that comprises compiling or interpretative code, and can be configured with arbitrary form (comprising stand-alone program or module, assembly, subprogram or other unit that is suitable in computing environment, using).Computer program can be deployed to be executed on the computer or be executed at be in one the station or distributed pass a plurality of stations and by on interconnective many computers of communication network.
In addition, various embodiment can be implemented in hardware or special-purpose purpose circuit, software, logic or their combination in any.For example, some aspect can be implemented in the hardware, and others can be implemented in firmware or the software that can carry out by controller, microprocessor or other computing equipment in, although disclosed embodiment is not limited thereto.Although the various aspects of various embodiment can be illustrated and be described as block diagram, flow chart, perhaps use some other diagram to represent; Be understood that these block diagrams, equipment, system, technology or method described here can be with hardware, software, firmware, special circuit or logic, common hardware or controller or other computing equipments etc., perhaps their some combination realizes.
As it will be appreciated by those skilled in the art that, can utilize computer system to realize the exemplary embodiment that discloses here, wherein said computer system has the associated computer-readable media that comprises the instruction that is used to control said computer system.Said computer system can comprise at least one computer, for example microprocessor, digital signal processor and relevant peripheral circuit.
Present invention resides in this explicitly or briefly disclosed any novel feature or these combination of features.Though, it will be understood by those skilled in the art that existence is to multiple change and the variation of said system with technology about comprising that the particular example of carrying out preference pattern of the present invention described the present invention.Therefore, the spirit and scope of the present invention quilt that should like enclosed in the claim to be set forth is explained widely.