本發(fa)明(ming)涉及載波(bo)(bo)通(tong)(tong)信領域,具體涉及基于載波(bo)(bo)線路進行(xing)穩定通(tong)(tong)信的方法。
背景技術:
電力(li)載(zai)波(bo)通(tong)(tong)訊即plc,是英文(wen)powerlinecommunication的(de)簡稱。電力(li)載(zai)波(bo)是電力(li)系統特(te)有的(de)通(tong)(tong)信方(fang)式(shi),電力(li)載(zai)波(bo)通(tong)(tong)訊是指利用現有電力(li)線,通(tong)(tong)過載(zai)波(bo)方(fang)式(shi)將(jiang)模(mo)擬(ni)或數(shu)字信號進行高(gao)速傳輸的(de)技術。最(zui)大特(te)點(dian)是不需要重(zhong)新架(jia)設網(wang)絡,只(zhi)要有電線,就能進行數(shu)據傳遞。
載波(bo)通(tong)信的(de)方式(shi)由于(yu)不需要重新布(bu)線(xian),所(suo)以非常適合于(yu)家庭(ting)及工廠新設(she)通(tong)信線(xian)路,然而(er)現有的(de)載波(bo)通(tong)信技(ji)術(shu)由于(yu)采用(yong)不分權廣播(bo)的(de)方式(shi)進行發(fa)送(song),對既(ji)有線(xian)路的(de)輸(shu)電造成(cheng)了很大影響。
技術實現要素:
本發明所要(yao)解(jie)(jie)決(jue)(jue)的技(ji)(ji)術問題是現有的載波通信(xin)技(ji)(ji)術由于(yu)采用不分權廣播的方式(shi)進(jin)行發送,對既有線(xian)路的輸電造成了(le)很大影響(xiang),目的在于(yu)提(ti)供基于(yu)載波線(xian)路進(jin)行穩定通信(xin)的方法(fa),解(jie)(jie)決(jue)(jue)上述問題。
本發(fa)明通過下(xia)述技(ji)術(shu)方案實現:
基于(yu)載(zai)波(bo)線路進行穩(wen)定通信(xin)(xin)的(de)(de)方法,包(bao)括(kuo)以下步(bu)驟(zou):s1:主控(kong)(kong)(kong)端(duan)建立所有受控(kong)(kong)(kong)端(duan)信(xin)(xin)息的(de)(de)路由表(biao);s2:主控(kong)(kong)(kong)端(duan)接(jie)收需(xu)要傳輸的(de)(de)信(xin)(xin)號(hao)和該信(xin)(xin)號(hao)需(xu)要傳輸到(dao)的(de)(de)受控(kong)(kong)(kong)端(duan);s3:主控(kong)(kong)(kong)端(duan)根(gen)據受控(kong)(kong)(kong)端(duan)信(xin)(xin)息的(de)(de)路由表(biao)采用蟻群算法選(xuan)擇信(xin)(xin)號(hao)傳輸最佳路徑;s4:主控(kong)(kong)(kong)端(duan)根(gen)據最佳路徑將(jiang)需(xu)要傳輸的(de)(de)信(xin)(xin)號(hao)傳輸到(dao)受控(kong)(kong)(kong)端(duan)。
現有(you)(you)(you)技(ji)術(shu)中載波(bo)通信(xin)(xin)(xin)技(ji)術(shu)由(you)于(yu)采(cai)(cai)(cai)用不(bu)分權(quan)(quan)廣播(bo)(bo)(bo)的(de)(de)方式進行(xing)發送(song),對既(ji)有(you)(you)(you)線路(lu)(lu)的(de)(de)輸(shu)(shu)電(dian)造成了(le)很大(da)影響(xiang)(xiang),不(bu)分權(quan)(quan)的(de)(de)廣播(bo)(bo)(bo)方式,不(bu)對信(xin)(xin)(xin)號(hao)路(lu)(lu)徑(jing)進行(xing)規劃(hua),而(er)(er)是對每一個信(xin)(xin)(xin)號(hao)進行(xing)全(quan)網(wang)廣播(bo)(bo)(bo),而(er)(er)全(quan)網(wang)廣播(bo)(bo)(bo)對既(ji)有(you)(you)(you)線路(lu)(lu)的(de)(de)電(dian)力(li)輸(shu)(shu)送(song)又有(you)(you)(you)很大(da)影響(xiang)(xiang)。本發明(ming)應用時,主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)建立所有(you)(you)(you)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)信(xin)(xin)(xin)息的(de)(de)路(lu)(lu)由(you)表(biao),該路(lu)(lu)由(you)表(biao)為后面步驟所需(xu)(xu)的(de)(de)依據。然(ran)(ran)后主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)接收需(xu)(xu)要傳輸(shu)(shu)的(de)(de)信(xin)(xin)(xin)號(hao)和(he)該信(xin)(xin)(xin)號(hao)需(xu)(xu)要傳輸(shu)(shu)到(dao)的(de)(de)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan),用戶通過主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)來輸(shu)(shu)入信(xin)(xin)(xin)號(hao)并(bing)傳輸(shu)(shu)到(dao)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan),所以用戶在主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)處需(xu)(xu)要輸(shu)(shu)入信(xin)(xin)(xin)號(hao)并(bing)制定該信(xin)(xin)(xin)號(hao)需(xu)(xu)要達到(dao)的(de)(de)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)。然(ran)(ran)后,主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)根據受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)信(xin)(xin)(xin)息的(de)(de)路(lu)(lu)由(you)表(biao)采(cai)(cai)(cai)用蟻群算(suan)(suan)法選(xuan)擇(ze)信(xin)(xin)(xin)號(hao)傳輸(shu)(shu)最(zui)(zui)佳路(lu)(lu)徑(jing),由(you)于(yu)采(cai)(cai)(cai)用了(le)蟻群算(suan)(suan)法,主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)可以判斷出(chu)該信(xin)(xin)(xin)號(hao)達到(dao)制定受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)的(de)(de)最(zui)(zui)短路(lu)(lu)徑(jing),從而(er)(er)不(bu)會(hui)(hui)對全(quan)網(wang)進行(xing)不(bu)分權(quan)(quan)廣播(bo)(bo)(bo),不(bu)會(hui)(hui)對既(ji)有(you)(you)(you)線路(lu)(lu)的(de)(de)輸(shu)(shu)電(dian)造成很大(da)影響(xiang)(xiang)。再然(ran)(ran)后主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)根據最(zui)(zui)佳路(lu)(lu)徑(jing)將(jiang)需(xu)(xu)要傳輸(shu)(shu)的(de)(de)信(xin)(xin)(xin)號(hao)傳輸(shu)(shu)到(dao)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)。本發明(ming)通過采(cai)(cai)(cai)用蟻群算(suan)(suan)法對主(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)到(dao)受(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)(duan)(duan)(duan)(duan)(duan)的(de)(de)信(xin)(xin)(xin)號(hao)傳輸(shu)(shu)路(lu)(lu)線進行(xing)優化(hua),從而(er)(er)不(bu)會(hui)(hui)對全(quan)網(wang)進行(xing)不(bu)分權(quan)(quan)廣播(bo)(bo)(bo),不(bu)會(hui)(hui)對既(ji)有(you)(you)(you)線路(lu)(lu)的(de)(de)輸(shu)(shu)電(dian)造成很大(da)影響(xiang)(xiang)。
進一步的,本(ben)發明(ming)還包括(kuo)以下(xia)步驟:s5:主控端在任意受控端信息發生變化時(shi),更新路由表。
進一步的,本發明(ming)所述步驟s2包括以下子步驟:s21:主控端接收到(dao)需要(yao)傳(chuan)輸的信(xin)(xin)號時,對該信(xin)(xin)號進行模數轉換。
進一(yi)步(bu)的(de)(de),本發明所述步(bu)驟(zou)s3包括以下子步(bu)驟(zou):s31:主控端在(zai)蟻群(qun)算法選(xuan)擇(ze)出的(de)(de)信號傳輸最佳(jia)(jia)路徑(jing)為(wei)多條時,隨機選(xuan)擇(ze)一(yi)條作為(wei)s4所需(xu)要(yao)的(de)(de)最佳(jia)(jia)路徑(jing)。
進一(yi)步(bu)的,本發明步(bu)驟s1中所述所有受控端(duan)信息的路由表(biao)包括受控端(duan)的ip地址和受控端(duan)的mac地址。
本(ben)發明與現有技術相比(bi),具(ju)有如下的優點和(he)有益效果:
本發明基(ji)于載波線路(lu)進行穩定(ding)通信的(de)方法,通過采用(yong)蟻群算(suan)法對(dui)主控端到受控端的(de)信號傳輸(shu)路(lu)線進行優化,從(cong)而不會對(dui)全網進行不分權(quan)廣播,不會對(dui)既有(you)線路(lu)的(de)輸(shu)電造成(cheng)很大影響(xiang)。
附圖說明
此處所說明的附圖用來提供對本發明實施例的進一步理解,構成
本技術:
的一部分,并不構成對本發明實(shi)施例的限定。在附圖中:
圖(tu)1為本發明方(fang)法步驟示(shi)意圖(tu)。
具體實施方式
為(wei)使本(ben)發(fa)明(ming)的目的、技術方(fang)案和優點更加清楚明(ming)白(bai),下面結(jie)合實施例和附圖,對本(ben)發(fa)明(ming)作(zuo)進一步的詳細說(shuo)明(ming),本(ben)發(fa)明(ming)的示意性(xing)實施方(fang)式及其說(shuo)明(ming)僅用于解(jie)釋(shi)本(ben)發(fa)明(ming),并不作(zuo)為(wei)對本(ben)發(fa)明(ming)的限定(ding)。
實施例
如圖1所(suo)示,本(ben)(ben)發明基于載波線路(lu)進(jin)(jin)行(xing)穩定通(tong)信(xin)(xin)的(de)方法,包(bao)括以(yi)下(xia)步(bu)(bu)驟(zou)(zou):s1:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)建立(li)所(suo)有受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)信(xin)(xin)息的(de)路(lu)由表;s2:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)接收(shou)需(xu)(xu)(xu)要(yao)(yao)傳(chuan)輸(shu)的(de)信(xin)(xin)號(hao)(hao)和(he)該信(xin)(xin)號(hao)(hao)需(xu)(xu)(xu)要(yao)(yao)傳(chuan)輸(shu)到(dao)的(de)受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan);s3:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)根據受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)信(xin)(xin)息的(de)路(lu)由表采用蟻(yi)群算法選擇(ze)信(xin)(xin)號(hao)(hao)傳(chuan)輸(shu)最(zui)佳路(lu)徑(jing);s4:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)根據最(zui)佳路(lu)徑(jing)將需(xu)(xu)(xu)要(yao)(yao)傳(chuan)輸(shu)的(de)信(xin)(xin)號(hao)(hao)傳(chuan)輸(shu)到(dao)受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)。本(ben)(ben)發明還包(bao)括以(yi)下(xia)步(bu)(bu)驟(zou)(zou):s5:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)在任(ren)意受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)信(xin)(xin)息發生變(bian)化(hua)時,更(geng)新路(lu)由表。本(ben)(ben)發明所(suo)述步(bu)(bu)驟(zou)(zou)s2包(bao)括以(yi)下(xia)子步(bu)(bu)驟(zou)(zou):s21:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)接收(shou)到(dao)需(xu)(xu)(xu)要(yao)(yao)傳(chuan)輸(shu)的(de)信(xin)(xin)號(hao)(hao)時,對(dui)該信(xin)(xin)號(hao)(hao)進(jin)(jin)行(xing)模數轉(zhuan)換(huan)。本(ben)(ben)發明所(suo)述步(bu)(bu)驟(zou)(zou)s3包(bao)括以(yi)下(xia)子步(bu)(bu)驟(zou)(zou):s31:主(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)在蟻(yi)群算法選擇(ze)出(chu)的(de)信(xin)(xin)號(hao)(hao)傳(chuan)輸(shu)最(zui)佳路(lu)徑(jing)為(wei)多(duo)條時,隨機選擇(ze)一條作為(wei)s4所(suo)需(xu)(xu)(xu)要(yao)(yao)的(de)最(zui)佳路(lu)徑(jing)。本(ben)(ben)發明步(bu)(bu)驟(zou)(zou)s1中(zhong)所(suo)述所(suo)有受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)信(xin)(xin)息的(de)路(lu)由表包(bao)括受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)的(de)ip地址(zhi)和(he)受(shou)(shou)(shou)控(kong)(kong)(kong)(kong)端(duan)的(de)mac地址(zhi)。
本實施例實施時,主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)建立(li)所(suo)有受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)信(xin)(xin)(xin)(xin)息的(de)(de)路(lu)由表,該路(lu)由表為(wei)后(hou)(hou)面(mian)步驟所(suo)需(xu)的(de)(de)依據。然后(hou)(hou)主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)接收需(xu)要傳(chuan)(chuan)輸(shu)(shu)(shu)的(de)(de)信(xin)(xin)(xin)(xin)號(hao)和該信(xin)(xin)(xin)(xin)號(hao)需(xu)要傳(chuan)(chuan)輸(shu)(shu)(shu)到(dao)的(de)(de)受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan),用(yong)(yong)(yong)戶通(tong)過(guo)主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)來輸(shu)(shu)(shu)入信(xin)(xin)(xin)(xin)號(hao)并傳(chuan)(chuan)輸(shu)(shu)(shu)到(dao)受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan),所(suo)以用(yong)(yong)(yong)戶在主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)處需(xu)要輸(shu)(shu)(shu)入信(xin)(xin)(xin)(xin)號(hao)并制(zhi)定該信(xin)(xin)(xin)(xin)號(hao)需(xu)要達到(dao)的(de)(de)受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)。然后(hou)(hou),主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)根據受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)信(xin)(xin)(xin)(xin)息的(de)(de)路(lu)由表采用(yong)(yong)(yong)蟻群算(suan)(suan)法(fa)(fa)選擇信(xin)(xin)(xin)(xin)號(hao)傳(chuan)(chuan)輸(shu)(shu)(shu)最(zui)佳路(lu)徑,由于(yu)采用(yong)(yong)(yong)了蟻群算(suan)(suan)法(fa)(fa),主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)可以判斷(duan)出該信(xin)(xin)(xin)(xin)號(hao)達到(dao)制(zhi)定受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)的(de)(de)最(zui)短路(lu)徑,從而不(bu)(bu)會對全(quan)網進(jin)行(xing)不(bu)(bu)分(fen)權廣(guang)播,不(bu)(bu)會對既(ji)有線路(lu)的(de)(de)輸(shu)(shu)(shu)電(dian)造成很大影響(xiang)。再然后(hou)(hou)主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)根據最(zui)佳路(lu)徑將需(xu)要傳(chuan)(chuan)輸(shu)(shu)(shu)的(de)(de)信(xin)(xin)(xin)(xin)號(hao)傳(chuan)(chuan)輸(shu)(shu)(shu)到(dao)受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)。本發(fa)明(ming)通(tong)過(guo)采用(yong)(yong)(yong)蟻群算(suan)(suan)法(fa)(fa)對主(zhu)(zhu)(zhu)控(kong)(kong)(kong)(kong)端(duan)(duan)到(dao)受(shou)控(kong)(kong)(kong)(kong)端(duan)(duan)的(de)(de)信(xin)(xin)(xin)(xin)號(hao)傳(chuan)(chuan)輸(shu)(shu)(shu)路(lu)線進(jin)行(xing)優(you)化,從而不(bu)(bu)會對全(quan)網進(jin)行(xing)不(bu)(bu)分(fen)權廣(guang)播,不(bu)(bu)會對既(ji)有線路(lu)的(de)(de)輸(shu)(shu)(shu)電(dian)造成很大影響(xiang)。
以上所(suo)述的(de)(de)(de)具(ju)體(ti)實施(shi)方(fang)式,對本(ben)發明(ming)(ming)的(de)(de)(de)目(mu)的(de)(de)(de)、技(ji)術方(fang)案和(he)(he)有(you)益效果進(jin)(jin)行了進(jin)(jin)一步詳細說明(ming)(ming),所(suo)應(ying)理解的(de)(de)(de)是,以上所(suo)述僅為本(ben)發明(ming)(ming)的(de)(de)(de)具(ju)體(ti)實施(shi)方(fang)式而(er)已,并不用于限定本(ben)發明(ming)(ming)的(de)(de)(de)保護范(fan)圍(wei),凡在本(ben)發明(ming)(ming)的(de)(de)(de)精神(shen)和(he)(he)原則(ze)之(zhi)(zhi)內,所(suo)做的(de)(de)(de)任何修改、等同替換(huan)、改進(jin)(jin)等,均應(ying)包含在本(ben)發明(ming)(ming)的(de)(de)(de)保護范(fan)圍(wei)之(zhi)(zhi)內。