Gateway device, communication method, and communication program

The gateway device efficiently manages backup mobile lines by switching and controlling data communication to prevent exceeding data limits, addressing inefficiencies in existing technologies.

JP2026114485APending Publication Date: 2026-07-08MITSUBISHI ELECTRIC CORP

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
MITSUBISHI ELECTRIC CORP
Filing Date
2024-12-26
Publication Date
2026-07-08

AI Technical Summary

Technical Problem

Existing gateway technologies do not effectively manage mobile lines with data communication limits and lack backup line utilization in case of main line failures, leading to inefficient data communication when redundancy is required.

Method used

A gateway device with a first and second line interface, where the second line is a backup, includes a line switching unit that switches between lines based on communication failure and recovery events, and a data volume control unit that determines data communication feasibility using pre-configured control information.

Benefits of technology

Enables efficient use of the backup line by managing data communication to avoid exceeding data limits, ensuring reliable communication even when the primary line is unavailable.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026114485000001_ABST
    Figure 2026114485000001_ABST
Patent Text Reader

Abstract

The present invention provides a gateway device, a communication method, and a communication program that enable efficient use of a backup second line when the first line of two lines is unavailable. [Solution] When the gateway device (100) detects a communication failure on the first line (501), it switches from the first line (501) to the second line (502), which is a backup line for the first line (501), and performs data communication. When the communication failure on the first line (501) is resolved, it generates a recovery notification event. When the recovery notification event is generated, the communication volume control unit (113) controls the system to switch from the second line (502) to the first line (501) if data communication has finished, or if data communication is continuing, it controls the system to switch from the second line (502) to the first line (501) after data communication is completed or after data communication has finished.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a gateway device, a communication method, and a communication program.

Background Art

[0002] There is known a gateway device that relays an IoT (Internet of Things) device such as a camera or a sensor, which is a representative example of a terminal, and a cloud or a data center, which is a representative example of an external device, and is responsible for primary processing of data and protocol conversion. In an IoT system constructed using a gateway device, in ensuring the reliability of the system, the line between the gateway device and the cloud or the data center is important and is desired to be redundant.

[0003] As one method for achieving the above solution, Patent Document 1 discloses a technique for actively switching to the other line when one line is interrupted in a situation where both a wired line and a wireless line can be used. Patent Document 2 discloses a technique for allocating communication amounts to each of a plurality of terminal devices based on the remaining communication amounts for each terminal device in order to achieve stable communication even when there is a data communication upper limit amount.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Patent Document 2

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, Patent Document 1 neither describes nor suggests any technology for use with mobile lines (3G / LTE / 5G, etc.). Mobile lines have a data communication limit over a predetermined period, so if the data capacity of the line contracted by the user is exceeded, the communication speed is generally limited to 128 kbit / s. Therefore, when redundancy using lines with data communication limits, such as wireless mobile lines, it is necessary to consider the amount of data communicated within the predetermined period.

[0006] Furthermore, Patent Document 2 had the problem that it neither described nor suggested the use of the main line as a backup line in the event of a main line failure.

[0007] This disclosure aims to provide a gateway device, a communication method, and a communication program that enable efficient use of a backup second line when the first line of two lines is out of service. [Means for solving the problem]

[0008] The gateway device of this disclosure is a communication interface with an external device using a first line, and includes a first WAN interface unit that generates an abnormality notification event when it detects a communication failure on the first line and generates a recovery notification event when the communication failure is resolved, a second WAN interface unit that is a communication interface with the external device using a second line which is a backup line for the first line, a line switching unit that switches between the first line and the second line based on the abnormality notification event and the recovery notification event, and when the line switching unit switches from the first line to the second line, the terminal The system includes a data volume control unit that determines whether communication via the second line is possible based on the data communication data sent from the first WAN interface unit and pre-configured control information, and if it determines that communication is possible, it realizes the data communication between the terminal and the external device via the second WAN interface unit, and when the first WAN interface unit generates the recovery notification event, if the data communication has ended, it instructs the line switching unit to switch from the second line to the first line, and if the data communication is continuing, it issues the instruction after the data communication is completed or after the data communication has ended.

[0009] The communication method of this disclosure is a communication method performed by a computer, comprising: a step of generating an abnormality notification event when a communication failure in the first line is detected in a first WAN interface unit which is a communication interface with an external device using the first line; a step of generating a recovery notification event when the communication failure is resolved in the first WAN interface unit; a step of switching the first line and a second line which is a backup line for the first line based on the abnormality notification event and the recovery notification event; and a step of determining the second line based on the data of data communication sent from the terminal and pre-configured control information when switching from the first line to the second line. The process includes: determining whether communication is possible; if it is determined that communication is possible, realizing the data communication between the terminal and the external device via the second WAN interface unit, which is the communication interface of the second line; if the first WAN interface unit generates the recovery notification event and the data communication has ended, instructing the line switching unit to switch from the second line to the first line; and if the first WAN interface unit generates the recovery notification event and the data communication is continuing, giving the instruction after the data communication is completed or after the data communication has ended.

[0010] The communication program of this disclosure includes the steps of: generating an abnormality notification event when a communication failure is detected in the first WAN interface unit, which is a communication interface with an external device using the first line; generating a recovery notification event in the first WAN interface unit when the communication failure is resolved; switching the first line between the first line and the second line, which is a backup line for the first line, based on the abnormality notification event and the recovery notification event; and determining whether communication is possible on the second line based on the data of data communication sent from the terminal and pre-configured control information when switching from the first line to the second line. The computer is instructed to perform the following steps: a step of determining that communication is possible, a step of realizing the data communication between the terminal and the external device via the second WAN interface unit, which is the communication interface of the second line; a step of instructing the line switching unit to switch from the second line to the first line if the data communication has ended when the first WAN interface unit generates the recovery notification event; and a step of giving the instruction after the data communication is completed or after the data communication has ended if the data communication is continuing when the first WAN interface unit generates the recovery notification event. [Effects of the Invention]

[0011] According to this disclosure, it is possible to provide a gateway device, a communication method, and a communication program that enable efficient use of a second line, which is a backup line, when the first line of two lines is out of service. [Brief explanation of the drawing]

