TWI673981B - The processing method and the system of the remote device about the abstraction and behavior simulation - Google Patents

The processing method and the system of the remote device about the abstraction and behavior simulation Download PDF

Info

Publication number
TWI673981B
TWI673981B TW107119954A TW107119954A TWI673981B TW I673981 B TWI673981 B TW I673981B TW 107119954 A TW107119954 A TW 107119954A TW 107119954 A TW107119954 A TW 107119954A TW I673981 B TWI673981 B TW I673981B
Authority
TW
Taiwan
Prior art keywords
network
cloud server
virtual
unit
intermediary
Prior art date
Application number
TW107119954A
Other languages
Chinese (zh)
Other versions
TW202002588A (en
Inventor
林宏洲
林忠杰
陳泰安
Original Assignee
三泰科技股份有限公司
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 三泰科技股份有限公司 filed Critical 三泰科技股份有限公司
Priority to TW107119954A priority Critical patent/TWI673981B/en
Application granted granted Critical
Publication of TWI673981B publication Critical patent/TWI673981B/en
Publication of TW202002588A publication Critical patent/TW202002588A/en

Links

Abstract

一種遠端設備的抽象化與模擬行為的處理方法與系統,其特徵在於對遠端設備的連接辨識與操作的控制,其係包括:閘道器網路連接於雲伺服端與至少一中介設備;由閘道器接收中介設備的裝置資訊,並轉發裝置資訊至雲伺服端;雲伺服端根據裝置資訊生成對應的虛擬通訊介面;虛擬通訊介面建立至少一虛擬設備,並設定虛擬設備的虛擬存取模型;從些虛擬設備選擇任一,由雲伺服端將所選的虛擬設備加載為遠端設備;雲伺服端透過虛擬存取模型將設備命令發送至閘道器與中介設備;中介設備將所接收的網路封包轉換為設備命令;中介設備將終端設備的回覆響應發送至雲伺服端;由虛擬存取模型將第網路封包轉換為回覆響應。 A processing method and system for abstracting and simulating behavior of a remote device, which is characterized by controlling connection identification and operation of the remote device, and includes a gateway network connected to a cloud server and at least one intermediary device. The gateway receives the device information of the intermediary device and forwards the device information to the cloud server; the cloud server generates a corresponding virtual communication interface according to the device information; the virtual communication interface establishes at least one virtual device and sets the virtual storage of the virtual device Take the model; choose any of these virtual devices, and the cloud server will load the selected virtual device as a remote device; the cloud server will send device commands to the gateway and the intermediary device through the virtual access model; the intermediary device will The received network packet is converted into a device command; the intermediary device sends a reply response from the terminal device to the cloud server; and the virtual network access model converts the second network packet into a reply response.

Description

遠端設備的抽象化與模擬行為的處理方法與系統 Processing method and system for remote device abstraction and simulation behavior

一種電子設備的行為處理方法與系統,特別有關遠端設備的抽象化與模擬行為的處理方法與系統。 A method and system for processing behaviors of electronic equipment, in particular, a method and system for abstracting and simulating behaviors of remote equipment.

隨著工廠智慧化與物聯網(Internet to Things,IoT)等議題的興起,各家廠商希望能從雲伺服端(後台主機或雲端)可以即時的收集底層終端設備(device)的各項運作時的訊息,以便將所收集的訊息應用於大數據分析之中。而如何讓終端設備連接至網路才是跨入雲端的首要工作。 With the rise of issues such as factory intelligence and the Internet of Things (IoT), various manufacturers hope to be able to collect various operations of the underlying terminal device (device) from the cloud server (backstage host or cloud) in real time. In order to apply the collected information to big data analysis. And how to make the terminal equipment connect to the network is the most important task when entering the cloud.

習知的終端設備所採的通訊協議並不相容現行的乙太網路(Ethernet)與TCP/IP協議(Transmission Control Protocol/Internet Protocol,簡稱TCP/IP),因此無法直接將資訊上傳至雲端。所述的基礎網路(Filed bus)指的是終端設備所使用的通訊網路,例如:Modbus協議的基礎網路係為RS-485。一般而言,習知技術的終端設備的基礎網路的傳輸距離有限,而且基礎網路的架設方式固定。例如:環狀、菊鏈或星狀等。所以有新終端設備加入時,工作人員不易調整現有的基礎網路的拓樸結構。 The communication protocol adopted by the conventional terminal equipment is not compatible with the current Ethernet and TCP / IP (Transmission Control Protocol / Internet Protocol, TCP / IP), so the information cannot be uploaded directly to the cloud . The basic network (Filed bus) refers to the communication network used by the terminal equipment. For example, the basic network of the Modbus protocol is RS-485. Generally speaking, the transmission distance of the basic network of the terminal equipment of the conventional technology is limited, and the installation method of the basic network is fixed. For example: ring, daisy chain or star. Therefore, when new terminal equipment is added, it is difficult for the staff to adjust the topology of the existing basic network.

以Modbus-TCP協議為例,Modbus-TCP協議原是以主從式架構(Master/Salve)的方式並透過TCP通訊。當Master端(意即雲伺服端)與任一Slave端(意即終端設備)輪詢(polling)時,其他終端設備僅能等待Master端釋放後才能進行連接。當擴增終端設備的數量時,會使得Master輪詢的時間也會隨之增加。這是由於Modbus-TCP協議對於終端設備的控制行為並無相應的變化。因此大量佈建終端設備時,會使得有越多的終端設備會發出中斷要求的次數變多。但每一個訪詢的時間仍是固定,所以就會造成總體的訪詢時間過長。而且新增加的終端設備也會額外加重雲伺服 端的工作負載。 Taking Modbus-TCP protocol as an example, Modbus-TCP protocol was originally based on a master-slave architecture and communicated through TCP. When the master (meaning the cloud server) polls with any slave (meaning the terminal device), other terminal devices can only wait for the master to release the connection before connecting. When the number of terminal devices is increased, the master polling time will also increase accordingly. This is because the Modbus-TCP protocol has no corresponding change in the control behavior of the terminal equipment. Therefore, when a large number of terminal devices are deployed, more terminal devices will issue more interrupt requests. However, the time of each interview is still fixed, so the overall interview time will be too long. And the newly added terminal equipment will also increase the cloud servo End workload.

此外,工作人員除了需要設定終端設備本身的參數,還需要另外設定網路位址。Modbus-TCP協議的雲伺服端是透過查找表(table)與UID來定義所連接的終端設備。工作人員需要設定偵測裝置的相關參數。當設定錯誤的參數時,雲伺服端將無法順利控制終端裝置。而且各家廠商雖然是透過Modbus-TCP協議發展相關的終端設備,但是各家廠商的設定方式是各有差異的。 In addition, the staff need to set the network address in addition to the parameters of the terminal device itself. The cloud server end of the Modbus-TCP protocol defines the connected terminal device through a lookup table (table) and a UID. Workers need to set the relevant parameters of the detection device. When the wrong parameters are set, the cloud server cannot control the terminal device smoothly. And although each manufacturer develops related terminal equipment through the Modbus-TCP protocol, the setting method of each manufacturer is different.

此外,其他種類的終端設備可能是透過所屬的通訊協議,例如:EtherNet/IP或Profinet。當同一工廠中存在多種不同的通訊協議時,基礎網路的佈建難度會隨之增加。對於上層的開發人員而言,在多種通訊協議間的轉換與資料擷取是相當繁雜的工作。 In addition, other types of terminal devices may be through their own communication protocols, such as EtherNet / IP or Profinet. When there are many different communication protocols in the same factory, the difficulty of setting up the basic network will increase. For upper-level developers, the conversion and data extraction between multiple communication protocols is quite complicated.

基於前述各種多種協議的佈線與設備參數的問題,使得雲伺服端不易連接至底層的終端設備而造成底層設備的資料採集不易,使得物聯網與大數據分析無法進一步的推近。 The problems of the wiring and equipment parameters based on the foregoing various protocols make it difficult for the cloud server to connect to the underlying terminal equipment, making it difficult to collect data for the underlying equipment, making it impossible to further advance the Internet of Things and big data analysis.

本發明提供一種遠端設備的抽象化與模擬行為的處理方法,其特徵在於對遠端設備的連接辨識與操作的控制。 The invention provides a processing method for abstracting and simulating behavior of a remote device, which is characterized by controlling connection identification and operation of the remote device.

遠端設備的抽象化與模擬行為的處理方法包括:閘道器網路連接於雲伺服端與至少一中介設備;由閘道器接收每中介設備的裝置資訊,並轉發裝置資訊至雲伺服端;雲伺服端根據裝置資訊生成對應的虛擬通訊介面;對虛擬通訊介面建立至少一虛擬設備,並設定虛擬設備的虛擬存取模型;從些虛擬設備選擇任一,由雲伺服端將所選的虛擬設備加載為遠端設備;雲伺服端透過虛擬存取模型將設備命令封裝成第一網路封包;閘道器接收第一網路封包並轉發至相應的中介設備,中介設備將所接收的第一網路封包轉換為設備命令;中介設備將回覆響應轉換為第二網路封包;發送第二網路封包至閘道器,由閘道器轉發至雲伺服端;由虛擬存取模型將第二網路封包轉換為回覆響應。 The processing method for abstracting and simulating remote devices includes: the gateway network is connected to the cloud server and at least one intermediary device; the gateway receives the device information of each intermediary device and forwards the device information to the cloud server ; Cloud server generates corresponding virtual communication interface according to device information; establish at least one virtual device for virtual communication interface and set virtual access model of virtual device; choose any of these virtual devices, and cloud server will select the selected one The virtual device is loaded as a remote device; the cloud server end encapsulates the device command into a first network packet through the virtual access model; the gateway receives the first network packet and forwards it to the corresponding intermediary device, and the intermediary device The first network packet is converted into a device command; the intermediary device converts the reply response into a second network packet; sends the second network packet to the gateway, which is forwarded to the cloud server; the virtual access model converts The second network packet is converted into a reply response.

本發明另提供一種遠端設備的抽象化與模擬行為的處理系統包括中介設備、雲伺服端與閘道器。中介設備包括第一處理單元、第一 網路單元、第一儲存單元與實體通訊介面,第一處理單元電性連接於第一網路單元、第一儲存單元與實體通訊介面,第一網路單元電性連接終端設備,第一處理單元將第一網路封包轉換為設備命令並發送至終端設備,第一處理單元將終端設備的回覆響應轉換為第二網路封包,第一儲存單元存儲裝置資訊,裝置資訊記錄中介設備的實體通訊介面的種類與數量;雲伺服端包括第二處理單元、第二網路單元與第二儲存單元,第二處理單元電性連接於第二網路單元與第二儲存單元,第二網路單元連接於中介設備,第二處理單元根據所連結的中介設備建立連線清單,第二處理單元根據裝置資訊並建立相應的虛擬通訊介面,第二處理單元對虛擬通訊介面建立至少一虛擬設備,第二處理單元將所選的虛擬設備掛載為遠端設備,第二處理單元設定遠端設備所對應的虛擬存取模型,第二處理單元透過虛擬存取模型傳輸設備命令或回覆響應;閘道器包括第三處理單元、第三網路單元、第四網路單元與第三儲存單元,第三處理單元電性連接於第三網路單元、第四網路單元與第三儲存單元,第三網路單元連接於中介設備,第四網路單元網路連接於雲伺服端,第三處理單元用於轉換第一網路封包與第二網路封包的識別資訊。 The invention further provides a processing system for abstracting and simulating behaviors of remote devices, including an intermediary device, a cloud server and a gateway. The intermediary device includes a first processing unit, a first The network unit, the first storage unit and the physical communication interface, the first processing unit is electrically connected to the first network unit, the first storage unit and the physical communication interface, the first network unit is electrically connected to the terminal device, and the first processing The unit converts the first network packet into a device command and sends it to the terminal device. The first processing unit converts the response from the terminal device into a second network packet. The first storage unit stores device information, and the device information records the entity of the intermediary device. The type and number of communication interfaces; the cloud server includes a second processing unit, a second network unit, and a second storage unit. The second processing unit is electrically connected to the second network unit and the second storage unit. The unit is connected to the intermediary device, the second processing unit establishes a connection list according to the connected intermediary device, the second processing unit establishes a corresponding virtual communication interface according to the device information, and the second processing unit establishes at least one virtual device for the virtual communication interface The second processing unit mounts the selected virtual device as a remote device, and the second processing unit sets the corresponding value of the remote device. The virtual access model, the second processing unit transmits the device command or reply response through the virtual access model; the gateway includes a third processing unit, a third network unit, a fourth network unit and a third storage unit, and the third process The unit is electrically connected to the third network unit, the fourth network unit and the third storage unit, the third network unit is connected to the intermediary device, the fourth network unit is network connected to the cloud server, and the third processing unit is used for For converting the identification information of the first network packet and the second network packet.

本發明的遠端設備的抽象化與模擬行為的處理方法與系統提供由雲伺服端至終端設備的資料傳輸管道,用於實現物聯網的資料採集與設備控制的需求。後台的工作人員不需要在工作現場設定終端設備完成才能讓雲控制端選擇所連接的終端設備。而且中介設備毀損時,工作人員只要將毀損的中介設備替換成新的中介設備後,在雲伺服端只要載入相應的環境設定檔即可驅動新裝設的中介設備。 The method and system for abstracting and simulating behaviors of remote devices of the present invention provide a data transmission pipeline from the cloud server end to the terminal device, which is used to implement the data collection and device control requirements of the Internet of Things. The background staff does not need to set up the terminal equipment at the work site to allow the cloud control terminal to select the connected terminal equipment. In addition, when the intermediary equipment is damaged, the staff only needs to replace the damaged intermediary equipment with a new intermediary equipment, and the newly installed intermediary equipment can be driven by loading the corresponding environment configuration file on the cloud server.

有關本發明的特徵與實作,茲配合圖式作最佳實施例詳細說明如下。 With regard to the features and implementation of the present invention, the preferred embodiment with reference to the drawings is described in detail below.

110、a、b、c‧‧‧中介設備 110, a, b, c‧‧‧ intermediary equipment

111‧‧‧第一處理單元 111‧‧‧first processing unit

112‧‧‧第一網路單元 112‧‧‧The first network unit

113‧‧‧第一儲存單元 113‧‧‧first storage unit

114‧‧‧第一輸出緩存單元 114‧‧‧first output buffer unit

115‧‧‧實體通訊介面 115‧‧‧ physical communication interface

116‧‧‧第一管理程序 116‧‧‧first management program

117‧‧‧裝置資訊 117‧‧‧ Device Information

120‧‧‧雲伺服端 120‧‧‧ Cloud Server

121‧‧‧第二處理單元 121‧‧‧Second Processing Unit

122‧‧‧第二網路單元 122‧‧‧Second Network Unit

123‧‧‧第二輸出緩存單元 123‧‧‧Second output buffer unit

124‧‧‧第二儲存單元 124‧‧‧Second storage unit

125‧‧‧作業系統 125‧‧‧operating system

126‧‧‧第二管理程序 126‧‧‧Second Management Procedure

127‧‧‧連線列表 127‧‧‧connection list

130‧‧‧閘道器 130‧‧‧Gateway

131‧‧‧第三處理單元 131‧‧‧third processing unit

132‧‧‧第三網路單元 132‧‧‧Third Network Unit

133‧‧‧第四網路單元 133‧‧‧Fourth Network Unit

134‧‧‧第三儲存單元 134‧‧‧Third storage unit

140‧‧‧終端設備 140‧‧‧terminal equipment

511‧‧‧第一中介設備 511‧‧‧The first intermediary equipment

512‧‧‧第二中介設備 512‧‧‧Second intermediary equipment

513‧‧‧第三中介設備 513‧‧‧Third intermediary equipment

521‧‧‧警示燈 521‧‧‧Warning lights

522‧‧‧讀卡機 522‧‧‧Card Reader

523‧‧‧溫度計 523‧‧‧ thermometer

524‧‧‧電子磅秤 524‧‧‧electronic scale

第1圖係為本發明的系統架構示意圖。 Figure 1 is a schematic diagram of the system architecture of the present invention.

第2A圖係為本發明的運作流程示意圖。 Figure 2A is a schematic diagram of the operation process of the present invention.

第2B圖係為本發明的中介設備識別示意圖。 FIG. 2B is a schematic diagram for identifying an intermediary device according to the present invention.

第3A圖係為本發明的雲伺服端對中介設備的傳輸示意圖。 FIG. 3A is a schematic diagram of a cloud server end transmitting to an intermediary device according to the present invention.

第3B圖係為本發明的雲伺服端與中介設備的分層控制示意圖。 FIG. 3B is a schematic diagram of the layered control of the cloud server and the intermediary device of the present invention.

第3C圖係為本發明的虛擬存取模型的動作機制示意圖。 FIG. 3C is a schematic diagram of an operation mechanism of the virtual access model of the present invention.

第4A圖係為本發明的處理系統的連接示意圖。 FIG. 4A is a connection diagram of the processing system of the present invention.

第4B圖係為本發明的處理系統的設定示意圖。 FIG. 4B is a schematic diagram of setting the processing system of the present invention.

第4C圖係為本發明的處理系統的控制示意圖。 Fig. 4C is a control schematic diagram of the processing system of the present invention.

第5A圖係為本發明的中介設備更換前示意圖。 Figure 5A is a schematic diagram before the intermediary equipment of the present invention is replaced.

第5B圖係為本發明的中介設備更換後示意圖。 Figure 5B is a schematic diagram after the intermediary equipment of the present invention is replaced.

本發明所揭示遠端設備的抽象化與模擬行為的處理系統包括中介設備110、雲伺服端120、閘道器130與終端設備140。請配合第1圖所示,其係為本發明的系統架構示意圖。中介設備110網路連接於閘道器130。另外,中介設備110可選擇是否電性連接於終端設備140。閘道器130網路連接於雲伺服端120。在本發明中閘道器130用於區分兩個不同的網路區段。閘道器130與中介設備110在本發明中設定為區域網段,閘道器130與雲伺服端120則設定為外部網段。雲端伺服器往閘道器130與中介設備110所發送的網路封包定義為第一網路封包,而中介設備110或閘道器130發往雲伺服端120的網路封包則定義為第二網路封包。 The processing system for abstracting and simulating a remote device disclosed in the present invention includes an intermediary device 110, a cloud server 120, a gateway 130, and a terminal device 140. Please cooperate with FIG. 1, which is a schematic diagram of the system architecture of the present invention. The intermediary device 110 is network-connected to the gateway 130. In addition, the intermediary device 110 may select whether to be electrically connected to the terminal device 140. The gateway 130 is network-connected to the cloud server 120. In the present invention, the gateway 130 is used to distinguish two different network segments. The gateway 130 and the intermediary device 110 are set as a regional network segment in the present invention, and the gateway 130 and the cloud server 120 are set as an external network segment. The network packet sent by the cloud server to the gateway 130 and the intermediary device 110 is defined as the first network packet, and the network packet sent by the intermediary device 110 or the gateway 130 to the cloud server 120 is defined as the second network packet. Network packets.

中介設備110包括第一處理單元111、第一網路單元112、第一儲存單元113、第一輸出緩存單元114與實體通訊介面115。第一處理單元111電性連結第一網路單元112、第一儲存單元113、第一輸出緩存單元114與實體通訊介面115。第一網路單元112連結於閘道器130。第一網路單元112與閘道器130係以媒體存取控制位址層(Media Access Control Address Layer,簡稱MAC Layer)封裝傳輸的網路封包。 The intermediary device 110 includes a first processing unit 111, a first network unit 112, a first storage unit 113, a first output buffer unit 114, and a physical communication interface 115. The first processing unit 111 is electrically connected to the first network unit 112, the first storage unit 113, the first output buffer unit 114, and the physical communication interface 115. The first network unit 112 is connected to the gateway 130. The first network unit 112 and the gateway 130 use a Media Access Control Address Layer (Media Access Control Address Layer, MAC layer for short) to encapsulate and transmit network packets.

第一儲存單元113存儲第一管理程序116與裝置資訊117。第一處理單元111運行第一管理程序116。第一管理程序116除了提供中介設備110的裝置資訊117,也將設備命令或回覆響應轉換為網路封包。裝置資訊117中記載中介設備110的型號資訊與所搭載的實體通訊介面115(種類與數量)。裝置資訊117也記錄至少一組的介面通道與中介設備 110的位址資訊。在區域網段中的位址資訊係為媒體存取控制位址。 The first storage unit 113 stores a first management program 116 and device information 117. The first processing unit 111 runs a first management program 116. In addition to providing the device information 117 of the intermediary device 110, the first management program 116 also converts device commands or response responses into network packets. The device information 117 records the model information of the intermediary device 110 and the physical communication interface 115 (type and quantity) carried therein. Device information 117 also records at least one set of interface channels and intermediary devices 110 address information. The address information in the local network segment is the media access control address.

實體通訊介面115電性連接於終端設備140,終端設備140接收設備命令或發送回覆響應。實體通訊介面115可以是但不限定為串列介面(serial)、並列介面(parallel)、類比輸入/輸出介面(analog I/O)、數位輸入/輸出介面(digital I/O)或通用序列匯流排(Universal Serial Bus,USB)。裝置資訊117的每一組介面通道均對應實體通訊介面115。舉例而言,第一組的介面通道對應RS-232,第二組的介面通道對應串列介面。此外,其他組的介面通道也可以對應至已存在的實體通訊介面115。 The physical communication interface 115 is electrically connected to the terminal device 140, and the terminal device 140 receives a device command or sends a reply response. The physical communication interface 115 may be, but is not limited to, a serial interface, a parallel interface, an analog input / output interface (analog I / O), a digital input / output interface (digital I / O), or a universal serial bus. (Universal Serial Bus, USB). Each set of interface channels of the device information 117 corresponds to a physical communication interface 115. For example, the interface channels of the first group correspond to RS-232, and the interface channels of the second group correspond to the serial interface. In addition, the interface channels of other groups may also correspond to the existing physical communication interface 115.

雲伺服端120包括第二處理單元121、第二網路單元122、第二輸出緩存單元123與第二儲存單元124。第二處理單元121電性連結於第二網路單元122、第二輸出緩存單元123與第二儲存單元124。 The cloud server 120 includes a second processing unit 121, a second network unit 122, a second output buffer unit 123, and a second storage unit 124. The second processing unit 121 is electrically connected to the second network unit 122, the second output buffer unit 123, and the second storage unit 124.

第二網路單元122網路連接閘道器130。第二儲存單元124存儲作業系統125、第二管理程序126與連線列表127。連線列表127記錄所連接的閘道器130與所屬的中介設備110。第二處理單元121用於運行作業系統125並執行第二管理程序126。作業系統125可以是微軟(Microsoft)的視窗作業系統125或UNIX相關作業系統125。第二處理單元121另根據所連接的中介設備110與所選的介面通道,進而生成相應的虛擬通訊介面及虛擬存取模型。第二輸出緩存單元123用於暫存發送至中介設備110的相關資料,藉以保證發送至中介設備110的資料完整性。雲伺服端120與閘道器130之間係以傳輸控制協議/網路傳輸協議(Transmission Control Protocol/Internet Protocol,簡稱TCP/IP)的方式封裝傳輸的網路封包。換言之,雲伺服端120與閘道器130之間的封包識別是透過IP位址。而閘道器130與中介設備110之間的封包識別則是透過MAC位址。 The second network unit 122 is network-connected to the gateway 130. The second storage unit 124 stores the operating system 125, the second management program 126, and the connection list 127. The connection list 127 records the connected gateway 130 and the associated intermediary device 110. The second processing unit 121 is configured to run the operating system 125 and execute a second management program 126. The operating system 125 may be a Microsoft Windows operating system 125 or a UNIX related operating system 125. The second processing unit 121 further generates a corresponding virtual communication interface and a virtual access model according to the connected intermediary device 110 and the selected interface channel. The second output buffer unit 123 is configured to temporarily store relevant data sent to the intermediary device 110, thereby ensuring the integrity of the data sent to the intermediary device 110. The cloud server 120 and the gateway 130 are used to encapsulate transmission network packets in a Transmission Control Protocol / Internet Protocol (TCP / IP) method. In other words, the packet identification between the cloud server 120 and the gateway 130 is through an IP address. The packet identification between the gateway 130 and the intermediary device 110 is through a MAC address.

閘道器130可以透過個人電腦(PC)或是單晶片微計算機(ASIC)等各種型態實現。閘道器130包括第三處理單元131、第三網路單元132、第四網路單元133與第三儲存單元134。第三處理單元131電性連結第三網路單元132與第三儲存單元134。第三網路單元132連接於中介設備110,第四網路單元133連接於雲伺服端120。第三處理單元131用於轉換第一網路封包與第二網路封包的識別資訊。第三儲存單元134儲 存識別資訊與暫存通過閘道器130的網路封包。因此識別資訊在區域網段中係為MAC位址,而在外部網段則為IP位址。 The gateway 130 may be implemented by various types such as a personal computer (PC) or a single-chip microcomputer (ASIC). The gateway 130 includes a third processing unit 131, a third network unit 132, a fourth network unit 133, and a third storage unit 134. The third processing unit 131 is electrically connected to the third network unit 132 and the third storage unit 134. The third network unit 132 is connected to the intermediary device 110, and the fourth network unit 133 is connected to the cloud server 120. The third processing unit 131 is configured to convert the identification information of the first network packet and the second network packet. The third storage unit 134 stores The identification information and the network packets passing through the gateway 130 are temporarily stored. Therefore, the identification information is a MAC address in the regional network segment and an IP address in the external network segment.

對外部網段而言,閘道器130在初次連接網路時會發送連線要求至雲伺服端120。對區域網段而言,閘道器130根據識別資訊查詢相應的中介設備110的MAC位址,並將所查詢到的MAC位址對第一網路封包的標頭重新設定。由於雲伺服端120的第一網路封包的標頭僅提供閘道器130的IP位址與MAC位址。因此閘道器130無法直接從第一網路封包標頭的MAC位址直接映射至中介設備110的MAC位址。當從外部網段的封包發送至區域網段時,第三處理單元131會從第一網路封包文本中解析目的地的中介設備110的識別資訊,並重新封裝封包標頭。中介設備110在發送第二網路封包至閘道器130時,則由閘道器130根據雲端服務器的位址重新封裝第二網路封包的標頭與相關資訊。 For external network segments, the gateway 130 sends a connection request to the cloud server 120 when it first connects to the network. For a regional network segment, the gateway 130 queries the MAC address of the corresponding intermediary device 110 according to the identification information, and resets the queried MAC address to the header of the first network packet. Because the header of the first network packet of the cloud server 120 only provides the IP address and the MAC address of the gateway 130. Therefore, the gateway 130 cannot directly map the MAC address of the first network packet header to the MAC address of the intermediary device 110. When the packet from the external network segment is sent to the regional network segment, the third processing unit 131 parses the identification information of the destination intermediary device 110 from the first network packet text, and re-encapsulates the packet header. When the intermediary device 110 sends the second network packet to the gateway 130, the gateway 130 repackages the header and related information of the second network packet according to the address of the cloud server.

為進一步說明中介設備110與雲伺服端120的處理流程,請配合第2A圖所示,其係為本發明的運作流程示意圖。本發明的遠端設備的抽象化與模擬行為的處理方法包括以下步驟:步驟S210:閘道器網路連接於雲伺服端與至少一中介設備;步驟S220:由閘道器接收每一中介設備的裝置資訊,並轉發裝置資訊至雲伺服端;步驟S230:雲伺服端根據裝置資訊生成對應的虛擬通訊介面;步驟S240:對虛擬通訊介面建立至少一虛擬設備,並設定虛擬設備的虛擬存取模型;步驟S250:從虛擬設備選擇任一,由雲伺服端將所選的虛擬設備加載為遠端設備;步驟S260:雲伺服端透過虛擬存取模型將設備命令封裝成第一網路封包;步驟S270:閘道器接收第一網路封包並轉發至相應的中介設備,中介設備將所接收的第一網路封包轉換為設備命令;步驟S280:中介設備將回覆響應轉換為第二網路封包;步驟S290:發送第二網路封包至閘道器,由閘道器轉發至雲伺服端; 以及步驟S300:由虛擬存取模型將第二網路封包轉換為回覆響應。 To further explain the processing flow of the intermediary device 110 and the cloud server 120, please cooperate with FIG. 2A, which is a schematic diagram of the operation flow of the present invention. The method for processing the abstraction and simulation of the remote device of the present invention includes the following steps: Step S210: the gateway network is connected to the cloud server and at least one intermediary device; step S220: the gateway receives each intermediary device Device information and forward the device information to the cloud server; step S230: the cloud server generates a corresponding virtual communication interface according to the device information; step S240: establish at least one virtual device for the virtual communication interface and set virtual access to the virtual device Model; step S250: select any one from the virtual device, and the cloud server end loads the selected virtual device as a remote device; step S260: the cloud server end encapsulates the device command into a first network packet through the virtual access model; Step S270: the gateway receives the first network packet and forwards it to the corresponding intermediary device, and the intermediary device converts the received first network packet into a device command; step S280: the intermediary device converts the response to the second network Packet; step S290: sending a second network packet to the gateway, which is forwarded to the cloud server; And step S300: the second network packet is converted into a reply response by the virtual access model.

首先,中介設備110可以選擇是否連接終端設備140。閘道器130分別網路連接雲伺服端120與中介設備110。閘道器130將所連接的兩個網段分別定義為區域網段與外部網段。在區域網段中,中介設備110與閘道器130係以MAC位址作為裝置搜尋與封包傳輸的方式。在外部網段,閘道器130與雲伺服端120係以IP位址作為網路封包的傳輸方式。 First, the intermediary device 110 can choose whether to connect the terminal device 140 or not. The gateway 130 is respectively connected to the cloud server 120 and the intermediary device 110 via a network. The gateway 130 defines the two connected network segments as a regional network segment and an external network segment, respectively. In the local network segment, the intermediary device 110 and the gateway 130 use the MAC address as a means for device search and packet transmission. In the external network segment, the gateway 130 and the cloud server 120 use the IP address as the transmission method of the network packet.

在中介設備110連接於閘道器130時,閘道器130會開始廣播識別要求,如第2B圖所示。中介設備110接獲識別要求,中介設備110將裝資訊以第二網路封包的方式傳送至閘道器130。閘道器130再將裝置資訊117轉發至雲伺服端120,雲伺服端120根據裝置資訊117將中介設備110新增至連線列表127中。當有任一中介設備110被更換時,則雲伺服端120也會根據新的中介設備110更新連線列表127與相關的環境參數。在裝置資訊117中記錄中介設備110所搭載的實體通訊介面115的種類與數量。 When the intermediary device 110 is connected to the gateway 130, the gateway 130 starts to broadcast the identification request, as shown in FIG. 2B. The intermediary device 110 receives the identification request, and the intermediary device 110 transmits the packaging information to the gateway 130 in the form of a second network packet. The gateway 130 forwards the device information 117 to the cloud server 120, and the cloud server 120 adds the intermediary device 110 to the connection list 127 according to the device information 117. When any intermediary device 110 is replaced, the cloud server 120 will also update the connection list 127 and related environmental parameters according to the new intermediary device 110. The device information 117 records the type and number of the physical communication interface 115 carried by the intermediary device 110.

另外,雲伺服端120接獲裝置資訊117時,第二處理單元121根據裝置資訊117的介面通道與種類在作業系統125中加載虛擬通訊介面。第二處理單元121根據虛擬通訊介面建立至少一虛擬設備與相應的虛擬存取模型。於載入虛擬通訊介面的過程中,第二管理程序126同時會根據虛擬通訊介面的種類生成相應的虛擬存取模型。在本發明中對於各虛擬通訊介面與虛擬存取模型的建立處理稱之為物件化(Object)。虛擬存取模型用於配置遠端設備的存取設定。 In addition, when the cloud server 120 receives the device information 117, the second processing unit 121 loads a virtual communication interface into the operating system 125 according to the interface channel and type of the device information 117. The second processing unit 121 establishes at least one virtual device and a corresponding virtual access model according to the virtual communication interface. During the process of loading the virtual communication interface, the second management program 126 also generates a corresponding virtual access model according to the type of the virtual communication interface. In the present invention, the process of establishing each virtual communication interface and virtual access model is called Object. The virtual access model is used to configure the access settings of the remote device.

舉例來說,裝置資訊117記載一組RS-232介面與一組RS-485介面。第二管理程序126將會根據裝置資訊117所載的介面種類在作業系統125中加載前述的RS-232與RS-485的虛擬通訊介面。在另外的實施態樣中,裝置資訊117也可以記錄多組相同的介面。例如,在另一實施態樣中裝置資訊117可以記錄兩組(或多組)相同的通訊介面。 For example, the device information 117 records a set of RS-232 interfaces and a set of RS-485 interfaces. The second management program 126 will load the aforementioned RS-232 and RS-485 virtual communication interfaces into the operating system 125 according to the interface type contained in the device information 117. In another embodiment, the device information 117 may also record multiple sets of the same interface. For example, in another embodiment, the device information 117 may record two (or more) sets of the same communication interface.

換言之,虛擬存取模型可以對實體通訊介面115的設備控制方式與資料的傳輸相關設定。特別是中介設備110與雲伺服端120之間 的存取、連線維持(connection maintain)、管理、資料傳輸交握(handshake)、資料重傳與異常回報等。使用者可以透過雲伺服端120從所述的虛擬通訊介面中選擇其一,並將所選的遠端設備映射(mapping)至終端設備140。所述映射的方式係透過作業系統125、驅動程式與第二管理程序126的組合建立終端設備140相對遠端設備的傳輸管道。 In other words, the virtual access model can set the device control mode and data transmission related settings of the physical communication interface 115. Especially between the intermediary device 110 and the cloud server 120 Access, connection maintain, management, data transfer handshake, data retransmission, and abnormal reporting. The user may select one of the virtual communication interfaces through the cloud server 120 and map the selected remote device to the terminal device 140. The mapping method is to establish a transmission channel between the terminal device 140 and the remote device through a combination of the operating system 125, the driver, and the second management program 126.

接著,第二處理單元121對虛擬通訊介面建立至少一虛擬設備。第二管理程序126根據虛擬通訊介面的種類與數量提供遠端設備列表。例如:在RS-232的虛擬通訊介面可以分別對應條碼讀卡機522(barcode reader)或印表機(printer)等虛擬設備。使用者可以從虛擬設備的列表中選擇任一。在本說明書中對所選的虛擬設備另定義為遠端設備。基於所述的傳輸管道,第二管理程序126將設備命令與回覆響應的各種處理行為抽象化為虛擬通訊介面,工作人員即可直接對虛擬出來的遠端設備進行操作。 Then, the second processing unit 121 establishes at least one virtual device on the virtual communication interface. The second management program 126 provides a remote device list according to the type and quantity of the virtual communication interface. For example, the RS-232 virtual communication interface can correspond to a virtual device such as a barcode reader 522 (barcode reader) or a printer (printer), respectively. The user can select any one from the list of virtual devices. The selected virtual device is defined as a remote device in this manual. Based on the transmission pipeline, the second management program 126 abstracts various processing actions of device commands and response responses into a virtual communication interface, and a worker can directly operate the virtual remote device.

第二管理程序126根據中介設備110與遠端設備定義出存取的定址機制,如第3A圖所示。本發明中採用通道(channel)與位移(offset)的方式定義中介設備110與遠端設備的相關位址(address)。對於雲伺服端120而言,每一種不同的遠端設備可以被視為不同的物件。在第3A圖中,雲伺服端120根據中介設備110的虛擬通訊介面指定通道,並在指定的通道中以記憶體的位移量作為不同的遠端設備。第3圖的雲伺服端120根據「GW_x:Dev_m:CH_n」的通道與位移作為中介設備110110與遠端設備的識別(以黑虛線表示所指定的設備),其中「GW_x」表示閘道器130、「Dev_m」表示中介設備110的設備編號、「CH_n」表示第m個位移量(意即遠端設備)。 The second management program 126 defines an access addressing mechanism according to the intermediary device 110 and the remote device, as shown in FIG. 3A. In the present invention, a channel and an offset are used to define the relevant addresses of the intermediary device 110 and the remote device. For the cloud server 120, each different remote device can be regarded as a different object. In FIG. 3A, the cloud server 120 designates a channel according to the virtual communication interface of the intermediary device 110, and uses the amount of memory displacement as a different remote device in the specified channel. The cloud server 120 in FIG. 3 uses the channel and displacement of “GW_x: Dev_m: CH_n” as the identification of the intermediate device 110110 and the remote device (the designated device is indicated by a black dotted line), where “GW_x” indicates the gateway 130 "Dev_m" represents the device number of the intermediary device 110, and "CH_n" represents the m-th displacement (meaning the remote device).

第3B圖係為本發明的物件與實體通訊介面115的對應示意圖。在第3B圖中左方代表雲伺服端120,右方表示中介設備110,雲伺服端120與中介設備110之間經由乙太網路作為傳輸的媒介。雲伺服端120的上層具有多個物件,而中介設備110上層也對應有多個實體通訊介面115。在第3B圖中的雙方均設兩物件與兩實體通訊介面115。而雲伺服端120的物件與乙太網路之間更可以劃分為資料轉換層(data transform layer)。資料轉換層的作用在於處理設備命令與回覆響應的網路封包的轉換。在雲伺服端120的各物件均各自對應實體通訊介面115,在第3B圖中係以物件A與物件B分別對應實體通訊介面115與實體通訊介面115。 FIG. 3B is a schematic diagram of the correspondence between the object and the physical communication interface 115 of the present invention. In FIG. 3B, the left side represents the cloud server end 120, and the right side represents the intermediary device 110. The cloud server end 120 and the intermediary device 110 via Ethernet are used as a transmission medium. The upper layer of the cloud server 120 has multiple objects, and the upper layer of the intermediary device 110 also corresponds to multiple physical communication interfaces 115. In both sides of FIG. 3B, two objects and two physical communication interfaces 115 are provided. The objects on the cloud server 120 and the Ethernet network can be further divided into a data transform layer (data transform layer). layer). The role of the data conversion layer is to handle the conversion of device commands and response network packets. Each object on the cloud server 120 corresponds to the physical communication interface 115, and in FIG. 3B, the object A and the object B correspond to the physical communication interface 115 and the physical communication interface 115, respectively.

此外,虛擬存取模型針對設備的控制與資料的存取定義相應的處理機制係分別為事件(event)、指令(command)與資料(data),並請配合第3C圖。「事件」用於中介設備110對雲伺服端120的中斷處理要求。「指令」用於雲伺服端120對中介設備110的操作控制。「資料」用於中介設備110與雲伺服端120之間的資料傳輸與交換。本發明的中介設備110在接獲事件發生時將會事件種類即時的回報至雲伺服端120。相較習知技術的終端設備140的通訊協議,雲伺服端120不需要等待所有的終端設備140被遍詢後才能得知某一終端設備140有事件發生。當雲伺服端120欲操作遠端設備時,雲伺服端120可以透過虛擬存取模型轉發指令至閘道器130與中介設備110,再由中介設備110將指令發送至終端設備140。 In addition, the virtual access model defines the corresponding processing mechanisms for device control and data access. They are events, commands, and data, respectively, and please cooperate with Figure 3C. The "event" is used for the interrupt processing request of the intermediary device 110 to the cloud server 120. The “command” is used for the cloud server 120 to control the operation of the intermediary device 110. "Data" is used for data transmission and exchange between the intermediary device 110 and the cloud server 120. When the intermediary device 110 of the present invention receives an event, it reports the event type to the cloud server 120 in real time. Compared with the communication protocol of the terminal device 140 of the conventional technology, the cloud server 120 does not need to wait for all the terminal devices 140 to be queried before learning that an event has occurred in a certain terminal device 140. When the cloud server 120 wants to operate a remote device, the cloud server 120 can forward the instructions to the gateway 130 and the intermediary device 110 through the virtual access model, and then the intermediary device 110 sends the instructions to the terminal device 140.

為確保網路封包的傳輸時的完整性,第一管理程序116在發送第二網路封包前,第一處理單元111會將第二網路封包預儲存在第一輸出緩存單元114。第一輸出緩存單元114將現有的第二網路封包發送完成後,才會載入新的第二網路封包。因此第一管理程序116除了根據網路的傳輸狀態調整第一輸出緩存單元114的資料發送速率,藉以避免雲伺服端120發生資料溢出(overflow)的情況。 To ensure the integrity of the network packet transmission, before the first management program 116 sends the second network packet, the first processing unit 111 stores the second network packet in the first output buffer unit 114 in advance. The first output buffer unit 114 will only load the new second network packet after sending the existing second network packet. Therefore, in addition to adjusting the data sending rate of the first output buffer unit 114 according to the transmission status of the network, the first management program 116 can avoid data overflow in the cloud server 120.

所述的資料溢出的發生情況,主要發生在網路傳輸速率不穩定時,接收方的緩存單元還未處理完所接收的封包,但後續的網路封包還是會被持續的接收。這樣將會使得接收方的網路封包轉換回資料(或指令),產生資料(或指令)的片段遺漏或轉譯錯誤。同理,第二管理程序126在發送第一網路封包前,第二處理單元121會將第一網路封包預儲存在第二輸出緩存單元123。 The occurrence of the data overflow mainly occurs when the network transmission rate is unstable and the receiving unit's buffer unit has not finished processing the received packets, but subsequent network packets will still be continuously received. This will cause the receiver's network packets to be converted back into data (or instructions), resulting in missing or translated fragments of the data (or instructions). Similarly, before the second management program 126 sends the first network packet, the second processing unit 121 stores the first network packet in the second output buffer unit 123 in advance.

第一處理單元111根據第一網路封包所轉譯的「事件」、「資料」或「指令」的優先權高低,第一處理單元111在決定將相應的設備命令依序的發送至相應的終端設備140。一般而言,「事件」的優先順 序高於「指令」與「資料」。「指令」的優先順序高於「資料」。當中介設備110接獲「事件」時,中介設備110將會中斷當前處理中的「指令」或「資料」,以便優先執行「事件」。 The first processing unit 111 determines the priority of the "event", "data" or "instruction" translated by the first network packet. The first processing unit 111 decides to send the corresponding device commands to the corresponding terminal in order. Equipment 140. Generally speaking, the priority of "event" The order is higher than the "command" and "data". The "command" takes precedence over the "data". When the intermediary device 110 receives the "event", the intermediary device 110 will interrupt the "instruction" or "data" currently being processed in order to execute the "event" first.

終端設備140運行所接獲的設備命令後,終端設備140在完成相關操作後可能返回所述的回覆響應。中介設備110將回覆響應轉換為第二網路封包,並將第二網路封包傳送至雲伺服端120。舉例來說,當終端設備140的讀卡機522在讀取卡片時,將會返回讀取卡片時的回覆響應。終端設備140透過中介設備110與閘道器130將回覆響應傳送至雲伺服端120。 After the terminal device 140 runs the received device command, the terminal device 140 may return the reply response after completing the related operations. The intermediary device 110 converts the reply response into a second network packet, and sends the second network packet to the cloud server 120. For example, when the card reader 522 of the terminal device 140 reads a card, it will return a response when the card is read. The terminal device 140 transmits the reply response to the cloud server 120 through the intermediary device 110 and the gateway 130.

