CN1710885A - A method of QoS multicast routing based on Ant-Like mobile agent - Google Patents

A method of QoS multicast routing based on Ant-Like mobile agent Download PDF

Info

Publication number
CN1710885A
CN1710885A CNA2005100189828A CN200510018982A CN1710885A CN 1710885 A CN1710885 A CN 1710885A CN A2005100189828 A CNA2005100189828 A CN A2005100189828A CN 200510018982 A CN200510018982 A CN 200510018982A CN 1710885 A CN1710885 A CN 1710885A
Authority
CN
China
Prior art keywords
node
mobile agent
agent
bandwidth
packet
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2005100189828A
Other languages
Chinese (zh)
Inventor
李腊元
李春林
许毅
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan University of Technology WUT
Original Assignee
Wuhan University of Technology WUT
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan University of Technology WUT filed Critical Wuhan University of Technology WUT
Priority to CNA2005100189828A priority Critical patent/CN1710885A/en
Publication of CN1710885A publication Critical patent/CN1710885A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Implementing mobile agent under network simulator NS2, the invention includes steps: (1) building network model; multicasting tree T(VT, ET) satisfies following conditions: time delay constraint delay(P(s, m)) less than and equal to D, Pm is a member of the set M; bandwidth constraint bandwidth(P(s, m)) larger than and equal to B, e is a member of the P(s, t), where P as route, s as source node, m as target node, D as maximal time delay, B as minimal bandwidth; (2) expanding NS2 in following four sides: 1, expansion of class i.e. mobile agent MA classifier is expanded in address classifier; 2, expansion of packet i.e. MA head is expanded in packet head of NS2; 3, expansion of node, i.e. special data packet including mobile agent is added in node structure of original NS2; 4, expansion of agent, i.e. implementation environment MAE of mobile agent is built and loaded to node.

Description

一种基于Ant-Like移动代理的QoS多播路由的方法A QoS Multicast Routing Method Based on Ant-Like Mobile Agent

技术领域technical field

本发明涉及一种基于Ant-Like移动代理的QoS多播路由的方法(MAMRQoS),属于网络技术,通信技术,多媒体应用技术领域(QoS的含义是服务质量)。The invention relates to a QoS multicast routing method (MAMRQoS) based on Ant-Like mobile agent, which belongs to the field of network technology, communication technology and multimedia application technology (the meaning of QoS is quality of service).

背景技术Background technique

蚂蚁算法是一种基于种群的模拟进化算法,经过大量研究发现,蚂蚁具有寻找蚁穴和食物源之间最短(最优)路径的能力,这种能力是靠其在所经过的路径上留下的一种挥发性分泌物信息素(Pheromone)来实现,蚂蚁在一条路上前进时选择该路径的概率与这条路径上信息素的强度成正比。对于最短路径,选择它的蚂蚁越来越多,导致更多的信息素积累,吸引更多的蚂蚁,从而形成了一种正反馈,这样最短路径将会很快被绝大多数蚂蚁发现,蚂蚁个体之间的交流信息与相互协作达到搜索食物的目的。The ant algorithm is a population-based simulated evolutionary algorithm. After a lot of research, it has been found that ants have the ability to find the shortest (optimal) path between the ant nest and the food source. A volatile secretion pheromone (Pheromone) is realized, and the probability that the ant chooses the path when advancing on a path is proportional to the intensity of the pheromone on this path. For the shortest path, more and more ants choose it, resulting in more pheromone accumulation, attracting more ants, thus forming a positive feedback, so that the shortest path will be found by most ants soon, the ants The exchange of information and mutual cooperation between individuals achieve the purpose of searching for food.

AntNet是一种基于移动Agent的分布式自适应最短路径计算方法,起源于仿生学中著名的蚁群算法。AntNet的基本思想是:网络中任意一个节点为源节点,以一定的时间间隔向一个随机选择的节点为目的节点,派发一个移动Agent为前向Agent搜索两节点之间的最短路径,同时收集记录路径状态信息,Agent在每个中间节点根据路由表中相邻节点的取向概率的比例值或以随机方式选取下一跳节点,同时记录节点的标识符以及从源节点到该节点所经历的旅行时间,重复此过程,直至到达目的节点,到达目的节点的前向Agent产生一个后向Agent,并将收集的信息全部传给该Agent之后消亡,后向Agent沿同一路径的相反方向移动,并用其携带的信息对所经过的节点的路由表中的取向概率值和旅行时间等参数进行更新,并通过模拟实验证明其性能优于传统的链路状态算法与距离向量算法,但该算法只针对尽力而为的数据报传递,没有考虑具有服务质量要求的实时数据流的路由计算问题,具有一定的局限性。AntNet is a distributed adaptive shortest path calculation method based on mobile agents, which originated from the famous ant colony algorithm in bionics. The basic idea of AntNet is: any node in the network is the source node, and a randomly selected node is the destination node at a certain time interval, and a mobile agent is sent as the forward agent to search for the shortest path between the two nodes, and the records are collected at the same time. Path state information, the agent selects the next hop node at each intermediate node according to the ratio of the orientation probability of the adjacent node in the routing table or randomly, and records the identifier of the node and the travel experience from the source node to the node Time, repeating this process until reaching the destination node, the forward agent that reaches the destination node generates a backward agent, and passes all the collected information to the agent and then dies, the backward agent moves along the opposite direction of the same path, and uses its The information carried updates the parameters such as the orientation probability value and travel time in the routing table of the passing node, and the simulation experiment proves that its performance is better than the traditional link state algorithm and distance vector algorithm, but this algorithm is only for best-effort However, for the datagram delivery, it does not consider the routing calculation problem of real-time data flow with service quality requirements, which has certain limitations.