[0012] [Figure 1] This is a block diagram showing an example of the configuration of a gateway device according to Embodiment 1. [Figure 2] (A) and (B) are flowcharts illustrating the operation of the circuit switching unit. [Figure 3] This is a flowchart illustrating an example of the operation of the communication volume control unit. [Figure 4] It is a schematic diagram showing an example of contract information and control information of a mobile line. [Figure 5] It is a block diagram showing an example of the configuration of the gateway device according to Embodiment 2. [Figure 6] (A) and (B) are block diagrams showing an example of the configuration of the traffic learning device according to Embodiment 2. [Figure 7] It is a flowchart showing an example of the operation of the traffic control unit. [Figure 8] It is a flowchart showing an example of the operation of the traffic control unit. [Figure 9] It is a block diagram showing an example of the configuration of the gateway device according to Embodiment 3. [Figure 10] It is a flowchart showing an example of the operation of the traffic control unit. [Figure 11] It is a block diagram showing an example of the configuration of the data conversion unit. [Figure 12] It is an explanatory diagram showing an example of the application control information constituting the application setting storage unit. [Figure 13] It is a flowchart showing an example of the processing of the data conversion unit.

Mode for Carrying Out the Invention

[0013] Hereinafter, the gateway device, communication method, and communication program according to the present disclosure will be described with reference to the drawings. The following embodiments are merely examples, and it is possible to appropriately combine the embodiments and appropriately change each embodiment.

[0014] 《Embodiment 1》 FIG. 1 is a block diagram showing an example of the configuration of the gateway device 100 according to Embodiment 1. In FIG. 1, the gateway device 100 controls communication between a terminal 301 belonging to a LAN (Local Area Network) 300 and an external device 203 including a cloud 201 belonging to a WAN (Wide Area Network) 200, which is a wide area communication network, a server group 202, and the like. There may be a plurality of terminals 301, and terminals 301a, 301b,... are illustrated in FIG. 1. In FIG. 1, the gateway device 100 has a function of communicatively connecting terminals 301a, 301b,... belonging to the LAN 300 and the cloud 201 and the server group 202 belonging to the WAN 200 via the Internet 400.

[0015] The first WAN interface unit 101 included in the gateway device 100 is an interface for connecting to the Internet 400 on the WAN 200 side via a first line 501 used in normal times, and the second WAN interface unit 102 is an interface for connecting to the Internet 400 on the WAN 200 side via a backup second line 502 not used in normal times. In the present disclosure, the first line 501 is a high-speed wired optical network, and the second line 502 is a mobile network that is slower than the first line 501 and has a communication volume limit or a speed limit during a predetermined period. This will be described as an example, but the present disclosure is not limited thereto. In the present disclosure, the second line 502 is a backup line for the first line 501, and it is preferable that at least the second line 502 is set with a communication volume limit or a speed limit.

[0016] The LAN interface unit 103 of the gateway device 100 is an interface for connecting terminals 301a, 301b, ... within the LAN 300 to the gateway device 100. The CPU 110 controls various parts of the gateway device 100 by loading firmware or computer programs stored in the ROM 130 into the RAM 120 via the bus 107 and executing them, and also functions as a line switching unit 111, a communication volume monitoring unit 112, and a communication volume control unit 113. Furthermore, by the CPU 110 controlling various parts of the gateway device 100 with the above-mentioned communication program, and by functioning as a line switching unit 111, a communication volume monitoring unit 112, and a communication volume control unit 113, a communication method is realized that enables control of various parts of the gateway device 100, line switching, communication volume monitoring, and communication volume control.

[0017] The communication volume control unit 113 of the gateway device 100 determines whether communication via the second line 502 is possible based on the data communication data sent from the terminal and pre-configured control information when the line switching unit 111 switches from the first line 501 to the second line 502. If it determines that communication is possible, it realizes data communication between the terminal 301 and external devices 203 (cloud 201 and server group 202, etc.) via the second WAN interface unit 102. The pre-configured control information includes contract information related to the data capacity of the mobile line, as well as (1) the destination to be prioritized, (2) the protocol, and (3) the upper limit of the data size.

[0018] The line switching unit 111 of the gateway device 100 is a functional unit that switches between lines connected via the first WAN interface unit 101 or the second WAN interface unit 102. Specifically, the line switching unit 111 switches between the first line 501 and the second line 502 based on an abnormality notification event or a recovery notification event. The first WAN interface unit 101 generates an abnormality notification event when it detects a communication failure on the first line 501, and generates a recovery notification event when the communication failure is resolved.

[0019] The operation of the line switching unit 111 will be explained using the flowcharts in Figures 2(A) and 2(B). Note that in Figures 2(A) and 2(B), explanations may be omitted for parts that are common to the same processing steps.

[0020] In the flowchart of Figure 2(A), the line switching unit 111 determines whether or not an abnormality notification event for the first line 501 has been detected from the first WAN interface unit 101 (S100). Here, an abnormality notification event for the first line 501 is, for example, when the system periodically checks for connections to multiple servers on the Internet that have been set in advance, and determines that there is an abnormality in the current line if connections cannot be confirmed from multiple servers (at least two or more servers). If no abnormality notification event is detected, the determination in S100 is NO, and the determination in S100 is repeated.

[0021] When the line switching unit 111 detects an abnormality notification event for the first line 501 from the first WAN interface unit 101, the determination in S100 becomes YES, and the communication line is switched from the first line 501, which is normally used, to the second line 502, which is a backup line (S101).

[0022] Next, the line switching unit 111 sends a communication volume monitoring request to the communication volume monitoring unit 112 and the communication volume control unit 113 (S102), and the communication volume monitoring unit 112 starts monitoring the communication volume. The communication volume monitoring unit 112 may start counting the communication volume of the second line 502 when the line switching unit 111 switches from the first line 501 to the second line 502, and end counting the communication volume when the line switching unit 111 switches from the second line 502 to the first line 501.