在中介設備110與雲伺服端120傳輸的過程中,兩方均會監控封包接收完整率是否匹配。封包接收完整率係為網路封包的完整程度。由於網路封包的傳輸過程中可能會遭遇碰撞或斷線等情況,使得發送方發出過量的網路封包使得接收方來不及處理,進而造成封包溢出。當任一方的封包接收完整率超過流量門檻時,則調整中介設備110或雲伺服端120的資料輸出量。封包接收完整率係為第一網路封包對設備命令的完整度,或是第二網路封包對回覆響應的完整度。 During the transmission process between the intermediary device 110 and the cloud server 120, both parties will monitor whether the packet reception completeness rate matches. The packet reception integrity rate is the completeness of the network packets. Because the network packet may encounter collision or disconnection during the transmission process, the sender sends an excessive amount of network packets so that the receiver has no time to deal with it, which causes the packet to overflow. When the packet receiving integrity rate of either party exceeds the traffic threshold, the data output of the intermediary device 110 or the cloud server 120 is adjusted. The packet receiving completeness rate is the completeness of the first network packet to the device command, or the completeness of the second network packet to the response.

在雲伺服端120發送設備命令的過程中會將設備命令轉換為若干個第一網路封包。因此中介設備110可以判斷設備命令與第一網路封包的數量的接收完整率。當接收方的處理速度趕不上封包發送的時候,可能會導致發送方所發出的封包並未能讓接收方收取。因此本發明於發生所述狀況時,發送方將會降低封包的傳送速度,以使接收方可以確保封包的解析處理。由於中介設備110、閘道器130與雲伺服端120均可能是發送方或接收方,因此中介設備110、閘道器130與雲伺服端120都會配置所述的緩存處理機制。 During the process of sending the device command by the cloud server 120, the device command is converted into several first network packets. Therefore, the intermediary device 110 can determine the receiving complete rate of the device command and the number of the first network packets. When the processing speed of the receiver cannot keep up with the sending of the packet, the packet sent by the sender may not be received by the receiver. Therefore, when the present invention occurs, the sender will reduce the transmission speed of the packet, so that the receiver can ensure the parsing process of the packet. Since the intermediary device 110, the gateway 130, and the cloud server 120 may all be senders or receivers, the intermediary device 110, the gateway 130, and the cloud server 120 may all configure the cache processing mechanism described above.