基于Agent的路由算法是人工智能在网络中的一个应用,Appleby和Steward最初提出了类似蚂蚁Agent的算法可以用于网络控制如路由和负载平衡等,但是他们没有给出实现原型。基于移动Agent的分布式QoS(服务质量)路由计算方法,该方法采用移动Agent搜索网络,寻找满足QoS请求的路径,引入移动Agent后,系统更具灵活性与适应性。Agent-based routing algorithm is an application of artificial intelligence in the network. Appleby and Steward initially proposed that an algorithm similar to ant agent can be used for network control such as routing and load balancing, but they did not give a prototype. Distributed QoS (Quality of Service) routing calculation method based on mobile agent. This method uses mobile agent to search the network to find the path that meets the QoS request. After introducing mobile agent, the system is more flexible and adaptable.

蚂蚁路由是一种新颖的路由算法,它来源于生物学中蚁群搜索食物的模型。在蚂蚁路由中称之为Agents,一群蚂蚁被用来探索指定的源节点与目的节点之间的最短路径,对于一个目的节点,在路由表中不是具有一个固定的下一跳节点,而是具有多个可选的下一跳节点,每一个候选的下一跳节点都具有一个概率值,表示在计算最短路径情况下该候选值被选择的可能性。这些候选节点的概率值在初始时是相等的,在算法的运行过程中,随时被经过的蚂蚁包更新。对于一对给定的源节点与目的节点,源节点将产生一定数量的蚂蚁,根据它自身的路由表项向网络发送这些蚂蚁包,它们将完成探索网络寻找路径的任务。蚂蚁能够记住经过的路径节点,因此当一个蚂蚁到达目的节点时,它将能够沿源路径返回源节点,在返回的过程中,蚂蚁习惯于根据自身携带的信息状态按照下面的规则改变它经过的每一个节点的路由表。路由表的更新规则是在当前节点的路由表中增加蚂蚁来自的那个候选节点的概率值,减少其它候选节点的概率值,概率值较高的路径总是被优先选择,这样又增加了该路径的选择概率,越来越多的蚂蚁将遵循这条路径,进一步增加了概率值,最终使得更多的蚂蚁遵循这条路径,正是由于这种正反馈循环,使得一条最好的路径很快出现,而且当网络负载改变一条新的最好的路径出现时,蚂蚁会迅速认同与加强,因此蚂蚁路由是动态的、自适应的,而且具有很好的扩展性与灵活性。Ant routing is a novel routing algorithm, which is derived from the model of ant colony searching for food in biology. It is called Agents in ant routing. A group of ants is used to explore the shortest path between a specified source node and destination node. For a destination node, instead of having a fixed next-hop node in the routing table, it has A plurality of optional next-hop nodes, each candidate next-hop node has a probability value, indicating the possibility of the candidate value being selected in the case of calculating the shortest path. The probability values of these candidate nodes are equal at the beginning, and are updated by the passing ant packets at any time during the operation of the algorithm. For a pair of given source node and destination node, the source node will generate a certain number of ants, and send these ant packets to the network according to its own routing table entries, and they will complete the task of exploring the network to find the path. Ants can remember the path nodes they have passed, so when an ant reaches the destination node, it will be able to return to the source node along the source path. In the process of returning, the ant is used to changing its path according to the following rules according to the information state it carries The routing table of each node. The update rule of the routing table is to increase the probability value of the candidate node that the ant comes from in the routing table of the current node, and reduce the probability value of other candidate nodes. The path with a higher probability value is always preferred, which increases the path With the selection probability of , more and more ants will follow this path, further increasing the probability value, and eventually more ants will follow this path. It is because of this positive feedback loop that a best path quickly Appears, and when the network load changes and a new best path appears, ants will quickly recognize and strengthen it, so ant routing is dynamic, adaptive, and has good scalability and flexibility.

以上这些都没有用来解决QoS多播路由的约束问题。None of the above is used to solve the constraint problem of QoS multicast routing.

发明内容Contents of the invention

本发明的目的是解决QoS多播路由的约束问题,提出一种基于Ant-Like移动代理的QoS多播路由的方法,用它来解决实时应用中的时延、时延振动、宽带和包丢失率等约束。The purpose of the present invention is to solve the constraint problem of QoS multicast routing, propose a kind of method based on the QoS multicast routing of Ant-Like mobile agent, use it to solve time delay, time delay vibration, broadband and packet loss in real-time applications rate constraints.

