CN111385853A - Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network - Google Patents
Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network Download PDFInfo
- Publication number
- CN111385853A CN111385853A CN202010153008.7A CN202010153008A CN111385853A CN 111385853 A CN111385853 A CN 111385853A CN 202010153008 A CN202010153008 A CN 202010153008A CN 111385853 A CN111385853 A CN 111385853A
- Authority
- CN
- China
- Prior art keywords
- path
- node
- pheromone
- energy
- colony algorithm
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 50
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 46
- 238000009792 diffusion process Methods 0.000 title claims abstract description 24
- 239000003016 pheromone Substances 0.000 claims abstract description 67
- 230000008569 process Effects 0.000 claims abstract description 26
- 238000005265 energy consumption Methods 0.000 claims abstract description 15
- 230000007704 transition Effects 0.000 claims description 17
- 241000257303 Hymenoptera Species 0.000 claims description 13
- 230000006872 improvement Effects 0.000 claims description 8
- 238000012804 iterative process Methods 0.000 claims description 5
- 101100493820 Caenorhabditis elegans best-1 gene Proteins 0.000 claims description 3
- 101100004280 Caenorhabditis elegans best-2 gene Proteins 0.000 claims description 3
- 238000006424 Flood reaction Methods 0.000 claims description 3
- 230000002708 enhancing effect Effects 0.000 claims description 3
- 230000007246 mechanism Effects 0.000 claims description 3
- 238000004364 calculation method Methods 0.000 claims description 2
- 230000008859 change Effects 0.000 claims description 2
- 230000000717 retained effect Effects 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract 1
- 238000005457 optimization Methods 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000009471 action Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000015572 biosynthetic process Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000035755 proliferation Effects 0.000 description 1
- 239000000523 sample Substances 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/023—Limited or focused flooding to selected areas of a network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/04—Communication route or path selection, e.g. power-based or shortest path routing based on wireless node resources
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/02—Communication route or path selection, e.g. power-based or shortest path routing
- H04W40/20—Communication route or path selection, e.g. power-based or shortest path routing based on geographic position or location
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W40/00—Communication routing or communication path finding
- H04W40/24—Connectivity information management, e.g. connectivity discovery or connectivity update
- H04W40/248—Connectivity information update
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W84/00—Network topologies
- H04W84/18—Self-organising networks, e.g. ad-hoc networks or sensor networks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Feedback Control In General (AREA)
Abstract
本发明请求保护一种无线传感器网络中基于改进蚁群算法的定向扩散路由方法。在该方法中,主要引入了一种改进的蚁群算法用于定向扩散协议。本发明将节点能量因子与全局平均能量因子引入蚁群算法,使寻优路径的过程始终考虑网络能耗因素。在梯度建立阶段,以改进后的蚁群算法生成的信息素浓度作为梯度场建立梯度路径。在路径增强阶段,根据蚁群算法的迭代作用,统计每次迭代下产生的最优路径并进行排名,增强排名前三的路径作为可选路由路径。改进后的模型比较原协议更适用于网络节点庞大的场景中,并且提高了网络的生命周期,在路径的选择上更为合理。
The invention claims to protect a directional diffusion routing method based on an improved ant colony algorithm in a wireless sensor network. In this method, an improved ant colony algorithm is mainly introduced for the directed diffusion protocol. The invention introduces the node energy factor and the global average energy factor into the ant colony algorithm, so that the network energy consumption factor is always considered in the process of finding the optimal path. In the gradient establishment stage, the gradient path is established with the pheromone concentration generated by the improved ant colony algorithm as the gradient field. In the path enhancement stage, according to the iterative effect of the ant colony algorithm, the optimal paths generated under each iteration are counted and ranked, and the top three paths are enhanced as optional routing paths. Compared with the original protocol, the improved model is more suitable for scenarios with huge network nodes, and it improves the life cycle of the network and is more reasonable in path selection.
Description
技术领域technical field
本发明属于无线传感器网络中的定向扩散路由算法领域,具体是一种无 线传感器网络中基于改进蚁群算法的定向扩散路由方法。The invention belongs to the field of directional diffusion routing algorithms in wireless sensor networks, in particular to a directional diffusion routing method based on improved ant colony algorithm in wireless sensor networks.
背景技术Background technique
随着5G时代的到来,将势必推动物联网产业的发展,而无线传感器网络作为物 联网的重要部分,其路由协议是WSN网络设计中的重要一环,路由协议主要指 导将数据分组地从源节点通过网络转发到目的节点。在不同的场景下,WSN路由 协议也千差万别。本发明针对定向扩散协议中优化路径的寻找策略与网络能耗 的忽视问题提出改进,在无线传感器网络中,定向扩散协议是最为基础和常见 的平面路由协议,它是以数据为中心的查询路由协议。所以在路径的寻找过程 中,通过发送探测数据、消息等都是洪泛往全网节点发送的,其路径寻优的过 程也是需要遍历所有节点才能获得。同时,因为只适用于规模较小的网络,从 而节点能耗也未加以考虑。而本方法通过改进蚁群算法后,可以用算法模拟得 到路径距离与能量大小相对均衡的最优路径,可以在网络规模较大的场景中适 用。得出一种基于改进蚁群算法的定向扩散模型。在该模型中,将节点能量因 子与全局平均能量因子引入定向扩散协议的梯度建立阶段以及路径增强阶段, 使寻优路径的过程始终考虑网络能耗因素。改进后的模型比较原协议更适用于 网络节点庞大的场景中,并且提高了网络的生命周期,在路径的选择上更为合 理。With the advent of the 5G era, it will inevitably promote the development of the Internet of Things industry. As an important part of the Internet of Things, the wireless sensor network, its routing protocol is an important part of the WSN network design. The routing protocol mainly guides the data packets from the source The node forwards to the destination node through the network. In different scenarios, WSN routing protocols are also very different. The invention proposes an improvement to the problem of finding strategies for optimizing paths and neglecting network energy consumption in the directional diffusion protocol. In the wireless sensor network, the directional diffusion protocol is the most basic and common plane routing protocol, and it is a data-centric query route. protocol. Therefore, in the process of finding the path, the probe data, messages, etc. are sent to the nodes of the entire network by flooding, and the process of path optimization also needs to traverse all the nodes to obtain. At the same time, because it is only suitable for small-scale networks, the node energy consumption is not considered. However, after improving the ant colony algorithm, this method can simulate the optimal path with relatively balanced path distance and energy size, which can be applied in the scene with large network scale. A directional diffusion model based on improved ant colony algorithm is obtained. In this model, the node energy factor and the global average energy factor are introduced into the gradient establishment stage and the path enhancement stage of the directional diffusion protocol, so that the network energy consumption factor is always considered in the process of optimizing the path. Compared with the original protocol, the improved model is more suitable for scenarios with huge network nodes, and it improves the life cycle of the network and is more reasonable in path selection.
发明内容SUMMARY OF THE INVENTION
本发明旨在解决现有技术中的问题。提出了一种无线传感器网络中基于改 进蚁群算法的定向扩散路由方法。本发明的技术方案如下:The present invention aims to solve the problems in the prior art. A directed diffusion routing method based on improved ant colony algorithm in wireless sensor network is proposed. The technical scheme of the present invention is as follows:
一种无线传感器网络中基于改进蚁群算法的定向扩散路由方法,其包括以下步骤:A directed diffusion routing method based on an improved ant colony algorithm in a wireless sensor network, comprising the following steps:
步骤一:兴趣洪泛的步骤;sink汇聚节点周期性向无线传感器网络全网泛 洪广播兴趣interest,目标节点接收到对应兴趣消息后确定源节点位置;Step 1: the step of interest flooding; the sink sink node periodically floods the entire wireless sensor network to broadcast interest interest, and the target node determines the source node position after receiving the corresponding interest message;
步骤二:梯度建立;从源节点出发,sink节点作为目的节点,运行改进后 的蚁群算法,改进后的蚁群算法,主要在于蚁群算法中加入节点能量因子和全 局平均能量因子,体现在改进了转移概率函数的启发式函数以及信息素更新函 数的更新方法,初始化迭代次数与蚂蚁个数,初始化各个节点初始能量,并根 据改进后的转移概率寻找下一节点,转移概率改进主要在于启发式函数的改进, 其中增加了节点能量因子,发送、接受能量因子;与此同时在路径上留下信息 素,经过所有蚂蚁不断的探索最终迭代出信息素浓度梯度场,在梯度建立阶段 依次找梯度最大的节点构成梯度路径;Step 2: Gradient establishment; starting from the source node, the sink node is used as the destination node to run the improved ant colony algorithm. The improved ant colony algorithm mainly lies in adding the node energy factor and the global average energy factor to the ant colony algorithm, which is reflected in The heuristic function of the transition probability function and the update method of the pheromone update function are improved, the number of iterations and the number of ants are initialized, the initial energy of each node is initialized, and the next node is found according to the improved transition probability. The improvement of transition probability is mainly based on inspiration The improvement of the formula function, in which the node energy factor is added, and the energy factor is sent and received; at the same time, pheromone is left on the path, and the pheromone concentration gradient field is finally iterated through the continuous exploration of all ants, and the gradient field is found in turn in the gradient establishment stage. The node with the largest gradient constitutes the gradient path;
步骤三:路径增强;根据步骤二的信息素浓度梯度场,计算统计出N次迭代下 最优的前3条路径并增强并进行路由,路径增强过程的增强方法依然是由汇聚 节点反向发送加强兴趣消息,以信息素浓度最大方向反向确立该路径。Step 3: Path enhancement; according to the pheromone concentration gradient field in step 2, calculate and count the top three optimal paths under N iterations, and enhance and route them. The enhancement method of the path enhancement process is still sent by the sink node in the reverse direction. Intensifying the message of interest establishes the path in the opposite direction in the direction of maximum pheromone concentration.
进一步的,步骤一中所述兴趣洪泛步骤仍然取原定向扩散协议中的洪泛 过程,不作改变。Further, the interest flooding step described in step 1 still takes the flooding process in the original directed diffusion protocol, and does not change.
进一步的,所述步骤二初始化迭代次数与蚂蚁个数与初始化各个节点初始 能量具体为:无线传感器网络中,假设有n个节点,首先初始化,赋予这些节 点初始能量E1,E2,E3,...,En,初始时刻n个节点能量相同,初始化节点信 息素τ1,τ2,τ3...,τn,初始化迭代次数N=0,蚂蚁个数为m。Further, the number of initialization iterations, the number of ants and the initial energy of each initialized node in the second step are specifically: in the wireless sensor network, assuming that there are n nodes, first initialize, and give these nodes initial energy E 1 , E 2 , E 3 . , . _ _ _
进一步的,所述步骤二信息素浓度梯度场的计算步骤为:Further, the calculation steps of the pheromone concentration gradient field in the second step are:
(1)改进后的蚁群算法转移概率如公式(15)(16)所示:(1) The transition probability of the improved ant colony algorithm is shown in formulas (15) and (16):
式(15)中,表示t时刻,蚂蚁k从节点i到节点j的转移概率,τij(t) 表示t时刻残留在路径(i,j)上的信息量,ηij为启发函数,α为信息启发式因子, β为期望启发式因子,s表示下一跳节点,τis(t)表示本次探索i节点到s节点的 信息素,ηis表示本次探索i节点到s节点的启发函数,allowedk表示蚂蚁k下 一步允许选择的节点的集合;In formula (15), represents the transition probability of ant k from node i to node j at time t, τ ij (t) represents the amount of information remaining on the path (i, j) at time t, η ij is the heuristic function, α is the information heuristic factor, β is the expected heuristic factor, s represents the next hop node, τ is (t) represents the pheromone from node i to node s in this exploration, η is represents the heuristic function from node i to node s in this exploration, and allowedk represents the ant k set of nodes that are allowed to be selected in the next step;
式(16)中,Ei和Ej分别为节点i、j的剩余能量值,ETx是传感器节点发射 数据功耗,ERx是传感器节点接受数据功耗;In formula (16), E i and E j are the residual energy values of nodes i and j, respectively, E Tx is the power consumption of the sensor node to transmit data, and E Rx is the power consumption of the sensor node to receive data;
传感器节点发送kbit数据耗能:The energy consumption of the sensor node sending kbit data:
传感器节点接收kbit数据耗能:The energy consumption of the sensor node to receive kbit data:
ERx(k)=kEelec (4)E Rx (k)=kE elec (4)
式(17)中,d0为距离门限,d表示两个节点间的欧式距离,εfs和εmp为放 大器功耗,Eelec为单位比特数据耗能;In formula (17), d 0 is the distance threshold, d is the Euclidean distance between two nodes, ε fs and ε mp are the power consumption of the amplifier, and E elec is the power consumption per bit of data;
每只蚂蚁根据转移概率进行下一跳节点的选择,每走完一个节点将修改禁 忌表并记录留下的信息素,直到m只蚂蚁都走完路径到达了sink节点,则一次 迭代完成,这时更新信息素。Each ant selects the next hop node according to the transition probability. After each node is completed, it will modify the taboo table and record the remaining pheromone. Until m ants have completed the path and reached the sink node, one iteration is completed. update pheromone.
(2)在信息素更新阶段,同样采用路径与能量结合选择的方式进行信息素 的更新,并将路径较短与平均能量较高的路径定义为最佳路径,由此这样的路 径上信息素浓度相比较其他路径将会凸显,更新方法如公式(19)(20)(21) 所示:(2) In the pheromone update stage, the pheromone update is also carried out by the combination of path and energy selection, and the path with a shorter path and a higher average energy is defined as the best path, so that the pheromone on such a path is The concentration will be highlighted compared to other paths, and the update method is shown in formula (19)(20)(21):
τij(t+n)=(1-ρ)τij(t)+Δτij best (5)τ ij (t+n)=(1-ρ)τ ij (t)+Δτ ij best (5)
式(19)中ρ是信息素挥发因子,Δτij best表示定义的最优路径上需要增加的 信息素量,ω0且0<ρ<1,表示t+n时刻从i到j的信息素等于t时刻信息素挥 发后保留的部分与全局条件下最优路径上信息素增量的和;Pathbest表示定义的最 佳路径的标准。表示一条路径上所有节点的平均剩余能量的倒数;In formula (19), ρ is the pheromone volatilization factor, Δτ ij best represents the amount of pheromone that needs to be added on the defined optimal path, ω 0 and 0<ρ<1, represents the pheromone from i to j at time t+n It is equal to the sum of the pheromone retained after volatilization at time t and the pheromone increment on the optimal path under global conditions; Path best represents the standard of the defined optimal path. Represents the reciprocal of the average remaining energy of all nodes on a path;
最优路径的定义也加入了路径平均剩余能量因子,式(21)中Eavg表示路径 平均剩余能量因子,其值等于该路径上所有节点能量的平均值,L表示所有可能 路径中的一条路径距离,ω0是权重,在定义最优路径时用于控制路径长度与平 均能量之间的重要性;The definition of the optimal path also adds the path average residual energy factor. In Eq. (21), E avg represents the path average residual energy factor, and its value is equal to the average value of the energy of all nodes on the path, and L represents one of all possible paths. distance, ω 0 is the weight, used to control the importance between the path length and the average energy when defining the optimal path;
步骤2.2:梯度场的建立Step 2.2: Establishment of the Gradient Field
依据步骤2.1中改进的蚁群算法,运行结束后将产生由信息素浓度确定的 梯度场,在梯度建立过程中,由source节点依次沿着信息素浓度最大的方向找 到下一跳节点,并最终找到sink节点,这样将构成由距离和能量综合考虑的最 优梯度路径。According to the improved ant colony algorithm in step 2.1, the gradient field determined by the pheromone concentration will be generated after the operation is completed. During the gradient establishment process, the source node will find the next hop node in turn along the direction with the largest pheromone concentration, and finally Find the sink node, which will constitute the optimal gradient path considering the distance and energy.
进一步的,所述步骤三中增强路径过程的改进,具体包括:根据蚁群算法 的迭代过程,每次迭代过程将产生一条最佳路径,在此信息素更新机制下,当 完成迭代次数后,通过最优路径排名选择出最优的3条路径,即计算出最优路 径集合并从小到大排序Pathbest={Pathbest1,Pathbest2,Pathbest3,······},选出排名前三者, 并通过记录找到路径相应经过的全部节点,增强路径过程下,源节点沿着梯度 方向发送数据,而汇聚节点根据信息素水平值将对应加强三条最佳路径。Further, the improvement of the enhanced path process in the step 3 specifically includes: according to the iterative process of the ant colony algorithm, each iterative process will generate an optimal path, and under this pheromone update mechanism, when the number of iterations is completed, The optimal 3 paths are selected through the optimal path ranking, that is, the optimal path set is calculated and sorted from small to large Path best ={Path best1 ,Path best2 ,Path best3 ,...}, and the ranking is selected. For the first three, all nodes passed by the corresponding path are found by recording. In the process of enhancing the path, the source node sends data along the gradient direction, and the sink node will correspondingly strengthen the three optimal paths according to the pheromone level value.
本发明的优点及有益效果如下:The advantages and beneficial effects of the present invention are as follows:
1、本发明通过改进的蚁群算法,优化了传统定向扩散协议的路由,减少了 洪泛扩散模式下的能耗资源浪费情况,并且利用改进后的信息素梯度场为模型 提供冗余路径,增加了网络的健壮性。1. The present invention optimizes the routing of the traditional directed diffusion protocol through the improved ant colony algorithm, reduces the waste of energy consumption and resources in the flood diffusion mode, and uses the improved pheromone gradient field to provide redundant paths for the model, Increases the robustness of the network.
2、本发明在步骤二中对梯度建立过程进行优化,首先利用改进的蚁群算法模拟数据发送过程,通过距离和下一跳节点的能量优化转移概率,在此基础上根据 全局平均能量与路径距离优化信息素更新公式,最终完成改进蚁群算法的模拟 形成信息素的梯度场网络。这种处理使路径的寻优兼顾了距离与节点能量因素, 有助于延长网络的生命周期,该方法是利用一种改进蚁群算法去优化定向扩散 路由的步骤。在定向扩散梯度建立中原梯度建立过程是大规模数据洪泛探索的 过程,然后主要以数据发送到汇聚点的速度建立梯度。而蚁群算法本身具有信 息素浓度的概念,改进后的算法更是兼顾了距离与能量条件下更新的信息素浓 度,具有指导梯度建立的标准,也从而具有指导最优路径的标准。2. The present invention optimizes the gradient establishment process in step 2. First, the improved ant colony algorithm is used to simulate the data transmission process, and the transition probability is optimized by the distance and the energy of the next hop node. On this basis, according to the global average energy and path The distance optimization pheromone update formula, and finally complete the simulation of the improved ant colony algorithm to form the gradient field network of pheromone. This process makes the path optimization take into account the factors of distance and node energy, which helps to prolong the life cycle of the network. This method is a step of using an improved ant colony algorithm to optimize the directional diffusion route. In the establishment of the directional diffusion gradient, the gradient establishment process in the Central Plains is a process of large-scale data flood exploration, and then the gradient is mainly established at the speed at which the data is sent to the sink. The ant colony algorithm itself has the concept of pheromone concentration, and the improved algorithm takes into account the updated pheromone concentration under the conditions of distance and energy, and has the standard to guide the establishment of the gradient, and thus has the standard to guide the optimal path.
3、本发明在步骤三中对路径增强过程进行了冗余改进。根据步骤二中改进的蚁群算法的迭代过程,每次迭代产生一条最优路径,统计并计算出排名最优的前 三条路径并加强。这种处理有助于网络形成后期,数据发送长期处于最优路径 下能耗过快的情况,冗余路径在提升了网络生命周期的同时也加强了网络的健 壮性,该部分利用了步骤二中的蚁群迭代探索的过程,通过迭代作用,不仅可 以找到最优路径,同时也可以为网络提供次优路径。而比较HREEMR等路由协议 来说,虽然在路径增强过程中也为网络寻找次优路径,但需要额外繁琐的步骤, 本方法中可以直接利用改进蚁群算法的探索过程从而提供冗余路径,避免了不 必要的步骤与能量消耗。在本方法中,三条冗余路径增加了网络的健壮性,提 高了网络整体生命周期。3. The present invention performs redundancy improvement on the path enhancement process in step 3. According to the iterative process of the improved ant colony algorithm in step 2, each iteration generates an optimal path, and counts and calculates the top three optimal paths and strengthens them. This kind of processing helps in the later stage of network formation, when data transmission is in the optimal path for a long time and the energy consumption is too fast. The redundant path improves the network life cycle and also strengthens the robustness of the network. This part uses step 2 In the process of iterative exploration of the ant colony, through iterative action, not only the optimal path can be found, but also a sub-optimal path can be provided for the network. Compared with routing protocols such as HREEMR, although the suboptimal path is also searched for the network in the process of path enhancement, it requires additional cumbersome steps. In this method, the exploration process of the improved ant colony algorithm can be directly used to provide redundant paths and avoid unnecessary steps and energy consumption. In this method, the three redundant paths increase the robustness of the network and improve the overall life cycle of the network.
附图说明Description of drawings
图1是本发明无线传感器网络中基于改进蚁群算法的定向扩散路由方法流程示意图。FIG. 1 is a schematic flow chart of the directional diffusion routing method based on the improved ant colony algorithm in the wireless sensor network of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清 楚、详细地描述。所描述的实施例仅仅是本发明的一部分实施例。The technical solutions in the embodiments of the present invention will be described clearly and in detail below with reference to the accompanying drawings in the embodiments of the present invention. The described embodiments are only some of the embodiments of the invention.
本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the above-mentioned technical problems is:
本发明解决上述技术问题的技术方案是:The technical scheme that the present invention solves the above-mentioned technical problems is:
步骤1:兴趣洪泛;Step 1: Interest flooding;
根据原定向扩散协议不作改变。sink节点周期性向全网泛洪广播兴趣 interest,目标节点接收到对应兴趣消息后确定源节点位置。No changes were made to the original directed proliferation protocol. The sink node periodically floods the entire network to broadcast interest, and the target node determines the location of the source node after receiving the corresponding interest message.
步骤2:梯度建立;Step 2: Gradient establishment;
依据定向扩散协议的网络特殊模型,先针对蚁群算法进行改进,加入节点 能量因子和全局平均能量因子,使之可以适用于规划网络路由。在此基础上利 用此改进的蚁群算法进行从source节点到sink节点的路径寻优。以源节点出 发,sink节点作为目的节点,运行改进后的蚁群算法,初始化迭代次数与蚂蚁 个数,初始化各个节点初始能量,并根据改进后的转移概率寻找下一节点,与 此同时在路径上留下信息素,经过所有蚂蚁不断的探索最终迭代出信息素的梯 度场,在梯度建立阶段依次找梯度最大的节点构成梯度路径。According to the special network model of the directed diffusion protocol, the ant colony algorithm is first improved, and the node energy factor and the global average energy factor are added to make it suitable for planning network routing. On this basis, the improved ant colony algorithm is used to optimize the path from the source node to the sink node. Starting from the source node, sink node as the destination node, run the improved ant colony algorithm, initialize the number of iterations and the number of ants, initialize the initial energy of each node, and find the next node according to the improved transition probability, and at the same time in the path The pheromone is left on the ant, and the gradient field of the pheromone is finally iterated through the continuous exploration of all the ants. In the gradient establishment stage, the nodes with the largest gradient are sequentially found to form the gradient path.
具体包括以下步骤:Specifically include the following steps:
步骤2.1:运行改进的蚁群算法Step 2.1: Run the modified ant colony algorithm
首先进行初始化操作。无线传感器网络中,假设有n个节点,首先初始化, 赋予这些节点初始能量E1,E2,E3,...,En,初始时刻n个节点能量相同。初 始化节点信息素τ1,τ2,τ3...,τn。初始化迭代次数N=0,蚂蚁个数为m。运行 改进后的蚁群算法。Initialize first. In the wireless sensor network, assuming that there are n nodes, first initialize, and give these nodes initial energy E 1 , E 2 , E 3 , . . . Initialize the node pheromones τ 1 , τ 2 , τ 3 . . . , τ n . The number of initialization iterations is N=0, and the number of ants is m. Run the improved ant colony algorithm.
(1)改进后的蚁群算法转移概率如公式(15)(16)所示:(1) The transition probability of the improved ant colony algorithm is shown in formulas (15) and (16):
式(15)中,表示t时刻,蚂蚁k从节点i到节点j的转移概率。τij(t) 表示t时刻残留在路径(i,j)上的信息量,ηij为启发函数。α为信息启发式因子,; β为期望启发式因子,s表示下一跳节点,τis(t)表示本次探索i节点到s节点的 信息素,ηis表示本次探索i节点到s节点的启发函数,allowedk表示蚂蚁k下 一步允许选择的节点的集合。In formula (15), Represents the transition probability of ant k from node i to node j at time t. τ ij (t) represents the amount of information remaining on the path (i, j) at time t, and η ij is a heuristic function. α is the information heuristic factor, β is the expectation heuristic factor, s represents the next hop node, τ is (t) represents the pheromone from the i node to the s node in this exploration, and η is represents the current exploration from the i node to s The heuristic function of the node, allowedk represents the set of nodes that ant k is allowed to select in the next step.
式(16)中,Ei和Ej为节点i,j的剩余能量值。ETx是传感器节点发射数据 功耗,ERx是传感器节点接受数据功耗,n取2或4,这两个参数根据无线传感器 耗能模型得来,具体如公式(17)(18)所示:In formula (16), E i and E j are the residual energy values of nodes i, j. E Tx is the power consumption of the sensor node to transmit data, E Rx is the power consumption of the sensor node to receive data, n is 2 or 4, these two parameters are obtained according to the wireless sensor energy consumption model, as shown in formulas (17) (18) :
传感器节点发送kbit数据耗能:The energy consumption of the sensor node sending kbit data:
传感器节点接收kbit数据耗能:The energy consumption of the sensor node to receive kbit data:
ERx(k)=kEelec (11)E Rx (k)=kE elec (11)
式(17)中,d0为距离门限,d表示两个节点间的欧式距离。εfs和εmp为放 大器功耗。Eelec为单位比特数据耗能。In formula (17), d 0 is the distance threshold, and d represents the Euclidean distance between two nodes. ε fs and ε mp are amplifier power consumption. E elec is energy consumption per unit bit of data.
每只蚂蚁根据转移概率进行下一跳节点的选择,每走完一个节点将修改禁 忌表并记录留下的信息素,直到m只蚂蚁都走完路径到达了sink节点,则一次 迭代完成。这时更新信息素。Each ant selects the next hop node according to the transition probability. After each node is completed, it will modify the taboo table and record the remaining pheromone. Until m ants have completed the path and reached the sink node, one iteration is completed. At this time, the pheromone is updated.
(2)在信息素更新阶段,同样采用路径与能量结合选择的方式进行信息素 的更新。并将路径较短与平均能量较高的路径定义为最佳路径,由此这样的路 径上信息素浓度相比较其他路径将会凸显。更新方法如公式(19)(20)(21) 所示:(2) In the pheromone update stage, the pheromone update is also carried out by the combination of path and energy selection. And the path with shorter path and higher average energy is defined as the best path, so the pheromone concentration on such path will be prominent compared with other paths. The update method is shown in formula (19)(20)(21):
τij(t+n)=(1-ρ)τij(t)+Δτij best (12)τ ij (t+n)=(1-ρ)τ ij (t)+Δτ ij best (12)
式(19)中ρ是信息素挥发因子,且0<ρ<1,Δτij best表示定义的最优路径上 需要增加的信息素量,表示t+n时刻从i到j的信息素等于t时刻信息素挥发 后保留的部分与全局条件下最优路径上信息素增量的和。Pathbest表示定义的最佳 路径的标准。表示一条路径上所有节点的平均剩余能量的倒数。In formula (19), ρ is the pheromone volatilization factor, and 0<ρ<1, Δτ ij best represents the amount of pheromone that needs to be added on the defined optimal path, which means that the pheromone from i to j at time t+n is equal to t The sum of the remaining part of the time pheromone after volatilization and the pheromone increment on the optimal path under global conditions. Path best represents the criteria for the best path defined. Represents the reciprocal of the average remaining energy of all nodes on a path.
最优路径的定义也加入了路径平均剩余能量因子。式(21)中Eavg表示路径 平均剩余能量因子,其值等于该路径上所有节点能量的平均值。L表示所有可能 路径中的一条路径距离,ω0是权重,在定义最优路径时用于控制路径长度与平 均能量之间的重要性。The definition of the optimal path also incorporates the path average residual energy factor. In formula (21), E avg represents the average residual energy factor of the path, and its value is equal to the average value of the energy of all nodes on the path. L represents a path distance among all possible paths, and ω 0 is a weight used to control the importance between path length and average energy when defining the optimal path.
步骤2.2:梯度场的建立Step 2.2: Establishment of the Gradient Field
依据步骤2.1中改进的蚁群算法,运行结束后将产生由信息素浓度确定的 梯度场,在梯度建立过程中,由source节点依次沿着信息素浓度最大的方向找 到下一跳节点,并最终找到sink节点,这样将构成由距离和能量综合考虑的最 优梯度路径。According to the improved ant colony algorithm in step 2.1, the gradient field determined by the pheromone concentration will be generated after the operation is completed. During the gradient establishment process, the source node will find the next hop node in turn along the direction with the largest pheromone concentration, and finally Find the sink node, which will constitute the optimal gradient path considering the distance and energy.
步骤3:路径增强;根据蚁群算法的迭代过程,每次迭代过程将产生一条最 佳路径。在此信息素更新机制下,当完成迭代次数后,通过最优路径排名选择 出最优的3条路径,即计算出最优路径集合并从小到大排序 Pathbest={Pathbest1,Pathbest2,Pathbest3,······},选出排名前三者,并通过记录找到路径相 应经过的全部节点。增强路径过程下,源节点沿着梯度方向发送数据,而汇聚 节点根据信息素水平值将对应加强三条最佳路径。以上这些实施例应理解为仅 用于说明本发明而不用于限制本发明的保护范围。在阅读了本发明的记载的内 容之后,技术人员可以对本发明作各种改动或修改,这些等效变化和修饰同样 落入本发明权利要求所限定的范围。Step 3: Path enhancement; according to the iterative process of the ant colony algorithm, each iteration process will generate an optimal path. Under this pheromone update mechanism, when the number of iterations is completed, the optimal 3 paths are selected through the optimal path ranking, that is, the optimal path set is calculated and sorted from small to large Path best ={Path best1 ,Path best2 , Path best3 ,······}, select the top three, and find all the nodes that the path passes through by recording. In the process of enhancing the path, the source node sends data along the gradient direction, and the sink node will correspondingly enhance the three optimal paths according to the pheromone level value. The above embodiments should be understood as only for illustrating the present invention and not for limiting the protection scope of the present invention. After reading the contents of the description of the present invention, the skilled person can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010153008.7A CN111385853B (en) | 2020-03-06 | 2020-03-06 | Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010153008.7A CN111385853B (en) | 2020-03-06 | 2020-03-06 | Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111385853A true CN111385853A (en) | 2020-07-07 |
CN111385853B CN111385853B (en) | 2022-05-06 |
Family
ID=71218703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010153008.7A Active CN111385853B (en) | 2020-03-06 | 2020-03-06 | Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111385853B (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601217A (en) * | 2020-10-28 | 2021-04-02 | 北京工业大学 | Data security transmission method based on ant colony optimization and proxy re-encryption |
CN113242562A (en) * | 2021-06-17 | 2021-08-10 | 西安邮电大学 | WSNs coverage enhancement method and system |
CN114422424A (en) * | 2021-12-30 | 2022-04-29 | 中国电信股份有限公司 | Routing calculation method and device of transmission network |
TWI868766B (en) | 2023-06-30 | 2025-01-01 | 國立勤益科技大學 | Center point fusion algorithm and agricultural monitoring system based on ant colony optimization |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1731761A (en) * | 2005-08-05 | 2006-02-08 | 武汉理工大学 | A QoS Multicast Routing Method Based on Hybrid Ant Algorithm |
CN101277264A (en) * | 2008-05-13 | 2008-10-01 | 武汉理工大学 | Directed Diffusion Method Based on Ant Colony Algorithm in Wireless Sensor Networks |
-
2020
- 2020-03-06 CN CN202010153008.7A patent/CN111385853B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1731761A (en) * | 2005-08-05 | 2006-02-08 | 武汉理工大学 | A QoS Multicast Routing Method Based on Hybrid Ant Algorithm |
CN101277264A (en) * | 2008-05-13 | 2008-10-01 | 武汉理工大学 | Directed Diffusion Method Based on Ant Colony Algorithm in Wireless Sensor Networks |
Non-Patent Citations (3)
Title |
---|
何武: "基于蚁群优化算法的无线传感器网络路由算法研究", 《中国优秀硕士学位论文全文数据库》 * |
王珊珊: "基于蚁群算法的无线传感器网络路由技术研究", 《中国优秀硕士学位论文全文数据库》 * |
陆政: "基于改进蚁群算法的WSN路由研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112601217A (en) * | 2020-10-28 | 2021-04-02 | 北京工业大学 | Data security transmission method based on ant colony optimization and proxy re-encryption |
CN112601217B (en) * | 2020-10-28 | 2023-11-07 | 北京工业大学 | A secure data transmission method based on ant colony optimization and proxy re-encryption |
CN113242562A (en) * | 2021-06-17 | 2021-08-10 | 西安邮电大学 | WSNs coverage enhancement method and system |
CN113242562B (en) * | 2021-06-17 | 2022-11-29 | 西安邮电大学 | A WSNs coverage enhancement method and system |
CN114422424A (en) * | 2021-12-30 | 2022-04-29 | 中国电信股份有限公司 | Routing calculation method and device of transmission network |
CN114422424B (en) * | 2021-12-30 | 2023-08-11 | 中国电信股份有限公司 | Route calculation method and device of transmission network |
TWI868766B (en) | 2023-06-30 | 2025-01-01 | 國立勤益科技大學 | Center point fusion algorithm and agricultural monitoring system based on ant colony optimization |
Also Published As
Publication number | Publication date |
---|---|
CN111385853B (en) | 2022-05-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111385853B (en) | Directional diffusion routing method based on improved ant colony algorithm in wireless sensor network | |
CN104618982A (en) | Method for finding optimal path for Adhoc network based on improved genetic-ant colony algorithm | |
CN111049743B (en) | A Jointly Optimized Routing Method for Underwater Acoustic Multi-hop Collaborative Communication Networks | |
CN106161204B (en) | Data transmission method in mobile social network based on group intelligence | |
Tareq et al. | Mobile ad hoc network energy cost algorithm based on artificial bee colony | |
CN108512772B (en) | Data center traffic scheduling method based on quality of service | |
CN103327564A (en) | Wireless sensor network route method based on ant colony algorithm | |
CN110461018B (en) | Opportunistic network routing forwarding method based on computable AP | |
CN106332213A (en) | A method to reduce the number of routing hops in ZigBee wireless transmission network | |
CN108769939A (en) | A kind of wireless sensor network multipath transmitting fault-tolerance approach | |
CN108684063A (en) | An Improved Method of On-Demand Routing Protocol Based on Network Topology Change | |
CN110225493A (en) | Based on D2D route selection method, system, equipment and the medium for improving ant colony | |
Li et al. | An adaptive multi-zone geographic routing protocol for underwater acoustic sensor networks | |
JP2024001841A (en) | Distributed, entropy-high efficient, energy-saving cluster-based routing method for sdwsn | |
CN111447658A (en) | SDWSN-based clustering routing method | |
Rani et al. | A hybrid approach for the optimization of quality of service metrics of WSN | |
CN103346965B (en) | Based on the light multicast route method of coding subgraph Optimized Coding Based cost | |
Chen et al. | An efficient neural network-based next-hop selection strategy for multi-hop VANETs | |
CN103096411A (en) | Internet of things communication method based on reverse power restriction route protocol | |
CN115696494A (en) | Large-scale ad hoc network multipoint relay selection method based on ant colony optimization | |
CN109586848A (en) | A kind of message-passing decoding algorithm in SCMA system | |
Cheng et al. | An IoT ant colony foraging routing algorithm based on Markov decision model | |
CN105848239A (en) | Uniform distribution based opportunity network message forwarding strategy | |
Liang et al. | Adaptive routing based on Bayesian network and fuzzy decision algorithm in delay-tolerant network | |
Singh et al. | Optimization of Routing Protocol in MANET using GA |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |