景雯 張杰 傅文博 陳富
摘要: 針對(duì)鏈路負(fù)載控制受物聯(lián)網(wǎng)搜索空間的影響, 搜索空間過(guò)小會(huì)降低負(fù)載均衡度的問(wèn)題, 提出一種基于改進(jìn)遺傳算法的物聯(lián)網(wǎng)鏈路負(fù)載均衡控制方法. 首先, 構(gòu)建物聯(lián)網(wǎng)鏈路的頻帶傳輸模型, 利用抽頭間隔采樣控制物聯(lián)網(wǎng)鏈路傳輸, 建立物聯(lián)網(wǎng)鏈路頻帶模型獲得均衡調(diào)度函數(shù), 整合頻帶完成負(fù)載均衡配置; 其次, 加入分?jǐn)?shù)間隔均衡設(shè)計(jì)鏈路, 用頻帶分配原則得到頻帶匹配概率, 調(diào)節(jié)均衡器的抽頭數(shù)值, 設(shè)置鏈路碼間干擾項(xiàng)約束; 再次, 給出遺傳算法的參數(shù)編碼, 把所有請(qǐng)求都按一維順序排列, 對(duì)適應(yīng)度函數(shù)進(jìn)行線(xiàn)性尺度轉(zhuǎn)換, 完成遺傳算法的改進(jìn); 最后, 組合基因進(jìn)化染色體, 擴(kuò)展物聯(lián)網(wǎng)搜索空間, 令迭代數(shù)量小于最大系數(shù), 實(shí)現(xiàn)鏈路傳輸負(fù)載的均衡控制. 實(shí)驗(yàn)結(jié)果表明, 該方法能較好控制物聯(lián)網(wǎng)鏈路負(fù)載均衡, 鏈路負(fù)載均衡度可達(dá)92%, 并且能減少能量消耗.
關(guān)鍵詞: 改進(jìn)遺傳算法; 物聯(lián)網(wǎng)鏈路; 負(fù)載均衡控制; 頻帶分配; 適應(yīng)度函數(shù)
中圖分類(lèi)號(hào): TP391; TN919文獻(xiàn)標(biāo)志碼: A文章編號(hào): 1671-5489(2023)04-0922-07
Load Balancing Control Method of IoT Link Based on Improved Genetic Algorithm
JING Wen1, ZHANG Jie1, FU Wenbo1, CHEN Fu2
(1. School of Computer and Network Engineering, Shanxi Datong University, Datong 037009, Shanxi Province, China;
2. School of Mathematics and Statistics, Shanxi Datong University, Datong 037009, Shanxi Province, China)
Abstract: Aiming at the problem that the control of link load was affected by the search space of the Internet of Things, a small? search space could reduce the load balancing degree, we proposed a load balancing control method of the Internet of Things? link based on? improved genetic algorithm. Firstly, the frequency band transmission model of the Internet of Things link was constructed, and tap interval sampling was used to control the transmission of the Internet of Things link, the frequency band model of the Internet of Things link was established? to obtain the balanced scheduling function, and the frequency band was integrated to complete the load balancing configuration. Secondly, we added? fractional interval equalization to design the link, used the frequency band allocation principle to obtain the frequency band matching probability, adjusted the tap value of the equalizer, and set the inter symbol interference term constraint of the link. Thirdly, we gave the parameter code of genetic algorithm, arranged all requests? in one-dimensional order, and? transformed? linear scale on the fitness function to complete the improvement of genetic algorithm. Finally, we combined? gene evolution chromosomes to expand the search space of the Internet of Things, made the number of iterations less than the maximum coefficient, and realized the balancing control of link transmission load. The experimental results show that the proposed method can effectively? control the load balancing of the Internet of Things link, the link load balancing degree can reach 92%, and can reduce energy consumption.
Keywords: improved genetic algorithm; Internet of Things link; load balancing control; frequency band allocation; fitness function
近年來(lái), 隨著科技的發(fā)展, 一種全新的互聯(lián)網(wǎng)——物聯(lián)網(wǎng)(IoT)應(yīng)運(yùn)而生, 其具有很大的發(fā)展空間[1-2]. 物聯(lián)網(wǎng)的目的是把物理與信息世界連接起來(lái), 其本質(zhì)是由大量傳感器節(jié)點(diǎn)[3]構(gòu)成的大型復(fù)雜網(wǎng)絡(luò), 但節(jié)點(diǎn)能量有限, 因此, 如何降低能耗是該領(lǐng)域的研究重點(diǎn). 目前有兩種方式: 一是通過(guò)不斷使用新的硬件[4]技術(shù), 使節(jié)點(diǎn)能及時(shí)獲得更多的能量; 二是分析網(wǎng)絡(luò)本身的結(jié)構(gòu)裝置[5]. 在物聯(lián)網(wǎng)中數(shù)據(jù)傳輸是能耗最大的環(huán)節(jié), 鏈路是信息傳輸?shù)年P(guān)鍵, 通過(guò)合理匹配鏈路和傳感節(jié)點(diǎn)數(shù)量, 可提高物聯(lián)網(wǎng)的傳輸質(zhì)量. 負(fù)載均衡是指將物聯(lián)網(wǎng)內(nèi)鏈路中某個(gè)節(jié)點(diǎn)上的多余負(fù)載轉(zhuǎn)移到其他負(fù)載較小的節(jié)點(diǎn)上, 以使全部節(jié)點(diǎn)的負(fù)載處于一個(gè)較均衡的狀態(tài), 從而提高物聯(lián)網(wǎng)的整體負(fù)載能力與響應(yīng)速度, 因此研究物聯(lián)網(wǎng)鏈路負(fù)載均衡控制方法具有較大的現(xiàn)實(shí)意義.
吳海超等[6]在云和霧計(jì)算中, 通過(guò)構(gòu)造云霧混合網(wǎng)絡(luò), 合理配置物聯(lián)網(wǎng)設(shè)備的需求, 將物聯(lián)網(wǎng)服務(wù)請(qǐng)求均衡模型轉(zhuǎn)化為優(yōu)化問(wèn)題, 使服務(wù)請(qǐng)求的總延遲降至最低, 并采用改進(jìn)蝙蝠算法計(jì)算網(wǎng)絡(luò)均衡, 把邊緣終端分配給附近的設(shè)備, 制定合理資源劃分方案, 實(shí)現(xiàn)負(fù)載均衡; 姚澤瑋等[7]為解決多邊緣環(huán)境下的負(fù)載均衡問(wèn)題, 基于任務(wù)調(diào)度減少邊緣集中任務(wù)的最大響應(yīng)時(shí)間, 以改善系統(tǒng)的運(yùn)行效率, 并針對(duì)形式化多邊界問(wèn)題, 應(yīng)用粒子群遺傳方法實(shí)現(xiàn)負(fù)載的均衡控制. 但上述方法控制后鏈路負(fù)載的均衡度較差, 能量消耗較大, 網(wǎng)絡(luò)使用壽命并沒(méi)有被有效延長(zhǎng). 為解決現(xiàn)有方法存在的問(wèn)題, 本文將改進(jìn)遺傳算法應(yīng)用到負(fù)載均衡控制中, 利用改進(jìn)遺傳算法擴(kuò)展物聯(lián)網(wǎng)搜索空間, 通過(guò)迭代計(jì)算實(shí)現(xiàn)物聯(lián)網(wǎng)鏈路負(fù)載均衡控制.
1 鏈路頻帶傳輸模型
4 實(shí) 驗(yàn)
為更好地證明本文方法對(duì)鏈路負(fù)載均衡控制的有效性, 進(jìn)行測(cè)試實(shí)驗(yàn). 隨機(jī)布置一個(gè)200×200的區(qū)域, 并在其中設(shè)定200個(gè)感知節(jié)點(diǎn), 10個(gè)網(wǎng)關(guān), 長(zhǎng)度為4 000 bit的數(shù)據(jù)包. 因?yàn)殡S機(jī)拓?fù)渚W(wǎng)絡(luò)可較好表示物聯(lián)網(wǎng)節(jié)點(diǎn)的分布情況, 所以實(shí)驗(yàn)選擇該網(wǎng)絡(luò)作為模擬環(huán)境. 以網(wǎng)關(guān)節(jié)點(diǎn)為中心, 構(gòu)建物聯(lián)網(wǎng)的數(shù)據(jù)傳輸拓?fù)鋱D, 如圖3所示.
實(shí)驗(yàn)參數(shù)設(shè)置如下: 帶寬為13 MHz; 節(jié)點(diǎn)布局方位角為-11°; 節(jié)點(diǎn)布局距離為110~310 m; 采樣頻率為6 MHz; 信號(hào)時(shí)長(zhǎng)為2 s; 前1 s信號(hào)頻率為250 Hz; 后1 s信號(hào)頻率為300 Hz. 通過(guò)上述參數(shù)對(duì)物聯(lián)網(wǎng)鏈路負(fù)載均衡控制, 獲得傳輸過(guò)程中的鏈路負(fù)載情況如圖4所示.
完成物聯(lián)網(wǎng)鏈路負(fù)載幅值數(shù)據(jù)的采集后, 設(shè)定遺傳算法的參數(shù), 設(shè)置個(gè)體數(shù)目為50, 迭代次數(shù)為200, 交叉概率為0.8, 變異概率為0.03. 對(duì)比改進(jìn)前后遺傳算法的最小誤差, 結(jié)果如圖5所示. 由圖5可見(jiàn), 相比于改進(jìn)前的遺傳算法, 改進(jìn)后的遺傳算法的最小誤差明顯降低, 能提高對(duì)鏈路負(fù)載的控制性能.
為充分驗(yàn)證本文物聯(lián)網(wǎng)鏈路負(fù)載均衡控制方法的性能, 以負(fù)載均衡度、 網(wǎng)絡(luò)剩余能量以及丟包率為實(shí)驗(yàn)對(duì)比指標(biāo), 將本文方法與文獻(xiàn)[6]、 文獻(xiàn)[7]提出的基于改進(jìn)蝙蝠算法的控制方法、 基于粒子群遺傳算法的控制方法進(jìn)行對(duì)比驗(yàn)證.
負(fù)載均衡度可體現(xiàn)網(wǎng)絡(luò)節(jié)點(diǎn)負(fù)載均衡控制的狀況, 其值越大說(shuō)明其負(fù)載均衡控制效果越好, 采用本文方法、 改進(jìn)蝙蝠方法以及粒子群遺傳方法進(jìn)行比較, 分析獲得的負(fù)載均衡度, 結(jié)果如圖6所示. 由圖6可見(jiàn), 本文方法第一跳的負(fù)載均衡度為82.5%, 而粒子群遺傳方法只有65%, 改進(jìn)蝙蝠方法為58%. 表明本文方法的鏈路負(fù)載控制效果較好, 隨著跳數(shù)的逐漸增加, 本文方法負(fù)載均衡度呈上升的趨勢(shì), 直到第8跳已經(jīng)達(dá)到92%, 說(shuō)明利用本文方法對(duì)鏈路傳輸調(diào)整能提高物聯(lián)網(wǎng)的負(fù)載均衡度.
通過(guò)網(wǎng)絡(luò)剩余能量能得知物聯(lián)網(wǎng)負(fù)載均衡情況, 網(wǎng)絡(luò)剩余能量越多表示網(wǎng)絡(luò)均衡狀況越好. 設(shè)置物聯(lián)網(wǎng)總能量為300 J, 3種方法剩余能量對(duì)比如圖7所示. 由圖7可見(jiàn), 在相同的時(shí)間下, 本文方法控制下網(wǎng)絡(luò)剩余能量較多. 隨著時(shí)間的增加, 粒子群遺傳方法的能量消耗開(kāi)始增多, 這是由于該方法沒(méi)有關(guān)注節(jié)點(diǎn)剩余能量, 所以能量值比本文方法下降速度快. 改進(jìn)蝙蝠方法考慮到節(jié)點(diǎn)剩余能量, 但是未考慮負(fù)載量, 因此剩余能量低于本文方法. 本文方法的剩余能量較多, 在351 s才到達(dá)0, 延長(zhǎng)了網(wǎng)絡(luò)的使用時(shí)間, 證明本文方法的均衡控制較好.
丟包率是評(píng)估網(wǎng)絡(luò)負(fù)載均衡性能的重要指標(biāo), 3種方法的丟包率對(duì)比情況如圖8所示. 由圖8可見(jiàn), 改進(jìn)蝙蝠方法的丟包率會(huì)隨著數(shù)據(jù)流量的增加而快速升高, 說(shuō)明該方法控制下網(wǎng)絡(luò)鏈路負(fù)載均衡性較差. 本文方法控制后丟包率隨流量的增加也在升高, 但是上升速度較慢. 粒子群遺傳方法的丟包率在其余兩種方法之間, 均衡控制效果比蝙蝠方法好, 但比本文方法略差. 因此, 證明本文方法對(duì)物聯(lián)網(wǎng)鏈路負(fù)載均衡控制效果最佳, 更有利于數(shù)據(jù)傳輸穩(wěn)定, 延遲網(wǎng)絡(luò)使用壽命.
綜上所述, 針對(duì)物聯(lián)網(wǎng)鏈路負(fù)載均衡控制效果差, 會(huì)出現(xiàn)網(wǎng)絡(luò)能量消耗較多, 造成資源浪費(fèi), 且負(fù)載均衡性能差會(huì)導(dǎo)致網(wǎng)絡(luò)傳輸不穩(wěn)定, 易發(fā)生數(shù)據(jù)發(fā)送接收錯(cuò)誤的問(wèn)題, 本文提出了一種基于改進(jìn)遺傳算法的物聯(lián)網(wǎng)鏈路負(fù)載均衡控制方法. 首先建立物聯(lián)網(wǎng)鏈路頻帶傳輸模型, 其次利用擴(kuò)頻調(diào)制約束鏈路干擾濾波, 最后通過(guò)改進(jìn)遺傳算法完成鏈路負(fù)載均衡控制, 保證網(wǎng)絡(luò)穩(wěn)定. 實(shí)驗(yàn)結(jié)果表明, 與現(xiàn)有方法相比, 本文方法控制下鏈路負(fù)載均衡度明顯提升, 最高達(dá)到92%, 并且有效降低了鏈路傳輸?shù)膩G包率.
參考文獻(xiàn)
[1]徐東明, 譚靜茹, 關(guān)文博. 基于改進(jìn)遺傳算法的C-RAN網(wǎng)絡(luò)動(dòng)態(tài)無(wú)線(xiàn)資源分配 [J]. 電訊技術(shù), 2021, 61(10): 1225-1232. (XU D M, TAN J R,? GUAN W B. Dynamic Wireless Resource Allocation Based on Improved Genetic Algorithm in C-RAN Networks [J]. Telecommunication Engineering, 2021, 61(10): 1225-1232.)
[2]魯垚光, 王興偉, 李福亮, 等. 軟件定義網(wǎng)絡(luò)中的動(dòng)態(tài)負(fù)載均衡與節(jié)能機(jī)制 [J]. 計(jì)算機(jī)學(xué)報(bào), 2020, 43(10): 1969-1982. (LU Y G, WANG X W, LI F L, et al. Dynamic Load Balancing and Energy Saving Mechanism in Software Defined Networking [J].? Chinese Journal of Computers, 2020, 43(10): 1969-1982.)
[3]KABIRI Z, BAREKATAIN B, AVOKH A. GOP-SDN: An Enhanced Load Balancing Method Based on Genetic and Optimized Particle Swarm Optimization Algorithm in Distributed SDNs [J]. Wireless Networks, 2022, 28(6): 2533-2552.
[4]薛乃陽(yáng), 丁丹, 王紅敏, 等. 基于改進(jìn)遺傳算法的多類(lèi)測(cè)控資源調(diào)度方法 [J]. 系統(tǒng)工程與電子技術(shù), 2021, 43(9): 2535-2543. (XUE N Y, DING D, WANG H M, et al. Multi-type TT&C Resource Scheduling Method Based on Improved Genetic Algorithm [J]. Systems Engineering and Electronics, 2021, 43(9): 2535-2543.)
[5]崔子熙, 胡宇翔, 蘭巨龍, 等. 基于流分類(lèi)的數(shù)據(jù)中心網(wǎng)絡(luò)負(fù)載均衡機(jī)制 [J]. 電子學(xué)報(bào), 2021, 49(3): 559-565. (CUI Z X, HU Y X, LAN J L, et al. Load Balancing Based on Flow Classification for Datacenter Network [J]. Acta Electronica Sinica, 2021, 49(3): 559-565.)
[6]吳海超, 王新民. 物聯(lián)網(wǎng)低時(shí)延云霧混合網(wǎng)絡(luò)負(fù)載均衡策略 [J]. 計(jì)算機(jī)工程與設(shè)計(jì), 2021, 42(12): 3323-3332. (WU H C, WANG X M. Load Balancing Strategy for IoT in Low Delay Cloud-Fog Hybrid Network [J]. Computer Engineering and Design, 2021, 42(12): 3323-3332.)
[7]姚澤瑋, 林嘉雯, 胡俊欽, 等. 基于PSO-GA的多邊緣負(fù)載均衡方法 [J]. 計(jì)算機(jī)科學(xué), 2021, 48(增刊2): 456-463. (YAO Z W, LIN J W, HU J Q, et al. PSO-GA Based Approach to Multi-edge Load Balancing [J]. Computer Science, 2021, 48(Suppl 2): 456-463.)
[8]唐靜, 田波, 陳華君. 基于節(jié)點(diǎn)-鏈路評(píng)估模型的移動(dòng)物聯(lián)網(wǎng)數(shù)據(jù)傳輸穩(wěn)定算法 [J]. 電子測(cè)量與儀器學(xué)報(bào), 2020, 34(10): 194-201. (TANG J, TIAN B, CHEN H J. Data Transmission Stability Scheme of Mobile Internet of Things Based on Node Link Evaluation Model [J]. Journal of Electronic Measurement and Instrumentation, 2020, 34(10): 194-201.)
[9]趙季紅, 吳豆豆, 曲樺, 等. 面向物聯(lián)網(wǎng)的能耗感知虛擬網(wǎng)絡(luò)映射算法 [J]. 計(jì)算機(jī)工程, 2020, 46(5): 19-25. (ZHAO J H, WU D D, QU H, et al. Energy-Aware Virtual Network Mapping Algorithm for Internet of Things [J]. Computer Engineering, 2020, 46(5): 19-25.)
[10]谷南南, 姚佩陽(yáng), 焦志強(qiáng). 云計(jì)算環(huán)境下利用改進(jìn)遺傳算法結(jié)合二次編碼的大規(guī)模資源調(diào)度方法 [J]. 計(jì)算機(jī)應(yīng)用研究, 2020, 37(8): 2390-2394. (GU N N, YAO P Y, JIAO Z Q. Large-Scale Resource Scheduling Method Using Improved Genetic Algorithm Combined with Secondary Coding in Cloud Computing Environment [J]. Application Research of Computers, 2020, 37(8): 2390-2394.)
[11]周毅君, 金健, 黃斌, 等. 基于改進(jìn)遺傳算法的柔性作業(yè)車(chē)間調(diào)度優(yōu)化 [J]. 科學(xué)技術(shù)與工程, 2022, 22(1): 259-266. (ZHOU Y J, JIN J, HUANG B, et al. Flexible Job Shop Scheduling Optimization Based on Improved Genetic Algorithm [J]. Science Technology and Engineering, 2022, 22(1): 259-266.)
[12]RANI S, AHMED S H, RASTOGI R. Dynamic Clustering Approach Based on Wireless Sensor Networks Genetic Algorithm for IoT Applications [J]. Wireless Networks, 2020, 26(6): 1-10.
[13]ASGHARI A, SOHRABI M K, YAGHMAEE F. Task Scheduling, Resource Provisioning, and Load Balancing on Scientific Workflows Using Parallel SARSA Reinforcement Learning Agents and Genetic Algorithm [J]. Journal of Supercomputing, 2020, 77(3): 1-29.
[14]劉軍, 楊青文, 王金濤, 等. 基于改進(jìn)遺傳算法的空間信息網(wǎng)恢復(fù)策略 [J]. 東北大學(xué)學(xué)報(bào)(自然科學(xué)版), 2021, 42(4): 524-530. (LIU J, YANG Q W, WANG J T, et al. Spatial Information Network Restoration Strategy Based on Improved Genetic Algorithm [J]. Journal of Northeastern University (Natural Science), 2021, 42(4): 524-530.)
[15]蔡婷, 林暉, 陳武輝, 等. 區(qū)塊鏈賦能的高效物聯(lián)網(wǎng)數(shù)據(jù)激勵(lì)共享方案 [J]. 軟件學(xué)報(bào), 2021, 32(4): 953-972. (CAI T, LIN H, CHEN W H, et al. Efficient Blockchain-Empowered Data Sharing Incentive Scheme for Internet of Things [J]. Journal of Software, 2021, 32(4): 953-972.)
[16]劉音. 基于改進(jìn)遺傳算法的回歸測(cè)試用例優(yōu)先級(jí)排序 [J]. 計(jì)算機(jī)仿真, 2021, 38(2): 273-277. (LIU Y. Priority Ranking of Regression Test Cases Based on Improved Genetic Algorithm [J]. Computer Simulation, 2021, 38(2): 273-277.)
[17]火元蓮, 龍小強(qiáng), 連培君, 等. 一種類(lèi)箕舌線(xiàn)函數(shù)的變步長(zhǎng)歸一化自適應(yīng)濾波算法 [J]. 電子與信息學(xué)報(bào), 2021, 43(2): 335-340. (HUO Y L, LONG X Q, LIAN P J, et al. A Kind of Versoria Function Normalized Adaptive Filtering Algorithm [J]. Journal of Electronics & Information Technology, 2021, 43(2): 335-340.)
[18]周永華, 嚴(yán)梓碩. 基于ISE-ITAE指標(biāo)與遺傳算法的解耦控制方法 [J]. 現(xiàn)代電子技術(shù), 2021, 44(10): 130-134. (ZHOU Y H, YAN Z S. A Decoupling Control Method with ISE-ITAE Index and Genetic Algorithm [J]. Modern Electronics Technique, 2021, 44(10): 130-134.)
[19]鐘佩思, 劉金銘, 呂文浩, 等. 基于雙層自適應(yīng)遺傳算法的機(jī)器人參數(shù)辨識(shí) [J]. 科學(xué)技術(shù)與工程, 2022, 22(3): 1054-1060. (ZHONG P S, LIU J M, L W H, et al. Robot Parameter Identification Based on Two-Layer Adaptive Genetic Algorithm [J]. Science Technology and Engineering, 2022, 22(3): 1054-1060.)
[20]PUNDIR S, OBAIDAT M S, WAZID M, et al. MADP-IIME: Malware Attack Detection Protocol in IoT-Enabled Industrial Multimedia Environment Using Machine Learning Approach [J]. Multimedia Systems, 2021, 19(4): 1-13.
(責(zé)任編輯: 韓 嘯)
收稿日期: 2022-10-24.
第一作者簡(jiǎn)介: 景 雯(1979—), 女, 漢族, 碩士, 講師, 從事計(jì)算機(jī)教育應(yīng)用、 網(wǎng)絡(luò)安全和物聯(lián)網(wǎng)的研究, E-mail: jingwen@sxdtdx.edu.cn.
基金項(xiàng)目: 國(guó)家自然科學(xué)基金青年科學(xué)基金(批準(zhǔn)號(hào): 61803241)和山西省高等學(xué)??萍紕?chuàng)新項(xiàng)目(批準(zhǔn)號(hào): 2021L382).
吉林大學(xué)學(xué)報(bào)(理學(xué)版)2023年4期