本发明的技术方案:本发明给出一种基于Ant-Like移动代理的QoS多播路由的方法,在网络模拟器NS2下实现移动代理,其特征在于:Technical scheme of the present invention: the present invention provides a kind of method based on the QoS multicast routing of Ant-Like mobile agent, realizes mobile agent under network simulator NS2, is characterized in that:

一、建立网络模型:多播树T(VT,ET)满足:1. Establish a network model: the multicast tree T (VT, ET) satisfies:

时延约束,delay(P(s,m))≤D,Pm∈M.            (1)Delay constraint, delay(P(s,m))≤D, Pm∈M. (1)

带宽约束bandwidth(P(s,m))≥B,e∈P(s,t)      (2)Bandwidth constraint bandwidth(P(s, m))≥B, e∈P(s, t) (2)

式中:P代表路径,s代表源节点,m代表目标节点,D代表最大延时,B代表最小宽带;In the formula: P represents the path, s represents the source node, m represents the target node, D represents the maximum delay, and B represents the minimum bandwidth;

二、对NS2作以下四个方面的扩展:2. Expand NS2 in the following four aspects:

1)类的扩展:在地址分类器中扩展移动代理MA分类器;1) class extension: extend the mobile agent MA classifier in the address classifier;

2)分组扩展:在NS2的分组头中扩展MA头;2) Packet extension: extend the MA header in the packet header of NS2;

3)节点node的扩展:在原始NS2的节点node结构中,增加了一种包含移动代理的特殊数据报;3) Extension of node node: In the node node structure of the original NS2, a special datagram containing mobile agent is added;

4)Agent的扩展:建立移动代理执行环境MAE,并在节点上加载;扩展包括两个部分:首先是增强switcn_的功能,使其能判断收到的Packet是否是移动代理;其次是增加一个处理移动代理数据包的MA分类器。4) Agent extension: establish the mobile agent execution environment MAE, and load it on the node; the extension includes two parts: the first is to enhance the function of switcn_, so that it can judge whether the received Packet is a mobile agent; the second is to add a MA classifier that handles mobile agent packets.

本发明的优点:提高了移动代理获得最短路径的成功率;解决了网络平衡问题。The invention has the advantages of improving the success rate of the mobile agent in obtaining the shortest path and solving the problem of network balance.

附图说明Description of drawings

图1是网络模型示意图;Figure 1 is a schematic diagram of a network model;

图2建立网络模型流程图;Fig. 2 establishes the flow chart of network model;

图3结构扩展示意图;Figure 3 Schematic Diagram of Structural Expansion;

图4Node的扩展示意图。Figure 4 Schematic diagram of the extension of Node.

具体实施方式Detailed ways

一、理论依据:1. Theoretical basis:

本发明首先提出了多QoS约束的多播路由的网络模型,QoS多播路由的目的就是在分布的网络中寻找最优路径,要求从源节点出发,历经所有的目的节点,并且满足所有的约束条件,达到花费最小或达到特定的服务水平,QoS多播路由问题是NP完全问题。The present invention first proposes a network model of multicast routing with multiple QoS constraints. The purpose of QoS multicast routing is to find the optimal path in a distributed network, which requires starting from the source node, passing through all destination nodes, and satisfying all constraints. Conditions, to achieve the minimum cost or to achieve a specific service level, the QoS multicast routing problem is NP-complete.

一个网络可表示成一个加权图G=(V,E),其中V表示节点集,E表示连接节点的通信链路集,|V|和|E|分别表示该网络中的节点数和链路数。为不失一般性,只考虑这样的一类图,即在该类网络中一对节点之间最多只有一条链路,链路旁的参数可用于描述该链路当前的状态。设T(s,M)表示多播树,其中s∈V为一棵多播树的源节点,M{V-{s}}为该多播树的端节点或叶节点集,设R+为正实数集。在这里定义两个函数:c(u,v)和d(u,v),分别代表链路l上的代价和时延,设l=(u,v)∈E,则c(u,v):

Figure A20051001898200051
d(u,v):
Figure A20051001898200052
其中d(u,v)包含了分组在节点及链路上的排队、发送和传播三部分时延,假设P(u,v)代表从节点u到节点v的一条路径,而多播树为T,那么应存在下列关系:A network can be represented as a weighted graph G=(V, E), where V represents the set of nodes, E represents the set of communication links connecting nodes, |V| and |E| represent the number of nodes and links in the network, respectively number. For the sake of generality, we only consider such a type of graph, that is, there is at most one link between a pair of nodes in this type of network, and the parameters beside the link can be used to describe the current state of the link. Let T(s, M) represent a multicast tree, where s∈V is the source node of a multicast tree, M{V-{s}} is the end node or leaf node set of the multicast tree, let R + is the set of positive real numbers. Define two functions here: c(u, v) and d(u, v), respectively represent the cost and delay on the link l, let l=(u, v)∈E, then c(u, v ):
Figure A20051001898200051
d(u,v):
Figure A20051001898200052
Among them, d(u, v) includes the queuing, sending and propagation delays of packets on nodes and links. Assume that P(u, v) represents a path from node u to node v, and the multicast tree is T, then the following relationship should exist:

时延:是指链路的时延总和,即为:Latency: refers to the sum of the delays of the link, which is:

delaydelay (( PP (( sthe s ,, mm )) )) == ΣΣ ll ∈∈ PP (( sthe s ,, mm )) dd (( ll )) ,, mm ∈∈ Mm -- -- -- (( 11 -- 11 ))

宽带:是指链路的最小宽带值,即为:Broadband: refers to the minimum bandwidth value of the link, which is:

bandwidth(P(s,m))=min{bandwidth(e),e∈P(s,t)}    (1-2)bandwidth(P(s,m))=min{bandwidth(e), e∈P(s,t)} (1-2)

代价:是指链路的代价总和:Cost: refers to the sum of the cost of the link:

coscos tt (( TT )) == ΣΣ ll ∈∈ TT cc (( ll ))

时延及带宽限制的代价最小多播路由问题,给定一个网络G=(V,E),多播源节点s∈V,多播组M{V-{s}},时延函数d(u,v)∈R+,代价函数c(u,v)∈R+,要求找到一棵从s出发,连接所有目标节点的多播树T(VT,ET)满足:Cost minimum multicast routing problem with time delay and bandwidth constraints, given a network G=(V, E), multicast source node s∈V, multicast group M{V-{s}}, delay function d (u, v)∈R + , the cost function c(u, v)∈R + requires finding a multicast tree T(V T , E T ) starting from s and connecting all target nodes to satisfy:

时延约束,delay(P(s,m))≤D,Pm∈M.              (1)Delay constraint, delay(P(s,m))≤D, Pm∈M. (1)

带宽约束bandwidth(P(s,m))≥B,e∈P(s,t)        (2)Bandwidth constraint bandwidth(P(s, m))≥B, e∈P(s, t) (2)

代价约束在满足条件(1),(2)两式的所有多播树中,T(VT,ET)的代价cost(T)最小。Cost Constraints In all multicast trees satisfying the conditions (1) and (2), the cost cost(T) of T(V T , E T ) is the smallest.

其次是提出了一种基于Ant-Like移动代理的QoS多播路由的方法(MAMRQoS),其主要思想是根据QoS服务请求,让移动Agent在每个结点只沿那些满足QoS需求的链路移动,搜索出满足QoS请求的可行路径,并在结点逐跳记录路径信息,为了更好地描述MAMRQoS,进行了描述性地定义,定义包括路由表、链路可用带宽表、有源路径和路径向量。Secondly, a QoS multicast routing method (MAMRQoS) based on Ant-Like mobile agent is proposed. The main idea is to let the mobile agent move only along those links that meet the QoS requirements at each node according to the QoS service request. , search for a feasible path that satisfies the QoS request, and record the path information hop by hop at the node. In order to better describe MAMRQoS, a descriptive definition is made, including routing table, link available bandwidth table, active path and path vector.

二、具体实施方式2. Specific implementation

在NS2下实现,移动代理(Mobile Agents)是近年来迅速发展的研究课题,它具有独特的自主性、智能性和移动性为分布式计算和网络控制引入了一种全新的模型。为使模拟软件能适应多种网络环境,通过成熟的通用网络仿真工具的扩展进行开发,应是一种高效而又可靠的方法,首选的通用仿真工具是NS2模拟软件。Implemented under NS2, Mobile Agents is a rapidly developing research topic in recent years. It has unique autonomy, intelligence and mobility, which introduces a new model for distributed computing and network control. In order to make the simulation software adapt to a variety of network environments, it should be an efficient and reliable method to develop through the expansion of mature general network simulation tools. The preferred general simulation tool is NS2 simulation software.

1.Mobile Agents模型的建立,如图1所示:建立模型并实现移动代理,该模型可以模拟真实移动代理的行为,如预定任务的执行、访问当前节点、主动迁移等。1. The establishment of the Mobile Agents model, as shown in Figure 1: Establish the model and realize the mobile agent. This model can simulate the behavior of the real mobile agent, such as the execution of scheduled tasks, access to the current node, and active migration.

建立网络模型:多播树T(VT,ET)满足:Establish a network model: the multicast tree T(V T , E T ) satisfies:

时延约束,delay(P(s,m))≤D,Pm∈M.              (1)Delay constraint, delay(P(s,m))≤D, Pm∈M. (1)

带宽约束bandwidth(P(s,m))≥B,e∈P(s,t)        (2)Bandwidth constraint bandwidth(P(s, m))≥B, e∈P(s, t) (2)

式中:P代表路径,s代表源节点,m代表目标节点,D代表最大延时,B代表最小宽带。In the formula: P represents the path, s represents the source node, m represents the target node, D represents the maximum delay, and B represents the minimum bandwidth.

具体如图2建立网络模型流程图:初始化后利用矩阵公式pt’rs计算满足(1)、(2)两式条件的所有节点;调整参数,再计算,取达到代价最小的所有节点;利用满足(1)、(2)两式条件代价最小的所有节点生成多播树。Specifically, the flow chart of establishing a network model is shown in Figure 2: after initialization, use the matrix formula p t'rs to calculate all nodes that meet the two conditions of (1) and (2); adjust the parameters, and then calculate, and take all nodes that reach the minimum cost; use All nodes satisfying the two conditions of (1) and (2) with the minimum cost generate a multicast tree.

最后对MAMRQoS实现进行描述,实现的主要伪代码如下:Finally, the implementation of MAMRQoS is described, and the main pseudocode of the implementation is as follows:

在QoSMRMA中,是通过一个简单的移动代理来实现的,网络中的每个节点假定保存所需的自动回归的参数,当前所处地址(address)和当前的最小代价(cost),当网络拓扑创建后,网络id就确定,最小代价(cost)的更新是通过代理访问节点和调整参数b的值来实现的,因此算法的主要伪代码可表示为:In QoSMRMA, it is implemented by a simple mobile agent. Each node in the network is assumed to save the required automatic regression parameters, the current address (address) and the current minimum cost (cost). When the network topology After creation, the network id is determined, and the update of the minimum cost (cost) is realized by visiting the node through the agent and adjusting the value of parameter b, so the main pseudocode of the algorithm can be expressed as:

switch(主要循环的控制)switch (control of the main loop)

    case初始化(tabulist,t)case init(tabulist, t)

        tabulist={};tabulist={};

        t=当前时间t = current time

        L_min=0;L_min=0;

        home_node=current_node.address;  home_node = current_node.address;

          b=初值;b = initial value;

         breakbreak

    case向前搜索(tabulist,current_node.address,s)case forward search(tabulist, current_node.address, s)

       L_min=Min(L_min,current_node.L_min);L_min=Min(L_min, current_node.L_min);

       r=current_node.address;r = current_node.address;

                p(s)=计算pt,rsp (s) = calculate p t,rs ;

                X=(0.0,1.0);X = (0.0, 1.0);

           if(X<p(s))         //s是邻居节点if(X<p (s) ) //s is a neighbor node

             移到节点s;Move to node s;

           else p(s)=0else p (s) = 0

                L_min=计算代价(cost)的值L_min=Calculation cost (cost) value

         end ifend if

         breakbreak

    case 调整参数(b)case adjustment parameters (b)

         b=重新赋值;//重新赋值>初值    b = reassignment; //reassignment>initial value

      rt+1、rt+1和cost的参数值The parameter values of r t+1 , r t+1 and cost

      breakbreak

case返回case returns

    while(如果tabulist不为空)while (if tabulist is not empty)

      s=current_node;s=current_node;

      移动到tabulist的最后一个节点  Move to the last node of the tabulist

      r=current_node;r = current_node;

    升级Pt’rs Upgrade P t'rs

其中 rt+1路径向量,Pt’rs信息素变化矩阵。Where r t+1 path vector, P t'rs pheromone change matrix.

以上代码可用逻辑图表示如下:The above code can be expressed as a logic diagram as follows:

2.根据移动代理运行环境的功能需求,分析NS2的现有功能和结构特点和多QoS约束的多播路由算法特点,NS2需要作以下四个方面的扩展。2. According to the functional requirements of the mobile agent operating environment, analyze the existing functions and structural characteristics of NS2 and the characteristics of the multicast routing algorithm with multiple QoS constraints. NS2 needs to be expanded in the following four aspects.

1)结构的扩展:1) Expansion of structure:

NS2通过Tclcl将C++和Otcl两种语言中的对象和变量连接起来,NS2的构件库是一个层次结构,其中的构件通常都是由相互关联的两个类来实现的,一个在C++中,另一个在Otcl中,因此,NS2中就包含了一个C++类的层次结构和一个Otcl类的层次结构,构件的主要功能由C++程序实现,Otcl中的类则主要提供C++对象面向用户的配置接口。NS2 connects objects and variables in C++ and Otcl languages through Tclcl. The component library of NS2 is a hierarchical structure, and the components in it are usually realized by two interrelated classes, one in C++ and the other in C++. One is in Otcl. Therefore, NS2 contains a hierarchy of C++ classes and a hierarchy of Otcl classes. The main functions of the components are realized by C++ programs, and the classes in Otcl mainly provide user-oriented configuration interfaces for C++ objects.

