TW201509160A - System and method of controlling network connection - Google Patents

System and method of controlling network connection Download PDF

Info

Publication number
TW201509160A
TW201509160A TW102130462A TW102130462A TW201509160A TW 201509160 A TW201509160 A TW 201509160A TW 102130462 A TW102130462 A TW 102130462A TW 102130462 A TW102130462 A TW 102130462A TW 201509160 A TW201509160 A TW 201509160A
Authority
TW
Taiwan
Prior art keywords
electronic device
online
network
module
connection
Prior art date
Application number
TW102130462A
Other languages
Chinese (zh)
Inventor
Jui-Lung Lin
zhen-hong Wu
Kuo-Yuan Chang
Original Assignee
Hon Hai Prec Ind Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Hon Hai Prec Ind Co Ltd filed Critical Hon Hai Prec Ind Co Ltd
Priority to TW102130462A priority Critical patent/TW201509160A/en
Publication of TW201509160A publication Critical patent/TW201509160A/en

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a system of controlling network connection. When a first electronic device requests to connect to a second electronic device, detecting whether a NAT equipment corresponding to the second electronic device is normal. When the NAT equipment is normal, the first electronic device connects the second electronic device by the NAT equipment. When the first electronic device doesn't request for the network connection to the second electronic device, determining whether the second electronic device switch a connection mode. When the second electronic device need to switch the connection mode, switching a passive mode to a initiative mode. The invention automatically connects two electronic devices in different network segments and do not take too much bandwidth resources.

Description

網路聯機控制系統及方法Network online control system and method

本發明涉及一種網路聯機控制系統及方法,尤其涉及一種網路中多個裝置的網路聯機系統及方法。The invention relates to a network online control system and method, in particular to a network connection system and method for multiple devices in a network.

網路由多個不同的網段構成,每個網段會有一個NAT(Network Address Translation,網路位址轉換)設備,兩個分處不同網段的電子裝置需要建立網路聯機時,往往受制於各個網段的NAT設備。目前,當網段A下的電子裝置A1需要聯機網段B下的電子裝置B1時,如果網段B的NAT設備的埠轉換功能失效了,就會影響電子裝置A1與電子裝置B1的聯機。The network is composed of multiple network segments. Each network segment has a Network Address Translation (NAT) device. When two devices on different network segments need to establish a network connection, they are often subject to restrictions. NAT devices on each network segment. At present, when the electronic device A1 under the network segment A needs the electronic device B1 under the network segment B, if the conversion function of the NAT device of the network segment B fails, the connection between the electronic device A1 and the electronic device B1 is affected.

鑒於以上內容,有必要提供一種網路聯機控制系統及方法,其可以自動地完成網路中不同網段的兩個電子裝置的聯機,且並不會耗費過多的頻寬資源。In view of the above, it is necessary to provide a network connection control system and method, which can automatically complete the connection of two electronic devices on different network segments in the network without consuming excessive bandwidth resources.

一種網路聯機控制系統,運行於第一電子裝置中,該系統包括:獲取模組,用於獲取第一電子裝置所要連線的第二電子裝置的裝置代碼;讀取模組,用於根據所獲取的裝置代碼從與所述第一電子裝置及第二電子裝置進行資料傳輸的中間設備中讀取第二電子裝置的電子裝置資料;主動串流連線模組,用於根據第二電子裝置的電子裝置資料生成第一電子裝置與第二電子裝置進行聯機的聯機請求,並將所述聯機請求存儲至中間設備上;所述主動串流連線模組,還用於當第二電子裝置收到聯機請求時,透過與第二電子裝置連接的第二網路位址轉換設備進行埠轉換使第一電子裝置與第二電子裝置進行聯機;回報模組,用於當第一電子裝置與第二電子裝置聯機發生錯誤時,將所述錯誤回報至中間設備,並將第一電子裝置給第二電子裝置的切換聯機模式的通知存儲至中間設備上;及執行模組,用於將第一電子裝置的主動聯機模式切換至被動等待聯機模式。A network online control system, running in a first electronic device, the system comprising: an acquisition module, configured to acquire a device code of a second electronic device to which the first electronic device is to be connected; and a reading module configured to Obtaining, by the obtained device code, the electronic device data of the second electronic device from an intermediate device that performs data transmission with the first electronic device and the second electronic device; and the active serial connection module for using the second electronic device The electronic device data of the device generates an online connection request between the first electronic device and the second electronic device, and stores the online request on the intermediate device; the active serial connection module is further used as the second electronic device When the device receives the online request, the second electronic device is connected to the second electronic device through the second network address conversion device connected to the second electronic device; the reward module is configured to be the first electronic device When an error occurs in connection with the second electronic device, the error is reported to the intermediate device, and the notification of the switching mode of the first electronic device to the second electronic device is saved. To the intermediate apparatus; and performing module for connection to the active mode of the first electronic device is switched to the online mode passively waiting.

一種網路聯機控制系統,運行於第二電子裝置中,該系統包括:偵測模組,用於當有第一電子裝置的聯機請求時,偵測第二電子裝置與其相對應的第二網路位址轉換設備是否正常運行;被動串流連線模組,用於當第二電子裝置與其相對應的第二網路位址轉換設備正常運行時,透過第二網路位址轉換設備使第一電子裝置與第二電子裝置進行聯機;判斷模組,用於當沒有第一電子裝置的聯機請求時,判斷第二電子裝置是否要進行聯機模式的切換;及執行模組,用於將第二電子裝置要進行聯機模式的切換時,將第二電子裝置的聯機模式切換至主動聯機模式以與第一電子裝置建立聯機。A network connection control system, running in a second electronic device, the system comprising: a detection module, configured to detect a second electronic device corresponding to the second electronic device when there is an online request of the first electronic device Whether the path address conversion device is in normal operation; the passive stream connection module is configured to enable the second electronic device and the corresponding second network address conversion device to operate through the second network address conversion device The first electronic device is connected to the second electronic device; the determining module is configured to: when there is no online request of the first electronic device, determine whether the second electronic device is to be switched in an online mode; and execute a module for When the second electronic device is to perform the online mode switching, the online mode of the second electronic device is switched to the active online mode to establish a connection with the first electronic device.