[0023] The line switching unit 111 determines whether or not a recovery notification event for the first line 501 has been detected from the first WAN interface unit 101, which is a wired WAN interface (S103). Here, the recovery notification event for the first line 501 is, for example, when connection checks are periodically performed to multiple servers on the Internet that have been pre-configured, and if connections are confirmed from all of the multiple servers, it is determined that the current line has been restored. If a recovery notification event for the first line 501 has not been detected, the determination in S103 is NO, and the determination in S103 is repeated. If a recovery notification event for the first line 501 has been detected, the determination in S103 is YES, and the communication line is switched from the second line 502 to the first line 501 (S104), and the process ends.

[0024] The flowchart in Figure 2(A) illustrates an example where, if recovery of the first line 501 is detected in S103, a switch is made from the second line 502 to the first line 501 in S104. However, as shown in the flowchart in Figure 2(B), a new processing step may be set between S103 and S104. Steps S100 to S103 and S104 in Figure 2(B) are the same as in Figure 2(A), so a detailed explanation is omitted.

[0025] In Figure 2(B), at S105, the communication volume control unit 113 determines that the first WAN interface unit 101 has generated a recovery notification event, and if the determination in S103 is YES, and data communication on the second line 502 has ended, it determines S105 as YES, moves the procedure to S104, and instructs the line switching unit 111 to switch from the second line 502 to the first line 501 (S104).

[0026] If data communication on the second line 502 is continuing in S105, the communication volume control unit 113 determines NO to the judgment in S105, performs the action to terminate data communication on the second line 502 (S106), and instructs the line switching unit 111 to switch from the second line 502 to the first line 501 (S104). In Embodiment 1, completion of data communication means that all data has been sent, and termination of data communication means that data communication ends while it is still ongoing. In the latter case, that is, when data communication is continuing, the communication volume control unit 113 instructs the second WAN interface unit 102 to terminate the data communication midway. This process corresponds to the action in S106 shown before the switchover.

[0027] If the communication volume control unit 113 performs the action in S106, in S104 the communication volume control unit 113 instructs the line switching unit 111 to switch from the second line 502 to the first line 501 (S104). After the line switching unit 111 switches from the second line 502 to the first line 501, the communication volume control unit 113 may retransmit the data of the data communication that was terminated midway, or transmit the portion of the data communication that was terminated midway that was not transmitted via data communication through the second WAN interface unit 102, by data communication via the first WAN interface unit 101.

[0028] Next, the communication volume monitoring unit 112 will be explained. When the communication volume monitoring unit 112 receives a communication volume monitoring request (S102) from the line switching unit 111, it monitors the amount of data communication transmitted on the second WAN interface unit 102 at a predetermined time (T1). The total value X1 of the counted data communication volume is notified to the communication volume control unit 113 at predetermined time intervals (T1). The communication volume monitoring unit 112 sends information on the counted communication volume, or information on the communication volume being counted, to the communication volume control unit 113, and the communication volume control unit 113 adds the counted communication volume to the total communication volume of the second line 502 up to date. Alternatively, the communication volume monitoring unit 112 may add the counted communication volume to the total communication volume of the second line 502 up to date and send information on the total communication volume after the addition to the communication volume control unit 113. The total communication volume for the second line 502 is the cumulative communication volume during a predetermined counting period for billing communication charges, from the reset date of the communication data volume shown as <Mobile Line Contract Information> in Figure 4 to the next reset date. This example assumes that the predetermined counting period is one month, but the predetermined counting period may be one day, one year, multiple months, etc. In this embodiment, the total communication volume for the second line 502 is calculated by accumulating the communication volume counted by the communication volume monitoring unit 112 during the counting period. The total communication volume for the second line 502 may be calculated by the communication volume control unit 113 by accumulating the communication volume counted by the communication volume monitoring unit 112 during the counting period, or by the communication volume monitoring unit 112 by accumulating the communication volume counted during the counting period. When the communication volume monitoring unit 112 calculates the total communication volume, it transmits the calculated total communication volume information to the communication volume control unit 113. Communication control using the total data communication volume will be explained in Embodiment 2 below.

[0029] Next, the operation of the communication volume control unit 113 will be explained using Figure 3. In this disclosure, the communication volume control unit 113 compares the data of the data communication with the control information and can determine whether communication via the second line 502 is possible using at least one of three criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information, whether the destination of the data communication matches the destination information of an external device included in the control information, and whether the protocol of the data communication matches the protocol information included in the control information. The following explanation using Figure 3 will illustrate the case in which all three criteria are used.

[0030] The user has previously entered the reset date of the communication data volume and contract information related to the mobile line data capacity, as shown as <Mobile Line Contract Information> in Figure 4, via a GUI (Graphical User Interface), etc., through a terminal 301, etc., and saved it in the user setting storage unit 131 of the ROM 130. When the communication volume control unit 113 receives a communication volume monitoring request from the line switching unit 111, it obtains the control information from the user setting storage unit 131 (S200).

[0031] The communication volume control unit 113 checks whether the destination of the data to be sent to the WAN200 side matches the control information if the destination control information is valid (S201). If the destination of the data matches the control information in S201, the result is YES, and the procedure moves to S202, where a protocol check is performed. If the destination of the data does not match the control information in S201, the result is NO, and the procedure moves to S204, where the data is discarded and processing ends.

[0032] The communication volume control unit 113, when the protocol control information is valid, checks whether the protocol of the data to be sent to the WAN200 side matches the control information (S202). If the protocol of the data to be sent to the WAN200 side matches the control information in S202, the result is YES, and the procedure moves to S203 to perform a check based on the data size. If the protocol of the data to be sent to the WAN200 side does not match the control information in S202, the result is NO, and the procedure moves to S204, where the data is discarded and the process ends.

[0033] If the data size control information is valid, the communication volume control unit 113 checks whether the data size to be sent to the WAN200 side exceeds the data size specified in the control information (S203). If the data size to be sent to the WAN200 side does not exceed the data size specified in the control information in S203, the result is YES, and the procedure proceeds to S205, where the data is sent. If the data size to be sent to the WAN200 side exceeds the data size specified in the control information in S203, the result is NO, and the procedure proceeds to S204, where the data is discarded and the process ends.

