201233096 六、發明說明: 【發明所屬之技術領域】 本發明為-種通訊控制方法,尤其是指一種針對嵌入式作業系統 的遠端協助服務方法。 【先前技術】 在科技發展的今天’ Μ的使用已經深人千家萬戶,成為人們生 活、工作、學習、娛樂等不成缺少的-部份,再加上互聯網的高速發 展’人們使用電腦的情形更是隨處可見1腦使財,特別是沒有多 少技術專長的用戶’經常會遇到這樣-些配置問題或使用問題,技術 支持人員或朋友、—很難通過電話進行診斷和解決^ “遠端協 助”為用戶提供了-種獲取所需幫助的_。有經驗的用戶可以利用 遠端協助”直接為自己_友和家庭❹提供幫助,並可節約成本。 其工作原理在於:遠端協助使用了終端服務技術,允許説明人員 通過遠端“終端服務”會話來提供説明。遠端協助在建立您與幫助人 員之間的連接時使用了-種簡單而安全的過程。遠端協助技術是被控 端請求已信㈣協助控綱,透過醜(局部網路或者廣域網路)連 接到被控端的《上,因此整個遠端控制所解決處理的問題是一個遠 端網路操控的過程。 已有的遠端協助技術都可以提供遠端的協助,可以服務遠端的查 看,操作等等功能’也可以協助與前端的路由器或者網路設備進行通 訊’但其顧於個人電腦或者個人電腦性能之上的終端設備,並且設 備必需安裝了魏完善的作業祕才能伽。終端設備,例如我們的 201233096 個人電腦’或者卫作站等,這樣的終端設備結構複雜,魏強大具 有複雜積體電路’高性能的多卫處理能力。終端設備上的作業系統, 例如 Windows Se而 2000、Wind〇ws χρ、wind〇ws 服3 等系列,Uriux 系統等開放式作業系統。在遠端協助安裝技術實_過程巾,其中的 被控端與協助善必需運行在終端賴並安裝了魏完善的作業系統 上。然而’在未來社會發需求下,更多的小型多功能的嵌入式產品(如 手機'電視機上盒、多媒體設備等等具有嵌入式作業系統的設備等) 將佔據大部分市場’而其中3〇%到4〇%的產品將成為網路端子設備,在 這些結構鮮,功鮮―,巾、鎌處職力,小型嵌人式作業系統 的《又備疋無法使用已有的遠端協助技術,因為這些設備在網路上使用 時’要能提供麟時就需要成為網路傳輸控制協定(Transmissi〇n C論olP論col ’以下簡稱Tcp)資料流程服務設備,就當今的網路模 型狀態,要讓網路端子設備成為網路服務設備,並能通過網路丁cp的 貧料流程雜料是錄實_,也職要其它外界的協助才能將網 路端子成為網路TCP資料流程服務設備。即為使用遠端協助技術不得 不把此類嵌人設備增加—台終端電腦,從成本上已經增加了遠端協助 成本及實用價值。同時’終端電腦上㈣料資訊將出現安全隱患因 為在透過終端電15對嵌人式設備進行協助的時候,電腦需要開放電腦 的“作柯權’這樣就會讓計算失去安全性^可見就已有的遠端協助 技術產品來完成遠端協助工作,f要付出_外龐大的人力資源與經 濟資源。 此外,已有的遠端協助技術作為被控端的設置都較為複雜,除了 201233096 需要對前端的路由器或者上網設備做 對本地許可權設置,有些產品還 設置。例如’—提供的‘‘遠端桌面,’工具,如果是想在廣域網 路上使«,除了設置本地較时村權,還需要設置前端網路連 接的路由器。這是-般用戶無法實·,孙道如何設置糊使用者 的許可權資訊,或者孙道如何蚊前由$或精_路設備。 由此可見,上述習用技術仍有諸多缺失,實非一良善之設計者, 而巫待加以改良。 項缺點’乃亟思加以改 本案發明人鑑於上述習用技術所衍生的各 良創新,舰多年苦錄騎頌究後,終於柄研發完成本件針對 嵌入式作業系統的遠端協助服務方法。 【發明内容】 本發明的目的在於规了上述賴,提供—種針對於被控端為嵌 入式作業緣’提供通舰置路由||或者稱連接設備,可使嵌入式 設備與其前_路㈣或者晴連接設備通訊從•其成為廣域網路 上的可被服務的遠端協助服務方法。 本發明為-種針對嵌人式作業系統的遠端協助服務方法,其步驟 包括: A)、初始化準備,對遠端設備的網頁瀏覽器屬性進行代理伺服器 連接的相關資訊的設置,用於與遠端嵌入式設備所連接的路由器或者 網路設備進行資料通訊,作為遠端協助服務配置的工具;對遠端協助 伺服器進行功能狀態的初始化,準備開啟遠端協助服務; 所述步驟A的初始化準備包括, 201233096 初始化遠端協助服務的步驟,對遠端協助伺服器的服務狀態進行 初始化,將其服務狀態初始化為就緒狀態;當遠端嵌入式設備與遠端 協助伺服器的連接數超過最大值時,該狀態就被修改為忙碌狀態;初 始化設備任務清單、全域變數、識別字; 初始化網頁瀏覽器的步驟,對瀏覽器的代理屬性的IP埠、轉發埠 進行配置; B)、開啟監聽網路埠,遠端協助伺服器對網路埠進行監聽等待遠 端設備的遠端協助連接請求; 所述步驟B中的網路埠包括,用於接收來自網頁瀏覽器發送來的 HTTP資料請求及與遠端嵌入設備之間建立網路通訊通道,協調控制網 頁瀏覽器發送的HTTP資料與遠端嵌入設備回饋的HTTp資料轉換; 所述步驟B的開啟監聽網路埠包括, 偵測網頁代理服務埠的步驟,通過設定本地第一埠TCP資料通訊 類型作為網頁代理服務的通訊連接埠,用於網頁瀏覽器模組中的網頁 沙J覽器與遠端協助伺服器建立TCP的通訊連結,實現二者之間的網路 資料通訊; 偵測遠端協助服務埠的步驟,通過設定本地第二埠TCP資料通訊 類型作為遠端協助服務的通訊連接埠,用於遠端嵌入式設備與遠端協 助饲服器建立TCP的請求通訊連結,回應遠端嵌入式設備的遠端協助 請求’添加設備基本狀態資訊並將其添加到設備任務清單中’實現二 者之間的簡單命令的傳送。 偵測反向主動連接通訊連接埠的步驟,設定本地第二埠TCP資料 201233096 ———— 通sfl類型作為退如協助服務處理過程中反向主動連接的通訊連接埠, 用於遠端嵌入式設備與遠端協助伺服器建立Tcp的資料交換通訊連 結,實現二者之間遠端協助過程中處理資料的交換與傳送; C) 、设備自我L貞測’遠端設備對其路由器或稱連接設備的 閘道狀態及資訊進行偵測採集; 所述步驟C的設備自我狀態偵測包括, 設備資訊伽m步驟,用於獲取設備的相峨,需要在其前端 路由器上配置的服務埠號,路由器的用戶名和密碼; 網路資訊横測的步驟’設備通過檢測設備網卡上的網路位址資 訊,判定當前設備所在的網路狀態(局部網路或者廣域網路),再通過 HTTP通訊協議,偵測其前端路由器的閘道地址,路由器型號; 初始化執行緒池的步驟,創建用於服務後期與遠端協助舰器之 間通訊所㈣的執行㈣求的執行緒池,用於任務分配使用,當有任 務請求時,程式會從執行緒池中啟動一執行緒用於任務處理當任務 結束後,再把該執行緒歸還到執行緒池中; D) '設備發_猶求,遠端設備將_採婦訊臟資料封包 通過網路向遠端協助伺服器發起協助連接請求; 所述步驟D的設備發起協助請求包括, 建立丁〇>通訊連結的步驟,設備向遠端協助伺服㈣遠端協助服 務的通訊連接蟑發起TCP的資料連接請求,等待遠端協助舰器回應 後便建立起TCP的資料通訊連結; 發送遠端協助請求的步驟,當TCP通訊連結建立完成後,設備會 201233096 向遠端發起遠端協助請求,請求伺服器對其進行遠端協助,配置其前 端路由器設備,同時,設備會攜帶其設備資訊,網路狀態資訊一起向 遠端協助伺服器進行註冊,等待遠端協助的處理; 維4 TCP通訊連結的步驟,當遠端協助伺服器與設備之間的Tcp 通訊連結建立完賴,遠端協賴服器會_地向設備發—次計數封 包’以維5蔓5亥TCP it訊連結的有效性,同時,處理二者任意一端出現 異常斷開的情況;設備會間隔檢測㈣的接收,如果連續三次沒有接 收遠端協助飼服器發送來任何資料,那麼,設備則認為該連結已經破 壞或斷開,設備關閉本端的網路連接與通訊資源,重新發起協助請求: E)、回應遠端協助請求,遠端協助伺服器獲取遠端設備請求資訊 並將其添加到自身設備註冊清單中,表明此時設備已經準備就緒,隨 後,遠端協助伺服器將該通訊連結保留並維護、等待網頁瀏覽器的請 求 > 料,同時达端協助飼服器根據設備註冊的網路狀態資訊與閘道資 訊啟動遠端協助事件; 所述步驟E的回應遠端協助請求包括, 建立TCP通訊連結的步驟,遠端協助伺服器在遠端協助服務的通 訊連接埠接收到設備的TCP資料連接請求後,便回應其請求建立起 TCP的資料通訊連結; 接收設備的遠端協助請求的步驟,在建立起的丁CP資料通訊連結 上’伺服器接收到設備的遠端協助請求,同時收到包括設備資訊與網 路狀態資訊,伺服器會將設備註冊添加到設備任務清單中,標識設備 為就緒狀態,準備處理; 201233096 、准《•发TCP通§fl連結的步驟’當遠端協助>(司服器與設備之間的Tcp 通訊連結建立完成後,遠端協助伺服器會間隔地向設備發一次計數封 包,以維護該TCP通訊連結的有效性,同時,處理二者任意一端出現 異常斷開的情況,當伺服器在向遠端設備發送計數封包時,發現遠端 設備已經斷開通訊連結或者通訊連結已經破壞,那麼,伺服器會關閉 本端的網路連接與通訊資源,同時,清除設備在設備任務清單中的資 訊。 F)、開啟網頁瀏覽器’遠端協助伺服器啟動網頁瀏覽器並連接遠 端設備閘道,同時網頁瀏覽器發送HTTP連接請求發送給遠端協助伺 服器; 所述步驟F的開啟網頁瀏覽器包括, 建立TCP通訊連結的步驟,當設備請求從設備任務清單中選取處 理時,便啟動開啟網頁瀏覽器,同時,根據設備的網路資訊中的閘道 資訊,加到網頁瀏覽器中,發起HTTP連接請求,同時網路瀏覽器向 遠端協助伺服器的網頁代理服務的通訊連接埠發起TCp的資料連接 請求並建立起TCP的資料通訊連結; 發送HTTP請求資料的步驟,網頁瀏覽器通過與遠端協助伺服器 建立好的tcp資料通訊連結,將加裁設備端路由器閘道資訊的HTTP 資訊發送給遠端協助伺服器; 接收HTTP回饋資料的步驟,當網頁瀏覽器發送完HTTp資訊後, 開始等待接收HTTP回饋資料,直到接收HTTp回饋資料或者接收超 時,網頁瀏覽器關閉它與遠端協助伺服器之間的TCP資料通訊連結; 201233096 G) 、建立資料傳輸連結’遠端協助彳司服器要求遠端设備開啟方向 主動連接,遠端設備向遠端協助伺服器發起反向主動連接請求,遠端 協助伺服器相應該請求並與遠端設備建立連接; 所述步驟G的建立資料傳輸連結包括, 建立TCP資料傳輸通訊連結的步驟,當遠端協助伺服器接收到網 頁瀏覽器的請求資料後,遠端協助伺服器會向遠端嵌入式設備發出要 求設備發起反向主動連接請求,讓設備與遠端協助伺服器之間再建立 資料傳輸連結,設備接收到遠端協助伺服器的反向主動連接請求後, 將從執行緒池中啟動一個執行緒來處理設備建立資料傳輸連結過程, 設備會向遠端協助伺服器的反向主動連接的通訊連接璋發起TCp的資 料連接請求’等待遠端協助伺服器回應後便建立起TCP的資料傳輸通 訊連結; 接收迷端協助伺服器HTTP資料的步驟,當遠端協助伺服器與遠 端嵌入式設備之間已經建立起TCP資料傳輸連結後,遠端協助伺服器 會把網頁劉覽H的HTTP資料發送給設備,設備會儲存該資料資訊, 等待與路由建立好TCP的資料連結後再轉發; 反射式路由器回饋資料的步驟,當設備接收到路由器的回 饋資料後,會把該回饋資料發送給遠端協助伺服器; H) 、轉發請求資料,遠端協助伺服器將網頁瀏覽器發送Ηττρ連 接請求轉發至遠端設備; 所述步驟Η的轉發請求資料封包括, 與路由$閘道建立TCP資料通訊連結的轉,當設備接收到遠端 201233096 協助伺服器發送來的HTTP資料請求後,解析該HTTp資料取出. 請求的目的地址,比較目的地址與設備前端路由器閘道位址是否相 同’若不同則丟棄該HTTP資料,關閉反向主動連接建立的資料通訊 連結,釋放資源退出任務,將執行緒歸還執行緒池;若相同,則設備 將從執行緒池中啟動-個執行緒來處理與路由器閘道建立Tcp資料通 訊連結過程,設備向路由器閉道的埠發起TCp的資料連接請求,該路 由器閘道回應後,建立起TCP資料通訊連結; 轉發HTTP請求資料的步驟’當設備與路由器之間的丁cp資料通_ 訊連結建立完成後’設備會將舰器發送來的HTTp資料請求進行解 析,去掉其中含有代理位址的部分再把修改後的資料發給路由器; 接收回饋的HTTP請求資料的步驟,當設備把Ηττρ資料轉發給 路由碰’觸鱗待路㈣Ηττρ資伽饋,若鱗域立的Up 資料通訊連結出現異常情、關,觀備關反向絲連接建立的 資料通訊連結,釋放退出任務,將執行轉還執行緒池; I)、設備回綱道資料,遠端設備連接到路由器或網路連接設備鲁 的閘道,並把接收_請求龍轉發給路由_閘道,隨後等待其回 饋,設備接㈣_資訊後,再把回肺訊通過與遠端協助伺服器之 間的通訊連結回傳給遠端協助伺服器; 】)轉發-X備回饋資料’遠端協助伺服器收到來自遠端設備問道 HTTP資料後再把該資料轉發至網頁瀏覽器; K)、完成遠端協助連接,在遠端協助伺服器代理下完成網頁瀏覽 器與遠端6又備之間的資料連結連接,網頁彡職器可顯示、操作遠端嵌 12 201233096 入式設備前端路由器的閘道,並透過遠端協助伺服器實現對遠端嵌入 式設備的網路可服務功能的協助配置、安裝。 相對於常見的达j而協助貫現方法,本發明的優點在於通過利用 HTTP協助代理服務技術及反向主動連接技術,使得遠端協助伺服器可 透過網路資料傳輸與交換對遠端嵌入式設備前端的路由器進行訪問、 配置,從而使得嵌入式設備成為可服務的網路端子設備,從而使得更 多的嵌入式設備很容易地成為網路中可服務的網路端子設備。與通用 的遠端協助方法相比較能夠大大地減少人力、財力的開銷,同時減少 使用者在嵌入式設備的安裝與使用中困惑與煩惱,推進、擴展了未來 嵌入設備發展的市場與前景。 【實施方式】 如圖一所示為本發明遠端服務方法基於的系統架構圖,其中遠端 協助服務的運營伺服器及網頁瀏覽器設置在本地網域中,其遠端服務 程式運行在電腦作業系統上,電腦連接於網路並獲得有效廣域網路ιρ 位址,而後需要對瀏覽器屬性配置,即配置位址、本機Ip皡、轉發淳 寻資§R。而退端協助被控端(即運行於嵌入式作業系統的嵌入式役 備)’該作業系統能提供網路連線,並能連接到廣域網路即可,無需做 其它配置。 網頁瀏覽器的功能是用於遠端協助伺服器配置遠端嵌入式設備前 端路由器或網路連接設備’是配置過程中資料發送與資料顯示的載 體。扮演的角色為遠端協助服務過程中的任務執行者,實現工具。 遠端協助伺服器的功能是用於協調資料傳輸的過程,同時也是對 請求資訊與回饋資訊的資料轉發。扮演的角色為遠端協助服務過程中 的核心控制者、任務調度者。 嵌入式設備内會嵌入遠端協助的被控程式,主要的功能是發起遠 13 201233096 端協助服務的請求,並做單一的資料轉發。扮演的角色為遠端協助服 務過程中的任務發起者、資料轉發器。 在嵌入式設備端局部網路中還設有路由器/網路連接設備(閘 道),它是網路的接入設備,可以讓連接在其下的設備與Intemet (網路) 進行網路資料的通訊。扮演的角色為遠端協助服務過程中的任務的受 控者。 本系統實現的目的是通過嵌入式遠端協助服務實現方法完成對遠 端的嵌入式設備的路由器或者網路連接設備的配置,讓遠端的嵌入式 設備能成為網路上的一個可服務設備。 參見圖二,本發明針對嵌入式作業系統的遠端協助服務方法的具 體實現步驟包括: A)、初始化準備,對遠端設備的網頁瀏覽器屬性進行代理伺服器 連接的相關資訊的設置,用於與遠端嵌入式設備所連接的路由器或者 網路設備進行資料通訊,作為遠端協助服務配置的工具;對遠端協助 飼服器進行魏狀態的減化,準賴啟遠賴助服務,圖三,它 包括: 初始化遠端協助服務的步驟,主要是初始化遠端協助饲服器的服 務狀態,(初始化為就緒狀態,當遠猶人式設備與遠端協翻服器的 連接數超過最大_,雜郷改為㈣雜。)純化設備任 務清單、全域變數、識別字。 初始化網頁觀魏務的麵,主要是賴覽㈣代理屬性進行 配置>(劉覽器属性—連接—局部網路設置—LAN代理伺服器:地址: 本機IP埠:轉發埠)。 B)、開啟監聽網路蟑,遠端協助词服器對網路谭進行監聽等待遠 端設備的遠端協助連接請求:網料包括,驗接收來自網頁 發送來的HTTP韻請求及贿额錢叙賊糊骑訊通道, =調控發送的HTTP雜與遠鑛人設伽饋的Η丁丁p 負料轉換。如圖四,它包括: 201233096 偵測網頁代理服務埠的步驟,設定本地埠(8088) TCP資料通訊 類型作為網頁代理服務的通訊連接埠,用於網頁瀏覽器模組甲的網頁 劉覽器與遠端協助伺服器建立TCP的通訊連結,實現二者之間的網路 資料通訊。 偵測遠端協助服務埠的步驟,設定本地埠(8089) TCP資料通訊 類型作為遠端協助服務的通訊連接埠’用於遠端嵌入式設備與遠端協 助伺服器建立TCP的請求通訊連結,回應遠端嵌入式設備的遠端協助201233096 VI. Description of the Invention: [Technical Field] The present invention relates to a communication control method, and more particularly to a remote assistance service method for an embedded operating system. [Prior Art] In the development of science and technology today, the use of Μ has been deeply rooted in thousands of households, becoming a part of people's life, work, study, entertainment, etc., coupled with the rapid development of the Internet. It is even more visible that 1 brain makes money, especially users who don't have much technical expertise. 'Often encountering such configuration problems or use problems, technical support staff or friends, difficult to diagnose and solve by phone ^ Assisted by providing users with the kind of help they need. Experienced users can use remote assistance to directly help their own friends and family, and save costs. The working principle is: the remote assistance uses the terminal service technology, allowing the person to pass the remote "terminal service" session To provide instructions. Remote assistance uses a simple and secure process to establish a connection between you and the helper. The remote assistance technology is the request of the host to be trusted (4) to assist the control, through the ugly (local network Or the WAN is connected to the host, so the problem solved by the entire remote control is a remote network control process. The existing remote assistance technology can provide remote assistance and can serve far. The functions of viewing, operation, etc. can also help to communicate with the router or network device at the front end. However, it depends on the terminal device on the performance of the personal computer or personal computer, and the device must be equipped with Wei’s perfect job skills. Giga. Terminal equipment, such as our 201233096 personal computer' or Weizu station, etc. Wei Qiang has a complex integrated circuit 'high-performance multi-processor processing capability. Operating systems on terminal equipment, such as Windows Se and 2000, Wind〇ws χρ, wind〇ws service 3, etc., Uriux system and other open operating systems At the far end, the installation of the technical implementation _ process towel, in which the controlled end and the assisted good must run on the terminal and install the Wei perfect operating system. However, in the future social needs, more small multi-function Embedded products (such as mobile phones 'telephone boxes, multimedia devices, etc. with embedded operating systems, etc.) will occupy most of the market' and 3 to 4% of the products will become network terminal devices. In these structures, fresh, fresh, towel, and squatting, small inlay-based operating systems are also "can't use existing remote assistance technology, because these devices can be used when they are used on the Internet." It is necessary to become a network transmission control protocol (Transmissi〇n C on olP on col 'hereinafter referred to as Tcp) data flow service equipment, in the current state of the network model, to make the network terminal set Becoming a network service device, and can pass the network Ding cp's poor material flow of miscellaneous materials is recorded _, also requires other external assistance to turn the network terminal into a network TCP data flow service device. Assisting technology has to add such embedded devices to a terminal computer, which has increased the cost and practical value of remote assistance from the cost. At the same time, the information on the terminal computer will have security risks because it is embedded in the terminal. When the human-type device is assisted, the computer needs to open the computer "for Kequan", which will make the calculation lose security. ^The existing remote assistance technology products can be used to complete the remote assistance work. Human resources and economic resources. In addition, the existing remote assistance technology is more complicated as the setting of the host. In addition to 201233096, it is necessary to set the local permission for the router or the Internet access device on the front end, and some products are also set. For example, the ‘‘Remote Desktop,’ tool provided, if you want to make a WAN on the WAN, you need to set up a router for the front-end network connection, in addition to setting the local time zone. This is a general user who can't do it, how Sun Dao sets the permission information of the paste user, or how the Sun Dao is pre-mosquito by $ or fine_road equipment. It can be seen that there are still many shortcomings in the above-mentioned conventional techniques, which is not a good designer, but the witch is to be improved. The shortcomings of the project were changed by the inventors of the present invention. In view of the various innovations derived from the above-mentioned conventional technologies, the ship has been researching and developing the remote assistance service method for the embedded operating system. SUMMARY OF THE INVENTION The object of the present invention is to provide the above-mentioned reliance on the controlled terminal for the embedded operation edge to provide a ship-to-ship route|| or a connection device, which can make the embedded device and its front_road (four) Or clear connection device communication from • it becomes a remote assistance service method that can be served on the WAN. The present invention is a remote assistance service method for an embedded operation system, and the steps thereof include: A) initial preparation, setting information about a proxy server connection of a web browser attribute of a remote device, for setting Data communication with the router or network device connected to the remote embedded device as a remote assistance service configuration tool; initializing the function status of the remote assistance server, preparing to open the remote assistance service; The initialization preparation includes, 201233096, the step of initializing the remote assistance service, initializing the service status of the remote assistance server, and initializing the service status to the ready state; and the number of connections between the remote embedded device and the remote assistance server When the maximum value is exceeded, the state is changed to a busy state; the device task list, the global variable, and the identification word are initialized; the step of initializing the web browser is performed, and the IP address and forwarding port of the proxy attribute of the browser are configured; B), After the monitoring network is turned on, the remote assistance server listens to the network and waits for the remote device. The remote end assists the connection request; the network port in the step B includes: receiving an HTTP data request sent from a web browser and establishing a network communication channel with the remote embedded device, and coordinating and controlling the web browser The sent HTTP data is converted with the HTTp data fed back by the remote embedded device; the step of opening the listening network in step B includes the step of detecting the web proxy service, and setting the local first TCP data communication type as the web proxy service The communication port is used for establishing a TCP communication link between the web page browser and the remote assistance server in the web browser module to realize network data communication between the two; detecting the remote assistance service Step, by setting a local second TCP data communication type as a communication connection port of the remote assistance service, the remote embedded device and the remote assisted feeding device establish a TCP request communication link, responding to the remote embedded device The remote assistance request 'add device basic status information and add it to the device task list' to achieve the transfer of simple commands between the two. The step of detecting the reverse active connection communication port, setting the local second TCP data 201233096 ————passing the sfl type as the communication connection of the reverse active connection in the process of assisting the service processing, for remote embedded The device and the remote assistance server establish a data exchange communication link of the Tcp to realize the exchange and transmission of the processing data during the remote assistance process between the two; C), the device self-tests the remote device to its router or The device status and information of the connected device are detected and collected. The device self-status detection in the step C includes the device information gamma step, which is used to obtain the device 的, and needs the service nickname configured on the front-end router. , the user name and password of the router; the step of the network information cross-measurement 'the device determines the network state (local network or wide area network) where the current device is located by detecting the network address information on the device network card, and then through the HTTP communication protocol , detecting the gateway address of the front-end router, the router model; the steps of initializing the thread pool, creating a post-service and remote protocol The execution of the communication between the ship (4) (4) The thread pool for the task allocation, when there is a task request, the program will start a thread from the thread pool for the task processing, when the task is over, then The thread is returned to the thread pool; D) 'the device sends _, the remote device sends the _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ The assistance request includes the steps of establishing a communication link, the device assists the servo (4) the remote assistance service communication connection, initiates a TCP data connection request, and waits for the remote assistance ship to respond to establish the TCP data. The communication link; the step of sending the remote assistance request, when the TCP communication link is established, the device will initiate a remote assistance request to the remote end in 201233096, request the server to perform remote assistance, configure its front-end router device, and at the same time, the device Will carry their device information, network status information together to the remote assistance server to register, waiting for the remote assistance processing; dimension 4 TCP communication link In the end, when the remote assistance server and the device establish a Tcp communication link, the remote coordinator will send the device to the device to count the packet to verify the validity of the TCP connection. At the same time, the abnormal disconnection occurs at either end of the two; the device will detect the interval (4), if the remote assisted feeder does not receive any data for three consecutive times, then the device considers that the link has been broken or broken. On, the device closes the local network connection and communication resources, and re-initiates the assistance request: E), responds to the remote assistance request, and the remote assistance server obtains the remote device request information and adds it to the device registration list, indicating At this point, the device is ready, and then the remote assistance server retains and maintains the communication link, waits for a request from the web browser, and at the same time assists the server to register the network status information and gateway according to the device. The information initiates the remote assistance event; the response to the remote assistance request in step E includes the step of establishing a TCP communication link, and the remote assistance server is far away After receiving the TCP data connection request from the device, the communication link of the assistance service responds to the request to establish a TCP data communication link; the step of receiving the remote assistance request of the device, on the established D-CP data communication link, the servo Receives the remote assistance request from the device, and receives the device information and network status information. The server adds the device registration to the device task list, and identifies the device as ready. It is ready for processing. 201233096 TCP § ff link step 'When Remote Assistance> (When the Tcp communication link between the server and the device is established, the remote assistance server sends a count packet to the device at intervals to maintain the TCP communication. The validity of the link, at the same time, the abnormal disconnection occurs at either end of the two. When the server sends a count packet to the remote device, it finds that the remote device has disconnected the communication link or the communication link has been destroyed. Then, the servo The device will close the local network connection and communication resources, and at the same time, clear the information of the device in the device task list. F), open the web browser 'the remote assistance server starts the web browser and connects to the remote device gateway, and the web browser sends an HTTP connection request to the remote assistance server; the step F opens the web browser Including, the step of establishing a TCP communication link, when the device requests to select processing from the device task list, the web browser is started, and the gateway information is added to the web browser according to the gateway information in the network information of the device, and is initiated. HTTP connection request, at the same time, the web browser sends a communication connection request to the web proxy service of the remote assistance server, initiates a data connection request of the TCP and establishes a data communication link of the TCP; the step of sending the HTTP request data, the web browser passes the The remote assistance server establishes a good tcp data communication link, and sends the HTTP information of the gateway information of the device end router to the remote assistance server; the step of receiving the HTTP feedback data, after the web browser sends the HTTp information, Start waiting to receive HTTP feedback data until receiving HTTp feedback data or receiving timeout, web browser Close the TCP data communication link between it and the remote assistance server; 201233096 G), establish a data transmission link. The remote assistance server requires the remote device to open the active connection, and the remote device assists the servo to the remote end. The device initiates a reverse active connection request, and the remote assistance server responds to the request and establishes a connection with the remote device. The step of establishing the data transmission link includes the step of establishing a TCP data transmission communication link, and the remote assistance server After receiving the request data of the web browser, the remote assistance server sends a request to the remote embedded device to initiate a reverse active connection request, so that the device and the remote assistance server establish a data transmission link, and the device receives the data. After the remote active assistance request from the remote assistance server is initiated, a thread is started from the thread pool to process the device to establish a data transmission connection process, and the device will assist the remote communication connection of the server to the remote end. Initiate TCP connection data connection request 'wait for remote assistance server response to establish TCP data transmission communication link Receiving the step of assisting the server HTTP data, when the TCP data transmission link has been established between the remote assistance server and the remote embedded device, the remote assistance server will send the HTTP data of the web page H For the device, the device stores the data information, waits for the TCP connection with the route to be established, and then forwards the data; the step of the reflective router feeding back the data, when the device receives the feedback information of the router, the device sends the feedback data to the remote device. Assisting the server; H), forwarding the request data, and the remote assistance server forwards the Ηττρ connection request to the remote device by the web browser; the forwarding request data seal of the step 包括 includes establishing TCP data communication with the route $ gateway After the connection receives the HTTP data request sent by the remote server 201233096 to assist the server, the HTTp data is parsed. The destination address of the request is compared, and the destination address is compared with the gateway address of the device front-end router. Discard the HTTP data, close the data communication link established by the reverse active connection, and release the resource to exit the task. The thread is returned to the thread pool; if the same, the device will start a thread from the thread pool to process the Tcp data communication connection process with the router gateway, and the device initiates the TCP connection request to the router. After the router gateway responds, the TCP data communication link is established; the step of forwarding the HTTP request data is 'When the device and the router are connected to the data link, the device will send the HTTp data from the ship. The request is parsed, the part containing the proxy address is removed, and the modified data is sent to the router; the step of receiving the feedback HTTP request data, when the device forwards the Ηττρ data to the route, touches the scale to wait for the road (four) Ηττρ gamma feed, If there is an abnormal situation in the Up data communication link of the scale domain, the data communication link established by the reverse wire connection is released, and the exit task is released, and the execution is transferred back to the executive pool; I), the equipment back to the road data, far The end device is connected to the gateway of the router or the network connection device, and forwards the receiving_request dragon to the routing_gateway, and then waits for its feedback. After the (4)_ information, the back-to-back communication is transmitted back to the remote assistance server through the communication link with the remote assistance server; 】) Forwarding-X backup feedback data 'The remote assistance server receives the response from After the remote device asks for the HTTP data, the data is forwarded to the web browser; K), the remote assistance connection is completed, and the data link between the web browser and the remote device 6 is completed under the remote assistance server proxy. Connection, the web server can display and operate the gateway of the front-end router of the 201233096 incoming device, and assist the configuration and installation of the network serviceable function of the remote embedded device through the remote assistance server. The advantage of the present invention is that the remote assistance server can transmit and exchange remote data through network data transmission and exchange by using HTTP assisted proxy service technology and reverse active connection technology. The router at the front end of the device is accessed and configured, making the embedded device a serviceable network terminal device, making it easier for more embedded devices to become serviceable network terminal devices in the network. Compared with the universal remote assistance method, it can greatly reduce the labor and financial expenses, and reduce the confusion and troubles of users in the installation and use of embedded devices, and promote and expand the market and prospects of future embedded device development. [Embodiment] FIG. 1 is a system architecture diagram based on the remote service method of the present invention, wherein an operation server and a web browser of the remote assistance service are set in a local domain, and a remote service program runs on the computer. On the operating system, the computer is connected to the network and obtains an effective WAN address, and then needs to be configured for the browser attribute, ie, the configuration address, the local IP address, the forwarding 淳 淳R. The retreat assists the host (that is, the embedded server running in the embedded operating system). The operating system can provide network connection and can connect to the WAN without any other configuration. The function of the web browser is for the remote assistance server to configure the remote embedded device front-end router or network connection device' to be the carrier for data transmission and data display during the configuration process. The role played is the task performer in the remote assistance service process, implementing tools. The function of the remote assistance server is used to coordinate the process of data transmission, and is also the data forwarding of request information and feedback information. The role played is the core controller and task scheduler in the remote assistance service process. Embedded devices are embedded in the embedded device. The main function is to initiate a request for assistance services and to perform a single data forwarding. The role played is the task initiator and data forwarder in the remote assistance service process. There is also a router/network connection device (gateway) in the local network of the embedded device. It is a network access device that allows the device connected to it to communicate with the Internet. Communication. The role played is the remote control of the task of the task in the service process. The purpose of the system implementation is to complete the configuration of the router or network connection device of the remote embedded device through the embedded remote assistance service implementation method, so that the remote embedded device can become a serviceable device on the network. Referring to FIG. 2, the specific implementation steps of the remote assistance service method for the embedded operating system include: A) initial preparation, setting information about the proxy server connection of the web browser attribute of the remote device, and using Data communication with the router or network device connected to the remote embedded device, as a tool for remote assistance service configuration; for the remote assisted feeding device to reduce the Wei state, it is necessary to rely on Kaiyuan help service, Figure 3 It includes: The step of initializing the remote assistance service, mainly to initialize the service status of the remote assisted feeding device, (initialization is ready state, when the connection between the far-threshold device and the remote co-transfer device exceeds the maximum _ , the chowder is changed to (four) miscellaneous.) Purification equipment task list, global variables, identification words. Initialize the web page view of Wei Wei, mainly to look at (4) proxy properties for configuration > (viewer properties - connection - local network settings - LAN proxy server: address: native IP 埠: forwarding 埠). B), open the listening network, the remote assistance word server listens to the network tan waiting for the remote device's remote assistance connection request: the network material includes, accepts the HTTP rhyme request and bribe money sent from the webpage. The thief pastes the channel, = regulates the transmission of the HTTP miscellaneous and the far-mine personnel set the gamma-fed Η 丁 p negative material conversion. As shown in Figure 4, it includes: 201233096 Steps to detect the web proxy service, set the local port (8088) TCP data communication type as the communication port of the web proxy service, and the web browser for the web browser module A The remote assistance server establishes a TCP communication link to implement network data communication between the two. The step of detecting the remote assistance service ,, setting the local 埠 (8089) TCP data communication type as the communication connection of the remote assistance service 埠 'for the remote embedded device and the remote assistance server to establish a TCP request communication link, Respond to remote assistance from remote embedded devices
請求,添加設備基本狀態資訊並將其添加到設備任務清單中,實現二 者之間的簡單命令的傳送。 4貞測反向主動連接通訊連接琿的步驟,設定本地蟑(8099) TCP 資料通§fl類型作為遠端協助服務處理過程中反向主動連接的通訊連接 埠,用於遠端嵌入式設備與遠端協助伺服器建立TCp的資料交換通訊 連結,貫現二者之間遠端協助過程中處理資料的交換與傳送。 C)、設備自我狀態偵測’遠端設備對其路由器或網路連接設備的 閘道狀態及資訊進行偵測採集。如圖五,它包括: ”設備資訊躺的步驟’獲取設備的序列編號,需要在其前端路由 器上配置的服務埠號,路由器的使用者和密碼。 網路資訊偵測的步驟,設備通過檢測設備網卡上的網路位址資 訊,判定當前設備所在_路狀態(局部麟或者廣域晴),再通過 HTTP通訊協議,_其前端路由器的閘道地址,路由器形型號。 初始化執行緒池的步驟,創建遠端嵌入式設備端的執行,因 為在裁剪後的嵌人式Linux系統下,系統f源的制以及創建和銷毁所 需的開銷都很大,而且使用的記憶體空間也有限,所以,預先創建— 執行緒池來服務後期與遠端協助伺服器之間通訊所關的大量執行 ^求。預設情況下執行緒池中開啟3()執行緒,用於任務分配使用,春 有任務請求時,程式會從執行緒池中啟動—執行_於任務處理^ 任務結束後,再把該執行緒歸還職行緒池中^如果,在任務 緒池請求時,執行緒池發現已經沒有多的_執行緒分配時: 15 201233096 緒池會動態地向創建ίο個新的執行緒加入執行緒池供任務處理使用。_ D) '設備發起協助請求,遠端設備將偵測採集資訊形成資料封包 通過網路向遠端協助伺服器發起協助連接請求。如圖六,它包括: 建立TCP通訊連結的步驟,設備會向遠種助舰^的遠端協助 服務的通訊連接埠(8089),發起TCP的資料連接請求,等待遠端協助 伺服器®應後便建立起TCP的資料通訊連結。 發送遠端協助請求的步驟,等待TCP通訊連結建立完成後,設備 會向遠端發起遠端協助請求,請求伺服器對其進行遠端協助,配置其 前端路由器設備,同時,設備會後攜帶其設備資訊,網路狀態資訊一 起向遠端協助伺服器進行註冊,等待遠端協助的處理。 、 參 維護TCP通連結的步驟,當遠端協助伺服器與設備之間的TCp 通訊連結建立完成後,遠端協助伺服器會每間隔5秒向設備發一次計 數封包,以維護該TCP通訊連結的有效性,同時,處理二者任意一端 出現異常斷開的情況。設備會每5秒檢測資料的接收,如果連續三次 即15秒沒有接收遠端協助伺服器發送來任何資料’那麼,設備則認為 該連結已經破壞或賴’設備賴本端的舰連接與通贈源,重新 發起協助請求。 E)、回應遠端協助請求,遠端協助伺服器獲取遠端設備請求資訊 並將其添加到自身設備註冊清單中,表明此時設備已經準備就緒,隨籲 後,遠端協助伺服器將該通訊連結保留並維護、等待網頁瀏覽器的請 求-貝料,同時遠端協助伺服器根據設備註冊的網路狀態資訊與閘道資 訊啟動遠端協助事件。如圖七,它包括: 建立tcp ϋΐίΐ連結的步,驟’遠端協助伺服器在遠端協助服務的通 Λ連接埠⑽89) ’接收到設備的TCP資料連接請求後,便回應其請求 建立起TCP的資料通訊連結。 接收設備的遠端協助請示:在建立起的Tcp資料通訊連結上,伺 服器可以接收到設備的遠端協助請求,同時,包括設備資訊與網路狀 態資訊。舰时將設備珊添加到設備任務清單巾,標識設備為就 201233096 • 緒狀態,準備處理。 維護TCP通訊連結的步驟,當遠端協助伺服器與設備之間的TCp 通訊連結建立完成後,遠端協助伺服器會每間隔5秒向設備發一次計 數封包,以維護該TCP通訊連結的有效性,同時,處理二者任意一端 出現異常賴的n如果,舰!I在向遠端設備發送計數封包時, 發現遠端設備已經斷開通訊連結或者通訊連結已經破壞,那麼,伺服 器會關閉本端的網路連接與通訊資源,同時,清除設備在設備任務清 單中的資訊。 Φ F )、開啟網頁瀏覽器,遠端協助伺服器啟動網頁瀏覽器並連接遠 端設備閘道’網頁劉覽器發送HTTP連接請求發送給遠端協助飼服器。 如圖八,它包括: 建立TCP通訊連結的步驟,當設備請求從設備任務清單中選取處 理時,便啟動開啟網頁劇覽器,同時,會根據設備的網路資訊中的閘 道資訊,加裁到網頁瀏覽器中,發起HTTP連接請求。由於,在初始 化過程中已經配置了網頁劇覽器的代理屬性,所以,網路劉覽器會向 遠端協助伺服器的網頁代理服務的通訊連接埠(8〇88),發起丁cp的資 料連接請求並建立起TCP的資料通訊連結。 • 發送HTTP請求資料的步驟,網頁職器通過與遠端協助伺服器 建立好的TCP資料通訊連結,將加裁設備端路由器閘道資訊的Ηττρ 資訊發送給遠端協助伺服器。 接收HTTP回饋資料的步驟,當網頁瀏覽器發送完Ηττρ資訊後, 就開始等待接收HTTP回饋資料,直到接收Ηττρ回饋資料或者接收 超時,網頁瀏覽器才關閉它與遠端協助伺服器之間的TCP資料通气 結。 ° G)、建立=貝料傳輸連結,退端協助伺服器要求遠端設備開啟方向 主動連接’遠端設備向遠端協助伺服器發起反向主動連接請求,遠端 協助伺服器相應該請求與遠端設備建立連接。如圖九,它包括: 建立TCP資料傳輸通訊連結的步驟,當遠端協助伺服器接收到網 201233096 頁瀏覽器的HTTP請求資料後’遠端協助伺服器會向遠端嵌入式設備. 發出要求設備發起反向主動連接請求,讓設備與遠端協助伺服器之間 再建立資料傳輸連結《設備接收到遠端協助伺服器的反向主動連接請 求後,將從執行緒池中啟動一個執行緒來處理設備建立資料傳輸連結 過程,設備會向遠端協助伺服器的反向主動連接的通訊連接埠(8〇99), 發起TCP的資料連接請求,等待遠端協助伺服器回應後便建立起TCp 的資料傳輸通訊連結。 接收遠端協助伺服器HTTP資料的步驟,當遠端協助伺服器與遠 鳊敗入式设備之間已經建立起TCP資料傳輸連結後,遠端協助伺服器 會把網頁職器的HTTP資料發送給設備,設備會存儲該資料資訊,· 等待與路由建立好TCP的資料連結後再轉發。 反射式路由器回饋資料的步驟,當設備接收到路由器的Ηττρ回 饋資料後,會把該回饋資料發送給遠端協助伺服器。 H)、轉發β青求資料,遠端協助>(司服器將網頁劉覽器發送Ηττρ連 接請求轉發至遠端設備。如圖十,它包括: 與路由II閘道建立TCP㈣通訊連結的步驟,當設備接收到遠端 協助舰H發絲的HTTP資㈣求後,#觸HTTp f料進行解析, 取出HTTP請求的目的地址,比較目的地址與設備前端路由器問道位 址是否相同’如果’不同則丢棄該Ηττρ資料,關閉反向主動連接建馨 立的資料軌連結’槪魏退纽務,職行鱗還執行緒池。如 果’相同,則設備將從執行緒池中啟動一個執行緒來處理與路由器閘 道建立TCP㈣通訊連結過程,設備向路㈣閘道的8G蟑發起 的資料連接請求,該路由n閘道回應後,建立起TCp資料通訊連結。 轉發HTTP請求資料的步驟’當設備與路由器之間的Tcp資&通 訊連結建立完成後,設備會將伺服器發送來的ΗΓΓρ資料請求進行= 析,去掉其中含有代理位址的部分再把修改後的資料發給路由器。 接收回饋的HTTP請求資料的步驟,當設備把Ηττρ資料轉發终 路由器後’便開始等待路由的HTTP f料回饋。如果,與路由建立: 201233096 TCP資料通訊連結出現異常中斷’關閉,則設備關閉反向主動連接建 立的資料通訊連結,釋放資源退出任務,將執行緒歸還執行緒池。 I) 、設備回_道資料,遠端設備連接到路由器或網路連接設備 的閘道,並把接㈣的請求資料轉發給路由㈣閘道,隨後等待其回 饋’設備接㈣回饋資崎,再把訊通過與遠端協助概器之 間的通訊連結回傳給遠端協助词服器。 W它包括,當設備在路由與設備之間的資料通訊連結上接收到路由 器的HTTP回饋資料後,設備通過遠端協助瓶器與設備之間建立的 反向主動連接資料傳輸通訊連結,把HTTP回饋資料發送給遠端協助 伺服器。 J) 、轉發設備回饋資料,遠端協助伺服器收到來自遠端設備問道 HTTP資料後再把該資料轉發至網頁瀏覽器; 匕包括,遠端協助伺服器在遠端協助伺服器與設備之間建立的反 向主動連接資㈣輸通顺結上,接㈣設備發 Ηττρ回饋資料 後’遠端協助舰ϋ再透職_職建立的Tcp㈣通訊連結將 HTTP回饋資料轉發給網頁瀏覽器。 K) 、元成遠^協助連接,遠端協助伺服器代理下完成網頁劉覽器 • 與遠端設備之_資料連結連接,網·覽器可顯示、操作遠端嵌入 式設備前端路由⑽閘道,並透過賴協喃服器實賴遠端嵌入式 設備的網路可服務功能的協助配置'安裝。 匕包括,當網頁劇覽器接收到遠端協助伺服器發送來的HTTp回 饋資料後’網頁/劉覽器就可以將回饋的資料資訊進行顯示,操作,配 置,從而完成遠端協助連接,關閉網頁瀏覽器,關閉網路連接連結, 清除設備任務清單,釋放資源,設備端銷毀執行緒池。 關於實現技術的一些說明 1、HTTP代理服務 本地網域中遠端協助服務的營運伺服器及網頁劉覽器設置在根據 HTTP網路通訊協定’開啟HTTP的服務’實現對http資料資訊的接 201233096 收、解析再轉發至HTTP資料真正要到達的目的地。通過傳輸控制協. 定/網路協定(Transmission Control Pr〇t〇c〇i/internet prot〇c〇1, IP/TCP)協定,利用承接口(Socket)網路通訊通訊端,實現http資 料通訊的一種技術方法。 ' 在本發明方法中’遠端協助伺服器有用到HTTP代理服務技術, 實現遠端網路連接設備的配置。 2、執行緒池 執行緒池就是當用同步標記方法或代碼塊時,一個執行緒進入代 碼塊執行,然後其餘執行緒都要在池中等待。優點如下: 1 '縮短使用程式的回應時間。因為在執行緒池中執行緒處於等待鲁 分配任務狀態(只要沒有超過執行緒池的最大上限),無需建立執行緒。 2、 不必維護和維護生存週期短暫的執行緒,不用在建立時為其分 配資源,在其執行完任務之後釋放資源。 3、 執行緒池會根據當前系統特性對池内的執行緒實行優化處理 -在本發明方法中’遠端敗入式設備的程式中有使用到執行緒池的 技術’原因是為了減少嵌入式系統的資源開銷,以及程式運行的穩定 性,同時,遠端協助伺服器與遠端路由器/網路連接設備的閘道通訊, 需要建立多條的網路連接,有些連接需要保持連接狀態,也不能重用。 3、反向主動連接請求 0 在遠端協助過程中,遠端協助伺服器在與遠端設備進行Ηττρ資 料通訊時,需要建立紐的網路資料連接,有些連接需要保持連接狀 態’也不能重用,然後,遠端協純㈣不能直接主動地向遠端嵌入 j設備發起連接,因為’遠端嵌入式設備前端有路由器或者網路連接 設備,路由器都有網路位址轉譯器(NAT,Netw〇rkAddressT_f_) 力月b會阻止外來的主動連接請求,這樣,遠端協助伺服器就不能與 遠端嵌入式設備建立連接了 ’此時,就需要反向主動連接請求,讓遠 端嵌入式設備主動向遠端協助設備發起新的網路連接,遠端協助伺服 益位置廣域網路上,是可以與遠端嵌人式設備建立連接,所以,遠端 20 201233096 協助伺服器就能與遠端嵌入式設備建立多條連接,完成遠端協助的傳 輸。 綜上所述,通過採用本發明遠端協助方法利用HTTP協助代理服 務技術及反向主動連接技術,使得遠端協助伺服器可透過網路資料傳 輸與交換對遠端嵌入式設備前端的路由器進行訪問、配置,從而使得 嵌入式没備成為可服務的網路端子設備。與通用的遠端協助方法相比 較具有以下優點: 卜不受設備作業系統的平臺限制,可以運行於各種嵌入式作業系 統。 2、 使用簡單’無需安裝,無需g&置,可獨立運行,可板入使用。 3、 f源消耗少,無需大量的記憶體資源,也毋需高效能的cpu處 理能力,只要有網路連接功能即可。 所帶來的積極效果包括: 1、 減少服務安裝成本,減輕人力,物力的開銷。 2、 降低生產價值。 3、 適用領域廣泛。如:手機設備,家用設備,多媒體設備等等。 【圖式簡單說明】 圖1為本發明的系統架構圖: 圖2為本發明的方法流程圖; 圖3為本發明步驟a的具體方法流程圖; 圖4為本發明步驟b的具體方法流程圊; 圖5為本發明步驟c的具體方法流程圖; 圖6為本發明步驟〇的具體方法流程圖; 圖7為本發明步驟e的具體方法流程圖; 圖8為本發明步驟f的具體方法流程圖; 圖9為本發明步驟G的具體方法流程圖; 圖10為本發明步驟Η的具體方法流程圖; 21 201233096 【主要元件符號說明】Request, add device basic status information and add it to the device task list to enable the transfer of simple commands between the two. 4 贞 反向 反向 反向 反向 主动 主动 反向 反向 反向 反向 反向 反向 反向 反向 反向 反向 反向 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 The remote assistance server establishes a data exchange communication link of the TCp, and realizes the exchange and transmission of processing data during the remote assistance process between the two. C), device self-state detection 'The remote device detects and collects the gateway status and information of its router or network connected device. As shown in Figure 5, it includes: "Steps for device information lying" to obtain the serial number of the device, the service nickname required on the front-end router, the user and password of the router. The steps of network information detection, the device passes the detection The network address information on the device network card determines the status of the current device (local lining or wide-area clear), and then through the HTTP communication protocol, _ the gateway address of the front-end router, the router-shaped model. Initializing the crypto pool Steps, create the execution of the remote embedded device, because under the embedded embedded Linux system, the system f source system and the overhead required to create and destroy are very large, and the memory space used is also limited, so , pre-created - the crypto pool to serve a large number of executions between the post-end and remote-assisted server communication. In the default case, the executor pool opens the 3 () thread for task assignment, spring has When the task is requested, the program will start from the thread pool - execute _ after the task processing ^ after the task is finished, then return the thread to the job pool. When requesting the pool, the thread pool discovery has not been much _executor allocation: 15 201233096 The pool will dynamically add a new thread to the thread pool for task processing._ D) 'Device initiated To assist the request, the remote device will detect the collected information and form a data packet to initiate a request for assistance to the remote assistance server through the network. As shown in FIG. 6, it includes: a step of establishing a TCP communication link, and the device will send the remote support ship The remote assistance service communication port (8089) initiates a TCP data connection request and waits for the remote assistance server to establish a TCP data communication link. The remote assistance request is sent, waiting for the TCP communication link to be established. After the device is complete, the device will initiate a remote assistance request to the remote end, request the server to perform remote assistance, configure its front-end router device, and at the same time, the device will carry its device information, and the network status information will assist the server to the remote end. The device registers and waits for the remote assistance to process. The steps of maintaining the TCP connection are used to assist the TCp communication between the server and the device. After the node is established, the remote assistance server sends a counting packet to the device every 5 seconds to maintain the validity of the TCP communication link, and at the same time, the abnormal disconnection occurs at either end of the device. Secondly, the detection of the data is received. If the remote assistance server sends no data for three consecutive times, that is, 15 seconds, the device thinks that the connection has been destroyed or relies on the device connection and the source of the source, and re-initiates the assistance. E), responding to the remote assistance request, the remote assistance server obtains the remote device request information and adds it to the device registration list, indicating that the device is ready at this time, and the remote assistance server The communication link is retained and maintained, waiting for a request from the web browser, and the remote assistance server initiates a remote assistance event based on the network status information registered with the device and the gateway information. As shown in Figure 7, it includes: Steps to establish a tcp ϋΐ ΐ link, the 'remote assistance server in the remote assistance service's overnight connection 10 (10) 89) 'After receiving the device's TCP data connection request, it responds to its request to establish TCP data communication link. The remote assistance request of the receiving device: On the established Tcp data communication link, the server can receive the remote assistance request of the device, and includes device information and network status information. When the ship is loaded, the device is added to the equipment task list towel, and the identification device is ready for processing according to the status of 201233096. The step of maintaining the TCP communication link, after the remote assistance server and the device establish the TCp communication link, the remote assistance server sends a counting packet to the device every 5 seconds to maintain the validity of the TCP communication link. Sex, at the same time, if there is an abnormality at either end of the two, if the ship! I sends a count packet to the remote device, it finds that the remote device has disconnected the communication link or the communication link has been destroyed, then the server will shut down. The local network connection and communication resources, at the same time, clear the information of the device in the device task list. Φ F ), open the web browser, the remote assisted server starts the web browser and connects to the remote device gateway. The web browser sends an HTTP connection request to the remote assisted feeding device. As shown in FIG. 8, it includes: a step of establishing a TCP communication link, when the device requests to select a process from the device task list, the page browser is started, and the gateway information is added according to the device information in the network information. Cut into a web browser and initiate an HTTP connection request. Since the proxy attribute of the web browser has been configured during the initialization process, the network browser will send a communication link to the web proxy service of the remote assistance server (8〇88), and initiate the data of the cp cp. Connect the request and establish a TCP data communication link. • The step of sending the HTTP request data, the web server sends the Ηττρ information of the gateway information of the device end router to the remote assistance server through the TCP data communication link established with the remote assistance server. After receiving the HTTP feedback data, when the web browser sends the Ηττρ information, it waits to receive the HTTP feedback data until the Ηττρ feedback data is received or the reception timeout, and the web browser closes between the remote assistance server and the remote assistance server. TCP data ventilation knot. ° G), establish = batten transmission link, the back-end assistance server requires the remote device to open the direction to actively connect the remote device to the remote assistance server to initiate a reverse active connection request, the remote assistance server corresponding to the request and The remote device establishes a connection. As shown in FIG. 9, it includes: a step of establishing a TCP data transmission communication link, and the remote assistance server sends a request to the remote embedded device after the remote assistance server receives the HTTP request data of the browser of the 201233096 page. The device initiates a reverse active connection request, and then establishes a data transmission connection between the device and the remote assistance server. After the device receives the reverse active connection request from the remote assistance server, a thread is started from the thread pool. To process the device to establish a data transmission link process, the device will assist the server's reverse active connection communication port (8〇99) to initiate a TCP data connection request, and wait for the remote assistance server to respond to the establishment. TCp's data transmission communication link. The step of receiving the HTTP data of the remote assistance server, when the TCP data transmission link has been established between the remote assistance server and the remote access device, the remote assistance server sends the HTTP data of the web server For the device, the device stores the data information, and waits for the TCP connection to be established after the route is established. The step of the reflective router feeding back the data, after the device receives the Ηττρ feedback data of the router, the feedback data is sent to the remote assistance server. H), forward β Qing seeking data, remote assistance > (the server sends the web browser to send the Ηττρ connection request to the remote device. As shown in Figure 10, it includes: Establishing TCP (4) communication link with the route II gateway Step, when the device receives the HTTP resource of the remote assistance ship H hair (four), the #TTTTp f material is parsed, the destination address of the HTTP request is taken out, and the comparison destination address is the same as the device front end router asking address is the same. 'Different then discard the Ηττρ data, close the reverse active connection Jianxin Li's data track link' 槪 Wei return to the new business, the job line scale also executes the pool. If 'the same, the device will start from the thread pool The thread handles the TCP (4) communication connection process with the router gateway, and the device initiates a data connection request to the 8G port of the road (four) gateway. After the route n gateway responds, the TCp data communication link is established. Steps of forwarding the HTTP request data 'When the Tcp resource & communication link between the device and the router is established, the device will analyze the data request sent by the server and remove the proxy address. Part of the modified data is sent to the router. The step of receiving the feedback HTTP request data, when the device forwards the Ηττρ data to the final router, it starts to wait for the HTTP f-feedback of the route. If, with the route establishment: 201233096 TCP data communication If the link is abnormally interrupted, the device closes the data communication link established by the reverse active connection, releases the resource and exits the task, and returns the thread to the thread pool. I), the device returns the data, and the remote device connects to the router or network. The road connects the gate of the equipment, and forwards the request data of the connection (4) to the routing (4) gateway, and then waits for its feedback, the equipment is connected (4), and the communication is transmitted back to the remote assistance device. Give the remote assistance word server. W includes, after the device receives the HTTP feedback data of the router on the data communication link between the route and the device, the device transmits the communication link through the reverse active connection data established between the remote assistance bottle and the device, and sends the HTTP The feedback data is sent to the remote assistance server. J), forwarding device feedback data, the remote assistance server receives the HTTP data from the remote device and then forwards the data to the web browser; 匕 includes, the remote assistance server assists the server and the device at the remote end The reverse active connection is established between the four (4) transmissions, and the (4) equipment sends the Ηττρ feedback data, and the remote assistance ship's Tcp (four) communication link forwards the HTTP feedback data to the web browser. K), Yuan Chengyuan ^ assisted connection, remote assisted server agent to complete the web browser • Connected with the remote device _ data link, the network browser can display and operate the remote embedded device front-end routing (10) gate The road, and through the Lai Xie Maker, rely on the network service function of the remote embedded device to configure 'installation.匕 Including, when the web browser receives the HTTp feedback data sent by the remote assistance server, the webpage/viewer can display, operate, and configure the feedback information to complete the remote assistance connection and close. The web browser closes the network connection link, clears the device task list, releases the resources, and the device side destroys the thread pool. Some explanations about the implementation technology 1. HTTP proxy service The local server's remote assistance service's operation server and web browser are set up to access the http data information according to the HTTP network protocol 'open HTTP service' 201233096 Receive, parse and then forward to the destination where the HTTP data really needs to arrive. Through the Transmission Control Protocol/Network Protocol (Transmission Control Pr〇t〇c〇i/internet prot〇c〇1, IP/TCP) protocol, the Socket network communication communication terminal is used to realize http data communication. a technical method. In the method of the present invention, the remote assistance server uses the HTTP proxy service technology to implement the configuration of the remote network connection device. 2, the thread pool The thread pool is when using the synchronization mark method or code block, a thread enters the code block execution, and then the rest of the thread must wait in the pool. The advantages are as follows: 1 'Short the response time of the application. Because the thread is waiting for the task to be assigned in the thread pool (as long as the maximum limit of the thread pool is not exceeded), there is no need to establish a thread. 2. It is not necessary to maintain and maintain a thread with a short life cycle. It does not need to allocate resources for it at the time of establishment, and release resources after it performs the task. 3. The thread pool will optimize the thread in the pool according to the current system characteristics - in the method of the present invention, the technology of the thread pool is used in the program of the remotely defeated device. The reason is to reduce the embedded system. The resource overhead and the stability of the program operation. At the same time, the remote assistance server communicates with the gateway of the remote router/network connection device. It is necessary to establish multiple network connections. Some connections need to be connected and cannot be connected. Reuse. 3. Reverse active connection request 0 In the remote assistance process, the remote assistance server needs to establish a network data connection when the Ηττρ data communication is performed with the remote device. Some connections need to maintain the connection status' and cannot be reused. Then, the remote co-pure (4) can not directly initiate the connection to the remote embedded j device, because the remote embedded device has a router or network connection device, and the router has a network address translator (NAT, Netw). 〇rkAddressT_f_) Force Month b will block incoming active connection requests, so the remote assistance server will not be able to establish a connection with the remote embedded device. At this point, a reverse active connection request is required to allow the remote embedded device to Proactively initiate a new network connection to the remote assistance device, and the remote assistance server can establish a connection with the remote embedded device on the wide area network. Therefore, the remote 20 201233096 assists the server to be embedded with the remote end. The device establishes multiple connections to complete the remote assistance transmission. In summary, by using the remote assistance method of the present invention, the HTTP assisted proxy service technology and the reverse active connection technology are used, so that the remote assist server can perform network data transmission and exchange on the router of the remote embedded device front end. Access, configuration, so that the embedded is not ready to become a service network terminal device. Compared with the universal remote assistance method, it has the following advantages: It is not limited by the platform of the equipment operating system and can be operated on various embedded operating systems. 2, easy to use 'No need to install, no g & set, can be run independently, can be used. 3. The f source consumes less, does not require a large amount of memory resources, and does not require high-performance cpu processing capability, as long as there is a network connection function. The positive effects brought by: 1. Reduce the cost of service installation and reduce the manpower and material resources. 2. Reduce production value. 3. Wide range of applications. Such as: mobile devices, home devices, multimedia devices, and so on. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 is a system architecture diagram of the present invention: FIG. 2 is a flowchart of a method of the present invention; FIG. 3 is a flowchart of a specific method of step a of the present invention; Figure 5 is a flow chart of a specific method of the step c of the present invention; Figure 6 is a flow chart of a specific method of the step ; of the present invention; Figure 7 is a flowchart of a specific method of the step e of the present invention; FIG. 9 is a flow chart of a specific method of step G of the present invention; FIG. 10 is a flowchart of a specific method of step ; of the present invention; 21 201233096 [Description of main component symbols]