一種網路聯機控制方法,應用於第一電子裝置中,該方法包括:獲取步驟,獲取第一電子裝置所要連線的第二電子裝置的裝置代碼;讀取步驟,根據所獲取的裝置代碼從與所述第一電子裝置及第二電子裝置進行資料傳輸的中間設備中讀取第二電子裝置的電子裝置資料;主動串流連線步驟一,根據第二電子裝置的電子裝置資料生成第一電子裝置與第二電子裝置進行聯機的聯機請求,並將所述聯機請求存儲至中間設備上;主動串流連線步驟二,當第二電子裝置收到聯機請求時,透過與第二電子裝置連接的第二網路位址轉換設備進行埠轉換使第一電子裝置與第二電子裝置進行聯機;回報步驟一,當第一電子裝置與第二電子裝置聯機發生錯誤時,將所述錯誤回報至中間設備,並將第一電子裝置給第二電子裝置的切換聯機模式的通知存儲至中間設備上;及執行步驟,將第一電子裝置的主動聯機模式切換至被動等待聯機模式。A network connection control method is applied to a first electronic device, the method comprising: an obtaining step of acquiring a device code of a second electronic device to which the first electronic device is to be connected; and a reading step, according to the acquired device code Reading, by the intermediate device that performs data transmission between the first electronic device and the second electronic device, the electronic device data of the second electronic device; the active stream connection step 1, generating the first according to the electronic device data of the second electronic device The electronic device performs an online online request with the second electronic device, and stores the online request on the intermediate device; the active serial connection step 2, when the second electronic device receives the online request, transmits the second electronic device The connected second network address translation device performs the conversion to enable the first electronic device to be connected to the second electronic device; and returns to step one, when the first electronic device and the second electronic device are online, an error is reported Go to the intermediate device, and store the notification of the switching mode of the first electronic device to the second electronic device to the intermediate device; Step, the active online mode is switched to the first electronic device passively waiting online mode.

一種網路聯機控制方法,應用於第二電子裝置中,該方法包括:偵測步驟,當有第一電子裝置的聯機請求時,偵測第二電子裝置與其相對應的第二網路位址轉換設備是否正常運行;被動串流連線步驟,當第二電子裝置與其相對應的第二網路位址轉換設備正常運行時,透過第二網路位址轉換設備使第一電子裝置與第二電子裝置進行聯機;判斷步驟,當沒有第一電子裝置的聯機請求時,判斷第二電子裝置是否要進行聯機模式的切換;及執行步驟,將第二電子裝置要進行聯機模式的切換時,將第二電子裝置的聯機模式切換至主動聯機模式以與第一電子裝置建立聯機。A network connection control method is applied to a second electronic device, the method comprising: a detecting step of detecting a second network address corresponding to the second electronic device when there is an online request of the first electronic device Whether the conversion device is in normal operation; the passive serial connection step, when the second electronic device and its corresponding second network address conversion device are operating normally, the first electronic device is enabled by the second network address conversion device The second electronic device is connected; the determining step is: when there is no online request from the first electronic device, determining whether the second electronic device is to be switched in the online mode; and performing the step of switching the second electronic device to the online mode Switching the online mode of the second electronic device to the active online mode to establish a connection with the first electronic device.

相較於習知技術,本發明提供的網路聯機控制系統及方法,其可以自動地完成網路中不同網段的兩個電子裝置的聯機,只要在同一時間所述兩個電子裝置中的任意一方所連接的NAT設備的埠轉換功能正常,就可以完成所述兩個電子裝置的聯機,且並不會耗費過多的頻寬資源。Compared with the prior art, the network connection control system and method provided by the present invention can automatically complete the connection of two electronic devices on different network segments in the network, as long as the two electronic devices are in the same time. If the NAT function of the NAT device connected to either party is normal, the connection of the two electronic devices can be completed without consuming excessive bandwidth resources.

1‧‧‧中間設備1‧‧‧Intermediate equipment

2‧‧‧電子裝置2‧‧‧Electronic devices

20‧‧‧存儲設備20‧‧‧Storage equipment

21‧‧‧處理器21‧‧‧ Processor

3‧‧‧NAT設備3‧‧‧NAT equipment

4‧‧‧網路4‧‧‧Network

5‧‧‧網路聯機控制系統5‧‧‧Network online control system

501‧‧‧讀取模組501‧‧‧Reading module

502‧‧‧主動串流連線模組502‧‧‧Active Streaming Connection Module

503‧‧‧判斷模組503‧‧‧Judgement module

504‧‧‧回報模組504‧‧‧Return module

505‧‧‧執行模組505‧‧‧Execution module

506‧‧‧通知模組506‧‧‧Notification module

507‧‧‧查詢模組507‧‧‧Query Module

508‧‧‧偵測模組508‧‧‧Detection module

509‧‧‧被動串流連線模組509‧‧‧Passive Streaming Module

圖1是本發明網路聯機控制系統較佳實施例的應用環境圖。1 is an application environment diagram of a preferred embodiment of a network connection control system of the present invention.

圖2是本發明網路聯機控制系統較佳實施例的功能模組圖。2 is a functional block diagram of a preferred embodiment of the network connection control system of the present invention.

圖3是本發明網路聯機控制方法中的主動聯機的較佳實施例的流程圖。3 is a flow chart of a preferred embodiment of active connection in the network connection control method of the present invention.

圖4是本發明網路聯機控制方法中的被動等待聯機的較佳實施例的流程圖。4 is a flow chart of a preferred embodiment of passive standby connection in the network connection control method of the present invention.

圖5是本發明網路聯機控制方法中的主動聯機的另一實施例。FIG. 5 is another embodiment of active connection in the network connection control method of the present invention.

參閱圖1所示,是本發明網路聯機控制系統較佳實施例的應用環境圖。所述網路聯機控制系統5應用於多個電子裝置2(例如圖中的第一電子裝置及第二電子裝置)所述網路聯機控制系統5包括存儲在電子裝置2的存儲設備20中,能夠被電子裝置2的處理器21所執行並且能夠完成固定功能的一系列電腦程式段,用於自動地完成網路中不同網段的兩個電子裝置的聯機。Referring to FIG. 1, it is an application environment diagram of a preferred embodiment of the network connection control system of the present invention. The network online control system 5 is applied to a plurality of electronic devices 2 (for example, the first electronic device and the second electronic device in the figure). The network online control system 5 is stored in the storage device 20 of the electronic device 2, A series of computer programs that can be executed by the processor 21 of the electronic device 2 and that can perform fixed functions for automatically completing the connection of two electronic devices on different network segments in the network.