為清楚說明本發明的整體運作方式,以下係以雲伺服端120、閘道器130、中介設備110與所連接的終端設備140的相關操作作為說明。請參考第4A圖~第4C圖所示,其係分別為本發明的多個區域網路的處理系統的連接、設定與控制之示意圖。第4A圖中具有兩個不同的區域網路,分別由第一閘道器130與第2閘道器130連接於雲伺服端120。 第一閘道器130連接第一中介設備511與第二中介設備512,第2閘道器130連接第三中介設備513。 In order to clearly explain the overall operation mode of the present invention, the following takes the related operations of the cloud server 120, the gateway 130, the intermediary device 110, and the connected terminal device 140 as an illustration. Please refer to FIG. 4A to FIG. 4C, which are schematic diagrams of connection, setting and control of processing systems of multiple local area networks of the present invention, respectively. In FIG. 4A, there are two different local area networks, and the first gateway 130 and the second gateway 130 are respectively connected to the cloud server 120. The first gateway 130 is connected to the first intermediary device 511 and the second intermediary device 512, and the second gateway 130 is connected to the third intermediary device 513.

第一中介設備511電性連接於兩個終端設備140,在此假設分別為警示燈521(RS-485)與讀卡機522(RS-232)。第二中介設備512連接溫度計523(Digital I/O)。第三中介設備513電性連接電子磅秤524(RS-232),前文括號中代表終端設備140所連接的實體通訊介面115。 The first intermediary device 511 is electrically connected to the two terminal devices 140, and it is assumed here that they are the warning light 521 (RS-485) and the card reader 522 (RS-232). The second intermediary device 512 is connected to a thermometer 523 (Digital I / O). The third intermediary device 513 is electrically connected to the electronic scale 524 (RS-232). The parentheses in the foregoing represent the physical communication interface 115 to which the terminal device 140 is connected.

首先,第一閘道器130連通至外部網段時,第一閘道器130會發送連線要求至雲伺服端120,用於建立第一閘道器130與雲伺服端120的連線。另外,第一閘道器130連通區域網路時,第一閘道器130會廣播發送識別要求至中介設備110。當任一中介設備110接獲識別要求時,中介設備110會根據識別要求回覆所屬的裝置資訊117給雲伺服端120。假設第一中介設備511接獲識別要求時,第一中介設備511將會返回所屬的裝置資訊117給雲伺服端120。雲伺服端120將會把第一中介設備511加入現有的連線列表127中。同理,雲伺服端120也會將第二中介設備512與第三中介設備513加入連線列表127中。若是有非法的中介設備110被安裝於該網路區段中,雲伺服端120也會收到相應的裝置資訊117。雲伺服端120可以決定是否將中介設備110新增至現有的連線列表127中。若是雲伺服端120不添加此中介設備110至連線列表127,則雲伺服端120將不會與所述的中介設備110建立網路連線。 First, when the first gateway 130 is connected to an external network segment, the first gateway 130 sends a connection request to the cloud server 120 to establish a connection between the first gateway 130 and the cloud server 120. In addition, when the first gateway 130 is connected to the local area network, the first gateway 130 broadcasts and sends an identification request to the intermediary device 110. When any intermediary device 110 receives the identification request, the intermediary device 110 will reply to the device information 117 to the cloud server 120 according to the identification request. It is assumed that when the first intermediary device 511 receives the identification request, the first intermediary device 511 will return the device information 117 to the cloud server 120. The cloud server 120 will add the first intermediary device 511 to the existing connection list 127. Similarly, the cloud server 120 will also add the second intermediary device 512 and the third intermediary device 513 to the connection list 127. If an illegal intermediary device 110 is installed in the network segment, the cloud server 120 will also receive corresponding device information 117. The cloud server 120 may decide whether to add the intermediary device 110 to the existing connection list 127. If the cloud server 120 does not add the intermediary device 110 to the connection list 127, the cloud server 120 will not establish a network connection with the intermediary device 110.

接著,雲伺服端120根據各不同的中介設備110的裝置資訊117分別各自所屬的加載虛擬通訊介面。換言之,在雲伺服端120的作業系統125中會加載中介設備110的虛擬通訊介面。在此一示例中,雲伺服端120會加載RS-485、RS-232與Digital I/O的虛擬通訊介面。而每一種的虛擬通訊介面可能被賦予不同的虛擬存取模型用於區別各類的遠端設備。使用者可以選擇不同的虛擬存取模型並且根據遠端設備的需求調整虛擬存取模型的相關屬性。舉例來說,RS-232的虛擬存取模型需要設定傳輸率(Baud Rate)才能正確驅動讀卡機522。但對溫度計523而言,Digital I/O的虛擬存取模型不需設定傳輸率也可以取得溫度的數值。因此對於不同類型的遠端設備,使用者可以經由設定虛擬存取模型的各種屬性,用於配合各 式的遠端設備與實體通訊介面115。 Next, the cloud server 120 loads the virtual communication interfaces respectively according to the device information 117 of the different intermediary devices 110. In other words, the virtual communication interface of the intermediary device 110 is loaded into the operating system 125 of the cloud server 120. In this example, the cloud server 120 will load the virtual communication interfaces of RS-485, RS-232 and Digital I / O. Each virtual communication interface may be assigned a different virtual access model to distinguish various types of remote devices. The user can select different virtual access models and adjust the relevant attributes of the virtual access models according to the requirements of the remote device. For example, the RS-232 virtual access model needs to set a Baud Rate to properly drive the card reader 522. But for the thermometer 523, the digital I / O virtual access model can obtain the temperature value without setting the transmission rate. Therefore, for different types of remote devices, users can set various properties of the virtual access model to cooperate with each Remote device and physical communication interface 115.

當完成前述的虛擬通訊介面的加載後,在第二管理程序126的畫面中將會顯示已經完成連接的中介設備110,如第4B圖所示。在第4B圖的第二管理程序126中分別顯示第一中介設備511、第二中介設備512與第三中介設備513。由於尚未設定相關的虛擬存取模型,因此在第二管理程序126中僅會顯示前述所連接的各中介設備110。 After the loading of the aforementioned virtual communication interface is completed, the intermediary device 110 that has completed the connection will be displayed on the screen of the second management program 126, as shown in FIG. 4B. The second management program 126 in FIG. 4B shows the first intermediary device 511, the second intermediary device 512, and the third intermediary device 513, respectively. Since the relevant virtual access model has not been set, only the aforementioned intermediary devices 110 are displayed in the second management program 126.

使用者在第二管理程序126的介面選擇第一中介設備511,並針對第一中介設備511的各種虛擬通訊介面分別指定相應的遠端設備。設定遠端設備的過程中,使用者僅需指派遠端設備的名稱、類型與設定虛擬存取模型即可完成遠端設備的相關加載與設定,而第二管理程序126的介面如第4C圖所示。對於第二中介設備512與第三中介設備513也進行相同的選擇處理。 The user selects the first intermediary device 511 on the interface of the second management program 126, and designates corresponding remote devices for various virtual communication interfaces of the first intermediary device 511, respectively. During the process of setting the remote device, the user only needs to assign the name, type, and virtual access model of the remote device to complete the loading and setting of the remote device. The interface of the second management program 126 is shown in Figure 4C. As shown. The same selection process is performed for the second intermediary device 512 and the third intermediary device 513.

當使用者完成前述的遠端設備的相關設定後,第二管理程序126將會透過遠端設備與所屬的虛擬存取模型對虛擬通訊介面進行資料存取或指令的控制。在第4C圖中係以選擇第一中介設備511與溫度計523為說明,在第二管理程序126的顯示畫面中遠端設備的溫度計523透過虛擬存取模型取得終端設備140的實際數值並顯示於第二管理程序126的畫面中。在第4C圖中,當使用者選擇溫度計523時,則右方畫面將會顯示溫度與時間的變化關係。 After the user completes the related settings of the remote device, the second management program 126 will perform data access or command control on the virtual communication interface through the remote device and the virtual access model to which it belongs. In FIG. 4C, it is explained that the first intermediary device 511 and the thermometer 523 are selected. In the display screen of the second management program 126, the thermometer 523 of the remote device obtains the actual value of the terminal device 140 through the virtual access model and displays it on The screen of the second management program 126. In FIG. 4C, when the user selects the thermometer 523, the right screen will show the relationship between temperature and time.

