Relay device, relay method, and relay program

文档序号:1470098 发布日期:2020-02-21 浏览:6次 中文

阅读说明:本技术 中继装置、中继方法及中继程序 (Relay device, relay method, and relay program ) 是由 三堀真美 筒井诚 舛田笃史 于 2019-07-25 设计创作,主要内容包括:本发明能够实现更适当的数据中继。中继装置具有:从通过第一网络连接的第一装置接收数据的接收部;将通过上述接收部接收的数据记录在规定文件中的记录部;以及判定存储在上述规定文件中的数据是否改变,在改变的情况下,将改变的部分的数据发送至通过与上述第一网络不同的第二网络连接的第二装置的发送部。(The present invention can realize more appropriate data relay. The relay device includes: a receiving unit that receives data from a first device connected via a first network; a recording unit for recording the data received by the receiving unit in a predetermined file; and a transmission unit configured to determine whether or not data stored in the predetermined file is changed, and if the data is changed, transmit the changed data to a second device connected to a second network different from the first network.)

1. A relay device includes:

a receiving unit that receives data from a first device connected via a first network;

a recording unit that records the data received by the receiving unit in a predetermined file; and

and a transmission unit that determines whether or not the data stored in the predetermined file is changed, and, if the data is changed, transmits the changed data to a second device connected via a second network different from the first network.

2. The relay apparatus according to claim 1, wherein the IP (internet protocol) address and firewall function setting for the first network are different from the IP address and firewall function setting for the second network.

3. The relay device according to claim 1 or 2, wherein the receiving unit responds to data received from the first device, and returns a response indicating that the data has been received to the first device.

4. The relay device according to any one of claims 1 to 3, wherein the recording part is a first process Operating on an OS (Operating System), and the transmitting part is a second process different from the first process Operating on the OS.

5. The relay device according to any one of claims 1 to 4, wherein the transmission unit transmits data including at least one of the information of the first device and the information of the relay device to the second device when the data stored in the predetermined file has not been changed for a predetermined time or longer.

6. The relay device according to any one of claims 1 to 5, wherein the transmitter changes the setting of the firewall function of the second network to allow reception of a packet of a predetermined communication protocol when the data stored in the predetermined file has not been changed for a predetermined time or longer.

7. The relay device according to any one of claims 1 to 6, wherein the transmitter transmits the data of the changed portion to a third device when the transmission to the second device is not possible for a predetermined time or longer.

8. A relay method, which is a method for a relay apparatus to perform:

a process of receiving data from a first device connected through a first network;

a process of recording the received data in a prescribed file; and

and a process of determining whether or not data stored in the prescribed file is changed, and in the case of the change, transmitting the changed part of the data to a second device connected via a second network different from the first network.

9. A relay program that causes a computer to execute:

a process of receiving data from a first device connected through a first network;

a process of recording the received data in a prescribed file; and

and a process of determining whether or not data stored in the prescribed file is changed, and in the case of the change, transmitting the changed part of the data to a second device connected via a second network different from the first network.

Technical Field

The invention relates to a relay device, a relay method, and a relay program.

Background

In addition, a technique is known in which data acquired from a sensor is stored in a server via a relay device (see, for example, patent document 1).

Disclosure of Invention

Technical problem to be solved by the invention

However, in the related art, the relay device may relay an inappropriate packet such as a network attack.

Accordingly, an object of the present invention is to enable more appropriate data relay.

Technical scheme for solving technical problem

The relay device includes: a receiving unit that receives data from a first device connected via a first network; a recording unit for recording the data received by the receiving unit in a predetermined file; and a transmission unit configured to determine whether or not data stored in the predetermined file is changed, and if the data is changed, transmit the changed data to a second device connected to a second network different from the first network.

Effects of the invention

More appropriate data relay can be achieved.

Drawings

Fig. 1 is a diagram showing a configuration example of a communication system according to an embodiment.

Fig. 2 is a diagram showing an example of a hardware configuration of the relay device according to the embodiment.

Fig. 3 is a diagram showing an example of hardware configuration of the apparatus and the server according to the embodiment.

Fig. 4 is a diagram showing an example of a functional configuration of the relay device according to the embodiment.