[0034] The communication volume control unit 113 acquires control information (1) destination, (2) protocol, and (3) data size from the pre-transmission data of the second WAN interface unit 102, compares the acquired information with the control information stored in the user setting storage unit 131, and determines whether to transmit or discard the data. The setting of whether the control information is enabled or disabled can be set by the user, and the determination based on (1) destination, (2) protocol, or (3) data size can be set individually or in combination.

[0035] As described above, the gateway device 100 of Embodiment 1 is an example in which the gateway device 100 has a first line 501 as a wired line and a second line 502 as a backup line as a mobile line, and is equipped with a communication volume control unit 113 that determines whether to transmit the data to be communicated based on control information such as the destination, protocol, and data size limit set in advance by the user.

[0036] Accordingly, according to the gateway device 100 of Embodiment 1, by determining whether or not to transmit data based on control information such as (1) destination, (2) protocol, and (3) data size set in advance by the user, it is possible to perform communication that does not exceed the data communication limit of the contracted mobile line, even when using a wireless backup line with a communication capacity within a predetermined period. As a result, it is possible to provide a gateway device, communication method, and communication program that can efficiently use the second line, which is a backup line, when the first line of the two lines is unavailable.

[0037] Embodiment 2 Next, Embodiment 2 will be described. Figure 5 is a block diagram showing an example of the configuration of the gateway device 150 according to Embodiment 2. The gateway device 150 according to Embodiment 2 differs from the gateway device 100 according to Embodiment 1 in that it includes a communication volume prediction unit 114 and a communication volume data storage unit 134 that utilize a learning model 601 (trained model 601). However, the other configurations are the same as in Embodiment 1, so the same reference numerals as in Embodiment 1 are used for the same configurations as in Embodiment 1, and detailed explanations are omitted.

[0038] The communication volume learning device 600 shown in Figures 6(A) and 6(B) is a communication volume learning device according to Embodiment 2, and generates a learning model 601.

[0039] Before describing the gateway device 150 according to Embodiment 2, we will first describe the communication volume learning device 600 according to Embodiment 2.

[0040] The communication volume learning device 600 shown in Figure 6(A) receives past communication volume information for each counting period from the communication volume data storage unit 134 in the ROM 130 for billing communication charges for the second line 502, and also receives control information from the user setting storage unit 131 in the ROM 130. It is equipped with a learning model (learning unit) 601 that performs machine learning based on the input information. The control information is pre-set, as in Embodiment 1, and is used by the communication volume control unit 113 when the line switching unit 111 switches from the first line 501 to the second line 502, and when it determines whether communication via the second line 502 is possible in conjunction with the data communication data sent from the terminal 301.

[0041] The communication volume learning device 600 shown in Figure 6(B) is equipped with a learning model (learning unit) 601 that performs machine learning by inputting past communication volume information and control information into the communication volume learning device 600 shown in Figure 6(A). In addition, it is equipped with a learning model (learning unit) 601 that performs machine learning by inputting information on the duration of communication failures of the first line 501 from abnormal notification events and recovery notification events acquired from the first WAN interface unit 101, and by machine learning the past communication volume information, control information and the duration of communication failures.

[0042] The trained learning model (learning unit) 601 shown in Figures 6(A) and 6(B) becomes the learning model 601 (trained model 601) shown in Figure 5. The communication volume prediction unit 114 shown in Figure 5 uses the learning model 601 to predict future communication volume during the counting period. Note that the learning model (learning unit) 601 can be any model capable of machine learning, including general AI (Artificial Intelligence).

[0043] Furthermore, although not shown in the diagram, the communication volume learning device 600 shown in Figure 6(A) may further include a past communication volume information input unit for inputting past communication volume information and a control input unit for inputting control information. Similarly, although not shown in the diagram, the communication volume learning device 600 shown in Figure 6(B) may further include a past communication volume information input unit for inputting past communication volume information, a control input unit for inputting control information, and a communication failure period information input unit when communication failure period information is input.

[0044] The gateway device 150 according to Embodiment 2 will now be described. As mentioned above, the gateway device 150 is configured by adding a communication volume prediction unit 114 and a communication volume data storage unit 134 to the gateway device 100 according to Embodiment 1. The communication volume prediction unit 114 is connected to the learning model 601. The learning model 601 may also be configured within the communication volume prediction unit 114, that is, within the gateway device 150.

[0045] The gateway device 150 according to Embodiment 2, like the gateway device 100 according to Embodiment 1, has a communication volume control unit 113 that, when the line switching unit 111 switches from the first line 501 to the second line 502, determines whether communication via the second line 502 is possible based on the data communication data sent from the terminal 301 and pre-set control information. If it determines that communication is possible, it performs data communication with the external device 203 via the second WAN interface unit 102. The communication volume prediction unit 114 predicts future communication volume during the counting period using a machine learning model that has acquired information on past communication volume and control information for each counting period (for example, the reset date shown in Figure 4) in order to bill for communication charges for the second line 502.

[0046] The communication volume data storage unit 134 stores past communication volume data. In Embodiment 1, it was explained that the communication volume monitoring unit 112 may start counting the communication volume of the second line 502 when it switches from the first line 501 to the second line 502, and stop counting the communication volume when it switches from the second line 502 to the first line 501. The total communication volume of the second line 502 that has been counted is stored in the communication volume data storage unit 134 via the communication volume control unit 113. The communication volume data may also be reflected in the control information of the user setting storage unit 131. In Embodiment 2, past communication volume data is stored in the communication volume data storage unit 134.

[0047] The communication volume prediction unit 114 performs machine learning using past communication volume data from the second WAN interface unit 102 stored in the communication volume data storage unit 134 and past control information stored in the user setting storage unit 131 as input. The communication volume control unit 113 then limits the communication volume using the learning model 601 constructed by this machine learning. As mentioned above, information on the duration of communication failures may also be used in the machine learning.

[0048] In the communication volume learning device 600 for generating the learning model 601 shown in Figure 6(A), control information is input from the user setting storage unit 131, and past communication volume information is input from the communication volume data storage unit 134. In the communication volume learning device 600 for generating the learning model 601 shown in Figure 6(B), control information is input from the user setting storage unit 131, past communication volume information is input from the communication volume data storage unit 134, and communication failure period information is input from the first WAN interface unit 101. These are just examples and are not limited to those described above. The communication volume learning device 600 may obtain information from outside the gateway device 150. Also, the information itself may be simulated information.

[0049] Next, the operation of the communication volume control unit 113 will be explained using Figure 7. Similar to Embodiment 1, the communication volume control unit 113 compares the data of the data communication with the control information and can determine whether communication via the second line 502 is possible using at least one of three criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information, whether the destination of the data communication matches the destination information of an external device included in the control information, and whether the protocol of the data communication matches the protocol information included in the control information. Figure 7 illustrates the case where all three criteria are used, similar to Figure 3.

[0050] The processing steps up to S203 are the same as those described in Figure 3, so the explanation is omitted. If the result of S203 is NO, the data is discarded in S204. If the result of S203 is YES, the procedure proceeds to S206.

[0051] In S206, the communication volume control unit 113 compares the control information with the data from the data communication from the terminal 301. If it determines that the total data communication volume does not exceed the communication volume limit imposed on the second line 502, as shown in the data capacity of Figure 4, and that data communication is possible via the second WAN interface unit 102, and if the communication volume prediction unit 114 predicts that the communication volume limit will not be exceeded during the counting period, it determines NO and proceeds to S205 to transmit the data. On the other hand, in S206, if it is predicted that the communication volume limit will be exceeded during the counting period, it determines YES and proceeds to S204 to discard the data communication data.

[0052] In Figure 7, the communication volume control unit 113, as in Embodiment 1, determines whether communication via the second line 502 is possible by using the following criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information; whether it matches the destination information of the external device 203 included in the control information; and whether it matches the protocol information included in the control information.

[0053] In the gateway device 150 in Embodiment 2, similar to the gateway device 100 in Embodiment 1, the communication volume control unit 113 may, when the first WAN interface unit 101 generates a recovery notification event, instruct the line switching unit 111 to switch from the second line 502 to the first line 501 if data communication has ended, or, if data communication is continuing, instruct the line switching unit 111 to switch from the second line 502 to the first line 501 after data communication is completed or terminated. In this case, in S205, when data communication with the external device 203 is being performed via the second WAN interface unit 102, it is preferable to retransmit or transmit the remaining data from the beginning via data communication with the external device 203 via the first WAN interface unit 101.

[0054] As described above, in the gateway device 150 of Embodiment 2, the communication volume control unit 113 performs machine learning using information on the data capacity of the mobile line set by the user and past communication volume data on the wireless WAN interface as input, and limits the communication volume based on the analysis results. According to the gateway device 150 of Embodiment 2, based on past communication control information and communication volume performance, it is possible to use the contracted mobile line to the maximum extent without exceeding its data capacity.

[0055] The configuration of the gateway device 150 according to Embodiment 2 is not limited to the above. For example, it may include a data conversion unit 1001 and an application setting storage unit 1135 that convert data for data communication, which will be described in detail in Embodiment 3. If the gateway device 150 according to Embodiment 2 includes a data conversion unit 1001, then, as shown in Figure 8, in S207, if it is desired to transmit the data for data communication from terminal 301 even at a reduced bitrate, the procedure proceeds to S208. Otherwise, the procedure proceeds to S204, and the data for data communication is discarded as described above. Situations where it is desired to transmit even at a reduced bitrate include cases where specific information is attached to the data for data communication. An example of attaching specific information is that for communications set to "enabled" in the control information of the application setting storage unit 1135, which will be described in detail in Embodiment 3, specific information is assumed to be attached, and the data conversion unit 1001 converts the received data to a low rate and transmits it. Also, for communications set to "disabled" in the control information of the application setting storage unit 1135, it is possible that no specific information is attached.

[0056] Then, in S208, the data conversion unit 1001 generates data for data communication with a reduced bitrate. Then, in S205, the communication volume control unit 113 transmits the data communication data with the reduced bitrate to the external device 203 via the second WAN interface unit 102 and terminates the process.

[0057] Embodiment 3 Next, Embodiment 3 will be described. Figure 9 is a block diagram showing an example of the configuration of the gateway device 1000 according to Embodiment 3.

[0058] In Figure 9, the gateway device 1000 is a gateway device that adds a data conversion unit 1001 and an application setting storage unit 1135 to the gateway device 150 according to Embodiment 2. The data conversion unit 1001 has the function of converting application data communicated via the gateway device 1000 to a low rate after the first WAN interface unit 101 becomes inoperable and switches to the second WAN interface unit 102.

[0059] In the gateway device 1000 according to Embodiment 3, the communication volume control unit 113 compares the data of data communication from terminal 301 with control information. If the data size to be transmitted to the WAN 200 exceeds the communication volume limit in the control information, and specific information is attached to the data communication, the data conversion unit 1001 converts the data and reduces the bitrate of the data communication, then uses this converted data to perform data communication with external devices via the second WAN interface unit 102. As an example of attaching specific information, for communications set to "enabled" in the control information of the application setting storage unit 1135 shown in Figure 9, it is assumed that specific information is attached, and the received data is converted to a lower rate before transmission. For communications set to "disabled" in the control information of the application setting storage unit 1135, no specific information is attached. Details regarding the specific information will be described later.

[0060] The communication volume prediction unit 114 may predict future communication volume during a counting period using a learning model 601 that has been machine-learned by taking past communication volume information and control information for each counting period in order to bill for communication charges for the second line 502. In this case, the data conversion unit 1001 may determine the bitrate from the future communication volume predicted by the communication volume prediction unit 114 to match the communication volume that does not exceed the communication volume limit. The learning model 601 and the communication volume learning device for obtaining the learning model 601 are the same as those described in Embodiment 2.

[0061] Furthermore, similar to Embodiment 2, the communication volume prediction unit 114 may predict future communication volumes using a learning model that has learned information on the duration of communication failures of the first line 501 from abnormality notification events and recovery notification events, in addition to past communication volume information and control information.

[0062] Next, the operation of the communication volume control unit 113 will be explained using Figure 10. Similar to Embodiment 1 (Figure 3) and Embodiment 2 (Figure 7), it is possible to determine whether communication via the second line 502 is possible using at least one of three criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information, whether the destination of the data communication matches the destination information of the external device included in the control information, and whether the protocol of the data communication matches the protocol information included in the control information. Figure 10 illustrates the case where all three criteria are used, similar to Figures 3 and 7.