此外,本發明在更換新的中介設備110時另可實現快速佈署的目的。於前文中述及在安裝新的中介設備110時,雲伺服端120會將新的中介設備110加入連線列表127中。此外,連線列表127也會記錄中介設備110與所連接的終端設備140的相關環境參數,如第5A圖所示。因此使用者可以隨時的匯出(export)連線列表127。假設任一區域網段中存在中介設備a、b、c,且中介設備b發生故障。在工作人員更換中介設備b時,雲伺服端120對更換目標的中介設備b禁能(disable)。工作人員只要將舊的中介設備b取下並替換為新的中介設備d。在更換完成新的中介設備d後,閘道器130也會取得中介設備d的相關裝置資訊117並傳送至雲伺服端120。雲伺服端120的連線列表127也會添加新的中介設備d,如 第5B圖所示。使用者可以從已存在的連線列表127中調取被更換下來的中介設備b的環境參數,並將環境參數套用至新增的中介設備d與所屬的終端設備140。 In addition, the present invention can also achieve the purpose of rapid deployment when the new intermediary device 110 is replaced. As mentioned above, when the new intermediary device 110 is installed, the cloud server 120 adds the new intermediary device 110 to the connection list 127. In addition, the connection list 127 also records related environmental parameters of the intermediary device 110 and the connected terminal device 140, as shown in FIG. 5A. Therefore, the user can export the connection list 127 at any time. Assume that intermediary devices a, b, and c exist in any area network segment, and intermediary device b fails. When a worker replaces the intermediary device b, the cloud server end 120 disables the intermediary device b of the replacement target. The worker only needs to remove the old intermediary device b and replace it with the new intermediary device d. After the replacement of the new intermediary device d is completed, the gateway 130 also obtains the related device information 117 of the intermediary device d and transmits it to the cloud server 120. The connection list 127 of the cloud server 120 will also add a new intermediary device d, such as Figure 5B. The user can retrieve the environmental parameters of the replaced intermediary device b from the existing connection list 127, and apply the environmental parameters to the newly added intermediary device d and the terminal device 140 to which it belongs.

對於開發系統的廠商而言,廠商只要提供各式的通訊介面與相應的虛擬存取模型,不需要建立所有的終端設備140與相關的參數。因此廠商只要針對通訊介面提供相應的虛擬存取模型,即可由使用者針對實際的終端設備140進行設定。而在雲伺服端120的一方,使用者只需要提供終端設備140所要連接各種參數,並設定相應的虛擬存取模型,即可驅動遠端設備的運作。本發明的基於乙太網路的遠端設備之物件化與控制機制之處理系統其方法可以提供雲伺服端120快速佈署基礎網路,也可以實現對終端設備140的資料存取與設備控制與設備控制。 For the manufacturer of the development system, as long as the manufacturer provides various communication interfaces and corresponding virtual access models, it is not necessary to establish all the terminal devices 140 and related parameters. Therefore, as long as the manufacturer provides a corresponding virtual access model for the communication interface, the user can set it for the actual terminal device 140. On the side of the cloud server 120, the user only needs to provide various parameters to be connected to the terminal device 140 and set a corresponding virtual access model to drive the operation of the remote device. The method for processing an objectification and control mechanism of a remote device based on the Ethernet of the present invention can provide the cloud server 120 to quickly deploy the basic network, and also can realize the data access and device control of the terminal device 140 And equipment control.

本發明的遠端設備的抽象化與模擬行為的處理方法與系統提供由雲伺服端至終端設備的資料傳輸管道,用於實現物聯網的資料採集與設備控制的需求。後台的工作人員不需要在工作現場設定終端設備完成才能讓雲控制端選擇所連接的終端設備。而且中介設備毀損時,工作人員只要將毀損的中介設備替換成新的中介設備後,在雲伺服端只要載入相應的環境設定檔即可驅動新裝設的中介設備。 The method and system for abstracting and simulating behaviors of remote devices of the present invention provide a data transmission pipeline from the cloud server end to the terminal device, which is used to implement the data collection and device control requirements of the Internet of Things. The background staff does not need to set up the terminal equipment at the work site to allow the cloud control terminal to select the connected terminal equipment. In addition, when the intermediary equipment is damaged, the staff only needs to replace the damaged intermediary equipment with a new intermediary equipment, and the newly installed intermediary equipment can be driven by loading the corresponding environment configuration file on the cloud server.

雖然本發明以前述之較佳實施例揭露如上,然其並非用以限定本發明,任何熟習相像技藝者,在不脫離本發明之精神和範圍內,當可作些許之更動與潤飾,因此本發明之專利保護範圍須視本說明書所附之申請專利範圍所界定者為準。 Although the present invention is disclosed in the foregoing preferred embodiments as above, it is not intended to limit the present invention. Any person skilled in similar arts can make some changes and retouch without departing from the spirit and scope of the present invention. The scope of patent protection of an invention shall be determined by the scope of patent application attached to this specification.

Claims (10)