所述多個電子裝置2都位於網路4中。所述網路4可以是網際網絡(Internet)或其他類型的通訊網絡,如GPRS、Wi-Fi/WLAN、3G/WCDMA、3.5G/HSDPA等。The plurality of electronic devices 2 are all located in the network 4. The network 4 may be an Internet or other type of communication network such as GPRS, Wi-Fi/WLAN, 3G/WCDMA, 3.5G/HSDPA, and the like.

所述電子裝置2可以是,但不限於,個人電腦、平板電腦、智慧手機,網路攝像機等裝置。The electronic device 2 may be, but not limited to, a personal computer, a tablet computer, a smart phone, a network camera, and the like.

所述網路4包括多個不同的網段(即多個內部網)及外網,每個網段對應一個NAT(Network Address Translation,網路位址轉換)設備3(例如圖中的第一NAT設備3、第二NAT設備3),每個NAT設備3都有一個固定IP,透過所述固定IP可找到對應的NAT設備3。每個NAT設備3管理多個電子裝置2,每個電子裝置2對應一個埠號,所述埠號對應一個IP位址。透過所述埠號所對應的IP位址可連接所述埠號對應的電子裝置2。所述NAT設備3用於轉換所管理的多個電子裝置2的埠所對應的IP位址。當一個網段內的電子裝置2需要聯機另外一個網段內的電子裝置2時就需要NAT設備3進行埠轉換。而網段內的電子裝置2訪問外網時就不需要NAT設備3進行轉換。The network 4 includes a plurality of different network segments (ie, multiple internal networks) and an external network, and each network segment corresponds to a NAT (Network Address Translation) device 3 (for example, the first in the figure) The NAT device 3 and the second NAT device 3) each have a fixed IP address through which the corresponding NAT device 3 can be found. Each NAT device 3 manages a plurality of electronic devices 2, each of which corresponds to an nickname, the nickname corresponding to an IP address. The electronic device 2 corresponding to the nickname can be connected through the IP address corresponding to the nickname. The NAT device 3 is configured to convert an IP address corresponding to the 埠 of the managed plurality of electronic devices 2. When the electronic device 2 in one network segment needs to connect to the electronic device 2 in another network segment, the NAT device 3 is required to perform the conversion. When the electronic device 2 in the network segment accesses the external network, the NAT device 3 is not required to perform the conversion.

在本實施例中,以兩個網段為例進行描述,例如第一網段及第二網段,第一網段對應第一NAT設備3,第二網段對應第二NAT設備3,第一NAT設備3管理多個電子裝置2(圖中以第一電子裝置2為例進行描述),第二NAT設備3管理多個電子裝置2(圖中以第二電子裝置2為例進行描述)。當第二電子裝置2主動與第一電子裝置2聯機時,第二電子裝置2根據第一NAT設備3的固定IP與第一NAT設備3建立連接,然後將第一NAT設備3的埠轉換至第一電子裝置2的埠上,使第一電子裝置2與第二電子裝置2進行通訊。In this embodiment, two network segments are taken as an example, for example, a first network segment and a second network segment, where the first network segment corresponds to the first NAT device 3, and the second network segment corresponds to the second NAT device 3, A NAT device 3 manages a plurality of electronic devices 2 (the first electronic device 2 is described as an example), and the second NAT device 3 manages a plurality of electronic devices 2 (the second electronic device 2 is described as an example) . When the second electronic device 2 actively connects with the first electronic device 2, the second electronic device 2 establishes a connection with the first NAT device 3 according to the fixed IP of the first NAT device 3, and then converts the UI of the first NAT device 3 to The first electronic device 2 communicates with the second electronic device 2 on the top of the first electronic device 2.

不同網段的電子裝置2之間的聯機模式有兩種,即主動聯機模式及被動等待聯機模式。不同網段的所有電子裝置2平時都處於被動等待聯機模式。當下列兩種情況發生時,以第一電子裝置及第二電子裝置為例,第一電子裝置的被動等待聯機模式會被切換到主動聯機模式:There are two online modes between the electronic devices 2 on different network segments, namely active online mode and passive standby online mode. All electronic devices 2 on different network segments are in a passive standby online mode. When the following two situations occur, taking the first electronic device and the second electronic device as an example, the passive waiting online mode of the first electronic device is switched to the active online mode:

(1)第一電子裝置2需要主動聯機第二電子裝置2時,所述第一電子裝置2的被動等待聯機模式被切換成主動聯機模式。(1) When the first electronic device 2 needs to actively connect the second electronic device 2, the passive standby mode of the first electronic device 2 is switched to the active online mode.

(2)當第二電子裝置2主動聯機第一電子裝置2,若第一電子裝置2的第一NAT設備3的不能正常使用時,就會造成聯機失敗,則第一電子裝置2的被動等待聯機模式被切換成主動聯機模式,第二電子裝置2的主動聯機模式被切換成被動等待聯機模式。(2) When the second electronic device 2 actively connects to the first electronic device 2, if the first NAT device 3 of the first electronic device 2 is not in normal use, the connection fails, and the first electronic device 2 passively waits. The online mode is switched to the active online mode, and the active online mode of the second electronic device 2 is switched to the passive standby online mode.

所述多個電子裝置2還可與中間設備1透過網路4進行通訊連接,用於存儲每一個電子裝置2的電子裝置資料。所述電子裝置資料包括每個電子裝置2所對應的NAT設備3的固定IP、每個電子裝置2的埠號及每個電子裝置2的裝置代碼,所述裝置代碼用於識別所述電子裝置2。所述電子裝置資料還包括每個電子裝置2與其所對應的NAT設備3的連接狀況。所述中間設備1包括,但不限於,伺服器及網路存儲介質。當所述中間設備1是伺服器時,所述伺服器還透過資料庫連接與一個資料庫相連接。其中,所述資料庫可為任何形式的資料庫,例如結構化查詢語言(Structured Query Language,SQL),開放式資料庫連接(Open Database Connectivity, ODBC),或Java資料庫連接(Java Database Connectivity, JDBC)。資料庫可獨立於伺服器,也可位於伺服器內的硬碟或者快閃記憶體盤中。The plurality of electronic devices 2 can also be in communication with the intermediate device 1 via the network 4 for storing electronic device data of each electronic device 2. The electronic device data includes a fixed IP of the NAT device 3 corresponding to each electronic device 2, an nickname of each electronic device 2, and a device code of each electronic device 2, the device code being used to identify the electronic device 2. The electronic device data further includes a connection status of each electronic device 2 and its corresponding NAT device 3. The intermediate device 1 includes, but is not limited to, a server and a network storage medium. When the intermediate device 1 is a server, the server is also connected to a database through a database connection. The database may be any form of database, such as Structured Query Language (SQL), Open Database Connectivity (ODBC), or Java Database Connectivity (Java Database Connectivity, JDBC). The database can be independent of the server or it can be located on a hard drive or flash memory disk in the server.