Fig. 5 is a sequence diagram showing an example of processing in the communication system according to the embodiment.

Fig. 6 is a flowchart for explaining an example of the authentication process according to the embodiment.

Fig. 7 is a flowchart for explaining an example of the recording process according to the embodiment.

Fig. 8 is a flowchart for explaining (one of) an example of the transmission processing according to the embodiment.

Fig. 9 is a flowchart for explaining an example (second example) of the transmission processing according to the embodiment.

Description of the symbols

1 communication system

10 machine

20 relay device

202 auxiliary storage device

203 storage device

204 CPU

205 interface device

206 interface device

21 receiving part

22 recording part

23 sending part

24 setting part

30 servers.

Detailed Description

Hereinafter, embodiments of the present invention will be described with reference to the drawings.

< System configuration >

Fig. 1 is a diagram showing a configuration example of a communication system 1 according to the embodiment. In fig. 1, a communication system 1 includes a machine 10-1A, a machine 10-1B, a machine 10-2A, a machine 10-2B, a machine 10-3A, a machine 10-3B (hereinafter, simply referred to as "machine 10" when there is no need to distinguish one from another), a relay device 20-1, a relay device 20-2, a relay device 20-3 (hereinafter, simply referred to as "relay device 20" when there is no need to distinguish one from another), and a server 30. The number of devices 10, relay devices 20, and servers 30 is not limited to the example shown in the figure.

The devices 10-1A and 10-1B and the relay device 20-1 are connected to each other so as to be able to communicate with each other by short-range wireless such as LAN (Local area network), USB (Universal Serial Bus) cable, wireless LAN, or BLE (Bluetooth (registered trademark)) Low Energy. Further, the device 10-2A, the device 10-2B and the relay device 20-2, the device 10-3A, the device 10-3B and the relay device 20-3, the relay device 20-1 and the relay device 20-2, and the relay device 20-2 and the relay device 20-3 are also connected in the same manner. The relay device 20-3 and the server 30 are connected to be able to communicate with each other through a network 50 such as the internet, a mobile phone network, and a LAN.

Hereinafter, from the perspective of one relay device 20, a device on the communication path on the server 30 side is referred to as an upper device, and a device on the communication path on the device 10 side is referred to as a lower device. In this case, for example, the higher-level devices viewed from the relay device 20-2 are the relay device 20-3 and the server 30, and the lower-level devices viewed from the relay device 20-2 are the relay device 20-1, the device 10-1A and the device 10-1B.

The device 10 is, for example, a device that transmits data of a manufacturing facility or the like detected by a measuring device (sensor) or the like (not shown) to the relay device 20 set in advance as a transmission destination of the data. The machine 10 may be configured as an apparatus integrated with a manufacturing facility or the like, or may be configured as an apparatus integrated with a measuring device that monitors the manufacturing facility or the like.

The relay device 20 uploads the data transmitted by the device 10 to the server 30. In the example of fig. 1, relay device 20-1 uploads data received from machine 10-1A and machine 10-1B to server 30 via relay device 20-2 and relay device 20-3. Further, relay device 20-2 uploads data received from machine 10-2A, machine 10-2B, and relay device 20-1 to server 30 via relay device 20-3. Further, relay device 20-3 uploads data received from machine 10-3A, machine 10-3B, and relay device 20-2 to server 30. The server 30 is provided, for example, on a cloud map, and stores data uploaded from the machine 10 via the relay device 20. Thereby, for example, the manager of the communication system 1 can collectively manage the data collected from the machine 10 on the server 30.

< hardware construction >

Hardware configuration of Relay device 20

Fig. 2 is a diagram showing an example of the hardware configuration of the relay device 20 according to the embodiment. The relay device 20 of fig. 2 includes a drive device 200, an auxiliary memory device (japanese language: メモリ device) 202, a memory device (japanese language: メモリ device) 203, a CPU204, an interface device 205, an interface device 206, and the like, which are connected to each other on a bus B.

The relay program that realizes the processing in the relay device 20 can be provided by the auxiliary storage device 202, for example. In this case, for example, data (video) of the auxiliary storage device of the other relay device 20, in which the relay program is installed, may be copied to the auxiliary storage device 202 using a PC (Personal Computer) or the like. Thus, the image can be copied to the auxiliary storage device 202 such as a MicroSD card, and can be used only by changing the setting.

Further, the relay program may be provided by the recording medium 201, for example. In this case, if the recording medium 201 in which the relay program is recorded is installed in the drive device 200, the program can be installed from the recording medium 201 to the auxiliary storage device 202 through the drive device 200. However, the relay program is not necessarily installed via the recording medium 201, and may be downloaded from another computer via a network. The auxiliary storage device 202 stores the installed program and also stores necessary files, data, and the like.

When a program start instruction is issued, the storage device 203 reads the program from the auxiliary storage device 202 and stores the program. The CPU204 realizes the functions of the relay device 20 according to the programs stored in the storage device 203. The interface device 205 serves as an interface for connecting a network on the machine 10 side. The interface device 206 serves as an interface for connecting a network on the server 30 side.

Further, as an example of the recording medium 201, a removable recording medium such as a CD-ROM, a DVD disk, or a USB memory may be mentioned. Further, as an example of the auxiliary storage device 202, a flash memory such as a Micro SD card, an HDD (Hard Disk Drive), or the like may be mentioned. The recording medium 201 and the auxiliary storage device 202 correspond to a computer-readable recording medium.

As the hardware of the relay device 20, for example, a Raspberry Pi which is a single board computer with low cost and high performance can be used. The interface device 205 and the interface device 206 may be, for example, wireless LAN adapters connected to the bus B via a USB cable and a USB connector. In this case, the interface device 205 can operate as a wireless LAN master to communicate with the device 10 and a wireless LAN slave unit of a lower-level device such as the relay device 20 on the device 10 side. The interface device 206 can operate as a wireless LAN slave unit to communicate with a wireless LAN master unit of a higher-level device such as the relay device 20 on the server 30 side. The interface device 205 and the interface device 206 may be integrated wireless LAN adapters or the like that can operate as a wireless LAN master and a wireless LAN slave at the same time. As a LAN cable for connecting at least one of the interface device 205 and the interface device 206, a LAN cable having a predetermined length (for example, 2m) may be used. Thus, for example, a radio wave from a lower device can be received in front of a radio wave shield, and a radio wave can be transmitted to an upper device from behind the shield.

The interface device 205 and the interface device 206 may be, for example, NICs (network interface cards) for connecting LAN cables, or may be communication boards for connecting to the internet via a mobile telephone network such as 3G or LTE (Long term evolution).

Hardware constitution of machine 10 and server 30

Fig. 3 is a diagram showing an example of hardware configuration of the device 10 and the server 30 according to the embodiment. Hereinafter, the server 30 is described as an example, but the hardware configuration of the device 10 may be the same as the hardware configuration example of the server 30 shown in fig. 3.

The server 30 in fig. 3 includes a drive device 100, an auxiliary storage device 102, a storage device 103, a CPU104, an interface device 105, a display device 106, an input device 107, and the like, which are connected to each other on a bus B.

A program that realizes processing on the server 30 is provided by the recording medium 101. When the recording medium 101 having the program recorded thereon is mounted on the drive device 100, the program can be mounted from the recording medium 101 to the auxiliary storage device 102 via the drive device 100. However, the program is not necessarily installed via the recording medium 101, and may be downloaded from another computer via a network. The auxiliary storage device 102 stores the installed program and necessary files, data, and the like.

When a program start instruction is issued, the storage device 103 reads the program from the auxiliary storage device 102 and stores the program. The CPU104 realizes the functions of the server 30 according to the program stored in the storage device 103. The interface device 105 serves as an interface for connecting a network. The display device 106 is a display for displaying a GUI (Graphical User Interface) based on a program or the like. The input device 107 receives various operation instructions.

Further, as an example of the recording medium 101, a removable recording medium such as a CD-ROM, a DVD disk, or a USB memory may be mentioned. Further, as an example of the auxiliary storage device 102, an HDD (Hard Disk Drive) or a flash memory may be mentioned. Both the recording medium 101 and the auxiliary storage device 102 correspond to computer-readable recording media. In addition, the server 30 may be implemented by a service provided by a cloud provider such as cloud storage (Amazon (registered trademark) S3 or the like) or a database service (Amazon RDS or the like).

< functional constitution >

Next, a functional configuration of the relay device 20 according to the embodiment will be described with reference to fig. 4. Fig. 4 is a diagram showing an example of a functional configuration of the relay device 20 according to the embodiment.

The relay device 20 includes a receiving unit 21, a recording unit 22, a transmitting unit 23, and a setting unit 24. The above-described respective sections are realized by a process in which the CPU204 of the relay device 20 executes 1 or more programs installed in the relay device 20.

The receiving unit 21 receives data from a communication session according to a predetermined communication protocol from a lower-level device (an example of a "first device") connected via a network (an example of a "first network") connected by the interface device 205. The recording unit 22 records the data received from the receiving unit 21 in a predetermined file.

The transmission unit 23 determines at a predetermined cycle whether or not the data stored in the predetermined file is changed, and if the data is changed, transmits the changed data to a higher-level device (an example of a "second device") connected via a network (an example of a "second network") connected via the interface device 206. The transmitting unit 23 may transmit data using a communication protocol different from that of the receiving unit 21. Alternatively, the transmitting unit 23 may transmit data using a communication session different from the communication session in which the receiving unit 21 receives data, by using the same communication protocol as that in which the receiving unit 21 receives data.

The recording unit 22 and the transmitting unit 23 may be realized by a process of different programs Operating on an OS (Operating System) of the relay device 20. That is, the recording section 22 may be realized by a procedure of a first application, and the transmission section 23 may be realized by a procedure of a second application different from the first application. By this means, by providing a process of operating data received from the network connected by the interface device 205 and a process of transmitting data to the network connected by the interface device 206 separately, security can be further improved.

The setting unit 24 performs setting related to communication of the relay device 20 by a setting operation from the administrator. The setting unit 24 sets, for example, an ip (internet protocol) address for a network connected by the interface device 205 and a firewall function. The setting unit 24 sets the firewall function of the interface device 205 for communicating with the lower-level device to allow the device 10 to receive only packets under the communication protocol used for transmission of the data. Thereby, the relay device 20 can receive the data transmitted by the device 10.

The setting unit 24 sets, for example, an IP address for a network connected by the interface device 206 and a firewall function. The setting unit 24 sets the firewall function of the interface device 206 for performing communication with the higher-level device to reject reception of packets under all communication protocols. This makes it possible to reject communication from the server 30 side to the device 10 side, and thus to prevent malicious communication with the device 10.

The setting unit 24 may be configured to prohibit packet transfer between the network connected to the interface device 205 and the network connected to the interface device 206 according to a setting operation from the administrator. In this case, the setting unit 24 may be set to disable the IP forwarding function for 2 networks provided by the OS, for example. This inhibits direct communication between 2 networks, and can improve the security of the network on the device 10 side and the like.

< treatment >

Next, an example of processing in the communication system 1 according to the embodiment will be described with reference to fig. 5. Fig. 5 is a sequence diagram showing an example of processing in the communication system 1 according to the embodiment. In the example of fig. 5, an example of a case where data transmitted from the device 10-1A and the device 10-1B is uploaded to the server 30 by the relay device 20-1, the relay device 20-2, and the relay device 20-3 will be described.

In step S1, the relay device 20-1 authenticates the device 10-1A and the device 10-1B. In addition, this process is not necessary.

Next, the device 10-1A transmits the data measured by the sensor or the like to the relay device 20-1 (step S2). Here, the device 10-1A may transmit data to the relay device 20-1 at a predetermined cycle (for example, every 10 seconds), for example. Further, the device 10-1A may transmit data measured by a sensor or the like to the relay device 20-1 when the data meets a predetermined condition or the like.

Next, the relay device 20-1 records the data received from the machine 10-1A (step S3).

Next, the device 10-1B transmits the data measured by the sensor or the like to the relay device 20-1 (step S4).

Next, the relay device 20-1 records the data received from the machine 10-1B (step S5).

Next, the relay device 20-1 transmits the recorded data to the relay device 20-2 at a predetermined timing (step S6). Here, the relay device 20-1 may transmit data at a predetermined cycle (for example, every 1 minute). In this case, relay device 20-1 may receive and record data from each of devices 10-1A and 10-1B a plurality of times in the predetermined cycle. For example, when the relay device 20-1 transmits data to the relay device 20-2 in a 1-minute cycle and the device 10-1A transmits data to the relay device 20-1 in a 10-second cycle, the data measured at 6 measurement times are transmitted to the relay device 20-2 at the same time in the processing of step S6.

Next, the relay device 20-2 records the received data (step S7). Next, the relay device 20-2 transmits the recorded data to the relay device 20-3 at a predetermined timing (step S8). Here, the relay device 20-2 may transmit data at a predetermined cycle (for example, every 1 minute).

Next, the relay device 20-3 records the received data (step S9). Next, the relay device 20-3 transmits the recorded data to the server 30 at a predetermined timing (step S10). Here, the relay device 20-3 may transmit data at a predetermined cycle (for example, every 1 minute). Next, the server 30 stores the received data (step S11).

Authentication processing

Next, an example of a process of authenticating a communication partner such as the device 10 in the data link layer in the ISO model in step S1 in fig. 5 will be described with reference to fig. 6. Fig. 6 is a flowchart for explaining an example of the authentication process according to the embodiment. Hereinafter, an example of a case where the interface device 205 of the relay device 20-1 operates as a wireless LAN master and authenticates the device 10-1A as a wireless LAN slave will be described. Further, the relay device 20-2 and the relay device 20-3 can also authenticate the device 10 or another relay device 20 communicating with the own device in the same manner. When the interface device 205 of the relay device 20-1 is operated as a wireless LAN master, communication between the terminals in the LAN formed by the wireless LAN master is not permitted.

In step S101, the receiving unit 21 of the relay device 20-1 receives a connection request of the wireless LAN from the device 10-1 (an example of the "first device").

Next, the receiving unit 21 of the relay device 20-1 performs authentication based on the SSID (Service set identifier) included in the received connection request and the passphrase, and determines whether the authentication is successful (step S102). Here, the receiving unit 21 of the relay device 20-1 determines that the authentication is successful when, for example, the received SSID and passphrase are preset in the relay device 20-1.

When authentication by the passphrase or the like fails (no in step S102), the receiving unit 21 of the relay device 20-1 returns a case where authentication has failed to the device 10-1 (step S103), and the process ends.

When the authentication based on the password phrase or the like is successful (yes in step S102), the receiving unit 21 of the relay device 20-1 performs authentication based on the MAC (Media Access Control) address included in the received connection request, and determines whether the authentication is successful (step S104). Here, the receiving unit 21 of the relay device 20-1 refers to, for example, a preset list of MAC addresses of communication destinations that permit communication, and determines that authentication has succeeded when the received MAC address is registered in the list.

When authentication based on the MAC address fails (no in step S104), the process proceeds to step S103.

When the authentication by the MAC address is successful (yes in step S104), the receiving unit 21 of the relay device 20-1 assigns an IP address associated with the MAC address to the device 10-1 (step S105), and the process ends. Here, the receiver 21 of the relay device 20-1 refers to, for example, a list of IP addresses associated with MAC addresses of respective communication destinations that permit communication, and assigns the received IP address associated with the MAC address to the device 10-1 by DHCP (Dynamic Host Configuration Protocol) or the like.

(treatment of records)

Next, an example of processing in which the relay device 20 records data received from the device 10 and another relay device 20 in steps S3, S5, S7, and S9 in fig. 5 will be described with reference to fig. 7. Fig. 7 is a flowchart for explaining an example of the recording process according to the embodiment. Hereinafter, an example of a case where the relay device 20-1 records data received from the device 10-1A will be described.

In step S201, the receiving unit 21 of the relay device 20-1 receives a registration request under a predetermined protocol from the device 10-1A. Examples of the predetermined Protocol include FTP (File Transfer Protocol), SMB (Server Message Block), MQTT (Message Queuing Telemetry Transport), HTTP (Hypertext Transfer Protocol), HTTPS (Hypertext Transfer Protocol Secure) and the like.