一種遠端設備的抽象化與模擬行為的處理方法,其特徵在於對遠端設備的連接辨識與操作的控制,遠端設備的抽象化與模擬行為的處理方法包括:一閘道器網路連接於一雲伺服端與至少一中介設備;由該閘道器接收每一該中介設備的一裝置資訊,並轉發該裝置資訊至該雲伺服端;該雲伺服端根據該裝置資訊生成對應的一虛擬通訊介面;對該虛擬通訊介面建立至少一虛擬設備,並設定該虛擬設備的一虛擬存取模型;從該些虛擬設備選擇任一,由該雲伺服端將所選的該虛擬設備加載為一遠端設備;該雲伺服端透過該虛擬存取模型將一設備命令封裝成一第一網路封包;該閘道器接收該第一網路封包並轉發至相應的該中介設備,該中介設備將所接收的該第一網路封包轉換為該設備命令;該中介設備將一回覆響應轉換為一第二網路封包;發送該第二網路封包至該閘道器,由該閘道器轉發至雲伺服端;以及由該虛擬存取模型將該第二網路封包轉換為該回覆響應。 A processing method for abstracting and simulating behavior of a remote device, which is characterized by controlling connection identification and operation of the remote device. The method for processing abstraction and simulating behavior of a remote device includes: a gateway network connection A cloud server and at least one intermediary device; the gateway receives a device information of each intermediary device and forwards the device information to the cloud server; the cloud server generates a corresponding one according to the device information A virtual communication interface; establishing at least one virtual device for the virtual communication interface, and setting a virtual access model of the virtual device; selecting any one of the virtual devices, and the cloud server end loading the selected virtual device as A remote device; the cloud server encapsulates a device command into a first network packet through the virtual access model; the gateway receives the first network packet and forwards it to the corresponding intermediary device, the intermediary device Convert the received first network packet into the device command; the intermediary device converts a reply response into a second network packet; send the second network packet The gateways, is forwarded by the gateway to the cloud server end; and accessed by the virtual model that converts the reply packet in response to a second network. 如請求項1所述之遠端設備的抽象化與模擬行為的處理方法,其中該虛擬存取模型封裝該設備命令更包括:設定該設備命令的一處理機制,其中該處理機制包括指令、資料與事件。 The processing method for abstracting and simulating a remote device according to claim 1, wherein the virtual access model encapsulates the device command and further includes: setting a processing mechanism for the device command, wherein the processing mechanism includes instructions, data With events. 如請求項2所述之遠端設備的抽象化與模擬行為的處理方法,其中將該回覆響應轉換該第二網路封包更包括:設定該回應響應的一處理機制,其中該處理機制包括指令、資料與事件。 The processing method for abstracting and simulating a remote device according to claim 2, wherein converting the reply response to the second network packet further includes: setting a processing mechanism for the response response, wherein the processing mechanism includes an instruction , Data and events. 如請求項3所述之遠端設備的抽象化與模擬行為的處理方法,其中該虛擬存取模型接收該回覆響應包括: 該虛擬存取模型根據該操作屬性決定該回覆響應的順序,其中事件優先於指令,指令優先於資料。 The processing method for abstracting and simulating a remote device according to claim 3, wherein the virtual access model receives the response response includes: The virtual access model determines the order of the reply responses according to the operation attribute, wherein events take precedence over instructions, and instructions take precedence over data. 如請求項1所述之遠端設備的抽象化與模擬行為的處理方法,其中該第二網路封包係以媒體存取控制層做為封裝與識別。 The processing method for abstracting and simulating a remote device according to claim 1, wherein the second network packet is encapsulated and identified by a media access control layer. 如請求項1所述之遠端設備的抽象化與模擬行為的處理方法,其中在發送該第一網路封包前更包括:該雲伺服端與該中介設備各自偵測傳輸過程的一封包接收完整率;當該封包接收完整率超過一流量門檻,則該雲伺服端降低該第一網路封包的資料輸出量;以及當該封包接收完整率超過該流量門檻,則該中介設備降低該第二網路封包的資料輸出量。 The processing method for abstracting and simulating a remote device according to claim 1, wherein before sending the first network packet, the method further includes: receiving a packet by the cloud server and the intermediary device to detect a transmission process. Integrity rate; when the packet reception integrity rate exceeds a traffic threshold, the cloud server reduces the data output of the first network packet; and when the packet reception integrity rate exceeds the traffic threshold, the intermediary device reduces the Data output of the second network packet. 一種遠端設備的抽象化與模擬行為的處理系統,其特徵在於對一遠端設備的連接與控制,遠端設備的抽象化與模擬行為的處理系統包括:一中介設備,其係包括一第一處理單元、一第一網路單元、一第一儲存單元與一實體通訊介面,該第一處理單元電性連接於該第一網路單元、該第一儲存單元與該實體通訊介面,該第一網路單元電性連接一終端設備,該第一處理單元將一第一網路封包轉換為一設備命令並發送至該終端設備,該第一處理單元將該終端設備的一回覆響應轉換為一第二網路封包,該第一儲存單元存儲一裝置資訊,該裝置資訊記錄該中介設備的一實體通訊介面的種類與數量;一雲伺服端,其係包括一第二處理單元、一第二網路單元與第二儲存單元,該第二處理單元電性連接於該第二網路單元與該第二儲存單元,該第二網路單元連接於該中介設備,該第二處理單元根據所連結的該中介設備建立一連線清單,該第二處理單元根據該裝置資訊並建立相應的一虛擬通訊介面,該第二處理單元對該虛擬通訊介面建立至少一虛擬設備,該第二處理單元將所選的該虛擬設備掛載為一遠端設備,該第二處理單元設定該遠端設備所對應的一虛擬存取模型,該第二處理單元透過該虛擬存取模型傳輸該設備命令或該回覆響應;以及一閘道器,其係包括一第三處理單元、一第三網路單元、一第四網路單元與一第三儲存單元,該第三處理單元電性連接於該第三網路單元、該第四網路單元與該第三儲存單元,該第三網路單元連接於該中介設備,該第四網路單元網路連接於該雲伺服端,該第三處理單元用於轉換該第一網路封包與該第二網路封包的一識別資訊,該第三儲存單元暫存該識別資訊。 A processing system for abstracting and simulating behavior of a remote device, which is characterized by connection and control of a remote device. The processing system for abstracting and simulating behavior of a remote device includes: an intermediary device, which includes a first device A processing unit, a first network unit, a first storage unit and a physical communication interface, the first processing unit is electrically connected to the first network unit, the first storage unit and the physical communication interface, the The first network unit is electrically connected to a terminal device. The first processing unit converts a first network packet into a device command and sends the device command to the terminal device. The first processing unit converts a response from the terminal device. It is a second network packet. The first storage unit stores a device information, and the device information records the type and quantity of a physical communication interface of the intermediary device. A cloud server includes a second processing unit, a A second network unit and a second storage unit, the second processing unit is electrically connected to the second network unit and the second storage unit, and the second network unit is connected to the middle Device, the second processing unit establishes a connection list according to the connected intermediary device, the second processing unit establishes a corresponding virtual communication interface according to the device information, and the second processing unit establishes at least the virtual communication interface A virtual device, the second processing unit mounts the selected virtual device as a remote device, the second processing unit sets a virtual access model corresponding to the remote device, and the second processing unit passes the The virtual access model transmits the device command or the reply response; and a gateway, which includes a third processing unit, a third network unit, a fourth network unit, and a third storage unit. The three processing units are electrically connected to the third network unit, the fourth network unit and the third storage unit, the third network unit is connected to the intermediary device, and the fourth network unit is network-connected to the On the cloud server side, the third processing unit is configured to convert an identification information of the first network packet and the second network packet, and the third storage unit temporarily stores the identification information. 如請求項7所述之遠端設備的抽象化與模擬行為的處理系統,其中該閘道器根據欲發送的該中介設備對該第一網路封包以媒體存取控制層重新封裝,該閘道器對該第二網路封包以傳輸控制層重新封裝。 The processing system for abstracting and simulating a remote device according to claim 7, wherein the gateway re-encapsulates the first network packet with a media access control layer according to the intermediary device to be sent, and the gateway The router repackages the second network packet with a transmission control layer. 如請求項7所述之遠端設備的抽象化與模擬行為的處理系統,其中該中介設備更包括一第一輸出緩存單元,該第一處理單元電性連接於該第一輸出緩存單元,該第一輸出緩存單元用於暫存欲發送的該第二網路封包,該雲伺服端更包括一第二輸出緩存單元,該第二處理單元電性連接於該第二輸出緩存單元,該第二輸出緩存單元用於暫存欲發送的該第一網路封包。 The processing system for abstracting and simulating a remote device according to claim 7, wherein the intermediary device further includes a first output buffer unit, the first processing unit is electrically connected to the first output buffer unit, The first output buffer unit is configured to temporarily store the second network packet to be sent. The cloud server further includes a second output buffer unit. The second processing unit is electrically connected to the second output buffer unit. The two output buffer units are configured to temporarily store the first network packet to be sent. 如請求項7所述之遠端設備的抽象化與模擬行為的處理系統,其中該雲伺服端與該中介設備相互監控雙方的一封包接收完整率,並該封包接收率低於一流量門檻時,該雲伺服端與該中介設備調整網路封包的輸出量。 The processing system for abstracting and simulating a remote device as described in claim 7, wherein the cloud server and the intermediary device mutually monitor a packet reception complete rate of both parties, and when the packet reception rate is lower than a traffic threshold , The cloud server and the intermediary device adjust the output of network packets.
TW107119954A 2018-06-08 2018-06-08 The processing method and the system of the remote device about the abstraction and behavior simulation TWI673981B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW107119954A TWI673981B (en) 2018-06-08 2018-06-08 The processing method and the system of the remote device about the abstraction and behavior simulation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW107119954A TWI673981B (en) 2018-06-08 2018-06-08 The processing method and the system of the remote device about the abstraction and behavior simulation

Publications (2)

Publication Number Publication Date
TWI673981B true TWI673981B (en) 2019-10-01
TW202002588A TW202002588A (en) 2020-01-01

Family

ID=69023696

Family Applications (1)

Application Number Title Priority Date Filing Date
TW107119954A TWI673981B (en) 2018-06-08 2018-06-08 The processing method and the system of the remote device about the abstraction and behavior simulation

Country Status (1)

Country Link
TW (1) TWI673981B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150156266A1 (en) * 2013-11-29 2015-06-04 Qualcomm Incorporated Discovering cloud-based services for iot devices in an iot network associated with a user
CN105874744A (en) * 2013-12-18 2016-08-17 瑞典爱立信有限公司 System and method for virtualizing a remote device
US20170187642A1 (en) * 2015-12-23 2017-06-29 Intel Corporation Managing communication congestion for internet of things devices
TW201723937A (en) * 2015-09-25 2017-07-01 英特爾股份有限公司 Utility provisioning with IOT analytics

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150156266A1 (en) * 2013-11-29 2015-06-04 Qualcomm Incorporated Discovering cloud-based services for iot devices in an iot network associated with a user
CN105874744A (en) * 2013-12-18 2016-08-17 瑞典爱立信有限公司 System and method for virtualizing a remote device
TW201723937A (en) * 2015-09-25 2017-07-01 英特爾股份有限公司 Utility provisioning with IOT analytics
US20170187642A1 (en) * 2015-12-23 2017-06-29 Intel Corporation Managing communication congestion for internet of things devices

Also Published As

Publication number Publication date
TW202002588A (en) 2020-01-01

Similar Documents

Publication Publication Date Title
US10057455B2 (en) Method and system for printing-device monitoring, and printing monitoring server
KR20040103352A (en) Home network system
JP2019515375A (en) Connection unit for monitoring automation system, monitoring system, and operation method
EP3376717A1 (en) Link discovery method and apparatus
US6738829B1 (en) System and method for implementing a generic enhanced network driver
TWI659632B (en) THE CONTROL SYSTEM AND THE METHOD FOR THE DATA FETCHING OF THE LAN IN THE IoT
TWI673981B (en) The processing method and the system of the remote device about the abstraction and behavior simulation
WO2021136199A1 (en) Network device monitoring method, system, routing device, and storage medium
JP2009530942A (en) Data communication method between processing systems in heterogeneous environments connected by a local area network and communication system using this method
US8891405B2 (en) Integrated device management over Ethernet network
JP5185383B2 (en) Control node for a network consisting of multiple control nodes
US10715396B2 (en) Support apparatus, non-transitory computer readable recording medium and setting method
US11722373B2 (en) Method for networking multi-protocol terminals, method for communicating, storage medium, and electronic device
TWI669981B (en) The process system and the method of the remote device objectification and control mechanism base on the ethernet
CN110753075B (en) Method and system for processing abstract and simulation behaviors of remote equipment
CN109542833A (en) A kind of server management method based on microserver framework, device, server
CN110750075B (en) System and method for regional data acquisition and equipment control of Internet of things
US11784929B2 (en) Heterogeneous link data translation and distribution method, system and device, and storage medium
CN112084127B (en) Distributed controller and distributed autonomous system
TWI755049B (en) The processing system of the controlling iot equipment, the method and the gateway
JP3855618B2 (en) Distributed building management system
CN112039957B (en) Control system and control method of edge equipment
CN107248935A (en) A kind of webmaster finds the system and method for simultaneously monitoring network element
CN101164292A (en) Layer structure of network control protocol and interface method
JP2002141965A (en) Gateway and its management server