當所述中間設備1為網路存儲介質時,所述網路存儲介質可在網路4的外網上提供存儲空間,使用者可在外網上註冊登記來獲取一些免費的存儲空間。網路存儲介質包括DropBox、Google Drive、Microsoft MySpace等。所有的電子裝置2可以把各自的電子裝置資料放於網路存儲介質上對應的存儲空間裏,這樣可以減少伺服器的建立、租賃及維護的成本。When the intermediate device 1 is a network storage medium, the network storage medium can provide a storage space on the external network of the network 4, and the user can register on the external network to obtain some free storage space. Network storage media include DropBox, Google Drive, Microsoft MySpace, and more. All the electronic devices 2 can put the respective electronic device data in the corresponding storage space on the network storage medium, which can reduce the cost of establishing, renting and maintaining the server.

如圖2所示,是本發明電子裝置2中的網路聯機控制系統5的較佳實施例的功能模組圖。在本實施例中,所述網路聯機控制系統5包括讀取模組501、主動串流連線模組502、判斷模組503、回報模組504、執行模組505、通知模組506、查詢模組507、偵測模組508及被動串流連線模組509。關於各模組的功能將在圖3的流程圖中具體描述。2 is a functional block diagram of a preferred embodiment of the network connection control system 5 in the electronic device 2 of the present invention. In this embodiment, the network connection control system 5 includes a reading module 501, an active stream connection module 502, a determination module 503, a reward module 504, an execution module 505, and a notification module 506. The query module 507, the detection module 508 and the passive stream connection module 509. The function of each module will be specifically described in the flowchart of FIG.

如圖3所示,是本發明網路聯機控制方法中的主動聯機的較佳實施例的流程圖。在本較佳實施例中,以第一電子裝置2處於主動聯機模式為例來說明,根據不同的需求,該流程圖中步驟的順序可以改變,某些步驟可以省略。3 is a flow chart of a preferred embodiment of active connection in the network connection control method of the present invention. In the preferred embodiment, the first electronic device 2 is in the active online mode as an example. The order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.

步驟S10,當第一電子裝置2需要主動與網路4中的其他網段的電子裝置2(記為第二電子裝置2)建立聯機時,獲取模組500獲取其所要連線的第二電子裝置2的裝置代碼。In step S10, when the first electronic device 2 needs to actively establish an online connection with the electronic device 2 (referred to as the second electronic device 2) of other network segments in the network 4, the obtaining module 500 acquires the second electronic device to be connected. The device code of device 2.

在本實施例中,可由用戶輸入所要連線的第二電子裝置2的裝置代碼,這樣獲取模組500直接接收用戶所輸入的所述裝置代碼即可。在另一實施例中,也可由獲取模組500自動從中間設備1中讀取第二電子裝置2所對應的裝置代碼。In this embodiment, the device code of the second electronic device 2 to be connected may be input by the user, so that the acquiring module 500 directly receives the device code input by the user. In another embodiment, the device code corresponding to the second electronic device 2 can also be automatically read from the intermediate device 1 by the acquisition module 500.

步驟S11,讀取模組501根據所獲取的裝置代碼從中間設備1中讀取所要連線的第二電子裝置2的電子裝置資料。In step S11, the reading module 501 reads the electronic device data of the second electronic device 2 to be connected from the intermediate device 1 according to the acquired device code.

所述電子裝置資料包括第二電子裝置2所對應的NAT設備3(即第二NAT設備3)的固定IP及第二電子裝置2的埠號。The electronic device data includes a fixed IP of the NAT device 3 (ie, the second NAT device 3) corresponding to the second electronic device 2 and an nickname of the second electronic device 2.

步驟S12,主動串流連線模組502根據所讀取的第二電子裝置2的電子裝置資料生成第一電子裝置2與第二電子裝置2進行聯機的聯機請求,並將所述聯機請求存儲至中間設備1上。In step S12, the active stream connection module 502 generates an online connection request for the first electronic device 2 and the second electronic device 2 according to the read electronic device data of the second electronic device 2, and stores the online request. To the intermediate device 1.

步驟S13,在第二電子裝置2收到所述聯機請求,並回報與其相連的NAT設備3(記為第二NAT設備3)正常運行時,主動串流連線模組502透過第二NAT設備3進行埠轉換使第一電子裝置2與第二電子裝置2進行聯機。Step S13, when the second electronic device 2 receives the online request and reports the normal operation of the NAT device 3 (referred to as the second NAT device 3) connected thereto, the active stream connection module 502 transmits the second NAT device. 3 Performing a chirp conversion causes the first electronic device 2 to be connected to the second electronic device 2.

在本實施例中,主動串流連線模組502先根據所述第二NAT設備3的固定IP與第二NAT設備3建立通訊以通知所述第二NAT設備3,第一電子裝置2所要聯機的埠號,然後第二NAT設備3根據所述埠號將IP位址轉換至第二電子裝置2上。In this embodiment, the active stream connection module 502 first establishes communication with the second NAT device 3 according to the fixed IP address of the second NAT device 3 to notify the second NAT device 3 that the first electronic device 2 is required. The online nickname, and then the second NAT device 3 converts the IP address to the second electronic device 2 based on the nickname.

步驟S14,判斷模組503判斷第一電子裝置2與第二電子裝置2聯機是否發生錯誤。當第一電子裝置2與第二電子裝置2聯機發生錯誤時,執行步驟S15;當第一電子裝置2與第二電子裝置2聯機沒有發生錯誤時,執行步驟S16。In step S14, the determining module 503 determines whether an error occurs in the connection between the first electronic device 2 and the second electronic device 2. When an error occurs in the first electronic device 2 and the second electronic device 2, step S15 is performed; when the first electronic device 2 is connected to the second electronic device 2 and no error occurs, step S16 is performed.

在本實施例中,如當第二電子裝置2所對應的第二NAT設備3不能將埠轉換至第二電子裝置所對應的埠時,或者中間設備1上沒有第二電子裝置2的電子裝置資料時,就會發生聯機錯誤。In this embodiment, when the second NAT device 3 corresponding to the second electronic device 2 cannot convert the UI to the UI corresponding to the second electronic device, or the electronic device of the second device 2 is not on the intermediate device 1 An online error occurs when the data is available.

步驟S15,回報模組504將第一電子裝置2與第二電子裝置2聯機所發生的錯誤回報至中間設備1,並將第一電子裝置2給第二電子裝置2的切換聯機模式的通知存儲至中間設備1上,然後執行步驟S17。In step S15, the reward module 504 reports the error generated by the first electronic device 2 and the second electronic device 2 to the intermediate device 1, and stores the notification of the switching mode of the first electronic device 2 to the second electronic device 2. To the intermediate device 1, then step S17 is performed.

在本實施例中,所述切換聯機模式的通知是第一電子裝置2給第二電子裝置的,為了通知第二電子裝置2需要從被動等待聯機模式切換至主動聯機模式與其進行聯機。In this embodiment, the notification of switching the online mode is the first electronic device 2 to the second electronic device, in order to notify the second electronic device 2 that it needs to switch from the passive waiting online mode to the active online mode.

步驟S16,回報模組504將第一電子裝置2與第二電子裝置2聯機成功回報至中間設備1,並存儲聯機成功的資訊,該流程結束。In step S16, the reward module 504 successfully returns the first electronic device 2 and the second electronic device 2 to the intermediate device 1 and stores the information of the online success, and the process ends.

步驟S17,執行模組505將第一電子裝置的主動聯機模式切換至被動等待聯機模式。In step S17, the execution module 505 switches the active online mode of the first electronic device to the passive standby online mode.

在另一實施例中,如圖5所示,當中間設備1為伺服器時,在步驟S10與步驟S11之間可增加步驟S100及步驟S101。In another embodiment, as shown in FIG. 5, when the intermediate device 1 is a server, step S100 and step S101 may be added between step S10 and step S11.

步驟S100,通知模組506將第一電子裝置2所要連線的第二電子裝置2的裝置代碼通知給所述伺服器。In step S100, the notification module 506 notifies the server of the device code of the second electronic device 2 to which the first electronic device 2 is to be connected.

步驟S101,判斷模組503判斷是否接收到伺服器回應的無法連接第二電子裝置2的資訊。當沒有接收到伺服器回應的無法連接第二電子裝置的資訊,執行步驟S11;當接收到伺服器回應的無法連接第二電子裝置的資訊時,直接執行步驟S15。In step S101, the determining module 503 determines whether the information of the second electronic device 2 that cannot be connected by the server is received. When the information of the second electronic device cannot be connected to the server, the step S11 is performed; when the information of the second electronic device cannot be connected to the server, the step S15 is directly executed.

如圖4所示,是本發明網路聯機控制方法中的被動等待聯機的較佳實施例的流程圖。在本較佳實施例中,以第二電子裝置2處於被動等待聯機模式為例來說明,根據不同的需求,該流程圖中步驟的順序可以改變,某些步驟可以省略。As shown in FIG. 4, it is a flow chart of a preferred embodiment of the passive waiting connection in the network connection control method of the present invention. In the preferred embodiment, the second electronic device 2 is in the passive standby mode as an example. The order of the steps in the flowchart may be changed according to different requirements, and some steps may be omitted.

步驟S40,當第二電子裝置2處於被動等待聯機模式時,判斷模組503判斷是否有其他網段的電子裝置2(記為第一電子裝置2)的聯機請求。當有第一電子裝置2的聯機請求時,執行步驟S41;當沒有第一電子裝置2的聯機請求時,執行步驟S43。In step S40, when the second electronic device 2 is in the passive standby online mode, the determining module 503 determines whether there is an online request of the electronic device 2 (referred to as the first electronic device 2) of another network segment. When there is an online request of the first electronic device 2, step S41 is performed; when there is no online request from the first electronic device 2, step S43 is performed.

在本實施例中,可由查詢模組507以第一預設時間間隔(如2S)到中間設備1上去查詢是否有所述第一電子裝置2的聯機請求。所述判斷模組503根據查詢的資訊來判斷是否有所述第一電子裝置2的聯機請求。In this embodiment, the query module 507 can query the intermediate device 1 at the first preset time interval (eg, 2S) to check whether there is an online request of the first electronic device 2. The determining module 503 determines, according to the queried information, whether there is an online request of the first electronic device 2.

在另一實施例中,當中間設備1為伺服器時,也可由伺服器定期發送所述第一電子裝置2的聯機請求至第二電子裝置2。In another embodiment, when the intermediate device 1 is a server, the online request of the first electronic device 2 can also be periodically sent by the server to the second electronic device 2.

步驟S41,偵測模組508偵測與第二電子裝置2相對應的NAT設備3(記為第二NAT設備3)的是否正常運行。當與第二電子裝置2相對應的第二NAT設備3的正常運行時,執行步驟S42;當與第二電子裝置2相對應的第二NAT設備3的不能正常運行時,該流程結束。In step S41, the detecting module 508 detects whether the NAT device 3 (referred to as the second NAT device 3) corresponding to the second electronic device 2 is operating normally. When the second NAT device 3 corresponding to the second electronic device 2 is in normal operation, step S42 is performed; when the second NAT device 3 corresponding to the second electronic device 2 is not operating normally, the flow ends.

在本實施例中,偵測模組508定期偵測與每個電子裝置2相連的NAT設備3是否正常運行,並由回報模組504將所偵測的狀況回報至中間設備1上。In this embodiment, the detection module 508 periodically detects whether the NAT device 3 connected to each electronic device 2 is operating normally, and returns the detected condition to the intermediate device 1 by the reward module 504.

步驟S42,被動串流連線模組509透過第二NAT設備3使第一電子裝置2與第二電子裝置2進行聯機,然後該流程結束。In step S42, the passive stream connection module 509 connects the first electronic device 2 and the second electronic device 2 through the second NAT device 3, and then the process ends.

步驟S43,當沒有所述第一電子裝置2的聯機請求時,判斷模組503判斷第二電子裝置是否要進行聯機模式的切換。當第二電子裝置需要進行聯機模式的切換時,執行步驟S44;當第二電子裝置不需要進行聯機模式的切換時,該流程結束。In step S43, when there is no online request from the first electronic device 2, the determining module 503 determines whether the second electronic device is to be switched in the online mode. When the second electronic device needs to perform switching of the online mode, step S44 is performed; when the second electronic device does not need to perform switching of the online mode, the process ends.

在本實施例中,所述查詢模組507以第二預設時間間隔(如3S)到中間設備1上去查詢是否有第一電子裝置給第二電子裝置的切換聯機模式的通知。所述判斷模組503根據查詢的資訊來判斷第二電子裝置是否要進行聯機模式的切換。In this embodiment, the query module 507 queries the intermediate device 1 at a second preset time interval (eg, 3S) to query whether there is a notification of the switching mode of the first electronic device to the second electronic device. The determining module 503 determines, according to the queried information, whether the second electronic device is to perform online mode switching.

在另一實施例中,當中間設備1為伺服器時,也可由伺服器發送所述切換聯機模式的通知給第二電子裝置。In another embodiment, when the intermediate device 1 is a server, the notification of the switching online mode may also be sent by the server to the second electronic device.

步驟S44,執行模組505將第二電子裝置2的聯機模式切換至主動聯機模式以與第一電子裝置2建立聯機。In step S44, the execution module 505 switches the online mode of the second electronic device 2 to the active online mode to establish a connection with the first electronic device 2.

最後所應說明的是,以上實施例僅用以說明本發明的技術方案而非限制,儘管參照以上較佳實施例對本發明進行了詳細說明,本領域的普通技術人員應當理解,可以對本發明的技術方案進行修改或等同替換,而不脫離本發明技術方案的精神和範圍。It should be noted that the above embodiments are only intended to illustrate the technical solutions of the present invention and are not intended to be limiting, and the present invention will be described in detail with reference to the preferred embodiments thereof The technical solutions are modified or equivalently substituted without departing from the spirit and scope of the technical solutions of the present invention.

no

5‧‧‧網路聯機控制系統 5‧‧‧Network online control system

501‧‧‧讀取模組 501‧‧‧Reading module

502‧‧‧主動串流連線模組 502‧‧‧Active Streaming Connection Module

503‧‧‧判斷模組 503‧‧‧Judgement module

504‧‧‧回報模組 504‧‧‧Return module

505‧‧‧執行模組 505‧‧‧Execution module

506‧‧‧通知模組 506‧‧‧Notification module

507‧‧‧查詢模組 507‧‧‧Query Module

508‧‧‧偵測模組 508‧‧‧Detection module

509‧‧‧被動串流連線模組 509‧‧‧Passive Streaming Module

Claims (18)