Next, the receiving unit 21 of the relay device 20-1 determines whether or not the IP address of the transmission source included in the received login request and the protocol related to the login request (destination port number included in the login request) are permitted in the setting of the firewall function for the interface device 205 set by the setting unit 24 (step S202).

If not permitted (no in step S202), the receiving unit 21 of the relay device 20-1 returns a response to the device 10-1A to reject registration (step S203), and the process ends.

When the authentication is permitted (yes in step S202), the receiving unit 21 of the relay device 20-1 performs authentication based on the user ID and the password included in the received login request, and determines whether the authentication is successful (step S204). Here, the receiving unit 21 of the relay device 20-1 determines that the authentication is successful when, for example, the received user ID and password are preset in the relay device 20-1.

When the authentication fails (no in step S204), the process proceeds to step S203.

If the authentication is successful (yes in step S204), the receiving unit 21 of the relay device 20-1 returns a response to permit registration to the appliance 10-1A (step S205), and receives data from the appliance 10-1A (step S206).

Next, the receiving unit 21 of the relay device 20-1 returns a response indicating that the data was normally received to the device 10-1A (step S207). Thus, even when a host device or the like of the relay device 20-1 fails, the process of transmitting data to the device 10-1A can be normally finished.

Next, the recording unit 22 of the relay device 20-1 records (stores) the data received from the receiving unit 21 in a predetermined area (hereinafter referred to as a "temporary storage area") of the auxiliary storage device 202 of the relay device 20-1 (step S208), and the process ends. Here, the recording unit 22 of the relay device 20-1 may add the received data to the end of the data in a file having a predetermined file name in a preset folder, for example. In addition, the recording unit 22 of the relay device 20-1 may generate the file and record the received data in the file when the file does not exist.

Sending processing (one of them)

Next, an example of a process of the relay device 20 transmitting (transferring) recorded data in step S6, step S8, and step S10 of fig. 5 will be described with reference to fig. 8. Fig. 8 is a flowchart for explaining (one of) an example of the transmission processing according to the embodiment. Hereinafter, an example of a case where the relay device 20-1 transmits the data recorded in the temporary storage area to the relay device 20-2 will be described.

In step S301, the transmission unit 23 of the relay device 20-1 detects that the current time coincides with a predetermined time. Here, the transmission unit 23 of the relay device 20-1 may perform the following processing at a predetermined cycle (for example, every 1 minute).

Next, the transmission unit 23 of the relay device 20-1 determines whether or not the data stored in the temporary storage area is changed (updated) from the data in the previous transmission (step S302). Here, the transmission unit 23 of the relay device 20-1 may record the data stored in the temporary storage area at the previous transmission time in another area in advance, and determine the difference from the data stored in the temporary storage area at the current time. Alternatively, the transmission unit 23 of the relay device 20-1 may record the data size of each file stored in the temporary storage area at the time of the previous transmission in another area in advance, and determine the difference from each file stored in the temporary storage area at the present time. In this case, for example, when the data size of a file of one file name at the time of the previous transmission is 100KB and the data size of the file at the current time is 101KB, the transmission unit 23 of the relay device 20-1 determines the difference between the data of the file from the 100KB first to the last and the data at the time of the previous transmission.

If the data stored in the temporary storage area has not changed (no in step S302), the process ends.

When the data stored in the temporary storage area is changed (yes in step S302), the transmission unit 23 of the relay device 20-1 transmits the data of a portion (difference) changed from the previous transmission to a predetermined destination (step S304), and the process ends. Here, the transmission unit 23 of the relay device 20-1 transmits the packet to the relay device 20-2 (an example of the "second device") set as the destination using a protocol such as HTTPS, for example.

Further, when the transmission to another relay device 20 or the server 30 set as the destination is not successful, the transmission unit 23 of the relay device 20 may retry the transmission at a predetermined interval until the transmission is successful or a predetermined number of retries is reached. Thereby, even when transmission fails due to radio wave conditions or the like, for example, transmission can be successfully performed when the radio wave conditions or the like improve.

Sending processing (second item)