如图3所示:在NS2中,一个节点Node包含一个地址分类器classifier_、类型(多播、单播和移动代理MA)分类器或一个端口分类器dmux_,它们的作用是将进来的数据包分发到正确的链路、agent或者移动代理上,对类地址AddressClassifier进行扩展,派生出类MAAddressClassifier,下面是对地址分类器的扩展:class SwitchClassifier:public Classifier{public:……As shown in Figure 3: In NS2, a node Node contains an address classifier classifier_, type (multicast, unicast and mobile agent MA) classifier or a port classifier dmux_, their role is to send incoming data packets Distribute to the correct link, agent or mobile agent, extend the class address AddressClassifier, derive the class MAAddressClassifier, the following is the extension of the address classifier: class SwitchClassifier: public Classifier{public:...

SwitchClassifier():mask_(:0),shift_(0){}……SwitchClassifier(): mask_(:0), shift_(0){}...

}class_switch_classifier;} class_switch_classifier;

2)分组(Packet)的扩展:2) Extension of Packet:

如图2:在NS2的网络模拟中,分组(Packet)对象间交互的基本单元,它由一系列分组头和一个可选的数据空间组成,分组头的结构在Simulator对象创建时就被初始化,同时每个分组头相对于分组的起始地址的偏移量也被记录下来,在这里NS2的分组头就包括commom头、IP头、TCP头、RTP头、MA头和trace头,这意味着在缺省情况下无论某个分组头是否会被使用,它都会被初始化。用户可以为新的协议定义自己的分组头,也可以通过增加域的方式扩展现有的分组头。添加新分组头的方法,就是先在C++中定义包含所需的域结构(structure),再定义一个static类来提供到Otcl的连接,然后修改一些模拟的初始化代码来指定新分组头在分组中的字节偏移量。Figure 2: In the network simulation of NS2, the basic unit of interaction between Packet objects consists of a series of packet headers and an optional data space. The structure of the packet header is initialized when the Simulator object is created. At the same time, the offset of each packet header relative to the starting address of the packet is also recorded. Here, the packet header of NS2 includes commom header, IP header, TCP header, RTP header, MA header and trace header, which means By default a packet header is initialized regardless of whether it is used or not. Users can define their own packet headers for new protocols, or extend existing packet headers by adding domains. The method of adding a new packet header is to first define the required domain structure in C++, then define a static class to provide a connection to Otcl, and then modify some simulated initialization codes to specify the new packet header in the packet The byte offset of .

编辑NS2源代码中的相关文件(如ns-packet.tcl等),以使这个新的头部结构在NS2启动的时候自动加载并初始化,因此分组头的主要部分可表示为:Edit the relevant files in the NS2 source code (such as ns-packet.tcl, etc.), so that this new header structure is automatically loaded and initialized when NS2 starts, so the main part of the packet header can be expressed as:

enum packet_t{enum packet_t{

  ……...

  PT_MA,PT_MA,

    ……};... };

    ……...

class p_info{class p_info{

public:public:

  p_info(){p_info(){

     ……...

     name_[PT_MA]=″ma″;name_[PT_MA] = "ma";

     ……}};... }};

3)Node的扩展,如图3:3) Node extension, as shown in Figure 3:

在原始NS2的节点node结构中,一个数据报到达该节点之后,首先判断是单播数据报还是多播数据报,并据此将数据报传递给相应的单播模块或者多播模块。由于现在增加了一种包含移动代理的特殊数据报,因此就需要修改原来的节点结构,当判断收到一个移动代理类型的数据报时,应将其传递到该节点的移动代理执行环境(MAE)中运行。In the node structure of the original NS2, after a datagram arrives at the node, it is first judged whether it is a unicast datagram or a multicast datagram, and accordingly the datagram is passed to the corresponding unicast module or multicast module. Since a special datagram containing a mobile agent is now added, the original node structure needs to be modified. When it is judged that a datagram of a mobile agent type is received, it should be passed to the mobile agent execution environment (MAE) of the node run in.

4)Agent的扩展4) Agent extension

建立MAE,并在节点上加载。当移动代理迁移到加载了MAE的节点之后,就可以在其上运行。在NS2中,将节点中处理各种协议数据包的功能组件称为“代理”(Agent),因此,从最基本的Agent派生出可以支持移动代理运行的Agent作为MAE。Build MAE and load it on the node. After the mobile agent is migrated to the node loaded with MAE, it can run on it. In NS2, the functional components that process various protocol data packets in nodes are called "Agents". Therefore, the Agent that can support the operation of mobile agents is derived from the most basic Agent as MAE.

如图3所示,扩展包括两个部分:首先是增强switch_的功能,使其能判断收到的Packet是否是移动代理;其次是增加一个处理移动代理数据包的MA分类器。当switch_判定一个Packet是移动代理后,就将其传送给MA分类器,然后由后者将移动代理传送给附着在该节点上的MAE,其后,MAE就可以调用移动代理的Activate函数将其激活。此外,还可以指定一个节点是否能加载MAE。移动代理只能在加载了MAE的节点上运行,而在没有加载MAE的节点中,移动代理将作为普通数据报处理。As shown in Figure 3, the extension includes two parts: firstly, the function of switch_ is enhanced, so that it can judge whether the received Packet is a mobile agent; secondly, an MA classifier for processing mobile agent data packets is added. When switch_ determines that a Packet is a mobile agent, it will be sent to the MA classifier, and then the latter will send the mobile agent to the MAE attached to the node. After that, the MAE can call the Activate function of the mobile agent to activate the It activates. In addition, it is also possible to specify whether a node can load MAE. The mobile agent can only run on the node that has loaded MAE, but in the node that has not loaded MAE, the mobile agent will be processed as a normal datagram.