[0063] The processing steps up to S203 in Figure 10 are the same as those described in Figures 3 and 7, so their explanation is omitted. If the determination in S203 is YES, the procedure proceeds to S205. If the determination in S203 is NO, the procedure proceeds to S207.

[0064] In S207, the communication volume control unit 113 compares the data from the data communication from terminal 301 with the control information and determines that data communication via the second WAN interface unit 102 is impossible because the total data communication volume from terminal 301 exceeds the communication volume limit related to the communication restriction of the second line 502 included in the control information (for example, the data capacity in Figure 4). If the data communication contains specific information ("enabled" setting), the procedure proceeds to S208. In S207, if the data communication does not contain specific information ("disabled" setting), the procedure proceeds to S204, discards the data communication data, and terminates the process.

[0065] In S208, the data conversion unit 1001 generates data for data communication with a reduced bitrate. Then, in S205, the data volume control unit 113 transmits the data communication data with the reduced bitrate to the external device 203 via the second WAN interface unit 102, and terminates processing.

[0066] In Figure 10, similar to Figure 7, the communication volume control unit 113 compares the data of the data communication with the control information and determines whether communication via the second line 502 is possible, using the following criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information, whether it matches the destination information of the external device 203 included in the control information, and whether it matches the protocol information included in the control information.

[0067] In the gateway device 1000 of Embodiment 3, similar to the gateway device 100 of Embodiment 1 and the gateway device 150 of Embodiment 2, the communication volume control unit 113 may, when the first WAN interface unit 101 generates a recovery notification event, instruct the line switching unit 111 to switch from the second line 502 to the first line 501 if data communication has ended, or instruct the line switching unit 111 to switch from the second line 502 to the first line 501 after data communication is completed or terminated if data communication is continuing. In this case, in S205, when data communication with an external device 203 is being performed via the second WAN interface unit 102 using data with a reduced bitrate, it is preferable to retransmit or transmit the remainder from the middle via data communication with the external device 203 via the first WAN interface unit 101.

[0068] Next, we will explain the case where the data transmitted from terminal 301 is specific application data. The gateway device 1000 according to Embodiment 3 transmits specific application data transmitted from terminal 301 to the WAN 200 side via the data conversion unit 1001. When transmitting through the first WAN interface unit 101, the application data transmitted from terminal 301 is transmitted as is due to the high speed and stable network. When switching to the second WAN interface unit 102, compared to the first WAN interface unit 101, the second WAN interface unit 102 has a lower rate and a limit on the amount of communication data over a predetermined period. Therefore, for communications set to "enabled" in the control information of the application setting storage unit 1135, the received data is converted to a lower rate and transmitted, and for communications set to "disabled" in the control information of the application setting storage unit 1135, transmission to the WAN 200 side is stopped.

[0069] The system will be explained using an example where the terminal is a surveillance camera and the video from the surveillance camera is transmitted to the cloud 201 via a gateway device 1000. Figure 11 shows the data conversion unit 1001 that processes the surveillance camera video data. The data conversion unit 1001 consists of an application data receiving unit 1100a, a media conversion unit 1101a, an application data transmission unit 1102a, an application data receiving unit 1100b, a media conversion unit 1101b, an application data transmission unit 1102b, ... Each of the application data receiving units 1100 (1100a, 1100b, ...), media conversion units 1101 (1101a, 1101b, ...), and application data transmission units 1102 (1102a, 1102b, ...) communicates with one surveillance camera and there are as many of these units as there are surveillance cameras to receive data from. Since the operation of each part is the same, the following explanation will use the application data receiving unit 1100a, the media conversion unit 1101a, and the application data transmission unit 1102a as representative examples.

[0070] The application data receiving unit 1100a has the function of receiving surveillance camera video from a terminal on the LAN 300 side. The media conversion unit 1101a has the function of converting the received surveillance camera video into low-rate data. The application data transmission unit 1102a has the function of transmitting the converted surveillance camera video data to the WAN 200 side.

[0071] Figure 12 is an explanatory diagram showing an example of application control information constituting the application setting storage unit 1135. As shown in Figure 12, the application control information consists of items such as destination address, destination port number, source address, source port number, data size limit, and enable / disable. The application data receiving unit 1100, media conversion unit 1101, and application data transmission unit 1102 are generated according to the number of lines described in the application control information, and perform transmission and reception processing using the destination address, destination port number, source address, and source port number information. Here, the application control information of the application setting storage unit 1135 is applied in priority to the control information of the user setting storage unit 131, and communications not described in the application control information of the application setting storage unit 1135 are controlled according to the control information of the user setting storage unit 131.

[0072] Figure 13 shows the processing flow of the data conversion unit 1001 when the line switching unit 111 switches from the first WAN interface unit 101 to the second WAN interface unit 102. The application data receiving unit 1100a receives video packets (S1001).

[0073] In S1002, the media conversion unit 1101a determines whether the second WAN interface unit 102 is being used for communication. If the first WAN interface unit 101 is being used for communication (NO in S1002), the received bucket is forwarded directly to the WAN200 side via the application data transmission unit 1102a (S1008). If the second WAN interface unit 102 is being used for communication (YES in S1002), the procedure proceeds to S1003.

[0074] In S1003, the media conversion unit 1101a determines whether the application control information in the application settings storage unit 1135 is set to "enabled". If the "enabled / disabled" setting of the application control information in the application settings storage unit 1135 is set to "enabled" (YES in S1003), the media conversion unit 1101a acquires video data from the video packet (S1004). If the "enabled / disabled" setting of the application control information in the application settings storage unit 1135 is set to "disabled" (NO in S1003), the media conversion unit 1101a discards the packet and proceeds to S1001. In Embodiment 3, the video data is, for example, data encoded using H.264.

[0075] If the "Enable / Disable" setting for application control information in the application settings storage unit 1135 is set to "Enable" (YES in S1003), the media conversion unit 1101a continues to receive packets in S1004 and proceeds to S1005.

