Summary of the invention
The object of the present invention is to provide a kind of data reconstruction method that is used for application layer multicast.Step comprises:
During sending in data, for each group membership seeks possible data recovery point, the possible data recovery point that finds is carried out discriminated union select the suitable data recovery point, and occurring under the situation of loss of data, utilize the data recovery point to transmit obliterated data, reach the purpose of reliable transmitting data in network to the group membership of obliterated data.
For each group membership seeks possible data recovery point, it is a kind of random walk in sending tree, each node produces pair of random numbers u and v, at first jump to walking u near the direction of data source, jump to the v that is directed downwards away more subsequently away from data source, can take two kinds of strategies in the time of migration downwards, select one at random as next-hop node from several children, perhaps the slowest child of specific data forwarding speed is as next-hop node.
The node that finds is carried out discriminated union select the suitable data recovery point, utilized overall unique application layer packet sequence number, judge according to requesting node and the sequence number difference that the node that finds receives data, have only when the sequence number difference greater than zero the time, the node that finds just possesses the qualification as recovery nodes, and from can be used as the alternative node of recovery point, several select the method for final recovery point, can choose more suitably recovery point according to the requirement of different business, for the file transfer business, select the point of sequence number difference maximum, the point of sequence number difference minimum is selected in transmission for Streaming Media.
Occurring utilizing the data recovery point to transmit obliterated data under the situation of loss of data to the group membership of obliterated data, can adopt two kinds of different data recovery policies, reduce the redundant data that occurs in the network if desired, then can only allow the child nodes of failure node carry out the data recovery, and by these nodes to other affected nodes transmission restore data, and if accelerate the speed of restore data and improve restore data
The present invention is based upon the network that computer is formed, be to pass through computer network, utilize end host or application layer to carry out the process of point-to-multipoint or multi-multipoint group communication, the group membership who mentions in the invention, node all are computers, and invention is intercomed mutually by these computers and finishes.Invention provides a kind of data reconstruction method that is used for application layer multicast.Purpose is in order to solve during the application layer multicast data send, when some group membership was lost efficacy and the problem of other group membership's obliterated data of causing being correlated with.It is by during transfer of data, judge that each group membership receives the progress of data in group, for each group membership seeks suitable data recovery point, and after perceiving loss of data, send request to the data recovery point rapidly, provide restore data by the data recovery point, thereby solve the data loss problem that occurs in the application layer multicast.
The present invention is by sending in data in the tree to each member seeks potential node as the data recovery point, and occurring utilizing recovery point restore data to be provided and to accomplish to avoid loss of data to the group membership under the situation of loss of data, provides the purpose of transmission reliability.Characteristics of the present invention are, each group membership independently seeks potential data recovery point, the ability of data recovery point is confirmed to search out with enhancing the possibility of data recovery point by the application layer packet sequence number, can select different data recovery points according to the demand of different application, after loss of data occurring, the group membership can be independently from the different recovery points data that are restored, finally reach the purpose that the efficient recovery obliterated data is arranged.
Technical scheme
In order further to set forth innovation part of the present invention, at first introduce the basic conception relevant with the present invention.The member who participates in group communication need utilize data of application layer multicast agreement structure to send tree and send to carry out data, and data source is a root node.Each node (group membership) that sends on the tree has a father node and zero to a plurality of child nodes.There is not the node of child nodes to be called leaf node.Each node receives the data of data source transmission there and data is transmitted to child nodes subsequently from father node.In Fig. 1 (a, b, c), pm is the father node of m, and pn is the father node of n, and m and n are respectively the child nodes of pm and pn, and m and n are leaf nodes.Node in the tree can be done following division according to its role's in invention difference.Can provide the node of obliterated data to be called recovery nodes to other nodes, recovery nodes need have the vacant number of degrees.The node of seeking recovery nodes is called requesting node, and the node that runs in the searching process is an intermediate node, and the node that might be used as recovery nodes is called alternative node.In Fig. 1 (a, b, c), m is a requesting node, and pm and pn are intermediate nodes, and o and n are alternative nodes, and n is a recovery nodes.
The grouping that data source sends has the application layer packet sequence number, can grouping of unique identification in whole group.Can receive the progress (speed) of the application layer sequence number decision node reception data of grouping according to node.
Concrete scheme:
1) utilizes existing application layer multicast protocol, carry out at needs that construction data sends tree in the end host of group communication;
2) form of the controlling packet of the searching data recovery point that determine to need sends, and the form of the controlling packet that the data recovery point is authenticated and selects;
3) revise the application layer multicast agreement, make each node can send and handle the controlling packet of seeking the data recovery point and the controlling packet that the data recovery point is authenticated and selects;
4) revise the application layer multicast agreement, make each node after detecting packet loss, can send request, and receive restore data to the data recovery point.
Concrete grammar step of the present invention is as follows:
The step that need carry out as a requesting node is:
1) requesting node m generation form is the controlling packet of Class1, and this controlling packet is sent to father node; The controlling packet of Class1 comprise pair of random numbers (u, v); U represent from this node along send tree upwards (near data source) need the jumping figure of process, and v be illustrated in recall through the u step after, beginning is the jumping figure of (away from data source) process downwards.
2) after m received the controlling packet of type 2, transmission types was 3 controlling packet, and the characteristics of type 3 controlling packet are to carry the application layer packet sequence number seq1 from data source that current time m receives;
3) m receives from the data recovery nodes of therefrom selecting optimal node as m after the controlling packet of different node type of feedback 4; Two kinds of strategies of selecting recovery nodes are arranged, the first, the node of selecting sequence number difference seq1-seq2 maximum is as recovery nodes, and the recovery nodes of Xuan Zeing provides the ability of restore data the strongest to m like this, is suitable for file transfer; The second, the node of selection sequence number difference seq1-seq2 minimum is recovery nodes the most, and it is the shortest that the recovery nodes of Xuan Zeing provides the time delay of restore data like this, is suitable for the Streaming Media transmission;
4) selected n is as recovery nodes, and m sends heartbeat message to n and sending in the tree and capable recovery nodes as m to guarantee n;
5) if m does not receive the controlling packet of type 4 from any node, perhaps in a period of time, do not receive the heartbeat message that recovery nodes n sends, m restarts from step 2;
6) after m perceives loss of data, the log-on data Restoration Mechanism; Time data recovery mechanism has two kinds of strategies, if expectation reduces the redundant data that occurs in the network, execution in step 7 so, if expect to have the more node data that are restored, execution in step 8 so;
7) if the node m father node operate as normal whether of checking it is its father node operate as normal, then m log-on data Restoration Mechanism not.Have only the child nodes of crashed node to carry out time data recovery mechanism in the whole transmission tree, they send recovery request to recovery nodes separately, after requesting node is received restore data, transmit restore data to child nodes;
8) each perceives the node difference log-on data Restoration Mechanism of loss of data, to recovery nodes request msg separately.After requesting node is received restore data, transmit restore data to child nodes, if certain node is received the restore data of repetition from its father node, then send to father node and suppress message, father node is no longer transmitted restore data to child node after receiving and suppressing message.The step that need carry out as an intermediate node is:
1) child nodes of utilizing the application layer packet sequence number to follow the trail of it receives the progress of data, the child nodes that the recorder data are the slowest;
2) receive the controlling packet of Class1 after, make the following judgment: if u>0, and this node is not root node, and u subtracts one so, and controlling packet is transmitted to father node; If u=0 or this node have been root nodes, u=0 sends to child nodes to controlling packet so; If u=0, v>0, and this node is not leaf node, v subtracts one so, and controlling packet is transmitted to child nodes; If u=0, v=0 or this node have been leaf nodes, v equals 0 so, and controlling packet is transmitted end-of-job, arrives node n.Transmit control to child nodes and be surrounded by two kinds of strategies, a kind of strategy is a random fashion, promptly select one at random from all child nodes, as the next-hop node that controlling packet is transmitted, another mode then is the slowest child nodes that controlling packet is transmitted to record in the step 1; The step that need carry out as an alternative node is:
1) alternative node inspection it whether possess necessary condition as the data recovery point, promptly whether it is free remaining number to connect new node.If there are not the vacant number of degrees, node does not remake any work so, if having, node need send the controlling packet that form is a type 2 to m, and the controlling packet of type 2 comprises alternative address of node;
2) after alternative node is received the controlling packet of type 3, relatively its grouping serial number seq2 that receives from data source and the relation of seq1, if seq2<seq1, so alternative node is 4 controlling packet to the m transmission types, otherwise alternative node is not done anything, and type 4 controlling packet comprise grouping serial number difference seq1-seq2; The step that need carry out as a recovery nodes is:
1) sends heartbeat message to requesting node;
2) receive the data recovery request of requesting node after, send restore data to requesting node;
The present invention has following advantage: alleviated certain group membership's collapse in network at first greatly, and the problem of the offspring group membership obliterated data that causes.Secondly, the task that data are recovered is born by numerous nodes in the transmission tree, the group membership who has avoided all obliterated datas is together to data source request restore data, cause data source to load too greatly and the problem of network congestion, the group membership of the 3rd obliterated data can be independently from the different recovery nodes data that are restored, thereby solved the obliterated data relativity problem, accelerated the speed that obliterated data recovers.At last, algorithm adopts different data recovery policies, can satisfy the different requirements of different application aspect the data recovery.
The present invention relates to and utilize end host or application layer that the muticast data transmission service is provided, is a kind of method that improves the application layer multicast data transmission credibility.Realize in the application that the present invention is adapted at utilizing application layer or end host to carry out the muticast data transmission service.