Embodiment
With reference to the accompanying drawings, accompanying drawing forms the part of embodiment in the description of following each exemplary embodiment, and illustrates by 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 and function on modification.
Based on Stream Control Transmission Protocol stack Hot Spare, be used for the data consistency of guaranteeing that message is synchronous according to the embodiment of various aspects of the present invention.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 comes for providing reliable messaging delivery services between two upper layer application by 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 standby condition.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 standby condition.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 undertaken by 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 below with reference to Fig. 2 and Fig. 3.
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 sends in the processor 220 at SCTP and is converted into SCTP packet, so that transmit by 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 by backup interface unit 250.SCTP sends processor 220 and receiving processor 240 can carry out the processing of Stream Control Transmission Protocol stack, and the process that the Stream Control Transmission Protocol stack is handled does not repeat them here 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 by 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 by 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, the Stream Control Transmission Protocol stack processing of carrying out in the principal can be called main Stream Control Transmission Protocol stack and handle, and being called standby 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, standby 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.As 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), may only handle a coupling, also may handle a plurality of couplings, but what wherein carried out all is to carry out at 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.
As 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 setting up between two SCTP endpoint.Relatively independent between each stream, can send data separately and be not subjected to 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 being supported in a coupling can be stipulated when coupling is set up.Stream is made up of message sequence, and described 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, unless submission is unordered business transferring.
In the Stream Control Transmission Protocol stack is handled, can the application message more than be multiplexed in the SCTP packet.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, as 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 the solution 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 by 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 by 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 described coupling that provides, SCTP sends processor 320 and is handling by aforesaid Stream Control Transmission Protocol stack, the upper layer application message that will be backed up from transmission buffer 310 obtains after the SCTP packet of this coupling, it is right to extract coupling TSN-check information, described 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.Described coupling TSN-check information is to obtaining 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 coupling TSN-check information right process from the TSN-check information centering of all payload data pieces and also can consistency check module 360, carry out, for example the operation (referring to Fig. 6 and Fig. 7) by following buffer queue Q with detailed description.
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 at the data division of the corresponding payload data piece in this coupling by the SCTP processor.SCTP sends processor 220,320 can determine whether only comprise a stream in the given coupling, if words just adopt described 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.Described definite can finishing by 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, utilize TSN-SSN to carrying out the process of consistency check by example explanation.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 by standby entity self Stream Control Transmission Protocol stack processing procedure is the SSN of 100 payload data piece, determines that then consistency check passes through.Otherwise, determine 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 data sequence on each reference point in principal, the just a series of data cells that wherein transmit with reference to Fig. 2 and Fig. 4.
Reference point A represents 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 represents 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 mutually, and approaching D3, D4 is merged into message p2 mutually.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 result that message is handled also can be other situation, and the present invention does not limit this.
Reference Point C represents that SCTP sends the sequence of a part of TSN/SSN in the SCTP packet that processor 210 is provided for consistency check (is example with the situation that contains a plurality of streams in the coupling) data.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 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 situations 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 mutually, 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 as seen, 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 by 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 streams 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 utilizes in consistency check module 360 implements by 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.As can be known by 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. may be inconsistent, the TSN-check information that comes autonomous entity to may from the TSN-check information of standby entity to arriving the consistency check module before, also may 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.The right process of TSN-check information of relatively coming autonomous entity and standby entity by a formation is described below with reference to Fig. 6.
In step 610, when a TSN-check information arrives the consistency check module to (supposing to be expressed as TSNc), obtain this TSNc.TSNc may come autonomous entity, also may be from standby entity.
In step 620, it is right to judge whether be cached with any TSN-check information in formation this moment.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, then in step 680, it is right to judge whether also be cached with the TSN-check information in the formation.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.
By 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 illustrates the workflow of the processing among Fig. 6 by an example, and shown in it is the fast situation of processing speed of principal, comes as can be seen from time shaft.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 action in each time period is 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 difference, 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 difference, 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, only be cached with 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 difference, 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 difference, 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, only be cached with 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 difference, 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 as Fig. 3 is in the standby entity, the present invention is not limited thereto, shown in as readily understood by the skilled person, 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 the consistency check on transmission buffer and the SCTP transmission 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 must carry out in advance the Stream Control Transmission Protocol stack as sending processor.
The implementation of various technology described here can realize with digital circuit, computer hardware, firmware, software or their combination.Implementation may be implemented as computer program, the i.e. computer program of in information carrier (for example machine readable storage device or transmitting signal), visibly realizing, carrying out, or control the operation of described 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 for using in computing environment).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 or use some other diagram expression, 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 understood by the skilled person in the art, can utilize computer system to realize the exemplary embodiment that discloses herein, wherein said computer system has the associated computer-readable media that comprises the instruction that is used to control described computer system.Described 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 multiple change and the variation of existence to said system and technology about comprising that the specific example of carrying out preference pattern of the present invention described the present invention.Therefore, the spirit and scope of the present invention should be explained widely as the quilt of being set forth in the claims.