二.MAMRQoS在NS2中的实现:2. Implementation of MAMRQoS in NS2:

NS2的体系结构是开放的,所以它允许研究者为其添加新的功能,实现新的网络拓朴结构和新的流量模型。NS使用两种语言,C++和Otcl,C++程序运行速度比较快,是强制类型语言,需要进行严格的数据类型检查,容易实现复杂的数据类型,容易实现精确的、复杂的算法,但是修改、debug和重新编译所花费的时间要长一些,因此C++适应于具体的协议的实现。Otcl运行较慢,但是很方便地进行交互式修改,不需要编译,而且不是强制类型,不易出错,它适应用来做模拟配置。在做模拟配置根据的任务选择不同语言来实现,新的代码添加到NS2体系中,来实现对Ant-like移动代理的QoS多播路由算法的仿真。由于要实现的是Ant-like移动代理的QoS机制,编写具有Mobile Agent机制的软件,然后添加到NS2中,进行仿真与模拟。The architecture of NS2 is open, so it allows researchers to add new functions to it, realize new network topology and new traffic model. NS uses two languages, C++ and Otcl, C++ program runs faster, is a mandatory type language, requires strict data type checking, easy to implement complex data types, easy to implement accurate and complex algorithms, but modification, debug It takes longer to recompile and recompile, so C++ is adapted to the implementation of specific protocols. Otcl runs slowly, but it is very convenient for interactive modification, no compilation is required, and it is not mandatory, and it is not easy to make mistakes. It is suitable for simulation configuration. In the simulation configuration, different languages are selected according to the task, and the new code is added to the NS2 system to realize the simulation of the QoS multicast routing algorithm of the Ant-like mobile agent. Since the QoS mechanism of Ant-like mobile agent is to be realized, software with Mobile Agent mechanism is written, and then added to NS2 for simulation and simulation.

三.仿真结果:3. Simulation results:

通过对Ant、OQMRA和MAMRQoS三者的仿真比较来评估算法的平均性能,在仿真实验中由改进的NS2软件包生成,节点数为50,端到端的延迟由发送延迟和线路传播延迟决定,主要比较了3种算法在不同网络负载情况下的平均接通率和相应的通信开销,曲线上每点是20次仿真结果的平均值,每次仿真产生100连接请求,请求的产生服从以下规律,呼叫的源和目的对以均匀的概率随机地从节点集中选取,呼叫请求的带宽、持续时间、端到端的最大允许延迟均服从均匀分布。通过实验证明,OQMRA不仅可以有效地提高网络数据包的传输质量,而且还可以大大节约路由选择时间,很快找到最优解(或近优解),OQMRA还可以实现全局优化。根据蚂蚁移动代理QoS多播路由的特点,提出了MAMRQoS的方法,仿真结果表明,MAMRQoS很好地解决了网络平衡问题,为解决多约束的QoS多播路由问题提供一个新的思维方法。The average performance of the algorithm is evaluated through the simulation comparison of Ant, OQMRA and MAMRQoS. In the simulation experiment, it is generated by the improved NS2 software package. The number of nodes is 50. The end-to-end delay is determined by the transmission delay and line propagation delay. Compared the average connection rate and corresponding communication overhead of the three algorithms under different network load conditions, each point on the curve is the average value of 20 simulation results, each simulation generates 100 connection requests, and the generation of requests obeys the following rules, The source and destination pairs of the call are randomly selected from the node set with a uniform probability, and the bandwidth, duration, and end-to-end maximum allowable delay of the call request are all subject to a uniform distribution. It is proved by experiments that OQMRA can not only effectively improve the transmission quality of network data packets, but also can greatly save routing time and find the optimal solution (or near-optimal solution) quickly. OQMRA can also achieve global optimization. According to the characteristics of QoS multicast routing of ant mobile agent, the method of MAMRQoS is proposed. The simulation results show that MAMRQoS solves the problem of network balance well, and provides a new thinking method for solving the multi-constraint QoS multicast routing problem.

Claims (1)