[0076] In S1005, the media conversion unit 1101a determines whether the received video data for one image has been collected in the storage device such as RAM 120 within a predetermined time. If the video data for one image is collected (YES in S1005), the video data is decoded (S1006). If the video data for one image is not collected within the predetermined time (NO in S1005), the media conversion unit 1101a discards the received video data and proceeds to the procedure in S1001. The predetermined time is determined specifically, for example, based on the communication speed with the LAN 300.

[0077] The media conversion unit 1101a encodes the video data decoded in S1006 at a bitrate equal to the upper limit of the data size of the application control information in the application setting storage unit 1135 (S1007). In S1007, the size of the video data is reduced by setting the encoding rate, but the size of the video data may also be reduced by changing the image resolution (e.g., 1080 pixels → 480 pixels) or by lowering the frame rate to change to a lower rate. Furthermore, the video data may be transmitted as still images at predetermined time intervals. The media conversion unit 1101a transmits the video converted to a lower rate to the destination via the application data transmission unit 1102a (S1008), and the procedure proceeds to S1001.

[0078] The above describes an example in which, when switching communication from the first WAN interface unit 101 to the second WAN interface unit 102, the camera video is converted to a lower rate and transmitted if the "Enable / Disable" setting of the application control information in the application setting storage unit 1135 is enabled. In addition to the above, when switching communication from the first WAN interface unit 101 to the second WAN interface unit 102, if the application control information is enabled, the video data is transmitted to the WAN 200 side at the received transmission rate without conversion, and if the application control information is disabled, the video data is converted to a lower rate video by the data conversion unit 1001 and transmitted.

[0079] Furthermore, if the application data to be transmitted is time-series measured numerical data, the data conversion unit 1001 can calculate the average data for a predetermined period and send only that average data to the WAN 200 side, thereby reducing the transmission rate. In addition, data that was not transmitted can be stored in a storage device such as RAM 120 in the gateway device 1000, and after the first WAN interface unit 101 becomes able to communicate and recovers, the data stored in the storage device can be sent to the WAN 200 side all at once.

[0080] As described above, by using the gateway device 1000 according to Embodiment 3, when the first WAN interface unit 101 becomes unavailable for communication and switches to the second WAN interface unit 102, it is possible to select and transmit only communications for which application control information is valid, and also reduce the transmission rate of the data that is made available for transmission. This makes it possible to efficiently utilize the second WAN interface unit 102, which is slower and has a communication volume limit for a predetermined period, compared to the first WAN interface unit 101. Specifically, when the gateway device 1000 according to Embodiment 3 communicates using a mobile line, which is a backup line, it is possible to reduce the transmission rate of the data that is determined to be transmitted by converting the data before transmission. [Explanation of Symbols]

[0081] 100 Gateway device, 101 First WAN interface unit, 102 Second WAN interface unit, 103 LAN interface unit, 107 Bus, 110 CPU, 111 Line switching unit, 112 Communication volume monitoring unit, 113 Communication volume control unit, 114 Communication volume prediction unit, 120 RAM, 130 ROM, 131 User setting storage unit, 134 Communication volume data storage unit, 150 Gateway device, 200 WAN, 201 Cloud, 202 Server group, 203 External device, 300 LAN, 301 Terminal, 400 Internet, 501 First line, 502 Second line, 600 Communication volume learning device, 601 Learning model (trained model, learning unit), 1000 Gateway device, 1001 Data conversion unit, 1135 Application setting storage unit, 1100 Application data receiving unit, 1101 Media conversion unit, 1102 Application data transmission unit.

Claims

1. A first WAN interface unit that provides a communication interface with an external device using a first line, generates an abnormality notification event when it detects a communication failure on the first line, and generates a recovery notification event when the communication failure is resolved. A second WAN interface unit, which is a communication interface with the external device using a second line that is a backup line to the first line, A line switching unit that performs line switching between the first line and the second line based on the aforementioned abnormality notification event and the aforementioned recovery notification event, When the line switching unit switches from the first line to the second line, it determines whether communication via the second line is possible based on the data communication data sent from the terminal and pre-configured control information, and if it determines that communication is possible, it realizes the data communication between the terminal and the external device via the second WAN interface unit, and when the first WAN interface unit generates the recovery notification event, if the data communication has ended, it instructs the line switching unit to switch from the second line to the first line, and if the data communication is continuing, it issues the instruction after the data communication is completed or after the data communication has ended, A gateway device that controls communication between the terminal and the external device.

2. The gateway device according to claim 1, characterized in that the communication volume control unit causes the second WAN interface unit to terminate the data communication midway if the data communication via the second WAN interface unit is continuing.

3. The gateway device according to claim 2, characterized in that the communication volume control unit, after switching from the second line to the first line, retransmits the data of the data communication via the second WAN interface unit that was terminated midway through the data communication via the first WAN interface unit.

4. The gateway device according to claim 2, characterized in that the communication volume control unit, after switching from the second line to the first line, transmits the portion of the data communication via the second WAN interface unit that was not transmitted in the data communication via the second WAN interface unit in the data communication via the first WAN interface unit.

5. The gateway device according to claim 2, characterized in that the communication volume control unit determines whether communication via the second line is possible using at least one of three determination criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information; whether the destination of the data communication matches the destination information of the external device included in the control information; and whether the protocol of the data communication matches the protocol information included in the control information.

6. The gateway device according to any one of claims 1 to 5, further comprising a communication volume monitoring unit that starts counting the communication volume of the second line when the line switching unit switches from the first line to the second line, and stops counting the communication volume when the line switching unit switches from the second line to the first line.

7. The gateway device according to claim 6, wherein, for billing of communication charges for the second line, the total amount of communication via the second WAN interface unit during the counting period is calculated by either sending the information of the amount of communication counted by the communication volume monitoring unit during the counting period to the communication volume control unit, and the communication volume control unit accumulating the amount of communication, or by the communication volume monitoring unit accumulating the amount of communication counted by the communication volume monitoring unit during the counting period, and when the communication volume monitoring unit has calculated the total amount of communication, it sends the calculated information of the total amount of communication to the communication volume control unit.

