Background
In recent years, with the increasing popularity of multimedia applications and the commercialization of mobile ad hoc networks, providing quality of service in mobile ad hoc networks has become an irrevocable problem, and quality of service guarantees have become an important function that must be supported by communication systems, and for mobile ad hoc networks as well, quality of service refers to quality agreements between users sending and receiving information and between users and an integrated service network transmitting information, which is a series of service requirements that need to be met when a network transmits traffic, and generally includes: bandwidth, time delay jitter, packet loss rate, etc. Quality of service guarantees are the quality of service promised by the network to ensure the service by taking a series of policies and measures. The service quality guarantee is a global problem, and all nodes in the network and all protocol layers on the nodes are secondarily and mutually cooperated to be jointly completed. In order to ensure the service quality, network state information as accurate as possible, such as available bandwidth and time delay of a link, needs to be grasped, so that a path with good link quality and enough available resources can be selected to transmit data according to the service quality requirement of the service.
In mobile ad hoc networks, routing protocols should fairly distribute routing tasks among mobile nodes due to power and bandwidth limitations. Most conventional ad hoc routing protocols operate to route many of the generated routes through a small percentage of nodes located centrally in the network. The transmission of a large amount of data through a small number of nodes inevitably leads to network appearance and bottleneck, so that packet queuing waiting time delay and packet loss are increased, the network connectivity is weakened, the call is finally lost due to the network division, and the overall survival time of the network is shortened. Therefore, it is necessary to consider the load and congestion conditions of each node in the network during routing to perform load balancing on the network, so that the network can keep, operate efficiently and stably, and the comprehensive performance of the network can be optimized.
NS2 is the abbreviation of network simulator, it is a discrete event simulator, by the United states Berkeley university LBL, xerox PARC, UCB and USC/ISI jointly developed network simulation integrated environment, have good, expansibility strong, suitable for Windows and Linux system platform characteristics, it is an outstanding simulation tool to study the network topology structure, analyze the network transmission. NS2 is written in two languages of OTc and C + +. The C + + language has high running speed and is easy to realize complex data types and accurate and complex algorithms, so that the method is suitable for detailed simulation and realization of specific protocols; the OTc language runs slower, but can be easily (and interactively) modified, does not require compilation, and is not prone to errors, so it is suitable for use in simulation configuration. The functions that NS2 can perform include: (1) and constructing a network topology. The network topology in NS2 is composed of nodes and links, where nodes can be regarded approximately as a simulation of implementing the bottom three layers of devices in the network, and links can be regarded as a simulation of the physical transmission link. (2) The Agent implementing the RTP protocol. In the NS2, the Agent is the simulation of a certain network protocol, and the NS2 realizes UDP Agent, TCP Agent and agents of some common network application protocols in advance. (3) Loading the Application data stream is achieved by Application/Traffic. The RTP Agent realizes the work of generating the data stream; without loading the Application.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
Sharing transmission media among nodes in a mobile ad hoc network is one of the remarkable characteristics of a wireless network, and the characteristic causes signals among adjacent nodes to interfere with each other, thereby affecting the normal transmission of information. It is illustrated by a simple example that considering the bandwidth factor does make it possible to improve the performance of the network. Fig. 1 is a connectivity graph of 5 nodes, the points in the graph representing nodes in the network, and the edges in the graph representing wireless links between nodes, assuming that the capacity of the channel is C. When node 1 and node 5 are to communicate, the conventional shortest path based path selection method will select path C-D-E. As can be seen from the figure, since link C is interfered by links A, B, D and E, its effective bandwidth can only reach C/5. If the bandwidth required by the transmitted traffic exceeds C/5, the quality of the communication will not be guaranteed. If path a-B-D-E is selected, C/3 of the effective bandwidth will be obtained. Therefore, considering the mutual interference between the nodes, the better transmission performance can be obtained by taking the bandwidth resources of the nodes as the standard for path selection. Further, from the perspective of the queuing theory, there are data packets waiting to be sent in the queue in each node, and if the number of data packets in the queue is not considered during the path selection, the waiting time delay of the data packets in the queue can be greatly increased, so that the time delay of the data packets from the source node to the destination node is increased, and meanwhile, the packet loss phenomenon occurs because the number of data packets in the queue exceeds the limit of the buffer area.
For any mobile ad hoc network, it can be represented as a directed graph G = { V, E }, and V, E represents node set and link set, respectively, if P is represented by link 1 1 ,1 2 ,...,1 n-1 Or by node v 1 ,v 2 ,...,v n A path from node S to node D is formed, wherein link 1 1 Is node v 1 ,v 2 A link therebetween. The available bandwidth of path P is denoted by B (P) and the load of path P is denoted by L (P). Thus, in a mobile ad hoc network, the path selection problem based on bandwidth constraints and minimum load can be described as: in a given network G = (V, E), a source host S sends a traffic flow to a destination host D, the bandwidth required by the traffic flow is Bq, if there are n paths P from S to D 1 ,P 2 ,...,P n . Then satisfy the bookThe inventive path P should satisfy the following condition:
B(P)≥Bq
L(P)=min{L(P i )|i=1,2,...,n}
in a wireless network, when calculating the available bandwidth of a node, the influence of its neighboring nodes is also considered in addition to the node itself. Fig. 2 is a wireless network consisting of 7 nodes where two nodes connected by a solid line can communicate directly and the dashed line indicates that traffic flow is being sent between the nodes. If node a wants to send traffic to E via D, congestion may occur on link AD, however, this link does not carry any traffic, because in wireless transmission, the node shares frequency resources with all nodes within a certain range around it, and congestion may occur when the bandwidth requirement of all traffic within a certain range exceeds the transmission capability of the network. Therefore, when measuring the available bandwidth of a segment of link, not only the traffic of the node but also the usage of resources by the traffic around the node are considered.
The invention defines the 'shared frequency set' of any node D as I (D), and the I (D) is composed of nodes N meeting the following conditions: n is within direct communication range of node D, i.e., N may receive data transmitted by D or D may receive data transmitted by N. In FIG. 1, nodes A, B, C and E are in the "shared frequency set" of D.
The following are variables to be used in the bandwidth calculation:
b (D): total bandwidth of node D. To be more realistic, the total bandwidth of the nodes is randomly generated.
B all (D) The method comprises the following steps Total bandwidth occupied by node D.
B c (D) The method comprises the following steps The current available bandwidth of node D.
B (j): bandwidth of data stream j.
(1)B all (D) Is calculated by
The following two parts need to be considered for calculating the signal bandwidth of the currently occupied node D:
bs (D): the occupied bandwidth of node D itself, i.e. the total bandwidth reserved by node D for other traffic flows.
Bn (D): the sum of the occupied bandwidths of the nodes in the shared frequency set of node D.
Bs (D) and Bn (D) may be obtained from information held by the node. Thus, the remaining bandwidth of node D can be obtained by the following equation:
Ball(D)=Bs(D)+Bn(D)
=Bs(D)+Bs(A)+Bs(B)+Bs(C)+Bs(E)
(2)B c (D) Is calculated by
The available bandwidth of the node D is the total bandwidth of the node D minus the total bandwidth occupied by the node D:
Bc(D)=B(D)-Ball(D)
when a service flow j passes through a node D, if the calculated available bandwidth Bc (D) of the D is more than or equal to B (j), the access of the data flow is allowed, otherwise, the access is refused.
The network load of a mobile node in a wireless mobile ad hoc network is related to traffic passing through the node, as well as traffic passing through its neighboring nodes, which is referred to as traffic interference. The following are variables used in the load calculation:
l (D): the traffic load of node D itself.
LI (D): the traffic of node D interferes with the load.
TL (D): node D total traffic load.
(1) Calculation of L (D)
Assuming that the link capacity is C, the average service length is L, and the node interface queue length is q, the load L (D) of any node D is:
L(D)=μ D q D /(1+q D )
in the formula, mu D =C D /L D 。
(2) Calculation of LI (D)
Traffic interference LI (D) may be defined as the sum of the traffic loads of the nodes in node D's shared frequency set I (D):
(3) Calculation of TL (D)
The traffic load TL (D) of a node comprises the sum of its own traffic L (D) and the traffic interference LI (D) of the nodes in the shared frequency set I (D):
(4) Calculation of load on path
The load of the path P from the source node to the destination node is the sum of the traffic loads of all intermediate nodes I on the path:
the method comprises the following specific steps:
(1) When a node needs to transmit service with another node, the node broadcasts a routing request packet, wherein the routing request packet comprises the following contents:
the IP address and the serial number of the destination node, the IP address and the serial number of the source node, the bandwidth required by the service, the ID number of the service, the load information and the hop count;
(2) When the intermediate node receives the routing request message, the addresses of the node and the destination node are compared;
(1) if the node is not the destination node, judging whether the request is received, if so, discarding the request, otherwise, turning to the step (2);
(2) calculating the current residual bandwidth and comparing the current residual bandwidth with the bandwidth required by the service, if the current residual bandwidth is less than the bandwidth required by the service, discarding the request, and otherwise, turning to the step (3);
(3) calculating the total service load of the node, and updating the parameters recorded in the routing request packet: the load information in the route request packet is modified and the hop count is increased by 1. A reverse route is then established to the source node and the ID number of the traffic is recorded in the route entry. And finally broadcasting the routing request message to the adjacent node.
(3) When the destination node receives the route request from the source node, it checks whether the current time is less than the time for receiving the route request within the specified time.
(1) If yes, continuing to wait, otherwise, turning to the step (2);
(2) selecting one route request with the minimum load from the multiple route requests, performing route reply along a reverse route established by the request, performing resource reservation after the intermediate node receives the route reply, establishing a forward route to a destination node, and recording the ID number of the service in a route entry.
The time complexity represents the number of steps that need to be run to perform a protocol operation. In the invention, when the nodes communicate each time, the routing request needs to be sent for bandwidth reservation, therefore, the source node sends out a routing request packet, the destination node returns a routing reply packet to traverse the network twice, the time complexity is 2d order of magnitude, namely O (2 d), wherein d is the diameter of the network. The communication complexity refers to the number of information required to be transmitted to perform protocol operation, where the worst case of a routing request performed by a node is that routing queries are performed in a distributed manner and simultaneously at each node, and the communication complexity is O (2N), where N is the number of nodes in the network.
The RREQ in the flow chart (fig. 3) represents a route request packet and the RREP represents a route reply packet. T indicates positive and F indicates negative.
In order to analyze the performance of the invention, corresponding simulation experiments are carried out, the AODV protocol is selected as a reference object in the experiments, and the three indexes of the AODV protocol, namely the packet delivery rate, the throughput and the packet loss rate, are compared. The simulation implementation of the protocol is based on the network simulation software NS 2. In the experiment, a scene containing 30 nodes is selected, the size of the scene is a rectangular area of 800m multiplied by 1000m, each node randomly selects the motion direction and the motion speed, the maximum motion speed is respectively 10m/s,20m/s,35m/s,60m/s and 100m/s, and the scene maintaining time is 500s. The packet rate is 2/s, each request needs to transmit a data packet of 1000B, and the bandwidth value of each node is generated by using a random number ranging from (1-5) Mbps.
The simulation result shows that the performance of the invention is superior to that of AODV, and as can be seen from FIG. 4, the packet delivery rate of the invention and AODV under different speeds is higher than that of AODV, and as the moving speed increases, the packet delivery rate of the invention decreases slowly while the packet delivery rate of AODV decreases greatly. In fig. 5, the packet loss rate of the present invention is lower than AODV, and with the change of the moving speed, the packet loss rate of the present invention is in a relatively stable state, while AODV is rapidly increased. Fig. 6 is a comparison of the throughput of the two, and when the moving speed of the node is slow, the throughput of the invention is slightly higher than the AODV, and when the moving speed of the node is fast, the throughput of the invention is much higher than the AODV.
The details not described in the present specification and the prior art known to those skilled in the art.