1.一种基于Ant-Like移动代理的QoS多播路由的方法,在网络模拟器NS2下实现移动代理,其特征在于:1. a method based on the QoS multicast routing of Ant-Like mobile agent, realize mobile agent under network simulator NS2, it is characterized in that: 一、建立网络模型:多播树T(VT,ET)满足:1. Establish a network model: the multicast tree T(V T , E T ) satisfies: 时延约束,delay(P(s,m))≤D,Pm∈M.           (1)Delay constraint, delay(P(s,m))≤D, Pm∈M. (1) 带宽约束bandwidth(P(s,m))≥B,e∈P(s,t)     (2)Bandwidth constraint bandwidth(P(s, m))≥B, e∈P(s, t) (2) 式中:P代表路径,s代表源节点,m代表目标节点,D代表最大延时,B代表最小宽带;In the formula: P represents the path, s represents the source node, m represents the target node, D represents the maximum delay, and B represents the minimum bandwidth; 二、对NS2作以下四个方面的扩展:2. Expand NS2 in the following four aspects: 1)类的扩展:在地址分类器中扩展移动代理MA分类器;1) class extension: extend the mobile agent MA classifier in the address classifier; 2)分组扩展:在NS2的分组头中扩展MA头;2) Packet extension: extend the MA header in the packet header of NS2; 3)节点node的扩展:在原始NS2的节点node结构中,增加了一种包含移动代理的特殊数据报;3) Extension of node node: In the node node structure of the original NS2, a special datagram containing mobile agent is added; 4)Agent的扩展:建立移动代理执行环境MAE,并在节点上加载;扩展包括两个部分:首先是增强switch_的功能,使其能判断收到的Packet是否是移动代理;其次是增加一个处理移动代理数据包的MA分类器。4) Agent extension: establish mobile agent execution environment MAE, and load it on the node; the extension includes two parts: the first is to enhance the function of switch_, so that it can judge whether the received Packet is a mobile agent; secondly, add a MA classifier that handles mobile agent packets.
CNA2005100189828A 2005-06-24 2005-06-24 A method of QoS multicast routing based on Ant-Like mobile agent Pending CN1710885A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2005100189828A CN1710885A (en) 2005-06-24 2005-06-24 A method of QoS multicast routing based on Ant-Like mobile agent

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2005100189828A CN1710885A (en) 2005-06-24 2005-06-24 A method of QoS multicast routing based on Ant-Like mobile agent

Publications (1)

Publication Number Publication Date
CN1710885A true CN1710885A (en) 2005-12-21

Family

ID=35707066

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2005100189828A Pending CN1710885A (en) 2005-06-24 2005-06-24 A method of QoS multicast routing based on Ant-Like mobile agent

Country Status (1)

Country Link
CN (1) CN1710885A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102656922A (en) * 2009-12-18 2012-09-05 英特尔公司 System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence
CN103329487A (en) * 2010-12-17 2013-09-25 阿尔卡特朗讯公司 Method and router for service named routing

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102656922A (en) * 2009-12-18 2012-09-05 英特尔公司 System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence
CN102656922B (en) * 2009-12-18 2016-05-18 英特尔公司 Utilize for using swarm intelligence to carry out the system and method for the framework of information router at large scale distributed system
US9923802B2 (en) 2009-12-18 2018-03-20 Intel Corporation System and method of utilizing a framework for information routing in large-scale distributed systems using swarm intelligence
CN103329487A (en) * 2010-12-17 2013-09-25 阿尔卡特朗讯公司 Method and router for service named routing

Similar Documents

Publication Publication Date Title
Liu et al. Deep reinforcement learning for communication flow control in wireless mesh networks
CN101043444A (en) Distributed quality of service multicast routing process based on ant group optimization
CN100346617C (en) Nucleus tree self-organizing dynamic route algorithm
CN104717098B (en) A kind of data processing method and device
CN108512772B (en) Data center traffic scheduling method based on quality of service
CN104378229B (en) A kind of link prediction method of opportunistic network
CN1887018A (en) A system and method for multi-access
CN1700668A (en) A Method of Generating and Updating Hierarchical Trees in MANET Multicast Routing Protocol Ad Hoc Networks
CN115033359A (en) Internet of things agent multi-task scheduling method and system based on time delay control
CN1747446A (en) Application Layer Multicast Method Combining Centralized and Distributed
CN101447936B (en) Multicast routing method based on particle swarm algorithm
KR101282611B1 (en) Routing apparatus and method for setting up transmission route using the same and table managing method of routing apparatus
Gupta et al. Dynamic routing algorithm in wireless mesh network
Sharma et al. A temporal deep Q learning for optimal load balancing in software-defined networks
CN1968122A (en) Simulated annealing-based dynamically distributed multicast routing method
CN1819556A (en) Multi-routing broadcasting method with dynamic delay constraining based on minimal generating tree and greedy algorithm
CN1710885A (en) A method of QoS multicast routing based on Ant-Like mobile agent
CN117596605A (en) A deterministic network architecture for intelligent applications and its working method
CN106028415A (en) A delay-tolerant network routing method for Internet of Things applications
Goswami et al. Reactive and proactive routing protocols performance metric comparison in mobile ad hoc networks NS 2
CN1761231A (en) The construction method of the distributed dynamic cellular route of mobile self-grouping network
CN1874299A (en) Method for managing active queue of route based on control of slipform variation structure
CN1710884A (en) A Multicast Routing Method Supporting Multiple QoS Constraints
Bajaj et al. Distributed delay constrained multicast path setup algorithm for high speed networks
CN1731762A (en) A Method of Multicast Routing Based on Steiner&#39;s QoS Constraint

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication