During switching, a kind of media-independent avoids repeating the method and the device of affairs
Technical field
The present invention relates to the communications field, avoid repeating the method and the device of affairs during particularly media-independent switches.
Background technology
Development of Communication Technique is maked rapid progress, and various new access technologies emerge in an endless stream, and heterogeneous networks also has each adaptive coverage and application scenarios.In order to realize ubiquitous Communications service, support the multimode terminal of plurality of access modes to arise at the historic moment, how the seamless switching between these heterogeneous networks and the problem of roaming become outstanding day by day to user terminal simultaneously.In order to solve the seamless switching problem of user between heterogeneous network (comprising 802 networks such as IEEE802.3, IEEE802.11, IEEE802.16 and cellular networks such as 3GPP and 3GPP2), the wireless working group of IEEE802 has set up IEEE802.21 working group research seamless switching problem.
The purpose of IEEE802.21 working group research is to switch for the network that helps to realize link layer, thereby improve user's experience, no matter they are medium type of the same race (comprising wired and wireless), the switching by auxiliary network makes mobile device finish seamless switching under the situation of network environment support to become possibility.Existing Mobile Internet Protocol (MIP, Mobile Internet Protocol) can be thought the mobility that has realized layer three makes the user after the network address changes, and still guarantees the continuity of upper-layer service; But still period of disconnecting fully of the bottom link that has user and network, thereby influenced service quality (QoS, Qualify of Service), promptly increased delay, indexs such as shake.
For seamlessness and the continuity that realizes this switching, IEEE802.21 working group has introduced a new protocol function layer-media-independent handoff functionality (MIHF in existing mobility management protocol stack, MediaIndependent Handover Function), MIHF in the mobility management protocol stack the position and key service as shown in Figure 1, MIHF logically is defined as a thin layer in the mobility management protocol stack of terminal and network, plays the function of assistant and boost motor in switching decision process; At multimode terminal, MIHF offers the upper strata and need make the switching decision and how effectively make some necessary informations of switching decision, and switching decision and link selection are made based on input and the context of MIHF in the upper strata, thereby realize seamless switching; Media-independent switches the handoff procedure that (MIH, Media Independent Handover) functional entity mainly provides following service to help the user:
Media-independent Event Service (MIES, Media Independent Event Service): classification, filtration and report about the dynamic change incident of link characteristics, Link State and link-quality are provided;
Media-independent command service (MICS, Media Independent Command Service): the means that MIH user management and the control link behavior relevant with switching and mobility is provided;
Media-independent service (MIIS, Media Independent Information Service): the feature and the professional details of service network and ambient network are provided, and these information are used for the efficient system access and switch decision.
In addition, IEEE802.21 working group has also defined the handoff protocol of media-independent, mainly is the description for following flow process:
The MIH ability discovery: the MIHF of terminal or network finds which entity supports the MIH function, and the degree of supporting how;
The MIH remote login: the MIHF of different network elements can register mutually, with the receiving media independent switching message, comprises remote events;
The MIH interacting message: the MIHF at two ends can use the MIH agreement to carry out alternately by suitable transmission means; Form, message format and the message interaction process of bag have been stipulated in the agreement.
As shown in Figure 2, MIH message is made up of three parts, comprises fixedly head, variable head and three parts of load.Wherein, the message format that MIH message fixing head divides as shown in Figure 3, MIH message fixing head branch is essential, length is 6 bytes, has comprised the most basic part of this MIH message, helps express analysis and processing to message; Wherein, MIH message identifier (MID, Message Identifier) is by service identifier (SID, Service Identifier), command code (OpCode, Operation Code) and behavior identifier (AID, Action Identifier) three parts form; Transaction Identifier TID (TransactionID) is used for matching request and response, and confirms at needs under the situation of ACK, and the ACK affirmation coupling of request Request, response Response and indication Indication and their correspondences is got up; Confirm request ACK-Req: the transmit leg of representing this message wishes that message receiver provides ACK and confirms after receiving this message; Confirm response ACK-Rsp: represent that this message is the ACK affirmation that has identical MID and TID message for another one; The specific descriptions of the relevant field that MIH message fixing head divides are as described in Table 1:
The message domain name |
Length (bit) |
Describe |
Ver |
4 |
Protocol version 0: need not 1: current version 2-15: keep |
ACK-Req |
1 |
Message confirmation request |
ACK-Rsp |
1 |
The message authentication response |
Reserved |
10 |
Keep the position, the time spent is not set to 0 |
MIH?Message?ID(MID) --Service?Identifier (SID) --Operation?Code (Opcode) --Action?Identifier (AID) |
16 4 2 10 |
Message identifier, comprise following three partial contents: service identification, identify different MIH types of service, value is as follows: 1: system management 2: Event Service 3: command service 4: the action type that information service is relevant with service identification, value is as follows: 1: request 2: response 3: indication operation mark, sign various command, incident and information |
Transaction?ID |
16 |
Transaction Identifier is used for matching request and response, and when ACK confirms, matching request, response and indication |
Variable?Load?Length |
16 |
The length of elongated load part is the elongated head length degree and the load length sum of MIHF frame, does not comprise fixedly head length degree of MIHF |
Table 1
The message format that MIH protocol message variable header is divided comprises head type (HeaderType), length (Length) and value (Value) as shown in Figure 4; Have two kinds of fields: media-independent handoff functionality sign (MIHF ID)/session identification (Session ID): the peer node that is used to discern communication; Synchronizing information (Synchronization Information): the timestamp that is used to discern the message that receives.
MIH message may be carried by service-strong bottom (for example transmission control protocol TCP), also can carry by unserviceable bottom (for example UDP UDP), therefore MIH interacting message itself need provide reliability end to end for telecommunication, guaranteeing that message received by destination, this can not provide particularly important under the situation of reliability services in carrying of using.Consider simultaneously that under the reliable transmission situation in order to save transport overhead and to reduce the MIH message transmission delay, the MIH agreement provides optional response mechanism.
The MIH message source node may be asked a MIHACK message, to guarantee the successful reception for certain message.The ACK message of MIH layer only is used to confirm that initial MIH message is correctly received by the destination node; After source node had been received MIH ACK, it just can conclude that message is sent to destination reliably.If initial message or MIH ACK lose, source node can the same MIH message of overtime re-transmission.
Owing to there is the retransmission mechanism of message, so might the recipient can receive two parts of copies of identical message.In this case, if the recipient carries out twice with same message, the state of switched system is unpredictable so, therefore must provide the mechanism that prevents that affairs from repeating in the MIH agreement.In the existing protocol, just advised all affairs in recipient's buffer memory a period of time, compared with the affairs of receiving then,, then do not carried out reprocessing if received this affairs before finding.
Because MIH message may be transmitted in insecure carrying, the MIH layer need guarantee that response retransmits.When the MIH message source node sends a MIH message,, the ACK-Req sign is set then, timer is set, and during timer, keeps the copy of this message if think and need response; If timer expiry is still confiscated acknowledge message, then can use original Message-ID and Transaction-ID to retransmit this message.
After if message source node is retransmitted this message, receive acknowledge message soon, it can think that initial MIH message successfully is delivered to destination node so, and does not need to continue wait acknowledge for the message that retransmits.
If message source node had been received affirmation message initial or that retransmit before timer expiry, source node can be removed timer, and the message copying of buffer release.Except the transmission first time of beginning, same MIH message is retransmitted twice by source node at most.If the ACK-Req flag bit is not set in the initial message, source node should not use identical Message-ID and Transaction-ID to retransmit this packet.
When destination node has been received the MIH packet that carries ACK-Req sign, destination node can return one and confirm packet, the ACK-Rsp sign is set, as the response to request message.If destination node thinks that the processing that can finish this MIH packet very soon, destination node also can be provided with the ACK-Rsp sign in the MIH response data packet, and destination node can also be by the ACK-Req sign is set, to source node request MIH acknowledge message.
Destination node should be within a certain period of time, and the MIH grouped data packet header that buffer memory is initial is with any packet that has the re-transmission of same transaction sign of association, to avoid the reprocessing of same message.The value in this time interval may depend on two two-way times (RTT, Round Trip Time) between the node.If in this cache-time section, received the packet of retransmitting, destination node should provide the ACK packet, if handled this packet before, then destination node should not handled the packet of re-transmission again.
If do not confirm request ACK-Req flag bit in the initial message, the MIH message source node should not use identical Transaction Identifier TID and MID to retransmit this message so.
From the above, prior art has the following disadvantages aspect the affairs avoiding repeating:
1, prior art requires all affairs in some time periods of buffer memory, can take a large amount of memory spaces and influence search efficiency, makes the limited device processes difficulty of memory space and operational capability.
2, because the transmit leg of MIH message can be retransmitted identical message after regularly overtime, therefore under unreliable transmission, shaking hands for twice between the affairs still is difficult to guarantee to avoid repeating affairs.
3, may there be a plurality of sessions between source node and the destination node, therefore only use 16 TID to be not enough to distinguish unique affairs, non-repetitive affairs can be judged as the affairs of repetition.
4, the recipient of MIH message uses a simple time window to avoid repeating of affairs in the prior art, if time window is excessive, will take ample resources; If time window is too small, can cause some affairs outside time window, to arrive at again, still can not guarantee to avoid repeating affairs.
Summary of the invention
The invention provides a kind of media-independent and avoid repeating the method and the device of affairs in switching, avoiding repeating affairs, and conserve memory resource and raising the efficiency.
The invention provides following technical scheme:
The method that a kind of media-independent avoids affairs to repeat in switching comprises step:
Destination node carries out the affairs coupling according to the Transaction Identifier in this message after receiving and comprising the media-independent switching message of confirming request mark at least;
The described media-independent of described destination node buffer memory when not matching affairs switches the relevant information of message and the buffer memory duration is set;
Described destination node sends to source node and carries the affirmation message of confirming request mark, wherein, and the described relevant information of deletion after the duration of the affirmation message of receiving described source node or the described relevant information of buffer memory surpasses described buffer memory duration.
Wherein:
Described destination node carries out the affairs coupling with the session identification in described Transaction Identifier and the described media-independent switching message.
Described destination node to source node send carry the affirmation message of confirming request mark after, resend the described affirmation message of confirming request mark of carrying when in the re-transmission duration of setting, not receiving the affirmation message of described source node.
The described affirmation message of confirming request mark of carrying of described destination node buffer memory; Wherein, in described re-transmission duration, receive when the affirmation message of described source node or number of retransmissions surpass pre-determined number the affirmation information of deletion buffer memory.
RTT two-way time that transmits data between described destination node basis and the source node is provided with described buffer memory duration and described re-transmission duration, and described buffer memory duration is greater than described re-transmission duration.Further, described destination node is provided with described buffer memory duration according to the mean value of a plurality of RTT, the mean square deviation of these a plurality of RTT and the number of times that allows to retransmit.
Avoid repeating the method for affairs during a kind of media-independent switches, comprise step:
Destination node carries out the affairs coupling according to the Transaction Identifier in this message after receiving and comprising the media-independent switching message of confirming request mark at least;
The described media-independent of described destination node buffer memory when not matching affairs switches the relevant information of message;
Described destination node sends to source node and carries the affirmation message of confirming request mark, and retransmits the described affirmation message of confirming request mark of carrying when not receiving the affirmation message of described source node in the re-transmission duration of setting.
A kind of communicator comprises:
Receiving element is used for receiving media independent switching message and acknowledge message;
Matching unit is used for when described media-independent switching message comprises the affirmation request mark, carries out the affairs coupling according to the Transaction Identifier in this message or according to Transaction Identifier in this message and session identification;
Transmitting element is used for sending and carrying the affirmation message of confirming request mark when described media-independent switching message comprises the affirmation request mark;
First memory management unit, be used for the relevant information of the described media-independent switching of buffer memory message when not matching affairs and the buffer memory duration is set, and receive and confirm described message of carrying the affirmation message of confirming request mark that perhaps the duration of the described relevant information of buffer memory is deleted described relevant information after surpassing described buffer memory duration.
Described communicator also comprises:
Retransmission unit, be used to set and resend the described re-transmission duration that carries the affirmation message of confirming request mark, and when in this duration, not receiving the confirmation described message of carrying the affirmation message of confirming request mark, indicate described transmitting element to resend and pass the described affirmation message of confirming request mark of carrying;
Second memory management unit, be used for the described affirmation message of confirming request mark of carrying of buffer memory, and receiving the confirmation described message of carrying the affirmation message of confirming request mark, perhaps, resend the described number of times of the affirmation message of confirming request mark that carries above behind the pre-determined number, the affirmation message of deletion buffer memory.
Described communicator also comprises:
Estimation unit is used to calculate RTT two-way time that transmits data between the other side's communicator of this communicator and session, and described buffer memory duration is set and retransmits duration according to this time.
A kind of communicator comprises:
Receiving element is used for receiving media independent switching message and acknowledge message;
Matching unit is used for when described media-independent switching message comprises the affirmation request mark, carries out the affairs coupling according to the Transaction Identifier in this message or according to Transaction Identifier in this message and session identification;
Transmitting element is used for sending and carrying the affirmation message of confirming request mark when described media-independent switching message comprises the affirmation request mark;
First memory management unit is used for the relevant information that the described media-independent of when not matching affairs buffer memory switches message;
Retransmission unit, be used to set and resend the described re-transmission duration that carries the affirmation message of confirming request mark, and when in this duration, not receiving the confirmation described message of carrying the affirmation message of confirming request mark, indicate described transmitting element to resend and pass the described affirmation message of confirming request mark of carrying.
A kind of communication system comprises:
First communicator is used to send and comprises the media-independent of confirming request mark and switch message and acknowledge message;
The second communication device, be used for switching the message Transaction Identifier or carrying out the affairs coupling, and the relevant information that the described media-independent of buffer memory switches message when not matching affairs is provided with the buffer memory duration according to wherein Transaction Identifier and session identification according to described media-independent; And send to first communicator and to carry the affirmation message of confirming request mark, and after the duration of the affirmation message of receiving described source node or the described relevant information of buffer memory surpasses described buffer memory duration the described relevant information of deletion.
A kind of communication system comprises:
First communicator is used to send and comprises the media-independent of confirming request mark and switch message and acknowledge message;
The second communication device be used for switching the message Transaction Identifier or carrying out the affairs coupling according to wherein Transaction Identifier and session identification according to described media-independent, and the described media-independent of buffer memory switches message when not matching affairs; And send to first communicator and to carry the affirmation message of confirming request mark, and retransmit the described affirmation message of confirming request mark of carrying when in the re-transmission duration of setting, not receiving the affirmation message of described source node.
Beneficial effect of the present invention is as follows:
1, adopts the MIH message header that recipient's buffer memory of MIH message receives and corresponding cache-time is set among the present invention, and the caching process mechanism of when cache-time arrives, taking to delete described MIH message header, reduced taking and improved seek rate to buffer resource.
2, adopt three-way handshake mechanism among the present invention between the transmit leg of MIH message and the recipient, and when the recipient does not receive the affirmation message of transmit leg, resend acknowledge message, can avoid repeating affairs to greatest extent.
3, the present invention carries out the affairs coupling by the mode of using session identification and Transaction Identifier combination, has avoided non-repetitive affairs are judged as the affairs of repetition.
4, carry out RTT based on the recipient among the present invention and estimate to be provided with cache-time and re-transmission time, can avoid repeating affairs to greatest extent, effectively avoided repeating affairs and cause the unpredictable problem of switching state.
Description of drawings
Fig. 1 is position and the key service schematic diagram of MIHF in the mobility management protocol stack in the prior art;
Fig. 2 is a MIH message format schematic diagram in the prior art;
Fig. 3 is the message format schematic diagram that MIH message fixing head divides in the prior art;
Fig. 4 is the message format schematic diagram that MIH message variable header is divided in the prior art;
Fig. 5 is a media-independent switched system structural representation in the embodiment of the invention;
The flow chart of Fig. 6 for avoiding affairs to repeat in the embodiment of the invention.
Embodiment
The present invention sets up cache management mechanism the recipient that media-independent switches message, the acknowledge message retransmission mechanism is avoided repeating of affairs and reduced resource occupation.
A kind of media-independent switched system in the present embodiment as shown in Figure 5, this system comprises by the network interconnection or direct-connected first node 50 and Section Point 51.First node 50 sends to Section Point 51 and comprises the media-independent switching MIH message of confirming request mark, and sends acknowledge messages (promptly the affirmation message that Section Point 50 is sent is confirmed) to Section Point 51; Section Point 51 is receiving the laggard behaviour affair of described MIH message coupling, and the described media-independent of buffer memory switches the relevant information of message when matching affairs, and sends the affirmation message of carrying the affirmation request mark to described first node 50.Wherein, during the relevant information of Section Point 51 buffer memory MIH message, the buffer memory duration is set simultaneously, and after the duration of the affirmation message of receiving first node or the described relevant information of buffer memory surpasses described buffer memory duration, deletes this relevant information.Further, Section Point 51 is provided with in the affirmation message that sends to first node 50 confirms request ACK_Req sign, requires 50 pairs of acknowledge messages of first node to confirm, promptly affairs is set up three-way handshake mechanism; Section Point 51 is set up and is retransmitted the described caching mechanism that is provided with affirmation message and this acknowledge message of deletion of ACK_Req sign simultaneously.
Consult shown in Figure 5ly, described Section Point 51 comprises: receiving element 510, matching unit 511, transmitting element 512, first memory management unit 513, retransmission unit 514, second memory management unit 515 and estimation unit 516.Wherein, receiving element 510 receiving media independent switching message and acknowledge messages; Matching unit 511 switches at the media-independent that receives and carries out the affairs coupling when message comprises the affirmation request mark; The described media-independent of first memory management unit 513 buffer memory when not matching affairs switches the header information of message and for buffer memory timer LONG-MAX the buffer memory duration is set; Transmitting element 512 sends when described media-independent switching message comprises the affirmation request mark and carries the affirmation message of confirming request mark, requires the other side that this acknowledge message is confirmed; Retransmission unit 514 is set the re-transmission duration of retransmission timer RETRY, and when not receiving the confirmation described message of carrying the affirmation message of confirming request mark in this duration, indication transmitting element 512 resends and passes the described affirmation message of confirming request mark of carrying; The affirmation message that second memory management unit, 515 buffer memory transmitting elements 512 send; Transmit RTT two-way time of data between the other side's communicator of estimation unit 516 these communicators of calculating and session, described first memory management unit 513 and second memory management unit 515 were provided with described buffer memory duration and retransmit duration according to this RTT time.After first memory management unit 513 received the message of the opposite end being confirmed by described acknowledge message at receiving element 510, perhaps the duration of buffer memory MIH header information was above the MIH header information of deletion buffer memory behind the described buffer memory duration; Same, after second memory management unit 515 receives the message of the opposite end being confirmed by described acknowledge message at receiving element 510, perhaps resend the described number of times of the affirmation message of confirming request mark that carries above behind the pre-determined number, the affirmation message of deletion buffer memory at transmitting element 512.
Because communication is two-way, first node 50 and Section Point 51 all can be used as source node that sends MIH message and the destination node that receives MIH message in practice, therefore, preferable implementation is that first node 50 has identical structure with Section Point 51.
In the present embodiment, the buffer memory duration that is used for timer LONG-MAX on the one hand should be long as much as possible, all can drop in the time window with the packet that guarantees all repeating transmission, to avoid repeating of affairs; On the other hand, this timer again should be short as much as possible, to avoid having deposited a large amount of MIH message in the message buffer of destination node.Therefore, RTT according to estimation unit 516 estimations, and the factors such as maximum in network, transmitted of the maximum of retransmission timer RETRY and packet, the buffer memory duration of timer LONG-MAX is set to the maximum length in time greater than affairs, Section Point calculates RTT at every turn after receiving acknowledge message, two wherein relevant with RTT parameters are as follows:
Average retardation (AAD, Average ACK Delay) is meant a plurality of RTT that measure is carried out arithmetic average.
Mean square deviation (ADEV, Average Deviation) is meant the difference of the mean value of a plurality of RTT that measure and current RTT is carried out square mean.
If retransmitting the pre-determined number of acknowledge message is maximum twice, the length of buffer memory timer LONG-MAX can be configured to 3 times of average retardation ADD and add N mean square deviation ADEV doubly, wherein, N can estimate by system configuration or according to the mathematical characteristic that RTT distributes, this set method can be guaranteed destination node after the buffer memory duration, can not receive the packet of repetition.
Retransmit acknowledge messages for Section Point 51, another kind of possible implementation is this acknowledge message of buffer memory not, but when each the re-transmission according to buffer memory in the corresponding first-born one-tenth acknowledge message of MIH.Though this mode can reduce between the buffer empty that takies, can take Section Point 51 multiprocessing time more.
The mode of the affirmation message in the present embodiment between first node 50 and the Section Point 51 can adopt direct affirmation mode, also can adopt Piggyback to confirm mode.
Consult Fig. 6, the main realization flow that media-independent avoids affairs to repeat in switching in the present embodiment is as follows:
Step 600, Section Point 51 receive the MIH message order that first node 50 sends.
Step 601, Section Point 51 check whether be provided with the ACK_Req sign in this message, if then execution in step 602; Otherwise, showing that the MIH message source node can not retransmit when handling these affairs, destination node does not need to check whether affairs repeat.
Step 602, Section Point 51 carry out the affairs coupling, and judge whether to exist the affairs of coupling, if, then directly return the ACK acknowledge message and give source node, no longer handle (be that Section Point 51 needs to return affirmation ACK after the MIH message of first node 50 repeating transmission, but do not need this MIH message of reprocessing); Otherwise, execution in step 603.
Owing to may have a plurality of session Session between two MIH entities, therefore, if there is the SessionID field in MIH variable header branch, destination node is when carrying out the affairs coupling, session identification Session id field of carrying in the MIH message with the source node transmission and Transaction Identifier Transaction id field compare with the message header that receives in the message buffer formation, with unique definite affairs.
Step 603, the initial MIH message header of Section Point 51 buffer memorys (comprise fixing head and variable), and the buffer memory duration of buffer memory timer LONG-MAX is set for this message.
Step 604, Section Point 51 are selected after the message authentication form affirmation message of ACK_Rsp sign and ACK_Req sign to be set, and send to first node 50; This acknowledge message of buffer memory and retransmission timer RETRY is set simultaneously.
After step 604, Section Point 51 can carry out other transaction, if receive the affirmation message of first node 50 under the not overtime situation of retransmission timer RETRY, the slow middle corresponding affirmation message of Section Point 51 deletions is also removed described retransmission timer RETRY, and deletes MIH head message corresponding in the buffer memory and remove described buffer memory timer.
If retransmission timer is overtime, Section Point 51 judges earlier whether number of retransmissions surpasses pre-determined number (as 2 times), if, then delete affirmation message corresponding in the buffer memory, otherwise, retransmit affirmation message corresponding in the buffer memory and the re-transmission duration of resetting retransmission timer RETRY, and number of retransmissions is increased by 1 time.
If the buffer memory timer expiry, the MIH head message of correspondence and removing corresponding cache timer in the Section Point 51 deletion buffer memorys.
In the present embodiment, it is to handle MIH message header information by existing caching mechanism that another kind is avoided the execution mode that repeats of affairs, set up three-way handshake mechanism by foregoing description, be Section Point 51 after first node 50 sends acknowledge messages, require 50 pairs of these acknowledge messages of first node further to confirm.Accordingly, first memory management unit 513 is used for the header information of the described media-independent switching of buffer memory message when not matching affairs, and all the other processing modes are same as described above, repeat no more.
Though below only show two nodes in the network system, the present invention is not limited to this, has more node in practice in the network system, but the processing mode between any two nodes is all with in like manner above-mentioned.
From the above, the MIH message header that recipient's buffer memory of employing MIH message is received also is provided with corresponding cache-time, and the caching process mechanism of when cache-time arrives, taking to delete described MIH message header, reduced taking and improved seek rate to buffer resource; Between the transmit leg of MIH message and recipient, adopt three-way handshake mechanism, and when the recipient does not receive the affirmation message of transmit leg, resend acknowledge message, can avoid repeating affairs to greatest extent; Carry out the affairs coupling by the mode of using session identification and Transaction Identifier combination, improved the efficient that affairs are searched and mated; Carry out RTT based on the recipient and estimate to be provided with cache-time and re-transmission time, can avoid repeating affairs to greatest extent, effectively avoided repeating affairs and cause the unpredictable problem of switching state.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.