一種網路聯機控制系統,運行於第一電子裝置中,該系統包括:
獲取模組,用於獲取第一電子裝置所要連線的第二電子裝置的裝置代碼;
讀取模組,用於根據所獲取的裝置代碼從與所述第一電子裝置及第二電子裝置進行資料傳輸的中間設備中讀取第二電子裝置的電子裝置資料;
主動串流連線模組,用於根據第二電子裝置的電子裝置資料生成第一電子裝置與第二電子裝置進行聯機的聯機請求,並將所述聯機請求存儲至中間設備上;
所述主動串流連線模組,還用於當第二電子裝置收到聯機請求時,透過與第二電子裝置連接的第二網路位址轉換設備進行埠轉換使第一電子裝置與第二電子裝置進行聯機;
回報模組,用於當第一電子裝置與第二電子裝置聯機發生錯誤時,將所述錯誤回報至中間設備,並將第一電子裝置給第二電子裝置的切換聯機模式的通知存儲至中間設備上;及
執行模組,用於將第一電子裝置的主動聯機模式切換至被動等待聯機模式。
A network online control system runs in a first electronic device, the system comprising:
Obtaining a module, configured to acquire a device code of a second electronic device to which the first electronic device is to be connected;
a reading module, configured to read electronic device data of the second electronic device from an intermediate device that performs data transmission with the first electronic device and the second electronic device according to the acquired device code;
The active stream connection module is configured to generate an online request for online connection between the first electronic device and the second electronic device according to the electronic device data of the second electronic device, and store the online request on the intermediate device;
The active stream connection module is further configured to perform a conversion by the second network address conversion device connected to the second electronic device when the second electronic device receives the online request, so that the first electronic device and the first Two electronic devices are connected;
And a reward module, configured to report the error to the intermediate device when the first electronic device and the second electronic device are online, and store the notification of the switching mode of the first electronic device to the second electronic device to the middle And an execution module for switching the active online mode of the first electronic device to the passive standby online mode.
根據申請專利範圍第1項所述之網路聯機控制系統,所述中間設備為伺服器或網路存儲介質,用於存儲第一電子裝置及第二電子裝置的電子裝置資料。According to the network online control system of claim 1, the intermediate device is a server or a network storage medium for storing electronic device data of the first electronic device and the second electronic device. 根據申請專利範圍第2項所述之網路聯機控制系統,所述電子裝置資料包括每個電子裝置所對應的網路位址轉換設備的固定IP、每個電子裝置的埠號、每個電子裝置的裝置代碼及每個電子裝置與其所對應的網路位址轉換設備的連接狀況。According to the network online control system described in claim 2, the electronic device data includes a fixed IP of a network address conversion device corresponding to each electronic device, an nickname of each electronic device, and each electronic device. The device code of the device and the connection status of each electronic device to its corresponding network address translation device. 根據申請專利範圍第2項所述之網路聯機控制系統,當所述中間設備為伺服器時,該系統還包括:
通知模組,用於將第一電子裝置所要連線的第二裝置的裝置代碼通知給所述伺服器;
判斷模組,用於判斷是否接收到伺服器回應的無法連接第二電子裝置的資訊。
According to the network online control system described in claim 2, when the intermediate device is a server, the system further includes:
a notification module, configured to notify the server of the device code of the second device to which the first electronic device is to be connected;
The judging module is configured to determine whether the information of the second electronic device that cannot be connected to the server is received.
根據申請專利範圍第1項所述之網路聯機控制系統,所述回報模組還用於當第一電子裝置與第二電子裝置聯機成功時,將聯機成功的資訊回報至中間設備上。According to the network online control system of claim 1, the reward module is further configured to report the successful online information to the intermediate device when the first electronic device and the second electronic device are successfully connected. 一種網路聯機控制系統,運行於第二電子裝置中,該系統包括:
偵測模組,用於當有第一電子裝置的聯機請求時,偵測第二電子裝置與其相對應的第二網路位址轉換設備是否正常運行;
被動串流連線模組,用於當第二電子裝置與其相對應的第二網路位址轉換設備正常運行時,透過第二網路位址轉換設備使第一電子裝置與第二電子裝置進行聯機;
判斷模組,用於當沒有第一電子裝置的聯機請求時,判斷第二電子裝置是否要進行聯機模式的切換;及
執行模組,用於將第二電子裝置要進行聯機模式的切換時,將第二電子裝置的聯機模式切換至主動聯機模式以與第一電子裝置建立聯機。
A network online control system runs in a second electronic device, the system comprising:
The detecting module is configured to detect whether the second electronic device and the corresponding second network address translation device are in normal operation when there is an online request of the first electronic device;
a passive stream connection module, configured to enable the first electronic device and the second electronic device through the second network address conversion device when the second electronic device and the corresponding second network address conversion device are in normal operation Go online;
a judging module, configured to: when there is no online request of the first electronic device, determine whether the second electronic device is to be switched in an online mode; and an execution module, configured to switch the second electronic device to be in an online mode Switching the online mode of the second electronic device to the active online mode to establish a connection with the first electronic device.
根據申請專利範圍第6項所述之網路聯機控制系統,所述中間設備包括伺服器或網路存儲介質,用於存儲每個電子裝置的電子裝置資料。The network connection control system according to claim 6, wherein the intermediate device comprises a server or a network storage medium for storing electronic device data of each electronic device. 根據申請專利範圍第7項所述之網路聯機控制系統,所述電子裝置資料包括每個電子裝置所對應的網路位址轉換設備的固定IP、每個電子裝置的埠號、每個電子裝置的裝置代碼及每個電子裝置與其所對應的網路位址轉換設備的連接狀況。According to the network online control system described in claim 7, the electronic device data includes a fixed IP of the network address conversion device corresponding to each electronic device, an nickname of each electronic device, and each electronic device. The device code of the device and the connection status of each electronic device to its corresponding network address translation device. 根據申請專利範圍第6項所述之網路聯機控制系統,該系統還包括:
查詢模組,用於以第一預設時間間隔到中間設備上去查詢是否有所述第一電子裝置的聯機請求;
所述查詢模組,還用於以第二預設時間間隔到中間設備上去查詢是否有第一電子裝置給第二電子裝置的切換聯機模式的通知。
According to the network online control system described in claim 6, the system further includes:
The query module is configured to query, on the intermediate device, the first preset time interval to determine whether there is an online request of the first electronic device;
The query module is further configured to query, on the second device, the second preset time interval to notify whether there is a notification of the switching mode of the first electronic device to the second electronic device.
一種網路聯機控制方法,應用於第一電子裝置中,該方法包括:
獲取步驟,獲取第一電子裝置所要連線的第二電子裝置的裝置代碼;
讀取步驟,根據所獲取的裝置代碼從與所述第一電子裝置及第二電子裝置進行資料傳輸的中間設備中讀取第二電子裝置的電子裝置資料;
主動串流連線步驟一,根據第二電子裝置的電子裝置資料生成第一電子裝置與第二電子裝置進行聯機的聯機請求,並將所述聯機請求存儲至中間設備上;
主動串流連線步驟二,當第二電子裝置收到聯機請求時,透過與第二電子裝置連接的第二網路位址轉換設備進行埠轉換使第一電子裝置與第二電子裝置進行聯機;
回報步驟一,當第一電子裝置與第二電子裝置聯機發生錯誤時,將所述錯誤回報至中間設備,並將第一電子裝置給第二電子裝置的切換聯機模式的通知存儲至中間設備上;及
執行步驟,將第一電子裝置的主動聯機模式切換至被動等待聯機模式。
A network online control method is applied to a first electronic device, the method comprising:
Obtaining, acquiring a device code of the second electronic device to which the first electronic device is to be connected;
a reading step of reading electronic device data of the second electronic device from an intermediate device that performs data transmission with the first electronic device and the second electronic device according to the acquired device code;
Step 1 of the active stream connection, generating an online request for online connection between the first electronic device and the second electronic device according to the electronic device data of the second electronic device, and storing the online request on the intermediate device;
In the active stream connection step 2, when the second electronic device receives the online request, the first electronic device and the second electronic device are connected by performing a conversion by the second network address conversion device connected to the second electronic device. ;
Returning to step one, when an error occurs in the online connection between the first electronic device and the second electronic device, the error is reported to the intermediate device, and the notification of the switching electronic mode of the first electronic device to the second electronic device is stored on the intermediate device. And performing steps to switch the active online mode of the first electronic device to the passive standby online mode.
根據申請專利範圍第10項所述之網路聯機控制方法,所述中間設備為伺服器或網路存儲介質,用於存儲第一電子裝置及第二電子裝置的電子裝置資料。The network connection control method according to claim 10, wherein the intermediate device is a server or a network storage medium for storing electronic device data of the first electronic device and the second electronic device. 根據申請專利範圍第11項所述之網路聯機控制方法,所述電子裝置資料包括每個電子裝置所對應的網路位址轉換設備的固定IP、每個電子裝置的埠號及每個電子裝置的裝置代碼,及每個電子裝置與其所對應的網路位址轉換設備的連接狀況。According to the network connection control method described in claim 11, the electronic device data includes a fixed IP of the network address conversion device corresponding to each electronic device, an nickname of each electronic device, and each electronic device. The device code of the device and the connection status of each electronic device to its corresponding network address translation device. 根據申請專利範圍第11項所述之網路聯機控制方法,當所述中間設備為伺服器時,該方法還包括:
通知步驟,將第一電子裝置所要連線的第二裝置的裝置代碼通知給所述伺服器;
判斷步驟,判斷是否接收到伺服器回應的無法連接第二電子裝置的資訊。
According to the network online control method of claim 11, when the intermediate device is a server, the method further includes:
a notification step of notifying the server of the device code of the second device to which the first electronic device is to be connected;
The determining step determines whether the information of the second electronic device that cannot be connected to the server is received.
根據申請專利範圍第10項所述之網路聯機控制方法,該方法還包括回報步驟二,當第一電子裝置與第二電子裝置聯機成功時,將聯機成功的資訊回報至中間設備上。According to the network connection control method described in claim 10, the method further includes reporting step 2, when the first electronic device and the second electronic device are successfully connected, returning the information of the online success to the intermediate device. 一種網路聯機控制方法,應用於第二電子裝置中,該方法包括:
偵測步驟,當有第一電子裝置的聯機請求時,偵測第二電子裝置與其相對應的第二網路位址轉換設備是否正常運行;
被動串流連線步驟,當第二電子裝置與其相對應的第二網路位址轉換設備正常運行時,透過第二網路位址轉換設備使第一電子裝置與第二電子裝置進行聯機;
判斷步驟,當沒有第一電子裝置的聯機請求時,判斷第二電子裝置是否要進行聯機模式的切換;及
執行步驟,將第二電子裝置要進行聯機模式的切換時,將第二電子裝置的聯機模式切換至主動聯機模式以與第一電子裝置建立聯機。
A network online control method is applied to a second electronic device, the method comprising:
a detecting step of detecting whether the second electronic device and the corresponding second network address translation device are in normal operation when there is an online request of the first electronic device;
a passive serial connection step, when the second electronic device and its corresponding second network address translation device are in normal operation, the first electronic device is connected to the second electronic device through the second network address conversion device;
a determining step of determining whether the second electronic device is to be switched in an online mode when there is no online request from the first electronic device; and performing a step of switching the second electronic device to be in an online mode, The online mode switches to the active online mode to establish a connection with the first electronic device.
根據申請專利範圍第15項所述之網路聯機控制方法,所述中間設備包括伺服器或網路存儲介質,用於存儲每個電子裝置的電子裝置資料。The network connection control method according to claim 15, wherein the intermediate device comprises a server or a network storage medium for storing electronic device data of each electronic device. 根據申請專利範圍第16項所述之網路聯機控制方法,所述電子裝置資料包括每個電子裝置所對應的網路位址轉換設備的固定IP、每個電子裝置的埠號、每個電子裝置的裝置代碼及每個電子裝置與其所對應的網路位址轉換設備的連接狀況。According to the network connection control method described in claim 16, the electronic device data includes a fixed IP of the network address conversion device corresponding to each electronic device, an nickname of each electronic device, and each electronic device. The device code of the device and the connection status of each electronic device to its corresponding network address translation device. 根據申請專利範圍第15項所述之網路聯機控制方法,該方法還包括:
查詢步驟一,以第一預設時間間隔到中間設備上去查詢是否有所述第一電子裝置的聯機請求;
查詢步驟二,以第二預設時間間隔到中間設備上去查詢是否有第一電子裝置給第二電子裝置的切換聯機模式的通知。
According to the network online control method described in claim 15 of the patent application, the method further includes:
In step 1 of the query, the intermediate device is queried at the first preset time interval to check whether there is an online request of the first electronic device;
In step 2, the second preset time interval is used to query the intermediate device to check whether there is a notification that the first electronic device gives the switching mode of the second electronic device.
TW102130462A 2013-08-26 2013-08-26 System and method of controlling network connection TW201509160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW102130462A TW201509160A (en) 2013-08-26 2013-08-26 System and method of controlling network connection

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW102130462A TW201509160A (en) 2013-08-26 2013-08-26 System and method of controlling network connection