Next, another example of the process of the relay device 20 to transmit the recorded data in step S6, step S8, and step S10 of fig. 5 will be described with reference to fig. 9. Fig. 9 is a flowchart for explaining an example (second example) of the transmission processing according to the embodiment. Further, a configuration may be adopted in which at least part of the processing in fig. 9 is not performed. Hereinafter, an example of a case where the relay device 20-1 transmits the data recorded in the temporary storage area to the relay device 20-2 will be described.

In step S401, the transmission unit 23 of the relay device 20-1 detects that the current time coincides with a predetermined time. Next, the transmission unit 23 of the relay device 20-1 determines whether or not the data stored in the temporary storage area is changed (updated) from the data in the previous transmission (step S402).

When the data stored in the temporary storage area is changed (yes in step S402), the transmission unit 23 of the relay device 20-1 transmits the data of a portion (difference) changed from the previous transmission to a preset first destination (step S404). In addition, the processes from step S401 to step S403 may be the same as the processes from step S301 to step S303 of fig. 8, respectively.

Next, the transmission unit 23 of the relay device 20-1 determines whether or not the transmission of the difference data is successful (step S404). When the transmission of the difference data is successful (yes in step S404), the processing is ended.

When the transmission of the difference data fails (no in step S404), the transmission unit 23 of the relay device 20-1 determines whether or not the transmission failure continues for a predetermined time (for example, 5 minutes) or longer (step S405). When the transmission failure does not continue for the predetermined time or longer (no in step S405), the process ends.

When the transmission failure state (the state in which transmission is not possible) continues for the predetermined time or longer (yes in step S405), the transmission unit 23 of the relay device 20-1 transmits the difference data from the interface device 206 to the preset second destination (step S406), and the process ends. Therefore, when the system operator detects an abnormality in the relay device 20-1, the data from the relay device 20-1 can be acquired by setting the wireless LAN base station ("an example of the third device") having the predetermined communication address in the vicinity of the relay device 20-2.

When the data stored in the temporary storage area is not changed (no in step S402), the transmission unit 23 of the relay device 20-1 determines whether or not the state in which the data stored in the temporary storage area is not changed continues for a predetermined time (for example, 5 minutes) or longer (step S407). If the processing does not continue for the predetermined time or longer (no in step S407), the processing ends.

When the data is continued for the predetermined time or longer (yes in step S407), the transmission unit 23 of the relay device 20-1 transmits, for example, information indicating that the data stored in the temporary storage area has not been changed for the predetermined time or longer, information on the lower-level device of the relay device 20-1, and information on the relay device 20-1 to a preset first destination (the relay device 20-2) (step S408). Here, the transmission unit 23 of the relay device 20-1 may transmit, as the information of the lower-level device of the relay device 20-1, information such as the MAC address of the device 10-1A or the like that allows the reception of the packet at the interface device 205, which is set in the setting unit 24 of the relay device 20-1. The transmitter 23 of the relay device 20-1 may transmit the MAC address, device name, or the like of the relay device 20-1 as the information of the relay device 20-1. Thus, when a failure occurs in the lower-level device, the interface device 205, or the like, the server 30 can be notified of the information of the lower-level device and the own device.

Next, the setting unit 24 of the relay device 20-1 changes the setting of the firewall function for the network on the higher-level device side (step S409), and the process ends. Here, the setting unit 24 of the relay device 20-1 changes the setting of the firewall function of the interface device 206, for example, so as to allow reception of a packet of a predetermined communication protocol in the interface device 206. In this case, the setting unit 24 of the relay device 20-1 may change the setting of the firewall function provided by the os (operating system) or the application, for example, so as to allow reception of a packet of the ICMP (Internet Control Message Protocol). Thus, when a failure occurs in the lower-level device, the interface device 205, or the like, the relay device 20-1 can receive a command for monitoring the dead/alive state, a command for restarting (rebot), or the like from the upper-level device side such as the server 30. The setting unit 24 of the relay device 20-1 may be configured to reset the setting on the interface device 206 and reject the reception of the packet of the predetermined protocol when the differential data is successfully transmitted.

< application example 1>

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:SQL Server数据库密码托管方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类