Information processing method, relay device, information processing program, and information processing system
Patent Information
- Application Number
- PCT/JP2025/039490
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-18
- Filing Date
- 2025-11-11
- Publication Date
- 2026-08-27
Smart Images

Figure JP2025039490_27082026_PF_FP_ABST
Abstract
Description
Information Processing Method, Relay Device, Information Processing Program, and Information Processing System
[0001] The present disclosure relates to a technique for relaying messages communicated between an operating device and an operated device.
[0002] For example, Patent Document 1 discloses that a second gateway includes a failure detection unit that detects the occurrence of a failure in a first gateway, and when the occurrence of a failure in the first gateway is detected, a client-side communication interface of the second gateway generates path information that defines a communication path of second communication data transmitted from the client-side communication interface of the second gateway that has received first communication data when the first communication data is received from one of a plurality of server-side communication interfaces of a communication device, and a transmission unit that transmits the second communication data based on the path information.
[0003] However, in the above conventional technology, it takes time until the switching from a gateway in which a failure has occurred to another gateway is completed, and further improvement has been required.
[0004] Japanese Patent Application Laid-Open No. 2024-93223
[0005] The present disclosure has been made to solve the above problems, and an object thereof is to provide a technique capable of shortening the time required for switching from a relay device in which a failure has occurred to another relay device.
[0006] An information processing method according to one aspect of the present disclosure is an information processing method performed by a relay device that relays messages communicated between an operating device and an operated device, and includes: receiving a first message transmitted from the operating device to the operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or receiving a second message transmitted from the operated device to the operating device; monitoring the operating status of one of a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group; determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message based on the operating status of the 1 relay device and the other relay devices; and, if the 1 relay device is determined to be the relay device that relays the first message or the second message, transmitting the received first message or transmitting the second message using a second common topic assigned to the predetermined group.
[0007] According to this disclosure, the time required to switch from a failed relay device to another relay device can be reduced.
[0008] This figure shows the overall configuration of the information processing system in this embodiment. This figure shows an example of the server configuration in an embodiment of this disclosure. This figure shows an example of the configuration of the first gateway in an embodiment of this disclosure. This is a schematic diagram for explaining the transmission process of the first message by the server, MQTT broker, first gateway, second gateway, and operated device in this embodiment. This is a sequence diagram showing the process of transmitting the first message from the operating device to the operated device in this embodiment. This is an example of a flowchart for explaining the relay process of the first message by the first gateway in this embodiment. This is an example of a flowchart for explaining the relay gateway determination process by the relay gateway determination unit in step S3 of Figure 6. This is a sequence diagram showing the operation monitoring process by the first gateway and the second gateway in this embodiment. This is a flowchart for explaining the operation monitoring process by the operation monitoring unit of the first gateway in this embodiment. This is a schematic diagram for explaining the processing of the first gateway and the second gateway in Modification 1 of this embodiment. This is a schematic diagram for explaining the processing of the first gateway, the second gateway, and the third gateway in Modification 2 of this embodiment. This is a schematic diagram for explaining the processing of the second gateway and the third gateway when the first gateway stops operating in Modification 2 of this embodiment. This is a schematic diagram illustrating the transmission process of the second message by the server, MQTT broker, first gateway, second gateway, and operated device in this embodiment. This is a sequence diagram showing the process of transmitting the second message from the operated device to the operating device in this embodiment. This is an example flowchart illustrating the relay process of the second message by the first gateway in this embodiment. This is a schematic diagram illustrating the processing of the first gateway and second gateway in Modification 3 of this embodiment. This is a schematic diagram illustrating the processing of the first gateway, second gateway, and third gateway in Modification 4 of this embodiment.This is a schematic diagram illustrating the processing of the second and third gateways when the first gateway stops operating in Modification 4 of this embodiment. This is a flowchart illustrating the operation monitoring process by the operation monitoring unit of the first gateway in Modification 5 of this embodiment.
[0009] (Knowledge forming the basis of this disclosure) Traditionally, when there are multiple gateways within a group, the server selects one gateway from among the multiple gateways and transmits data to the device through that one gateway. Traditionally, the server managed the operational status of each of the multiple gateways. However, as the number of groups increases, it becomes cumbersome for the server to manage multiple gateways within each group, which may increase the server's processing load. In addition, if a gateway relaying data becomes unable to communicate, switching gateways may take time, and data exchanged during the switching process may be lost.
[0010] In the above-mentioned Patent Document 1, when a server sends communication data to a mobile device, the gateway that relays the communication data uses a common virtual IP address compliant with a protocol such as VRRP (Virtual Router Redundancy Protocol).
[0011] If the first gateway fails and a switchover is made from the first gateway to the second gateway using VRRP, the following steps will occur.
[0012] 1. The second gateway detects a failure in the first gateway. At this time, the second gateway sends a signal to the first gateway multiple times to detect the occurrence of the failure, and if there is no response from the first gateway, it is determined that a failure has occurred in the first gateway.
[0013] 2. A virtual IP address is assigned to the communication interface of the second gateway.
[0014] 3. The ARP (Address Resolution Protocol) tables of all switches located between the server and the second gateway are updated.
[0015] As described above, with conventional technology, if the first gateway fails, many steps must be performed, and there is a problem that it takes time to complete the switchover from the failed first gateway to another second gateway.
[0016] To address the above challenges, the following technologies are disclosed.
[0017] (1) An information processing method according to one aspect of the present disclosure is an information processing method performed by a relay device that relays messages communicated between an operating device and an operated device, and includes: receiving a first message transmitted from the operating device to the operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or receiving a second message transmitted from the operated device to the operating device; monitoring the operating status of one of a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group; determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message based on the operating status of the 1 relay device and the other relay devices; and, if the 1 relay device is determined to be the relay device that relays the first message or the second message, transmitting the received first message or transmitting the second message using a second common topic assigned to the predetermined group.
[0018] In this configuration, all of the multiple relay devices belonging to a predetermined group receive either the first or second message. Furthermore, instead of switching from a failed relay device to another relay device and then having that other relay device receive either the first or second message, all of the multiple relay devices receive either the first or second message before switching from the failed relay device to another relay device. Therefore, the number of steps required to switch relay devices is reduced, and the time required to switch from a failed relay device to another relay device can be shortened.
[0019] (2) In the information processing method described in (1) above, receiving the first message or the second message includes receiving the first message using the first common topic, determining the relay device includes determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message, based on the operating status of each of the 1 relay device and the other relay devices, and transmitting the first message or the second message may include transmitting the received first message to the operated device if the 1 relay device is determined to be the relay device that relays the first message.
[0020] In this configuration, all of the relay devices belonging to a predetermined group receive the first message using the first common topic assigned to that group. Furthermore, instead of switching from a failed relay device to another relay device and then having that other relay device receive the first message, all of the relay devices receive the first message before switching from the failed relay device to another relay device. Therefore, the number of steps required to switch relay devices is reduced, and the time required to switch from a failed relay device to another relay device can be shortened.
[0021] (3) The information processing method described in (2) above further includes subscribing to the first common topic in publish / subscribe communication, and the reception of the first message may include receiving the first message published using the first common topic by a server that received the first message from the operating device in publish / subscribe communication.
[0022] In this configuration, when the first message is published from the server using the first common topic, the first message is sent to multiple relay devices that are subscribed to the first common topic. Therefore, there is no need for the source device and the destination device to communicate directly, and multiple relay devices can easily receive the first message.
[0023] (4) The information processing method described in (2) or (3) above may further include, if the relay device 1 is determined to be a relay device that does not relay the first message, storing the first message for a predetermined time interval that has been received in memory, and if the relay device 1 is determined to be a relay device that relays the first message after it has been determined to be a relay device that does not relay the first message, transmitting the first message for the predetermined time interval stored in memory to the device to be operated.
[0024] In this configuration, a relay device that does not relay the first message stores the received first message for a predetermined time interval in memory. Subsequently, if the relay device that did not relay the first message is determined to be a relay device that relays the first message, that relay device transmits the first message for the predetermined time interval stored in memory to the device being operated.
[0025] Therefore, if a failure occurs in the relay device relaying the first message, it is possible to prevent the loss of the first message that is being communicated while the relay device is being switched from the failed relay device to another relay device.
[0026] (5) The information processing method described in (2) or (3) above may further include determining, based on the operating status of the relay device 1 and the other relay devices, which relay devices among the operating relay device 1 and the other relay devices do not relay the first message, as a backup relay device.
[0027] With this configuration, a relay device that does not relay the first message is designated as a backup relay device. Therefore, if a failure occurs in the relay device that is relaying the first message, the backup relay device can be immediately designated as the new relay device that relays the first message, thereby reducing the processing time required to determine the new relay device.
[0028] (6) The information processing method described in (5) above further includes receiving the first message when the relay device 1 is determined to be a relay device that relays the first message or when the relay device 1 is determined to be a backup relay device, and storing the received first message for a predetermined time interval in memory when the relay device 1 is determined to be a backup relay device, and the transmission of the first message may also include transmitting the received first message to the operated device when the relay device 1 is determined to be a relay device that relays the first message.
[0029] With this configuration, the backup relay device stores the first messages received for a predetermined time interval in its memory. Therefore, if a relay device relaying the first messages fails, it is possible to prevent the loss of first messages transmitted during the switchover from the failed relay device to the backup relay device. Furthermore, since not all relay devices belonging to a predetermined group receive the first messages, relay devices that do not relay the first messages do not receive them, communication traffic can be reduced. In addition, because the backup relay device stores the first messages received for a predetermined time interval in its memory, the amount of memory required by other relay devices belonging to the predetermined group can be reduced.
[0030] (7) In the information processing method described in (6) above, if, after the relay device 1 is determined to be the backup relay device, the other relay device that is relaying the first message is determined not to be relaying the first message, the method further includes transmitting the first message for the predetermined time interval stored in the memory to the device to be operated; determining the relay device 1 to be relaying the first message; and determining the other operational relay device that is not relaying the first message as a new backup relay device based on the operational status of the other relay device that is not relaying the first message.
[0031] In this configuration, if a relay device relaying the first message fails, a backup relay device will transmit the first message to the controlled device for a predetermined time interval stored in memory. Therefore, it is possible to prevent the loss of the first message that is communicated during the switchover from the failed relay device to the backup relay device.
[0032] (8) In the information processing method described in (1) above, receiving the first message or the second message includes receiving the second message, determining the relay device includes determining which of the operating relay device 1 and the other relay devices is the relay device that relays the second message, based on the operating status of each of the 1 relay device and the other relay devices, and transmitting the first message or the second message may include transmitting the received second message to the operating device using the second common topic if the 1 relay device is determined to be the relay device that relays the second message.
[0033] In this configuration, all of the multiple relay devices belonging to a predetermined group receive the second message transmitted from the controlled device to the controlling device. Furthermore, instead of switching from a faulty relay device to another relay device and then having that other relay device receive the second message, all of the multiple relay devices receive the second message before switching from the faulty relay device to another relay device. Therefore, the number of steps required to switch relay devices is reduced, and the time required to switch from a faulty relay device to another relay device can be shortened.
[0034] (9) In the information processing method described in (8) above, the transmission of the second message may include publishing the second message using the second common topic in publish / subscribe communication.
[0035] In this configuration, the relay device publishes the second message using the second common topic, and the second message is sent to the devices that have subscribed to the second common topic. Therefore, there is no need for the source device and the destination device to communicate directly, and the relay device can easily send the second message.
[0036] (10) The information processing method described in (8) or (9) above may further include, if the relay device 1 is determined to be a relay device that does not relay the second message, storing the second message for a predetermined time interval that has been received in memory, and if the relay device 1 is determined to be a relay device that relays the second message after it has been determined to be a relay device that does not relay the second message, transmitting the second message for the predetermined time interval stored in memory to the operating device using the second common topic.
[0037] In this configuration, a relay device that does not relay the second message stores the received second messages for a predetermined time interval in memory. Subsequently, if the relay device that did not relay the second message is determined to be a relay device that relays the second message, that relay device transmits the second messages for the predetermined time interval stored in memory to the operating device using the second common topic.
[0038] Therefore, if a failure occurs in the relay device relaying the second message, it is possible to prevent the loss of the second message that is being communicated while switching from the failed relay device to another relay device.
[0039] (11) The information processing method described in (8) or (9) above may further include determining, based on the operating status of the first relay device and the other relay devices, which relay devices among the first relay device and the other relay devices that are in operation do not relay the second message and designate them as backup relay devices.
[0040] With this configuration, a relay device that does not relay the second message is designated as a backup relay device. Therefore, if a failure occurs in the relay device that is relaying the second message, the backup relay device can be immediately designated as the new relay device that relays the second message, thereby reducing the processing time required to determine the new relay device.
[0041] (12) The information processing method described in (11) above further includes receiving the second message when the relay device 1 is determined to be a relay device that relays the second message or when the relay device 1 is determined to be a backup relay device, and storing the received second message for a predetermined time interval in memory when the relay device 1 is determined to be a backup relay device, and the transmission of the second message may also include transmitting the received second message to the operating device using the second common topic when the relay device 1 is determined to be a relay device that relays the second message.
[0042] According to this configuration, since the standby relay device stores the second message for a predetermined time interval received in the memory, when a failure occurs in the relay device that relays the second message, it is possible to prevent the second message communicated during the switch from the relay device with the failure to the standby relay device from being lost. Further, since not all relay devices belonging to a predetermined group receive the second message, but relay devices that do not relay the second message do not receive the second message, communication traffic can be reduced. Further, since the standby relay device stores the second message for a predetermined time interval received in the memory, it is possible to reduce the storage amount of the memory of other relay devices that do not relay the second message.
[0043] (13) In the information processing method described in (12) above, after the one relay device is determined to be the standby relay device, when the other relay device that relays the second message is determined to be a relay device that does not relay the second message, transmitting the second message for the predetermined time interval stored in the memory toward the operating device using the second common topic; determining the one relay device as a relay device that relays the second message; and further determining, based on the operating status of the other relay devices that do not relay the second message, another operating relay device that does not relay the second message as a new standby relay device.
[0044] According to this configuration, when a failure occurs in the relay device that relays the second message, the standby relay device transmits the second message for a predetermined time interval stored in the memory toward the operating device using the second common topic. Therefore, it is possible to prevent the second message communicated during the switch from the relay device with the failure to the standby relay device from being lost.
[0045] (14) In the information processing method according to any one of (1) to (13) above, among the one relay device and the other relay device, a relay device whose operation status has switched between operating and stopping a predetermined number of times or more within a predetermined period may be further determined as a relay device that does not relay the first message or the second message.
[0046] According to this configuration, since the relay device does not frequently switch, it is possible to prevent the first message or the second message from being lost.
[0047] (15) In the information processing method according to (14) above, the determination of the relay device may include that when the relay device whose operation status has switched between operating and stopping a predetermined number of times or more within a predetermined period has the function of the operated device, the relay device having the function of the operated device is not determined as a relay device that does not relay the first message or the second message.
[0048] According to this configuration, since a relay device having the function of the operated device is not determined as a relay device that does not relay the first message or the second message, it is possible to prevent the relay device and the operated device from being unable to directly transmit and receive the first message or the second message.
[0049] Further, the present disclosure can be realized not only as an information processing method for executing the above-described characteristic processing, but also as a relay device having a characteristic configuration corresponding to the characteristic processing executed by the information processing method. It can also be realized as a computer program that causes a computer to execute the characteristic processing included in such an information processing method. Therefore, in the following other aspects, the same effects as the above information processing method can be achieved.
[0050] (16) A relay device according to another aspect of the present disclosure is a relay device for relaying messages communicated between an operating device and an operated device, comprising: a receiving unit that receives a first message transmitted from the operating device to the operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or a second message transmitted from the operated device to the operating device; a monitoring unit that monitors the operating status of one relay device among a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group; a determination unit that determines which of the operating relay device 1 and the other relay devices is the relay device for relaying the first message or the second message, based on the operating status of the 1 relay device and the other relay devices; and a transmitting unit that, when the 1 relay device is determined to be the relay device for relaying the first message or the second message, transmits the received first message or transmits the second message using a second common topic assigned to the predetermined group.
[0051] (17) An information processing program according to another aspect of the present disclosure is an information processing program for relaying messages communicated between an operating device and an operated device, the program receiving a first message transmitted from the operating device to an operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or receiving a second message transmitted from the operated device to the operating device, monitoring the operational status of one of a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group, determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message based on the operational status of each of the relay devices 1 and the other relay devices, and when the relay device 1 is determined to be the relay device that relays the first message or the second message, the program causes the computer to transmit the received first message or transmit the second message using a second common topic assigned to the predetermined group.
[0052] Non-temporary computer-readable recording media relating to other aspects of this disclosure record the information processing program described in (17) above.
[0053] (18) An information processing system according to another aspect of the present disclosure is an information processing system comprising a plurality of relay devices that relay messages communicated between an operating device and an operated device, and a server provided between the operating device and the relay devices and connected to the operating device so as to be able to communicate with each other, wherein the server comprises a receiving unit that receives a first message transmitted from the operating device to the operated devices belonging to a predetermined group or a second message transmitted from the operated devices to the operating device, and a transmitting unit that transmits the received first message to the plurality of relay devices belonging to the predetermined group or transmits the received second message to the operating device, wherein one of the plurality of relay devices receives the first message transmitted by the server The system includes: a receiving unit that receives the second message using a first common topic assigned to a predetermined group or transmitted by the operated device; a monitoring unit that monitors the operating status of the first relay device and other relay devices belonging to the predetermined group; a determination unit that determines which of the operating first relay device and the other operating relay devices will be the relay device that relays the first message or the second message, based on the operating status of the first relay device and the other relay devices; and a transmitting unit that, when the first relay device is determined to be the relay device that relays the first message or the second message, transmits the received first message or transmits the second message using a second common topic assigned to the predetermined group.
[0054] Embodiments of this disclosure will be described below with reference to the attached drawings. Note that the embodiments described below are all specific examples of this disclosure. The numerical values, shapes, components, steps, and order of steps shown in the following embodiments are examples only and are not intended to limit this disclosure. Furthermore, components in the following embodiments that are not described in the independent claim representing the highest-level concept will be described as optional components. Also, in all embodiments, the contents of each can be combined.
[0055] (Embodiment) Figure 1 is a diagram showing the overall configuration of the information processing system 10 in this embodiment.
[0056] The information processing system 10 shown in Figure 1 comprises an operating device 1, a server 2, an MQTT (Message Queuing Telemetry Transport) broker 3, a first gateway 4A, a second gateway 4B, and a plurality of devices to be operated 5.
[0057] The operating device 1 is an information terminal such as a smartphone, tablet computer, or personal computer, and remotely controls the controlled device 5. The operating device 1 transmits a first message containing operation instruction information for controlling the controlled device 5 to the controlled device 5, and receives a second message containing data obtained by the controlled device 5. The operating device 1 is communicated with the server 2 via a wide area network (not shown). The wide area network is, for example, the Internet. The operating device 1 transmits the first message to the server 2 and receives the second message from the server 2.
[0058] The Matter standard has been proposed as a communication standard for IoT devices. The Matter standard is a smart home standard developed by the CSA (Connectivity Standards Alliance). By using the Matter standard, multiple IoT devices from different manufacturers can be easily connected to each other.
[0059] The controlled device conforms to a communication protocol called the Matter standard and can be connected to the control device or relay device via a network, allowing it to send and receive data to and from each other using Matter. An example of such a relay device is a Matter bridge.
[0060] When a new device is registered within a group of devices connected by Matter, the newly registered device can communicate and cooperate with other devices. The group of devices connected by Matter is also referred to as a fabric. An example of a predetermined group in this embodiment includes a group of devices connected by Matter.
[0061] Server 2, MQTT broker 3, first gateway 4A, and second gateway 4B are connected via publish / subscribe communication according to the MQTT messaging protocol. In publish / subscribe communication, a transmitting device (publisher) publishes a message using a specific topic, and a receiving device (subscriber) subscribes to that specific topic, thereby sending the message from the transmitting device to the receiving device via MQTT broker 3. At this time, the transmitting device can send a message without specifying the receiving device. By having multiple receiving devices subscribe to a specific topic, the transmitting device can send a message to multiple receiving devices at once.
[0062] Server 2 is installed between the operating device 1 and the first gateway 4A and the second gateway 4B, and is connected to the operating device 1 so that they can communicate with each other. Server 2 receives the first message transmitted by the operating device 1 and transmits the first message to the controlled device 5 using the first common topic assigned to a predetermined group 8. Server 2 also receives the second message transmitted by the MQTT broker 3 using the second common topic assigned to a predetermined group 8 and transmits the second message to the operating device 1.
[0063] The first common topic is used when the operating device 1 sends the first message to the operated device 5, and the second common topic is used when the operated device 5 sends the second message to the operating device 1.
[0064] Server 2 is connected to MQTT broker 3 via a wide area network (not shown) that enables communication between them. The wide area network is, for example, the Internet. The configuration of server 2 will be described later.
[0065] The MQTT broker 3 relays messages between the server 2 and either the first gateway 4A or the second gateway 4B. The MQTT broker 3 is connected to the first gateway 4A and the second gateway 4B via a wide area network 6, enabling communication between them. The wide area network 6 is, for example, the Internet.
[0066] The MQTT broker 3 stores the first common topic assigned to a predetermined group 8 subscribed by the first gateway 4A and the second gateway 4B, associating it with the first gateway 4A and the second gateway 4B. When the MQTT broker 3 receives the first message sent using the first common topic from the server 2, it determines the destination of the first message to be the first gateway 4A and the second gateway 4B based on the first common topic. The MQTT broker 3 then sends the first message to the first gateway 4A and the second gateway 4B.
[0067] Furthermore, the MQTT broker 3 stores the second common topic assigned to a predetermined group 8 subscribed to by the server 2, associating it with the server 2. When the MQTT broker 3 receives a second message sent using the second common topic from the first gateway 4A or the second gateway 4B, it determines the destination of the second message to be the server 2 based on the second common topic. Then, the MQTT broker 3 sends the second message to the server 2.
[0068] The first gateway 4A is an example of one relay device, and the second gateway 4B is an example of another relay device. The first gateway 4A and the second gateway 4B are installed in the user's residence. The first gateway 4A and the second gateway 4B belong to a predetermined group 8. The predetermined group 8 consists of multiple controlled devices 5, the first gateway 4A, and the second gateway 4B, all installed in the same residence. The first gateway 4A and the second gateway 4B relay messages communicated between the operating device 1 and the controlled devices 5 belonging to the predetermined group 8.
[0069] The first gateway 4A and the second gateway 4B are communication devices that connect the wide area network 6 and the local area network 7. The local area network 7 is a wireless LAN such as Wi-Fi. The first gateway 4A and the second gateway 4B are each connected to each of the multiple devices to be operated 5 via the local area network 7 so that they can communicate with each other.
[0070] The first gateway 4A and the second gateway 4B receive the first message using the first common topic. That is, the first gateway 4A and the second gateway 4B subscribe to the first common topic and receive the first message sent by the MQTT broker 3.
[0071] The first gateway 4A and the second gateway 4B monitor each other's operating status and, based on the operating status of the first gateway 4A and the second gateway 4B, determine which of the operating first gateway 4A and the second gateway 4B will be the gateway to relay the first message. The first gateway 4A and the second gateway 4B that has been determined to be the gateway to relay the first message transmits the received first message to the device to be operated 5.
[0072] Furthermore, the first gateway 4A and the second gateway 4B receive the second message transmitted from the controlled device 5 to the operating device 1. The first gateway 4A and the second gateway 4B monitor each other's operating status and, based on the operating status of the first gateway 4A and the second gateway 4B, determine which of the operating first gateway 4A and the second gateway 4B will be the gateway to relay the second message. The first gateway 4A and the second gateway 4B that has been determined to be the gateway to relay the second message transmits the received second message to the operating device 1 using the second common topic assigned to a predetermined group 8.
[0073] The configurations of the first gateway 4A and the second gateway 4B will be described later.
[0074] Furthermore, although the information processing system 10 includes two gateways belonging to a predetermined group 8, this disclosure is not limited thereto, and it may include three or more gateways belonging to a predetermined group 8.
[0075] The controlled device 5 is, for example, a home appliance such as a television, washing machine, refrigerator, rice cooker, electric water heater, and air conditioner. The controlled device 5 is operated by the operating device 1 and transmits data obtained by the controlled device 5 to the operating device 1. The controlled device 5 is installed in the user's residence. The controlled device 5 belongs to a predetermined group 8. The controlled device 5 receives a first message transmitted by the first gateway 4A or the second gateway 4B. The controlled device 5 also transmits a second message containing data obtained by the controlled device 5 to the first gateway 4A and the second gateway 4B.
[0076] If the operating device 1 is located inside the house where the controlled device 5 is installed, the operating device 1 may operate the controlled device 5 via the local area network 7. On the other hand, if the operating device 1 is located outside the house where the controlled device 5 is installed, the operating device 1 cannot connect to the local area network 7, and therefore operates the controlled device 5 via the server 2, MQTT broker 3, first gateway 4A, and second gateway 4B.
[0077] The information processing system 10 includes three operable devices 5 belonging to a predetermined group 8, but the disclosure is not limited thereto. It may include two or fewer operable devices 5 belonging to a predetermined group 8, or it may include four or more operable devices 5 belonging to a predetermined group 8.
[0078] Figure 2 shows an example of the configuration of server 2 in an embodiment of the present disclosure.
[0079] Server 2 comprises a communication unit 21, a device information storage unit 22, a topic determination unit 23, a message relay unit 24, and a topic management unit 25.
[0080] Server 2 comprises, for example, a computer system including a control program, a processing circuit such as a processor or logic circuit that executes the control program, and a recording device such as internal memory or accessible external memory that stores the control program. Server 2 may be implemented, for example, by a hardware implementation using a processing circuit, by the execution of a software program held in memory by the processing circuit or distributed from an external server, or by a combination of these hardware and software implementations.
[0081] The communication unit 21 is a communication interface that connects the server 2 to the network. The communication unit 21 receives a first message transmitted from the operating device 1 to the controlled device 5, or a second message transmitted from the controlled device 5 to the operating device 1. The communication unit 21 transmits the received first message to a plurality of gateways (first gateway 4A and second gateway 4B) or transmits the received second message to the operating device 1. The communication unit 21 receives the first message transmitted by the operating device 1 and transmits the received first message to the MQTT broker 3. The first message includes an operating device ID to identify the source operating device 1 and a controlled device ID to identify the destination controlled device 5. The communication unit 21 also receives the second message transmitted by the MQTT broker 3 and transmits the received second message to the operating device 1.
[0082] The operated device information storage unit 22 stores operated device information that associates an operated device ID for identifying the operated device 5 with a group ID for identifying the group 8 to which the operated device 5 belongs.
[0083] The topic determination unit 23 determines a first common topic assigned to a predetermined group 8 based on the operated device ID contained in the first message. The topic determination unit 23 refers to the operated device information stored in the operated device information storage unit 22, obtains the group ID associated with the operated device ID contained in the first message, and determines a first common topic using the obtained group ID. The first common topic may be stored in advance in association with the group ID. The operating device 1 may also accept user input of the first common topic to be associated with the group ID.
[0084] The message relay unit 24 transmits the first message to the controlled device 5 using the first common topic. That is, in publish / subscribe communication, the message relay unit 24 publishes the first message to the MQTT broker 3 using the first common topic.
[0085] The message relay unit 24 subscribes to the second common topic assigned to a predetermined group 8. Note that the first common topic and the second common topic are different topics. In order to subscribe to the second common topic, the message relay unit 24 sends a subscribe message containing the second common topic to the MQTT broker 3. The MQTT broker 3 stores the second common topic sent by the server 2 in association with the server 2.
[0086] The topic management unit 25 manages the second common topics assigned to a predetermined group 8. The topic management unit 25 manages which group's second common topics the server 2 is subscribed to. If there are multiple groups, the topic management unit 25 stores topic information that associates a group ID to identify each of the multiple groups, information indicating whether or not each of the multiple groups subscribes to the second common topic, and the second common topics of each of the multiple groups. The operating device 1 may also accept user input regarding which group's second common topics the server 2 subscribes to.
[0087] The second message includes an operated device ID for identifying the operating device 5 that is the source of the message and an operating device ID for identifying the operating device 1 that is the destination. When the communication unit 21 receives the second message, the message relay unit 24 transmits the received second message to the operating device 1 via the communication unit 21, based on the operating device ID included in the second message.
[0088] Figure 3 shows an example of the configuration of the first gateway 4A in the embodiment of this disclosure. The configuration of the second gateway 4B is the same as that of the first gateway 4A.
[0089] The first gateway 4A includes a communication unit 41, a message relay unit 42, a topic management unit 43, an operation monitoring unit 44, a monitoring information storage unit 45, and a relay gateway determination unit 46.
[0090] The first gateway 4A includes, for example, a computer system comprising a control program, a processing circuit such as a processor or logic circuit that executes the control program, and a recording device such as an internal memory or an accessible external memory that stores the control program. The first gateway 4A may be implemented, for example, by a hardware implementation using a processing circuit, by the execution of a software program held in memory by the processing circuit or distributed from an external server, or by a combination of these hardware and software implementations.
[0091] The communication unit 41 is a communication interface that connects the first gateway 4A to the wide area network 6 and the local area network 7. The communication unit 41 receives a first message transmitted from the operating device 1 to the operated device 5 or a second message transmitted from the operated device 5 to the operating device 1. The communication unit 41 receives the first message transmitted from the operating device 1 to the operated device 5 using a first common topic assigned to a predetermined group 8. The communication unit 41 receives the first message published by the server 2, which received the first message from the operating device 1, using the first common topic in publish / subscribe communication, from the MQTT broker 3.
[0092] Furthermore, the communication unit 41 receives the second message transmitted from the controlled device 5 to the operating device 1. The controlled device 5 transmits the second message to both the first gateway 4A and the second gateway 4B, which belong to a predetermined group 8.
[0093] The message relay unit 42 subscribes to the first common topic assigned to a predetermined group 8 to which the first gateway 4A belongs in publish / subscribe communication. In order to subscribe to the first common topic, the message relay unit 42 sends a subscribe message containing the first common topic to the MQTT broker 3. The MQTT broker 3 stores the first common topic sent by the first gateway 4A in association with the first gateway 4A.
[0094] The topic management unit 43 manages the first common topic assigned to a predetermined group 8 to which the first gateway 4A belongs. The topic management unit 43 manages whether the first gateway 4A is subscribed to the first common topic. The topic management unit 43 stores the first common topic that the first gateway 4A is subscribed to. The operating device 1 may also accept user input for the first common topic that the first gateway 4A is subscribed to.
[0095] Furthermore, the topic management unit 43 manages the second common topic assigned to a predetermined group 8 to which the first gateway 4A belongs. The topic management unit 43 manages the second common topic used by the first gateway 4A when sending the second message. The topic management unit 43 stores the second common topic for the first gateway 4A to publish the second message. The operating device 1 may also accept user input for the second common topic.
[0096] The topic management unit 43 may determine a second common topic assigned to a predetermined group 8 based on a group ID used to identify the predetermined group 8 to which the first gateway 4A belongs. The topic management unit 43 may also obtain a group ID stored in memory and determine a second common topic using the obtained group ID.
[0097] The monitoring information storage unit 45 stores monitoring information that associates a gateway ID for identifying each of the multiple gateways belonging to a predetermined group 8 with the operating status of each of the multiple gateways. The operating status is represented as either "operating," where the gateway is able to communicate, or "stopped," where the gateway is unable to communicate. For example, if the gateway's power is on and it is able to communicate, the operating status is "operating," and if the gateway's power is off or it is unable to communicate, the operating status is "stopped."
[0098] The operation monitoring unit 44 monitors the operating status of the first gateway 4A (gateway 1) and the second gateway 4B (other gateways) belonging to a predetermined group 8.
[0099] Specifically, the operation monitoring unit 44 sends an operation monitoring message, including a gateway ID for identifying the first gateway 4A, to the second gateway 4B belonging to a predetermined group 8. The operation monitoring unit 44 also receives the operation monitoring message sent by the second gateway 4B belonging to the predetermined group 8. Upon receiving the operation monitoring message, the operation monitoring unit 44 updates the monitoring information stored in the monitoring information storage unit 45 and sets the operation status of the gateway that sent the operation monitoring message to "operating". Alternatively, if the power to the first gateway 4A is on, the operation monitoring unit 44 may set the operation status of the first gateway 4A to "operating".
[0100] Furthermore, the operation monitoring unit 44 measures the elapsed time from the time the operating status was set to "operating". The elapsed time is stored in the monitoring information associated with the gateway ID. If a new operation monitoring message is received after the measurement of elapsed time has started and the operating status is set to "operating", the operation monitoring unit 44 resets the elapsed time. On the other hand, if the elapsed time exceeds a predetermined timeout period after the measurement of elapsed time has started, the operation monitoring unit 44 updates the monitoring information stored in the monitoring information storage unit 45 and sets the operating status of the gateway whose elapsed time has exceeded the predetermined timeout period to "stopped".
[0101] The relay gateway determination unit 46 determines, based on the operating status of the first gateway 4A (one relay device) and the second gateway 4B (another relay device), whichever of the first gateway 4A and the second gateway 4B is operational, to be the gateway that relays the first message or the second message. The relay gateway determination process by the relay gateway determination unit 46 will be described later.
[0102] The message relay unit 42 transmits the received first message or second message when the first gateway 4A (the relay device 1) is determined to be a gateway that relays the first message or the second message. The message relay unit 42 transmits the received first message to the operated device 5 via the communication unit 41 when the first gateway 4A is determined to be a gateway that relays the first message. The message relay unit 42 does not transmit the received first message to the operated device 5 when the first gateway 4A is determined to be a gateway that does not relay the first message.
[0103] When the communication unit 41 receives a second message from the device being operated 5, the relay gateway determination unit 46 determines, based on the operating status of the first gateway 4A and the second gateway 4B respectively, whichever of the first gateway 4A or second gateway 4B is operational, to be the gateway that relays the second message.
[0104] When the first gateway 4A is determined to be the gateway that relays the second message, the message relay unit 42 transmits the received second message to the operating device 1 using the second common topic assigned to a predetermined group 8. The message relay unit 42 obtains the second common topic from the topic management unit 43 and transmits the second message to the operating device 1 using the second common topic. In other words, in publish / subscribe communication, the message relay unit 42 publishes the second message to the MQTT broker 3 using the second common topic.
[0105] The message relay unit 42 does not transmit the received second message if the first gateway 4A is determined to be a gateway that does not relay the second message.
[0106] Next, the transmission process of the first message by the server 2, MQTT broker 3, first gateway 4A, second gateway 4B, and operated device 5 in this embodiment will be described.
[0107] Figure 4 is a schematic diagram illustrating the transmission process of the first message by the server 2, MQTT broker 3, first gateway 4A, second gateway 4B, and operated device 5 in this embodiment.
[0108] First, the first gateway 4A subscribes to the first common topic assigned to the predetermined group 8 to which the first gateway 4A belongs. Then, the second gateway 4B subscribes to the first common topic assigned to the predetermined group 8 to which the second gateway 4B belongs.
[0109] Next, Server 2 publishes the first message received from Operating Device 1 to MQTT Broker 3 using the first common topic.
[0110] Next, MQTT broker 3 sends the published first message to the first gateway 4A and the second gateway 4B, which are subscribed to the first common topic.
[0111] Next, the first gateway 4A receives the first message transmitted by the MQTT broker 3. The second gateway 4B also receives the first message transmitted by the MQTT broker 3.
[0112] Next, the first gateway 4A and the second gateway 4B determine which gateway will relay the first message. If the first gateway 4A is determined to be the gateway that will relay the first message, the first gateway 4A transmits the received first message to the device to be operated 5, while the second gateway 4B does not transmit the received first message to the device to be operated 5.
[0113] Next, the process of sending a first message from the operating device 1 to the operated device 5 in this embodiment will be described.
[0114] Figure 5 is a sequence diagram showing the process of transmitting a first message from the operating device 1 to the operated device 5 in this embodiment.
[0115] First, in step S101, the first gateway 4A and the second gateway 4B subscribe to the first common topic assigned to a predetermined group 8 to which the first gateway 4A and the second gateway 4B belong. The first gateway 4A sends a message to the MQTT broker 3 indicating that the first gateway 4A subscribes to the first common topic. The second gateway 4B sends a message to the MQTT broker 3 indicating that the second gateway 4B subscribes to the first common topic.
[0116] Next, in step S102, the operating device 1 sends a first message to the operated device 5 to the server 2. The server 2 receives the first message sent by the operating device 1.
[0117] Next, in step S103, the server 2 determines a first common topic to be assigned to a predetermined group 8 to which the operated device 5 belongs, based on the operated device ID included in the first message.
[0118] Next, in step S104, server 2 publishes a first message to MQTT broker 3 using a first common topic. MQTT broker 3 receives the first message.
[0119] Next, in step S105, the MQTT broker 3 transmits the received first message to the first gateway 4A and the second gateway 4B, which are subscribed to the first common topic. The first gateway 4A and the second gateway 4B receive the first message transmitted by the MQTT broker 3.
[0120] Next, in step S106, the first gateway 4A and the second gateway 4B determine which gateway will relay the first message. The first gateway 4A and the second gateway 4B decide that either the first gateway 4A or the second gateway 4B will be the gateway that relays the first message.
[0121] Next, in step S107, either the first gateway 4A or the second gateway 4B, which has been determined to be the gateway that relays the first message, transmits the first message to the device to be operated 5. The device to be operated 5 receives the first message transmitted by either the first gateway 4A or the second gateway 4B.
[0122] Next, the relaying process of the first message by the first gateway 4A in this embodiment will be described.
[0123] Figure 6 is an example flowchart illustrating the relaying process of the first message by the first gateway 4A in this embodiment. Note that the relaying process of the first message by the second gateway 4B is the same as that of the first gateway 4A.
[0124] First, in step S1, the message relay unit 42 subscribes to the first common topic assigned to a predetermined group 8 to which the first gateway 4A belongs in publish / subscribe communication. At this time, the message relay unit 42 obtains the first common topic to subscribe to from the topic management unit 43. The message relay unit 42 sends a message to the MQTT broker 3 via the communication unit 41 indicating that the first gateway 4A subscribes to the first common topic. The MQTT broker 3 receives the message sent by the first gateway 4A and stores the first common topic in association with the first gateway 4A.
[0125] Next, in step S2, the communication unit 21 receives the first message transmitted from the operating device 1 to the operated device 5. At this time, since the first gateway 4A is subscribed to the first common topic, the MQTT broker 3 transmits the first message published using the first common topic to the first gateway 4A.
[0126] Next, in step S3, the relay gateway determination unit 46 determines which of the operational first gateway 4A and the operational second gateway 4B will relay the first message, based on the operational status of the first gateway 4A and the second gateway 4B respectively. If both the first gateway 4A and the second gateway 4B are operational, the relay gateway determination unit 46 determines that either the first gateway 4A or the second gateway 4B will be the gateway to relay the first message.
[0127] Next, in step S4, the message relay unit 42 determines whether the first gateway 4A has been determined to be the gateway that relays the first message.
[0128] If the first gateway 4A is determined to be a gateway that does not relay the first message (NO in step S4), the process returns to step S2. In this case, the message relay unit 42 does not transmit the received first message to the device being operated 5. The second gateway 4B is determined to be a gateway that relays the first message, and the second gateway 4B transmits the first message to the device being operated 5.
[0129] On the other hand, if the first gateway 4A is determined to be the gateway that relays the first message (YES in step S4), in step S5, the message relay unit 42 transmits the received first message to the device to be operated 5 via the communication unit 41.
[0130] In this way, all of the multiple gateways belonging to a predetermined group 8 receive the first message using the first common topic assigned to the predetermined group 8. Furthermore, instead of switching from the failed gateway to another gateway and then having that other gateway receive the first message, all of the multiple gateways receive the first message before switching from the failed gateway to another gateway. Therefore, the number of steps required to switch gateways is reduced, and the time required to switch from a failed gateway to another gateway can be shortened.
[0131] Next, the relay gateway determination process by the relay gateway determination unit 46 in this embodiment will be described.
[0132] Figure 7 is an example of a flowchart illustrating the relay gateway determination process performed by the relay gateway determination unit 46 in step S3 of Figure 6.
[0133] First, in step S11, the relay gateway determination unit 46 obtains an operated device ID for identifying the operated device 5 included in the received first message, and a gateway ID for identifying all active gateways from the monitoring information storage unit 45. Multiple gateways and multiple operated devices belonging to a predetermined group 8 are assigned different IDs in advance.
[0134] Next, in step S12, the relay gateway determination unit 46 calculates the difference between the operated device ID included in the received first message and the gateway ID of each of the currently operating gateways.
[0135] Next, in step S13, the relay gateway determination unit 46 determines whether the difference between the operated device ID and the gateway ID of the first gateway 4A is minimized.
[0136] If it is determined that the difference between the operated device ID and the gateway ID of the first gateway 4A is the smallest (YES in step S13), then in step S14, the relay gateway determination unit 46 determines the first gateway 4A to be the gateway that relays the first message.
[0137] On the other hand, if it is determined that the difference between the operated device ID and the gateway ID of the first gateway 4A is not the smallest (NO in step S13), the relay gateway determination is terminated. At this time, the relay gateway determination unit 46 determines the second gateway 4B, which has the smallest difference, as the gateway to relay the first message.
[0138] As described above, in this embodiment, the relay gateway determination unit 46 determines the gateway to relay the first message based on the operated device ID for identifying the operated device 5 included in the received first message and the gateway ID for identifying all active gateways.
[0139] The relay gateway determination unit 46 determines the gateway that relays the first message from among all operational gateways, which has the smallest difference between the operated device ID and the gateway ID. However, this disclosure is not limited to this. For example, the relay gateway determination unit 46 may determine the gateway that relays the first message from among all operational gateways, which has the largest difference between the operated device ID and the gateway ID.
[0140] Furthermore, the method for determining which gateway will relay the first message from among all operational gateways is not limited to the above, and the gateway to relay the first message may be determined by other methods.
[0141] Next, the operational monitoring process performed by the first gateway 4A and the second gateway 4B in this embodiment will be described.
[0142] Figure 8 is a sequence diagram showing the operation monitoring process by the first gateway 4A and the second gateway 4B in this embodiment.
[0143] First, in step S201, the second gateway 4B sends an operational monitoring message to the first gateway 4A that includes a gateway ID for identifying the second gateway 4B. The first gateway 4A receives the operational monitoring message sent by the second gateway 4B.
[0144] Next, in step S202, the first gateway 4A updates the monitoring information. At this time, the first gateway 4A sets the operating status of the second gateway 4B to "operating" based on the gateway ID of the second gateway 4B included in the operation monitoring message as monitoring information. The first gateway 4A also measures the elapsed time since the time when the operating status was set to "operating".
[0145] Next, in step S203, the second gateway 4B sends an operation monitoring message to the first gateway 4A. The operation monitoring message is sent periodically at predetermined time intervals. The first gateway 4A receives the operation monitoring message sent by the second gateway 4B. The first gateway 4A also periodically sends an operation monitoring message to the second gateway 4B.
[0146] Next, in step S204, the first gateway 4A updates the monitoring information. At this time, the first gateway 4A sets the operating status of the second gateway 4B to "operating" based on the gateway ID of the second gateway 4B included in the operational monitoring message as monitoring information. The first gateway 4A sets the operating status of the second gateway 4B included in the monitoring information to "operating" and resets the elapsed time that was being measured. Then, the first gateway 4A measures the elapsed time again from the time when the operating status was set to "operating". Then, the first gateway 4A determines whether the elapsed time has exceeded a predetermined timeout period.
[0147] If the elapsed time exceeds a predetermined timeout period, in step S205, the first gateway 4A updates the monitoring information. At this time, the first gateway 4A sets the operating status of the second gateway 4B, which is included in the monitoring information, to stopped. For example, if the power to the second gateway 4B is turned off, the second gateway 4B will no longer send operational monitoring messages.
[0148] Next, in step S206, the second gateway 4B sends an operation monitoring message to the first gateway 4A. The first gateway 4A receives the operation monitoring message sent by the second gateway 4B. For example, if the power to the second gateway 4B is turned on again, the second gateway 4B resumes sending operation monitoring messages.
[0149] Next, in step S207, the first gateway 4A updates the monitoring information. At this time, the first gateway 4A changes the operating status of the second gateway 4B from stopped to running based on the gateway ID of the second gateway 4B included in the operational monitoring message as monitoring information.
[0150] Next, the operation monitoring process performed by the operation monitoring unit 44 in this embodiment will be described.
[0151] Figure 9 is a flowchart illustrating the operation monitoring process performed by the operation monitoring unit 44 of the first gateway 4A in this embodiment. The operation monitoring process shown in Figure 9 is performed in parallel with the relay process of the first message shown in Figure 6. Furthermore, the operation monitoring process shown in Figure 9 is performed by the operation monitoring unit 44 of the first gateway 4A.
[0152] First, in step S21, the operation monitoring unit 44 determines whether or not it has received an operation monitoring message from the second gateway 4B.
[0153] If it is determined that an operation monitoring message has been received from the second gateway 4B (YES in step S21), then in step S22, the operation monitoring unit 44 sets the operation status of the second gateway 4B, which is included in the monitoring information stored in the monitoring information storage unit 45, to "operating".
[0154] Next, in step S23, the operation monitoring unit 44 resets the elapsed time of the second gateway 4B, which is set to be in operation.
[0155] Next, in step S24, the operation monitoring unit 44 measures the elapsed time of the second gateway 4B, which is set to be in operation.
[0156] On the other hand, if it is determined that no operational monitoring message has been received from the second gateway 4B (NO in step S21), in step S25, the operational monitoring unit 44 determines whether the elapsed time of the second gateway 4B has exceeded a predetermined timeout period.
[0157] If it is determined that the elapsed time of the second gateway 4B has not exceeded a predetermined timeout period (NO in step S25), the process returns to step S21.
[0158] On the other hand, if it is determined that the elapsed time of the second gateway 4B has exceeded a predetermined timeout period (YES in step S25), in step S26, the operation monitoring unit 44 changes the operation status of the second gateway 4B, which is included in the monitoring information stored in the monitoring information storage unit 45, to stopped.
[0159] Next, the processing of the first gateway 4A and the second gateway 4B in Modification 1 of this embodiment will be described.
[0160] In Modification 1 of this embodiment, if the first gateway 4A is determined to be a gateway that does not relay the first message, the message relay unit 42 may store the received first messages for a predetermined time interval in memory. After the first gateway 4A is determined to be a gateway that does not relay the first message, if the first gateway 4A is determined to be a gateway that relays the first message, the message relay unit 42 may transmit the first messages stored in memory for a predetermined time interval to the operated device 5. It is preferable that the predetermined time interval is the same as or greater than a predetermined timeout period.
[0161] Figure 10 is a schematic diagram illustrating the processing of the first gateway 4A and the second gateway 4B in a modified example 1 of this embodiment.
[0162] If the first gateway 4A is determined to be the gateway that relays the first message, the first gateway 4A transmits the received first message to the device to be operated 5. In this case, the second gateway 4B stores the received first messages for a predetermined time interval in its memory.
[0163] Subsequently, if the first gateway 4A becomes inoperable and is determined to be a gateway that does not relay the first message, the second gateway 4B is determined to be a gateway that relays the first message. If the second gateway 4B is determined to be a gateway that relays the first message, the second gateway 4B transmits the first message for a predetermined time interval stored in memory to the device to be operated 5.
[0164] This prevents the loss of the first message if a gateway relaying the first message fails, while the system switches from the failed gateway to another gateway.
[0165] Next, the processing of the first gateway 4A and the second gateway 4B in a modified example 2 of this embodiment will be described.
[0166] In a modified example of this embodiment, the relay gateway determination unit 46 may determine, based on the operating status of the first gateway 4A and the second gateway 4B respectively, that the gateway among the operating first gateway 4A and the operating second gateway 4B that does not relay the first message is the spare gateway. The relay gateway determination unit 46 may also determine, among all the operating gateways, the gateway with the second smallest difference between the operated device ID and the gateway ID is the spare gateway.
[0167] Furthermore, if the first gateway 4A is determined to be a gateway that relays the first message, or if the first gateway 4A is determined to be a backup gateway, the message relay unit 42 may receive the first message. On the other hand, if the first gateway 4A is determined to be a gateway that does not relay the first message, the message relay unit 42 may cancel its subscription to the first common topic and may not receive the first message.
[0168] If the first gateway 4A is determined to be a backup gateway, the message relay unit 42 may store the first messages received for a predetermined time interval in memory. If the first gateway 4A is determined to be a gateway that relays the first messages, the message relay unit 42 may transmit the received first messages to the device to be operated 5. In this case, the message relay unit 42 may transmit the received first messages to the device to be operated 5 only if the first gateway 4A is determined to be a gateway that relays the first messages.
[0169] If, after the first gateway 4A is determined to be a backup gateway, the second gateway 4B which is relaying the first message is determined not to be a gateway that relays the first message, the message relay unit 42 may transmit the first message for a predetermined time interval stored in memory to the device to be operated 5. After that, the relay gateway determination unit 46 may determine the first gateway 4A to be a gateway that relays the first message. At this time, based on the operating status of the third gateway 4C which does not relay the first message, the operating third gateway 4C which does not relay the first message may be determined to be a new backup gateway.
[0170] Figure 11 is a schematic diagram illustrating the processing of the first gateway 4A, the second gateway 4B, and the third gateway 4C in Modification 2 of this embodiment. Figure 12 is a schematic diagram illustrating the processing of the second gateway 4B and the third gateway 4C when the first gateway 4A stops operating in Modification 2 of this embodiment.
[0171] In Figures 11 and 12, the information processing system 10 includes a first gateway 4A, a second gateway 4B, and a third gateway 4C, all belonging to a predetermined group 8.
[0172] As shown in Figure 11, when the first gateway 4A is determined to be the gateway that relays the first message, the first gateway 4A receives the first message and transmits the received first message to the device being operated 5. Of the two active second gateways 4B and third gateway 4C, the second gateway 4B, which does not relay the first message, is determined to be the backup gateway. The second gateway 4B, which has been determined to be the backup gateway, then receives the first message. The third gateway 4C, which does not relay the first message, stops subscribing to the first common topic and does not receive the first message. The second gateway 4B, which has been determined to be the backup gateway, stores the received first messages for a predetermined time interval in memory.
[0173] Subsequently, as shown in Figure 12, if the first gateway 4A becomes inoperable and is determined to be a gateway that does not relay the first message, the second gateway 4B transmits the first message for a predetermined time interval stored in memory to the device to be operated 5. Then, the second gateway 4B is determined to be a gateway that relays the first message. Also, the operational third gateway 4C is determined to be a new backup gateway. The third gateway 4C, determined to be a backup gateway, subscribes to the first common topic and receives the first message. The third gateway 4C, determined to be a backup gateway, also stores the received first message for a predetermined time interval in memory.
[0174] This prevents the loss of the first message if a gateway relaying the first message fails, as the communication switches from the failed gateway to the backup gateway. Furthermore, since not all gateways belonging to a predetermined group 8 receive the first message, and gateways that do not relay the first message do not receive it, communication traffic can be reduced. Additionally, since only the backup gateway stores the received first messages for a predetermined time interval in memory, the memory usage of other gateways that do not relay the first message can be reduced.
[0175] Next, the transmission process of the second message by the server 2, MQTT broker 3, first gateway 4A, second gateway 4B, and operated device 5 in this embodiment will be described.
[0176] Figure 13 is a schematic diagram illustrating the transmission process of the second message by the server 2, MQTT broker 3, first gateway 4A, second gateway 4B, and operated device 5 in this embodiment.
[0177] First, server 2 subscribes to the second common topic assigned to the predetermined group 8 to which the device being operated 5 belongs.
[0178] Next, the first gateway 4A and the second gateway 4B receive the second message transmitted by the device being operated 5.
[0179] Next, the first gateway 4A and the second gateway 4B determine which gateway will relay the second message. If the first gateway 4A is determined to be the gateway that relays the second message, the first gateway 4A publishes the second message received from the operated device 5 to the MQTT broker 3 using the second common topic. If the second gateway 4B is determined to be the gateway that does not relay the second message, the second gateway 4B does not publish the second message received from the operated device 5 to the MQTT broker 3 using the second common topic.
[0180] Next, the MQTT broker 3 sends the second message, published by the first gateway 4A, to the server 2, which is subscribed to the second common topic. The server 2 then sends the received second message to the operating device 1.
[0181] Next, the process of sending a second message from the controlled device 5 to the operating device 1 in this embodiment will be described.
[0182] Figure 14 is a sequence diagram showing the process of transmitting a second message from the controlled device 5 to the operating device 1 in this embodiment.
[0183] First, in step S111, Server 2 subscribes to the second common topic assigned to a predetermined group 8 to which the operated device 5, identified by the operated device ID contained in the received second message, belongs. Server 2 sends a message to MQTT broker 3 indicating that Server 2 subscribes to the second common topic.
[0184] Next, in step S112, the device to be operated 5 transmits a second message to the operating device 1 to the first gateway 4A and the second gateway 4B. The first gateway 4A and the second gateway 4B receive the second message transmitted by the device to be operated 5.
[0185] Next, in step S113, the first gateway 4A and the second gateway 4B determine which gateway will relay the second message. The first gateway 4A and the second gateway 4B decide that either the first gateway 4A or the second gateway 4B will be the gateway that relays the second message.
[0186] Next, in step S114, either the first gateway 4A or the second gateway 4B, which has been determined to be the gateway that relays the second message, acquires the second common topic assigned to a predetermined group 8 to which both the first gateway 4A and the second gateway 4B belong.
[0187] Next, in step S115, either the first gateway 4A or the second gateway 4B, which has been determined to be the gateway that relays the second message, publishes the second message to the MQTT broker 3 using the second common topic. The MQTT broker 3 receives the second message.
[0188] Next, in step S116, the MQTT broker 3 sends the received second message to the server 2 which is subscribed to the second common topic. The server 2 receives the second message sent by the MQTT broker 3.
[0189] Next, in step S117, server 2 sends a second message to operating device 1. Operating device 1 receives the second message sent by server 2.
[0190] Next, the relaying process of the second message by the first gateway 4A in this embodiment will be described.
[0191] Figure 15 is an example flowchart illustrating the relaying process of the second message by the first gateway 4A in this embodiment. The relaying process of the second message by the second gateway 4B is the same as that of the first gateway 4A. Furthermore, the relaying process of the second message shown in Figure 15 is performed in parallel with the operation monitoring process shown in Figure 9.
[0192] First, in step S31, the communication unit 21 receives the second message transmitted from the controlled device 5 to the operating device 1.
[0193] Next, in step S32, the relay gateway determination unit 46 determines which of the operational first gateway 4A and operational second gateway 4B will relay the second message, based on the operational status of the first gateway 4A and the second gateway 4B respectively. If both the first gateway 4A and the second gateway 4B are operational, the relay gateway determination unit 46 determines that either the first gateway 4A or the second gateway 4B will be the gateway to relay the second message.
[0194] Here, the relay gateway determination unit 46 obtains an operated device ID for identifying the operated device 5 included in the received second message, and a gateway ID for identifying all active gateways from the monitoring information storage unit 45. Multiple gateways and multiple operated devices belonging to a predetermined group 8 are assigned different IDs in advance.
[0195] Next, the relay gateway determination unit 46 calculates the difference between the operated device ID included in the received second message and the gateway ID of each of the currently operating gateways. Next, the relay gateway determination unit 46 determines whether the difference between the operated device ID and the gateway ID of the first gateway 4A is the minimum. If it is determined that the difference between the operated device ID and the gateway ID of the first gateway 4A is the minimum, the relay gateway determination unit 46 determines the first gateway 4A to be the gateway that relays the second message. On the other hand, if it is determined that the difference between the operated device ID and the gateway ID of the first gateway 4A is not the minimum, the relay gateway determination unit 46 determines the second gateway 4B, which has the minimum difference, to be the gateway that relays the second message.
[0196] Next, in step S33, the message relay unit 42 determines whether the first gateway 4A has been determined to be the gateway that relays the second message.
[0197] If the first gateway 4A is determined to be a gateway that does not relay the second message (NO in step S33), the relaying process for the second message ends. In this case, the message relay unit 42 does not transmit the received second message to the MQTT broker 3. The second gateway 4B is determined to be a gateway that relays the second message, and the second gateway 4B transmits the second message to the MQTT broker 3.
[0198] On the other hand, if the first gateway 4A is determined to be the gateway that relays the second message (YES in step S33), in step S34, the message relay unit 42 publishes the second message to the MQTT broker 3 using the second common topic via the communication unit 41.
[0199] In this way, all of the gateways belonging to the predetermined group 8 receive the second message transmitted from the operated device 5 to the operating device 1. Furthermore, instead of switching from the failed gateway to another gateway and then having that other gateway receive the second message, all of the gateways receive the second message before switching from the failed gateway to another gateway. Therefore, the number of steps required to switch gateways is reduced, and the time required to switch from the failed gateway to another gateway can be shortened.
[0200] As described above, in this embodiment, the relay gateway determination unit 46 determines the gateway to relay the second message based on the operated device ID for identifying the operated device 5 included in the received second message and the gateway ID for identifying all active gateways.
[0201] The relay gateway determination unit 46 determines the gateway that relays the second message from among all operational gateways, which has the smallest difference between the operated device ID and the gateway ID. However, this disclosure is not limited to this. For example, the relay gateway determination unit 46 may determine the gateway that relays the second message from among all operational gateways, which has the largest difference between the operated device ID and the gateway ID.
[0202] Furthermore, the method for determining which gateway will relay the second message from among all operational gateways is not limited to the above, and the gateway to relay the second message may be determined by other methods.
[0203] Next, the processing of the first gateway 4A and the second gateway 4B in Modification 3 of this embodiment will be described.
[0204] In a modified example 3 of this embodiment, if the first gateway 4A is determined to be a gateway that does not relay the second message, the message relay unit 42 may store the received second messages for a predetermined time interval in memory. After the first gateway 4A has been determined to be a gateway that does not relay the second message, if the first gateway 4A is determined to be a gateway that relays the second message, the message relay unit 42 may transmit the second messages stored in memory for a predetermined time interval to the operating device 1 using the second common topic.
[0205] Figure 16 is a schematic diagram illustrating the processing of the first gateway 4A and the second gateway 4B in Modification 3 of this embodiment.
[0206] If the first gateway 4A is determined to be the gateway that relays the second message, the first gateway 4A publishes the second message to the MQTT broker 3 using the second common topic. In this case, the second gateway 4B stores the received second messages for a predetermined time interval in memory.
[0207] Subsequently, if the first gateway 4A becomes inoperable and is determined to be a gateway that does not relay the second message, the second gateway 4B is determined to be a gateway that relays the second message. If the second gateway 4B is determined to be a gateway that relays the second message, the second gateway 4B publishes the second message to the MQTT broker 3 using the second common topic for a predetermined time interval stored in memory.
[0208] This prevents the loss of second messages if a gateway relaying the second message fails, as the communication will continue between the failed gateway and another gateway.
[0209] Next, the processing of the first gateway 4A and the second gateway 4B in Modification 4 of this embodiment will be described.
[0210] In a modified example 4 of this embodiment, the relay gateway determination unit 46 may determine, based on the operating status of the first gateway 4A and the second gateway 4B respectively, to be a spare gateway, which of the operating first gateway 4A and the operating second gateway 4B does not relay the second message. The relay gateway determination unit 46 may also determine, among all the operating gateways, to be a spare gateway, which is the gateway with the second smallest difference between the operated device ID and the gateway ID.
[0211] Furthermore, if the first gateway 4A is determined to be a gateway that relays the second message, or if the first gateway 4A is determined to be a backup gateway, the message relay unit 42 may receive the second message. On the other hand, if the first gateway 4A is determined to be a gateway that does not relay the second message, the message relay unit 42 does not have to receive the second message.
[0212] If the first gateway 4A is determined to be a backup gateway, the message relay unit 42 may store the received second messages for a predetermined time interval in memory. If the first gateway 4A is determined to be a gateway that relays the second messages, the message relay unit 42 may transmit the received second messages to the operating device 1 using a second common topic. In this case, only if the first gateway 4A is determined to be a gateway that relays the second messages, the message relay unit 42 may transmit the received second messages to the operating device 1 using a second common topic.
[0213] After the first gateway 4A is determined to be a backup gateway, if the second gateway 4B, which is relaying the second message, is determined not to be a gateway that relays the second message, the message relay unit 42 may transmit the second message for a predetermined time interval stored in memory to the operating device 1 using the second common topic. Subsequently, the relay gateway determination unit 46 may determine the first gateway 4A to be a gateway that relays the second message. Based on the operating status of the third gateway 4C that does not relay the second message, the relay gateway determination unit 46 may determine the operating third gateway 4C that does not relay the second message as a new backup gateway.
[0214] Figure 17 is a schematic diagram illustrating the processing of the first gateway 4A, the second gateway 4B, and the third gateway 4C in Modification 4 of this embodiment. Figure 18 is a schematic diagram illustrating the processing of the second gateway 4B and the third gateway 4C when the first gateway 4A stops operating in Modification 4 of this embodiment.
[0215] In Figures 17 and 18, the information processing system 10 includes a first gateway 4A, a second gateway 4B, and a third gateway 4C, all belonging to a predetermined group 8.
[0216] As shown in Figure 17, when the first gateway 4A is determined to be the gateway that relays the second message, the first gateway 4A receives the second message and transmits the received second message to the MQTT broker 3. Of the two operational second gateways 4B and third gateway 4C, the second gateway 4B, which does not relay the second message, is determined to be the backup gateway. The second gateway 4B, which has been determined to be the backup gateway, receives the second message. The third gateway 4C, which does not relay the second message, does not receive the second message. The second gateway 4B, which has been determined to be the backup gateway, stores the received second messages for a predetermined time interval in memory.
[0217] Subsequently, as shown in Figure 18, if the first gateway 4A becomes inoperable and is determined to be a gateway that does not relay the second message, the second gateway 4B sends the second message for a predetermined time interval stored in memory to the MQTT broker 3. Then, the second gateway 4B is determined to be a gateway that relays the second message. Also, the operational third gateway 4C is determined to be a new backup gateway. The third gateway 4C, determined to be a backup gateway, receives the second message. The third gateway 4C, determined to be a backup gateway, also stores the received second message for a predetermined time interval in memory.
[0218] This prevents the loss of second messages transmitted during the transition from the failed gateway to the backup gateway if the gateway relaying the second message fails. Furthermore, since not all gateways belonging to a predetermined group 8 receive the second message, and gateways that do not relay the second message do not receive it, communication traffic can be reduced. In addition, since only the backup gateway stores the received second messages for a predetermined time interval in memory, the amount of memory used by other gateways that do not relay the second message can be reduced.
[0219] Next, the processing of the first gateway 4A and the second gateway 4B in Modification 5 of this embodiment will be described.
[0220] In a modified example 5 of this embodiment, the relay gateway determination unit 46 may determine that among the first gateway 4A and the second gateway 4B, the gateway whose operating status has switched between operating and stopped a predetermined number of times within a predetermined period will not relay the first message or the second message. More specifically, the relay gateway determination unit 46 may determine that among the first gateway 4A and the second gateway 4B, the gateway whose operating status has switched between operating and stopped a predetermined number of times within a predetermined period will not relay the first message or the second message permanently.
[0221] Figure 19 is a flowchart illustrating the operation monitoring process performed by the operation monitoring unit 44 of the first gateway 4A in Modification 5 of this embodiment. The operation monitoring process shown in Figure 19 is performed in parallel with the relay processing of the first message shown in Figure 6 or the relay processing of the second message shown in Figure 15. Furthermore, the operation monitoring process shown in Figure 19 is performed by the operation monitoring unit 44 of the first gateway 4A.
[0222] First, in step S41, the operation monitoring unit 44 determines whether or not it has received an operation monitoring message from the second gateway 4B.
[0223] If it is determined that an operation monitoring message has been received from the second gateway 4B (YES in step S41), then in step S42, the operation monitoring unit 44 determines whether the operation status of the second gateway 4B, as included in the monitoring information stored in the monitoring information storage unit 45, is permanently stopped.
[0224] If it is determined that the operating status of the second gateway 4B is permanently stopped (YES in step S42), the process returns to step S41.
[0225] On the other hand, if it is determined that the operating status of the second gateway 4B is not permanently stopped (NO in step S42), in step S43, the operation monitoring unit 44 sets the operating status of the second gateway 4B, as included in the monitoring information stored in the monitoring information storage unit 45, to "operating".
[0226] Note that the processes in steps S44 and S45 are the same as those in steps S23 and S24 shown in Figure 9, so their explanation will be omitted.
[0227] On the other hand, if it is determined that no operational monitoring message has been received from the second gateway 4B (NO in step S41), in step S46, the operational monitoring unit 44 determines whether the elapsed time of the second gateway 4B has exceeded a predetermined timeout period.
[0228] If it is determined that the elapsed time of the second gateway 4B has not exceeded a predetermined timeout period (NO in step S46), the process returns to step S41.
[0229] On the other hand, if it is determined that the elapsed time of the second gateway 4B has exceeded a predetermined timeout period (YES in step S46), in step S47, the operation monitoring unit 44 changes the operation status of the second gateway 4B, which is included in the monitoring information stored in the monitoring information storage unit 45, to stopped.
[0230] Next, in step S48, the operation monitoring unit 44 determines whether the operating status of the second gateway 4B has switched between operating and stopped a predetermined number of times or more within a predetermined period.
[0231] If it is determined that the operating status of the second gateway 4B has not switched between operating and stopped a predetermined number of times within a predetermined period (NO in step S48), the process returns to step S41.
[0232] On the other hand, if it is determined that the operating status of the second gateway 4B has switched between operating and stopped a predetermined number of times or more within a predetermined period (YES in step S48), in step S49, the operation monitoring unit 44 changes the operating status of the second gateway 4B included in the monitoring information stored in the monitoring information storage unit 45 to permanently stopped. Even if the operation monitoring unit 44 receives an operation monitoring message from a gateway whose operating status is permanently stopped, it does not change the operating status to operating.
[0233] This prevents the gateway from switching frequently, thus preventing the loss of the first and second messages.
[0234] In addition, in Modification 5 of this embodiment, the relay gateway determination unit 46 may determine that, among the first gateway 4A and the second gateway 4B, the gateway whose operating status has switched between operating and stopped a predetermined number of times or more within a predetermined period is a gateway that will not relay the first message or the second message for a predetermined period.
[0235] Furthermore, in Modification 5 of this embodiment, the relay gateway determination unit 46 may determine that, among the first gateway 4A and the second gateway 4B, the gateway whose operating status has switched between operating and stopped a predetermined number of times within a predetermined period is a gateway that will not relay the first message or the second message until it receives a change instruction from the user. The operating device 1 may accept input from the user to change the operating status of the gateway from permanently stopped to operating or stopped. When the communication unit 41 receives a message to change the operating status of the gateway from permanently stopped to operating or stopped, the operation monitoring unit 44 may change the operating status of the gateway included in the monitoring information stored in the monitoring information storage unit 45 from permanently stopped to operating or stopped. As a result, the permanent stop is released, and the gateway becomes capable of relaying the first message or the second message.
[0236] Furthermore, if a gateway whose operating status has switched between operating and stopped a predetermined number of times within a predetermined period has the function of the controlled device 5, the relay gateway determination unit 46 does not have to determine that the gateway having the function of the controlled device 5 is a gateway that does not relay the first message or the second message. More specifically, if a gateway whose operating status has switched between operating and stopped a predetermined number of times within a predetermined period has the function of the controlled device 5, the relay gateway determination unit 46 does not have to determine that the gateway having the function of the controlled device 5 is a gateway that does not permanently relay the first message or the second message. For example, if the gateway has the function of a television, the operation monitoring unit 44 does not change the operating status of the gateway to permanently stopped even if the operating status of the gateway has switched between operating and stopped a predetermined number of times within a predetermined period. The gateway having the function of the controlled device 5 transmits an operation monitoring message that includes a permanent stop prohibition flag. If the operation monitoring message includes a flag prohibiting permanent shutdown, the operation monitoring unit 44 will not change the operation status to permanent shutdown, even if the operation status switches between running and stopped a predetermined number of times or more within a predetermined period.
[0237] As a result, the gateway having the functionality of the controlled device 5 is not determined to be a gateway that does not permanently relay the first or second message, thus preventing the gateway and the controlled device from being unable to directly send or receive the first or second message.
[0238] Furthermore, some or all of the functions of the apparatus according to the embodiments of this disclosure may be realized by a processor such as a CPU executing a program.
[0239] Furthermore, all figures used above are illustrative examples provided to illustrate this disclosure, and this disclosure is not limited to these illustrative figures.
[0240] Furthermore, the order in which the steps shown in the flowchart above are performed is illustrative for the purpose of specifically illustrating this disclosure, and other orders are acceptable as long as similar effects are achieved. Also, some of the steps above may be performed simultaneously (in parallel) with other steps.
[0241] The technology described herein is useful as a technology for relaying messages communicated between an operating device and an operated device, because it can shorten the time required to switch from one relay device to another when a failure occurs.
Claims
1. An information processing method performed by a relay device that relays messages communicated between an operating device and an operated device, comprising: receiving a first message transmitted from the operating device to the operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or receiving a second message transmitted from the operated device to the operating device; monitoring the operating status of one of a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group; determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message based on the operating status of the first relay device and the other relay devices; and, if the first relay device is determined to be the relay device that relays the first message or the second message, transmitting the received first message or transmitting the second message using a second common topic assigned to the predetermined group.
2. The information processing method according to claim 1, wherein the reception of the first message or the second message includes receiving the first message using the first common topic, the determination of the relay device includes determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message, based on the operating status of each of the 1 relay device and the other relay devices, and the transmission of the first message or the second message includes transmitting the received first message to the operated device if the 1 relay device is determined to be the relay device that relays the first message.
3. The information processing method according to claim 2, further comprising subscribing to the first common topic in a publish / subscribe communication, wherein the reception of the first message comprises receiving the first message published using the first common topic by a server that received the first message from the operating device in the publish / subscribe communication.
4. The information processing method according to claim 2 or 3, further comprising: if the relay device 1 is determined to be a relay device that does not relay the first message, storing the received first message for a predetermined time interval in memory; and if the relay device 1 is determined to be a relay device that relays the first message after it has been determined to be a relay device that does not relay the first message, transmitting the first message for the predetermined time interval stored in memory to the operated device.
5. The information processing method according to claim 2 or 3, further comprising determining, based on the operating status of the relay device 1 and the other relay devices, which relay devices among the operating relay device 1 and the other relay devices do not relay the first message, as a backup relay device.
6. The information processing method according to claim 5, further comprising: receiving the first message when the relay device 1 is determined to be a relay device that relays the first message or when the relay device 1 is determined to be a backup relay device; and storing the received first messages for a predetermined time interval in memory when the relay device 1 is determined to be a backup relay device, wherein the transmission of the first message includes transmitting the received first message to the operated device when the relay device 1 is determined to be a relay device that relays the first message.
7. The information processing method according to claim 6, further comprising: transmitting the first messages for the predetermined time interval stored in the memory to the operated device if, after the relay device 1 has been determined to be the backup relay device, the other relay device that is relaying the first messages has been determined not to be a relay device that relays the first messages; and determining the relay device 1 to be a relay device that relays the first messages; and determining the other operational relay device that does not relay the first messages to be a new backup relay device based on the operational status of the other relay device that does not relay the first messages.
8. The information processing method according to claim 1, wherein the reception of the first message or the second message includes receiving the second message, the determination of the relay device includes determining which of the operating relay device 1 and the other relay device is the relay device that relays the second message, based on the operating status of the first relay device and the other relay device, respectively, and the transmission of the first message or the second message includes transmitting the received second message to the operating device using the second common topic, if the first relay device is determined to be the relay device that relays the second message.
9. The information processing method according to claim 8, wherein the transmission of the second message includes publishing the second message using the second common topic in publish / subscribe communication.
10. The information processing method according to claim 8 or 9, further comprising: if the relay device 1 is determined to be a relay device that does not relay the second message, storing the received second message for a predetermined time interval in memory; and if the relay device 1 is determined to be a relay device that relays the second message after it has been determined to be a relay device that does not relay the second message, transmitting the second message for the predetermined time interval stored in memory to the operating device using the second common topic.
11. The information processing method according to claim 8 or 9, further comprising determining, based on the operating status of the relay device 1 and the other relay devices, which relay devices among the operating relay devices 1 and the other relay devices do not relay the second message, as a backup relay device.
12. The information processing method according to claim 11, further comprising: receiving the second message when the relay device 1 is determined to be a relay device that relays the second message or when the relay device 1 is determined to be a backup relay device; and storing the received second message for a predetermined time interval in memory when the relay device 1 is determined to be a backup relay device, wherein the transmission of the second message includes transmitting the received second message to the operating device using the second common topic when the relay device 1 is determined to be a relay device that relays the second message.
13. The information processing method according to claim 12, further comprising: if, after the relay device 1 is determined to be the backup relay device, the other relay device that is relaying the second message is determined not to be a relay device that relays the second message, transmitting the second message for the predetermined time interval stored in the memory to the operating device using the second common topic; determining the relay device 1 to be a relay device that relays the second message; and determining the other operating relay device that does not relay the second message as a new backup relay device based on the operating status of the other relay device that does not relay the second message.
14. The information processing method according to claim 1, further comprising determining among the relay device 1 and the other relay devices that the operating status has switched between operating and stopped a predetermined number of times or more within a predetermined period of time as a relay device that does not relay the first message or the second message.
15. The information processing method according to claim 14, wherein the determination of the relay device includes not determining the relay device having the function of the operated device as a relay device that does not relay the first message or the second message, if the relay device whose operating status has switched between operating and stopped a predetermined number of times or more within a predetermined period has the function of the operated device.
16. A relay device for relaying messages communicated between an operating device and an operated device, comprising: a receiving unit that receives a first message transmitted from the operating device to the operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or a second message transmitted from the operated device to the operating device; a monitoring unit that monitors the operating status of one relay device among a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group; a determination unit that determines which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message, based on the operating status of the first relay device and the other relay devices; and a transmitting unit that, when the first relay device is determined to be the relay device that relays the first message or the second message, transmits the received first message or transmits the second message using a second common topic assigned to the predetermined group.
17. An information processing program for relaying messages communicated between an operating device and an operated device, the program receiving a first message transmitted from the operating device to an operated device belonging to a predetermined group using a first common topic assigned to the predetermined group, or receiving a second message transmitted from the operated device to the operating device, monitoring the operating status of one relay device among a plurality of relay devices belonging to the predetermined group and other relay devices belonging to the predetermined group, determining which of the operating relay device 1 and the other relay devices is the relay device that relays the first message or the second message based on the operating status of each of the relay devices, and, if the relay device 1 is determined to be the relay device that relays the first message or the second message, causing the computer to transmit the received first message or transmit the second message using a second common topic assigned to the predetermined group.
18. An information processing system comprising a plurality of relay devices for relaying messages communicated between an operating device and an operated device, and a server provided between the operating device and the relay devices and connected to the operating device so as to be able to communicate with each other, wherein the server comprises: a receiving unit for receiving a first message transmitted from the operating device to an operated device belonging to a predetermined group or a second message transmitted from an operated device to the operating device; a transmitting unit for transmitting the received first message to the plurality of relay devices belonging to the predetermined group or for transmitting the received second message to the operating device, wherein one of the plurality of relay devices comprises: a receiving unit for receiving the first message transmitted by the server using a first common topic assigned to the predetermined group or for receiving the second message transmitted by the operated device; a monitoring unit for monitoring the operating status of the first relay device and other relay devices belonging to the predetermined group; and a determination unit for determining which of the operating first relay device and the other operating relay devices will be the relay device for relaying the first message or the second message, based on the operating status of the first relay device and the other relay devices, respectively. An information processing system comprising: a transmitting unit that, when the relay device 1 is determined to be a relay device that relays the first message or the second message, transmits the received first message or transmits the second message using a second common topic assigned to the predetermined group.