Publications (1)

Publication Number Publication Date
TW201509160A true TW201509160A (en) 2015-03-01

Family

ID=53186408

Family Applications (1)

Application Number Title Priority Date Filing Date
TW102130462A TW201509160A (en) 2013-08-26 2013-08-26 System and method of controlling network connection

Country Status (1)

Country Link
TW (1) TW201509160A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI762995B (en) * 2020-08-07 2022-05-01 中華電信股份有限公司 System and method for communication site tagging associated with network flows

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI762995B (en) * 2020-08-07 2022-05-01 中華電信股份有限公司 System and method for communication site tagging associated with network flows

Similar Documents

Publication Publication Date Title
US11394625B2 (en) Service level agreement based storage access
JP6571161B2 (en) Method, apparatus, and system for exploring application topology relationships
US20180331905A1 (en) Method and system for tuning performance of microservices-based applications
US20130080509A1 (en) Cloud computing access gateway and method for providing a user terminal access to a cloud provider
WO2020207371A1 (en) Data processing system and method, apparatus, and electronic device
US10165507B2 (en) Network access method and apparatus applied to mobile application
US20140059388A1 (en) Diagnostic and performance data collection
US9514469B2 (en) Identification of consumers based on a unique device ID
US10609123B2 (en) Hybrid quorum policies for durable consensus in distributed systems
US20150205593A1 (en) Information processing device, system, information processing method and computer readable non-transitory medium
CN106357480B (en) Method and device for monitoring network performance of application and mobile terminal
KR102154788B1 (en) A DNS resolution method in a terminal of a wireless communication system, and an apparatus therefor
CN112671897B (en) Access method, device, storage medium, equipment and product of distributed system
US20160366559A1 (en) Adaptive Mobile Wireless Call Rescue
JP2017516202A (en) Promotion status data monitoring method, apparatus, device, and non-executable computer storage medium
US9480039B2 (en) System and method for virtual replication of a mobile phone
CN114218540A (en) Project access method and device
TW201509160A (en) System and method of controlling network connection
JP2013020591A (en) Dependency graph creation device, failure occurrence location diagnosis system, failure occurrence location diagnosis method and computer program
CN117135580A (en) 5G message universal access system and method
US20120191782A1 (en) Online Location Sharing Through an Internet Service Search Engine
CN104426734A (en) System and method for network on-line control
WO2017166438A1 (en) Method and apparatus for managing application state
CN112910675A (en) Equipment management method, device and system
JP5764090B2 (en) Terminal state detection apparatus and terminal state detection method