8. The system further includes a data conversion unit for converting the data of the aforementioned data communication, The gateway device according to claim 7, characterized in that, when the communication volume control unit determines that data communication via the second WAN interface unit is impossible because the total communication volume exceeds the communication volume limit related to the communication restriction on the second line included in the control information, and when specific information is attached to the data of the data communication, the data conversion unit converts the bit rate of the data to a lower rate, and the communication volume control unit transmits the converted data to the external device via the second WAN interface unit.

9. The system further includes a communication volume prediction unit that predicts future communication volume during the aforementioned counting period using a machine learning model that incorporates past communication volume information for each counting period and the control information. The gateway device according to claim 8, characterized in that the data conversion unit determines the bitrate based on the future communication volume predicted by the communication volume prediction unit, in accordance with the communication volume that does not exceed the communication volume limit.

10. The gateway device according to claim 9, characterized in that the communication volume prediction unit uses the learning model which learns the duration of the communication failure of the first line from the abnormality notification event and the recovery notification event, in addition to the past communication volume information and the control information.

11. A first WAN interface unit that provides a communication interface with an external device using a first line, generates an abnormality notification event when it detects a communication failure on the first line, and generates a recovery notification event when the communication failure is resolved. A second WAN interface unit, which is a communication interface with the external device using a second line that is a backup line to the first line, A line switching unit that performs line switching between the first line and the second line based on the aforementioned abnormality notification event and the aforementioned recovery notification event, A data conversion unit that converts data for data communication, A communication volume prediction unit predicts future communication volume during the aforementioned calculation period using a machine learning model that uses past communication volume information for each calculation period and pre-set control information in order to bill for communication charges for the second line. When the line switching unit switches from the first line to the second line, it determines whether communication via the second line is possible based on the data of the data communication sent from the terminal and the control information, and if it determines that communication is possible, it realizes the data communication between the terminal and the external device via the second WAN interface unit, and if the data size of the data communication does not exceed the upper limit of the data size included in the control information, and it is determined that the data communication via the second WAN interface unit is possible, and the communication volume prediction unit predicts that the total communication volume during the counting period will exceed the upper limit of the data volume, it discards the data of the data communication, and the data conversion unit converts the bitrate of the data to a lower rate and transmits the data to the external device via the second WAN interface unit, or A gateway device that controls communication between the terminal and the external device.

12. The gateway device according to claim 11, characterized in that the communication volume prediction unit uses the learning model which has learned the duration of the communication failure of the first line from the abnormality notification event and the recovery notification event, in addition to the past communication volume information and the control information.

13. The gateway device according to claim 11 or 12, characterized in that the communication volume control unit determines whether communication via the second line is possible using at least one of the following criteria: whether the total communication volume is within the communication volume limit, whether the destination of the data communication matches the destination information of the external device included in the control information, and whether the protocol of the data communication matches the protocol information included in the control information.

14. A first WAN interface unit that provides a communication interface with an external device using a first line, generates an abnormality notification event when it detects a communication failure on the first line, and generates a recovery notification event when the communication failure is resolved. A second WAN interface unit, which is a communication interface with the external device using a second line that is a backup line to the first line, A line switching unit that performs line switching between the first line and the second line based on the aforementioned abnormality notification event and the aforementioned recovery notification event, A data conversion unit that converts data for data communication, When the line switching unit switches from the first line to the second line, it determines whether communication via the second line is possible based on the data communication data sent from the terminal and the pre-set control information. If it determines that communication is possible, it realizes the data communication between the terminal and the external device via the second WAN interface unit. If it determines that the total communication volume of the second line exceeds the communication volume limit related to the communication restriction on the second line included in the control information, and therefore data communication via the second WAN interface unit is impossible, and specific information is attached to the data communication data, the data conversion unit converts the bitrate of the data to a lower rate and transmits the data to the external device via the second WAN interface unit. A gateway device that controls communication between the terminal and the external device.

15. The gateway device according to claim 14, wherein the communication volume control unit determines whether communication via the second line is possible using at least one of the following criteria: whether the data size of the data communication is within the upper limit of the data size included in the control information; whether the destination of the data communication matches the destination information of the external device included in the control information; and whether the protocol of the data communication matches the protocol information included in the control information.

16. A communication method performed by a computer, In the first WAN interface unit, which is a communication interface with an external device using the first line, the steps include: generating an abnormality notification event when a communication failure of the first line is detected; The first WAN interface unit generates a recovery notification event when the communication failure is resolved, Based on the aforementioned abnormality notification event and the aforementioned recovery notification event, the first line and the second line, which is a backup line for the first line, are switched over. When switching from the first line to the second line, the process involves determining whether communication via the second line is possible based on the data communication data sent from the terminal and pre-configured control information. If it is determined that the aforementioned communication is possible, the step is to realize the data communication between the terminal and the external device via the second WAN interface unit, which is the communication interface of the second line. When the first WAN interface unit generates the recovery notification event, if the data communication has ended, the first step is to instruct the line switching unit to switch from the second line to the first line. When the first WAN interface unit generates the recovery notification event, if the data communication is continuing, the step of issuing the instruction after the data communication is completed or after the data communication has been terminated, A communication method that includes [something].

17. In the first WAN interface unit, which is a communication interface with an external device using the first line, the steps include: generating an abnormality notification event when a communication failure of the first line is detected; The first WAN interface unit generates a recovery notification event when the communication failure is resolved, Based on the aforementioned abnormality notification event and the aforementioned recovery notification event, the first line and the second line, which is a backup line for the first line, are switched over. When switching from the first line to the second line, the process involves determining whether communication via the second line is possible based on the data communication data sent from the terminal and pre-configured control information. If it is determined that the aforementioned communication is possible, the step is to realize the data communication between the terminal and the external device via the second WAN interface unit, which is the communication interface of the second line. When the first WAN interface unit generates the recovery notification event, if the data communication has ended, the first step is to instruct the line switching unit to switch from the second line to the first line. When the first WAN interface unit generates the recovery notification event, if the data communication is continuing, the step of issuing the instruction after the data communication is completed or after the data communication has been terminated, A communication program that causes a computer to execute something.