CN110868348B - Multi-gateway communication method, device and system and electronic equipment - Google Patents

Multi-gateway communication method, device and system and electronic equipment Download PDF

Info

Publication number
CN110868348B
CN110868348B CN201910990092.5A CN201910990092A CN110868348B CN 110868348 B CN110868348 B CN 110868348B CN 201910990092 A CN201910990092 A CN 201910990092A CN 110868348 B CN110868348 B CN 110868348B
Authority
CN
China
Prior art keywords
gateway
communication path
communication
path information
updated
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910990092.5A
Other languages
Chinese (zh)
Other versions
CN110868348A (en
Inventor
李春君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lumi United Technology Co Ltd
Original Assignee
Lumi United Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lumi United Technology Co Ltd filed Critical Lumi United Technology Co Ltd
Priority to CN201910990092.5A priority Critical patent/CN110868348B/en
Publication of CN110868348A publication Critical patent/CN110868348A/en
Application granted granted Critical
Publication of CN110868348B publication Critical patent/CN110868348B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/02Topology update or discovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/66Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1074Peer-to-peer [P2P] networks for supporting data block transmission mechanisms
    • H04L67/1078Resource delivery mechanisms

Abstract

The embodiment of the application discloses a method, a device, a system, electronic equipment and a storage medium for multi-gateway communication. The method comprises the following steps: the first gateway searches communication path information, wherein the communication path information comprises a communication path which is established with communication connection in advance between the first gateway and other gateways based on a specified communication protocol; determining a target communication path between the second gateway and the communication path; and executing preset operation. Therefore, under the condition that a plurality of gateways automatically try to establish communication links among each other in advance and generate communication path information, when a point-to-point communication path among the gateways needs to be searched, the communication path information can be directly inquired, and therefore timeliness in determining the communication path and efficiency in executing preset operation are improved.

Description

Multi-gateway communication method, device and system and electronic equipment
Technical Field
The application belongs to the field of data communication, and particularly relates to a method, a device, a system, electronic equipment and a storage medium for multi-gateway communication.
Background
With the development of smart homes, more and more smart products enter every family. With the deep use of users, the number of devices accessed to the smart home system is gradually increased, and a single gateway cannot meet the networking requirement of the home smart device, so that a plurality of gateways are required to work cooperatively. However, there is still a pending aspect in the related multi-gateway communication method.
Disclosure of Invention
In view of the foregoing problems, embodiments of the present application provide a method, an apparatus, a system, an electronic device, and a storage medium for multi-gateway communication, so as to improve the foregoing problems.
In a first aspect, an embodiment of the present application provides a method for multi-gateway communication, where the method includes: the first gateway searches corresponding communication path information, wherein the communication path information comprises a communication path which is established with communication connection in advance between the corresponding gateway and other gateways based on a specified communication protocol; determining a target communication path between the second gateway and the communication path; and executing preset operation.
In a second aspect, an embodiment of the present application provides a method for multi-gateway communication, where the method is applied to a cloud server, and the method includes: after detecting that a gateway in a gateway group is updated, the cloud server updates a gateway list of the gateway group; sending the updated gateway list to the gateways in the gateway group, so that the gateways in the gateway group try to establish communication connection with the gateways in the updated gateway list based on a specified communication protocol, so as to generate communication path information corresponding to each gateway, so that each gateway performs data transmission with other gateways based on the communication path information, the communication path information includes communication paths in which communication connection is established in advance between the corresponding gateway and other gateways based on the specified communication protocol, and the communication paths are local communication paths corresponding to the gateways.
In a third aspect, an embodiment of the present application provides a method for multi-gateway communication, where the method includes: the method comprises the steps that a cloud server pushes a gateway list to all gateways in a gateway group, wherein the gateway list comprises a unique identifier and a corresponding IP address of each gateway in the gateway group; a first gateway in the gateway group receives the gateway list; if the first gateway detects that the updated gateway exists in the gateway group to which the first gateway belongs based on the gateway list, updating a locally stored gateway list of the gateway group to which the first gateway belongs; the first gateway sends a communication connection request to the updated gateway based on the updated IP address of the gateway, and updates communication path information corresponding to the first gateway based on a result of the communication connection request, wherein the communication path information comprises a communication path which is established in advance with communication connection between the corresponding gateway and other gateways based on a specified communication protocol, and the communication path is a local communication path corresponding to the gateway; if the first gateway receives the communication connection request sent by other gateways in the gateway group, establishing communication connection with the other gateways sending the communication connection request so that the other gateways update corresponding communication path information; the first gateway determines a target communication path with a second gateway in the gateway group based on the updated communication path information; and the first gateway sends data to the second gateway based on the target communication path.
In a fourth aspect, an embodiment of the present application provides an apparatus for multi-gateway communication, where the apparatus includes: the information searching unit is used for searching communication path information, wherein the communication path information comprises a communication path which is established in advance with communication connection between the corresponding gateway and other gateways based on a specified communication protocol; a path selection unit, configured to determine a target communication path with the second gateway from the communication paths; and the action execution unit is used for executing preset operation.
In a fifth aspect, an embodiment of the present application provides an apparatus for multi-gateway communication, where the apparatus includes: the gateway detection unit is used for updating a gateway list of a gateway group after detecting that the gateway in the gateway group is updated; a gateway communication configuration unit, configured to send the updated gateway list to the gateways in the gateway group, so that the gateways in the gateway group attempt to establish a communication connection with the gateways in the updated gateway list based on a specified communication protocol, so as to generate communication path information corresponding to each gateway, so that each gateway performs data transmission with other gateways based on the communication path information, where the communication path information includes a communication path in which a communication connection is established in advance based on the specified communication protocol between the corresponding gateway and other gateways, and the communication path is a local communication path corresponding to the gateway.
In a sixth aspect, an embodiment of the present application provides a system for multi-gateway communication, where the system includes a first gateway, a cloud server, and a second gateway; the cloud server is used for pushing a gateway list to all gateways in the gateway group; a first gateway for receiving the gateway list; the first gateway is used for detecting whether a gateway in the gateway group is updated or not based on the gateway list; if detecting that the gateway in the gateway group is updated, updating a locally stored gateway list of the gateway group; the first gateway is configured to send a communication connection request to the updated gateway based on the updated IP address of the gateway, and update communication path information corresponding to the first gateway based on a result of the communication connection request, where the communication path information includes a communication path in which a communication connection is pre-established based on a specified communication protocol between the corresponding gateway and another gateway, and the communication path is a local communication path corresponding to the gateway; the first gateway is configured to, if receiving a communication connection request sent by another gateway in the gateway group, establish a communication connection with the another gateway that sent the communication connection request, so that the another gateway updates corresponding communication path information; the first gateway is used for determining a target communication path with a second gateway in the gateway group based on the updated communication path information; and the second gateway is used for receiving the data sent by the first gateway based on the target communication path.
In a seventh aspect, an embodiment of the present application provides an electronic device, including one or more processors and a memory; one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In an eighth aspect, the present application provides a computer-readable storage medium, in which a program code is stored, wherein the program code performs the above-mentioned method when running.
The embodiment of the application provides a method, a device, a system, electronic equipment and a storage medium for multi-gateway communication. When the first gateway establishes a connection with another gateway in advance based on the specified communication protocol to generate communication path information including a communication path between the first gateway and the other gateway, the communication path information being a communication path in which a communication connection is established in advance based on the specified communication protocol, the first gateway may directly search for the communication path information when a preset operation needs to be performed, and determine a target communication path between the first gateway and the second gateway from the communication paths included in the communication path information to perform the preset operation. Therefore, under the condition that a plurality of gateways automatically try to establish communication links among each other in advance and generate communication path information, when a point-to-point communication path among the gateways needs to be searched, the communication path information can be directly inquired, and therefore timeliness in determining the communication path and efficiency in executing preset operation are improved.
Drawings
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Fig. 1 is a schematic diagram illustrating an application scenario proposed in the embodiment of the present application;
FIG. 2 is a schematic diagram illustrating another application scenario proposed by the embodiment of the present application;
fig. 3 is a flowchart illustrating a method for multi-gateway communication according to an embodiment of the present application;
fig. 4 is a flow chart illustrating a method for multi-gateway communication according to another embodiment of the present application;
fig. 5 is a flow chart illustrating a method of multi-gateway communication according to yet another embodiment of the present application;
fig. 6 is a timing diagram illustrating a method of multi-gateway communication according to another embodiment of the present application;
fig. 7 is a block diagram illustrating a multi-gateway communication apparatus according to an embodiment of the present application;
fig. 8 is a block diagram illustrating another apparatus for multi-gateway communication according to an embodiment of the present application;
fig. 9 is a block diagram illustrating a system for multi-gateway communication according to an embodiment of the present application;
fig. 10 shows a block diagram of a gateway of the present application for performing a method of multi-gateway communication according to an embodiment of the present application.
Fig. 11 shows a block diagram of a server for executing a method of multi-gateway communication according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described clearly and completely with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
With the development of smart homes, more and more smart products enter every family. In the related intelligent home systems, the equipment accessed to the intelligent home systems can send interactive data through the gateway. For example, when the cloud server needs to send a control instruction sent by the user terminal to a certain controlled device, the control instruction may be sent to a router in a certain local area network by the cloud server, then forwarded to the gateway by the router, and finally forwarded to the specific controlled device by the gateway. For another example, if the controlled device a needs to send a control instruction to the controlled device B, the control instruction may be forwarded by a gateway to which the controlled device a and the controlled device B are connected.
As the users use the smart home systems deeply, the number of devices accessing the smart home systems is increased, and in order to adapt to more devices, more gateways may be configured to transmit data between the devices. The inventor researches a network environment with multiple gateways, and finds that the network topology under the condition can be complex. For example, multiple gateways may or may not be in the same local area network. If the gateways are all in the same local area network, the gateways can directly communicate with each other. However, if the network has multiple sub-networks, due to the nature of ethernet, gateways present in different sub-networks may not be able to communicate with each other over the local network IP.
For example, as shown in fig. 1, there are 4 networks in the user environment, where there are two sub-networks under the 192.168.1.X network, which are: 192.168.2.X and 192.168.3.X.192.168.3.X network there is yet another subnetwork 192.168.4.100. The user now has 4 gateways, with gateway 1 in 192.168.1.X, gateway 2 in 192.168.2.X, gateway 3 in 192.168.3.X network, and gateway 4 in network 192.168.4. X.
Because the devices of the sub-network are invisible to the parent network due to the characteristics of the ethernet, the gateway of the parent network cannot connect to the gateway of the sub-network through the IP address when communicating. But the devices in the parent network are visible to the child network, so the devices of the child network can access the parent network through the IP address. Gateway 2, gateway 3 and gateway 4 may then all actively communicate with gateway 1, but gateway 1 cannot actively communicate with gateway 2, gateway 3 and gateway 4. The gateway 4 may actively communicate with the gateway 3, but the gateway 3 cannot actively communicate with the gateway 4. While devices between subnetworks may not communicate directly and thus gateway 2 may not communicate with gateway 3 or gateway 4. Likewise, gateways 3 and 4 cannot communicate directly with gateway 2.
The inventor finds in research that another related inter-gateway communication mode in a multi-gateway network is data forwarding through a cloud server. However, in this way of forwarding data through the cloud server, the data is heavily dependent on the cloud server, and the intermediate transmission network link is long, which results in a long data transmission delay and also fails to ensure the transmission security. Therefore, the method, the device, the system and the electronic equipment for multi-gateway communication are provided, wherein under the condition that a plurality of gateways automatically try to establish communication links among each other in advance and generate communication path information, when a point-to-point communication path among the gateways needs to be searched, the communication path information can be directly inquired, and the timeliness in determining the communication path and the efficiency of executing preset operation are improved. Moreover, the communication paths in the communication path information can be local communication paths, so that the dependence on the cloud server is reduced, and the data transmission efficiency and the data security are improved.
An application environment related to the embodiments of the present application will be described below.
As shown in fig. 2, in the application environment shown in fig. 2, a user terminal 100 and a communication system 200 are included. The user terminal 100 may perform data interaction with the communication system 200 through a network (e.g., a local area network or a wide area network, etc.). In one approach, the communication system 200 includes a cloud server 210, a first gateway 220, a second gateway 230, and a third gateway 240.
The cloud server 210 may serve as a relay station to forward data sent by the gateways, and may further store data of each of the first gateway 220, the second gateway 230, and the third gateway 240, where the data may include, for example, a packet and a network address to which each of the first gateway 220, the second gateway 230, and the third gateway 240 belongs. The first gateway 220, the second gateway 230, and the third gateway 240 may all belong to the same sub-network, may belong to different sub-networks, or may be located in networks having a parent-child relationship. For example, fig. 2 exemplarily shows that the network in which the third gateway 240 exists is a parent network of the network in which the first gateway 220 and the second gateway 230 exist.
It should be noted that fig. 2 is only an exemplary illustration of an application environment, the number of gateways in the figure may be increased or decreased as needed, and the affiliations (parent-child network relationships) of the networks may also be changed as needed.
Based on the above-described application environment and system, embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, a method for multi-gateway communication according to an embodiment of the present application includes:
step S110: the first gateway searches communication path information which comprises communication paths of communication connection which are established in advance between the first gateway and other gateways based on a specified communication protocol.
It should be noted that the first gateway may be understood as a gateway to perform a preset operation, and the second gateway may be understood as a target gateway corresponding to a target communication path to be determined subsequently. In the embodiment of the present application, each gateway may belong to one gateway group. As one way, one gateway group may be created in units of user homes. In this manner, a user may configure the gateway to associate with his account in order to group the network pipe. Furthermore, when a new gateway joins the gateway group, the cloud server assigns a unique identifier in the gateway group, called Id, to the new gateway.
Optionally, to facilitate the confirmation of the communication path, each gateway in the gateway group may locally store an address table and a forwarding table. The address table is used for recording the Ids and communication addresses of other gateways in a gateway group where the gateway is located; and the transfer table is used for recording the information of the communication path for the gateway to send the message to other gateways in the gateway group, wherein the information of the communication path comprises the related information of the transfer gateway and the time consumption of message transmission.
It is to be understood that the specified communication protocol refers to a communication rule that communication parties have agreed in advance, and may be simply understood as a common language used for mutual conversation between computers. The communication protocol has hierarchy, reliability and effectiveness. Optionally, the specified communication protocol mainly comprises a TCP/IP protocol.
As a manner, when the first gateway intends to perform a preset operation, and the preset operation relates to another gateway (for example, the aforementioned second gateway), the preset operation may be that the first gateway sends data to the second gateway according to a communication path, and when the first gateway needs to send data to the second gateway, the first gateway may first search its own local communication path information, where the communication path information includes a communication path between the first gateway and the second gateway, where a communication connection is established in advance based on a specified communication protocol, for example, information of the communication path stored in the aforementioned transfer table.
Step S120: and determining a target communication path between the second gateway and the second gateway from the communication paths.
In the embodiment of the present application, the target communication path with the second gateway may be determined in various ways.
As one approach, the first gateway may determine the target communication path based on the communication elapsed time. In this way, the first gateway compares the lengths of all communication paths by searching the communication path information corresponding to the first gateway, namely searching the transfer table of the first gateway, wherein the lengths of the communication paths are calculated by the time consumption of message transmission in the transfer table; and selecting the communication path with the shortest communication time as the target communication path.
Step S130: and executing preset operation.
It should be noted that the preset operation is a specific operation of communication between preset gateways.
As one way, the preset operation may be that the first gateway sends data to the target gateway through the target communication path.
According to the method for multi-gateway communication provided by the embodiment of the application, the first gateway searches the corresponding communication path information, then determines the target communication path between the first gateway and the second gateway from all the communication paths, and finally sends data to the target gateway through the target path. Therefore, the time consumption of data transmission between gateways is shortened; the strong dependence on the cloud server is reduced by establishing the transfer gateway to transmit data, the data are transmitted in the network of a user, the data transmission efficiency is improved, and the data security is improved.
Referring to fig. 4, a method for multi-gateway communication according to an embodiment of the present application includes:
step S210: the first gateway searches communication path information which comprises communication paths of communication connection which are established in advance between the first gateway and other gateways based on a specified communication protocol.
Step S220: and determining a target communication path between the second gateway and the communication path based on the communication elapsed time.
As one way, the step of determining a target communication path with the second gateway from the communication paths based on the communication elapsed time includes: and determining the communication path which consumes the least communication time as the target communication path from all the communication paths between the first gateway and the second gateway. The step of determining a communication path with the least communication time consumption as a target communication path in the communication paths between the first gateway and the second gateway comprises: firstly, judging whether a communication path between a first gateway and a second gateway is subjected to transit gateway or not; if so, taking the sum of the communication time consumption between the first gateway and the transit gateway and the time consumption between the transit gateway and the second gateway as the communication time consumption of a communication path between the first gateway and the second gateway; and determining a communication path which consumes the least time for corresponding communication in the communication paths between the second gateway and the second gateway as a target communication path.
Optionally, when the preset operation is to send data, the first gateway may query the relay table, and compare the route that consumes the shortest time among all communication routes of the relay table to send data. For example, taking the gateway 1 as a first gateway to send data to the gateway 2 as a second gateway as an example, in the following forwarding table, when the gateway 1 needs to send data to the gateway 2, the gateway 1 will look up its forwarding table and find out which gateway should forward the message addressed to the gateway 2. If a corresponding intermediary is found, such as the gateway 3, the message is sent directly to the gateway 3.
Similarly, when the gateway 2 needs to send data to the gateway 1, the gateway 2 looks up the transfer table therein to find that the transfer can be performed by the gateway 3. The gateway 2 transmits the data transmitted to the gateway 1 to the gateway 3. After receiving the data, the gateway 3 sends the data to the gateway 1.
Figure BDA0002237973690000081
Figure BDA0002237973690000091
Illustratively, as shown in the above table, the gateway 1 sends data to the gateway 2, and by finding out the transfer table of the gateway 1, the gateway 1 can send data to the gateway 2 through the transfer gateway 3, or can directly send data to the gateway 2 by itself; the time consumed for gateway 1 to send data to gateway 2 through transit gateway 3 is 10+10=20ms, the time consumed for gateway 1 to directly send data to gateway 2 is 5ms, and by comparison, a communication path with communication time consumed as 5ms can be used as a target communication path.
As a mode, if the first gateway does not find a target communication path for transmitting data with the second gateway from the communication path, the data sent to the second gateway may be sent to the cloud server, and forwarded to the second gateway through the cloud server.
Step S230: and if the first gateway detects that the updated gateway exists in the gateway group to which the first gateway belongs, updating a locally stored gateway list of the gateway group to which the first gateway belongs, wherein the gateway list comprises the unique identifier of each gateway and the corresponding IP address.
It should be noted that, in the home system, as the user requirement changes, the devices added into the gateway group change at any time, so that all the gateway information in the corresponding gateway group needs to be updated according to the change of the devices in the gateway group, for example, if a terminal device is suddenly added or deleted, the gateway in the gateway group needs to update the gateway information correspondingly. In this embodiment, the first gateway may perform the relevant update operation based on a variety of ways.
As a mode, if the first gateway detects that there is an updated gateway in the gateway group to which the first gateway belongs, the step of updating the locally stored gateway list of the gateway group to which the first gateway belongs includes: a first gateway receives a gateway list of a gateway group which the cloud server belongs to; and then the first gateway detects the received gateway list, and if the updated gateway is detected in the gateway list, the locally stored gateway list of the gateway group to which the first gateway belongs is updated.
Optionally, the gateway having an update in the gateway group includes the following two cases, one is when a new gateway is added or deleted in the gateway group, and the other is when an address of the gateway is updated in the gateway group. Both of these situations may result in the cloud server updating the gateway address table and pushing the updated gateway address table to all online gateways in the gateway group. When the gateway in the gateway group receives the gateway address table pushed by the cloud server, updating the content of the local gateway address table: if the gateway address item is newly added, trying to establish connection with the newly added gateway; if the gateway address entry is deleted, clearing the entry of the transfer table related to the gateway; if the gateway address entry is changed, the entry of the transfer table associated with the gateway is cleared and an attempt is made to establish a connection with the use address.
Illustratively, in the original gateway group, only gateway 1 and gateway 2 are present, and gateway 3 now joins the gateway group and informs the cloud server of its own network address. The cloud server receives the network address of the gateway 3 and assigns an Id of 3 to the gateway 3. The cloud server then updates the gateway address table and pushes the new gateway address table to all gateways in the gateway group. When gateway 3 receives the gateway address table, two other gateways are found. It then updates its local gateway address table and creates a corresponding entry in the local transit table for each other gateway. When the gateway 1 receives the gateway address table, it finds that the gateway 3 is newly added, updates the local gateway address table, and adds the address item of the gateway 3 in the transfer table.
By updating the gateway address table and the transfer table information in real time, the effectiveness of real-time communication between gateways can be ensured, the timeliness when a communication path is determined is also improved, and the efficiency of data transmission is further improved.
Step S240: and sending a communication connection request to the updated gateway based on the IP address of the updated gateway, and updating the communication path information corresponding to the first gateway based on the result of the communication connection request.
As one mode, the step of sending a communication connection request to the updated gateway based on the updated IP address of the gateway, and updating the communication path information corresponding to the first gateway based on the result of the communication connection request includes: sending a communication connection request to the updated gateway based on the IP address of the updated gateway, and starting a timer to start timing; if receiving information returned by the updated gateway, acquiring the timing length of the timer when the returned information is received, and determining the timing length as the communication time consumed by the first gateway to send data to the updated gateway; and updating the communication path information corresponding to the first gateway based on the communication time consumption of the first gateway for sending data to the updated gateway.
As another mode, if the first gateway receives information returned by the updated gateway, confirmation information is returned to the updated gateway, so that the updated gateway determines that the communication between the updated gateway and the first gateway is time-consuming, so as to update the corresponding communication path information.
It can be understood that, after the first gateway changes its own address table, it starts to attempt to establish a connection with the second gateway, and in the process of attempting the connection, the first gateway sends a visit request to the second gateway, where the visit request content includes: { Id of first gateway, id of second gateway }. The second gateway sends a visit reply to the first gateway after receiving the request, wherein the reply content comprises: { gateway Id, communication time consumption }. And after receiving the visit reply of the second gateway, the first gateway replies a visit confirmation to the second gateway.
Illustratively, as shown in the following table, in the original gateway group, only gateway 1 and gateway 2 are present, gateway 3 now joins the gateway group, and gateway 3 informs the network address of the cloud server itself. After receiving the network address of the gateway 3, the cloud server may further assign an Id of 3 to the gateway 3. The cloud server then updates the gateway address table and pushes the new gateway address table to all gateways in the gateway group. When gateway 3 receives the gateway address table, two other gateways are found. Then, the gateway 3 will further update its local gateway address table and create a corresponding entry in the local transfer table for each other gateway, where the corresponding entry includes the gateway Id and the communication time. When the gateway 1 receives the gateway address table, it finds that the gateway 3 is newly added, updates the local gateway address table, and adds the address item of the gateway 3 in the transfer table.
Gateway Id Gateway address
1 192.168.1.10
2 192.168.3.44
3 192.168.1.6
Gateway 1 then attempts to establish a connection with gateway 3. The gateway 1 sends a visit request to the gateway 3, and the information comprises: { Id of gateway 1, id of gateway 3 }. After sending the visit request, the gateway 1 starts timing and waits for the visit reply of the gateway 3.
After the gateway 3 receives the request, the gateway 3 searches the local transfer table, finds out other directly connected gateway information, generates an exchange table, and replies to the gateway 1. The switching table contains the contents: { gateway Id, communication time consumption }. At this time, no other gateway is connected to the transfer table in the gateway 3. The switching table has no data. The gateway 3 starts timing after transmitting the switching table, and waits for the visit confirmation of the gateway 1.
After receiving the reply from the gateway 3, the gateway 1 obtains the time interval, for example, 5ms, for communicating with the gateway 3 through the timer, and updates its own transfer table.
Gateway 1 then replies with an acknowledgement message to gateway 3. After receiving the visit confirmation, the gateway 3 obtains a time interval, for example, 8ms, by using a timer, and updates its own transit table.
In the same way, the gateway 2 updates its forwarding table in this way. When the gateway 2 receives the gateway address table, the gateway 3 is newly added, so that the local gateway address table of the gateway is updated, and the address item of the gateway 3 is added in the transfer table; and then attempts to establish a connection with the gateway 3.
The gateway 2 sends a visit request to the gateway 3, and the information comprises: { Id of gateway 2, id of gateway 3 }. After sending the visit request, the gateway 2 starts timing and waits for the visit reply of the gateway 3. After the gateway 3 receives the request, the gateway 3 looks up the local transfer table to find out other directly connected gateway information, wherein the gateway 1 directly communicates with the gateway, generates an exchange table and sends the exchange table to the gateway 2.
The gateway 3 starts timing after sending the switching table to the gateway 2, and waits for the visit confirmation of the gateway 2. After receiving the reply from the gateway 3, the gateway 2 obtains the time interval, for example, 6ms, for communicating with the gateway 3 through a timer, and updates its forwarding table. The gateway 2 then replies with an acknowledgement message to the gateway 3.
After receiving the visit confirmation, the gateway 3 obtains a time interval, for example, 3ms, by using a timer, and updates its own transit table. Since there is a transit table item in the gateway 3 changed, the gateway 3 packs the changed data into a transit table and forwards the transit table to all directly connected gateways. Gateway 3 then sends a switching table update request to gateway 1. After receiving the switching table updating request, the gateway 1 updates its own transfer table.
All gateways establish the connection among each other by updating their transfer tables, so that the transfer tables of the gateway 1, the gateway 2 and the gateway 3 all have paths for data to be sent to other gateways.
Step S250: and the first gateway synchronizes the updated communication path information with the gateway which establishes the communication connection so as to update the corresponding communication path information with the gateway which establishes the communication connection with the first gateway.
It is understood that after the first gateway and the second gateway establish a connection, data can be transmitted between the two gateways.
Step S260: and executing preset operation.
According to the multi-gateway communication method provided by the embodiment of the application, a first gateway tries to establish connection with a second gateway, then the first gateway and the second gateway update own gateway lists according to a visit request, a visit reply and a visit confirmation message sent between the first gateway and the second gateway, confirm communication paths for transmitting data between the first gateway and the second gateway, then select the path with the least communication time consumption as a target path by comparing the communication time consumption of the communication paths, and finally transmit the data according to the target path. Therefore, the time consumption of data transmission between gateways is shortened; the strong dependence of the gateway on the cloud server is reduced by establishing the transfer gateway for transmitting data, and after the transfer gateway is established, the gateway can not forward the data through the cloud server, the data is transmitted in the network of the user, and the safety of data transmission is improved.
Referring to fig. 5, a method for multi-gateway communication according to an embodiment of the present application includes:
step S310: and after detecting that the gateway in the gateway group is updated, the cloud server updates the gateway list of the gateway group.
Step S320: and sending the updated gateway list to the gateways in the gateway group, so that the gateways in the gateway group try to establish communication connection with the gateways in the updated gateway list based on a specified communication protocol to generate communication path information corresponding to each gateway, and each gateway performs data transmission with other gateways based on the communication path information.
It should be noted that the communication path information includes a communication path in which a communication connection is established in advance based on a specified communication protocol between the corresponding gateway and another gateway, and the communication path is a local communication path corresponding to the gateway.
According to the method for multi-gateway communication, when the cloud server detects that the gateways in the gateway group are updated, the list of the gateway group is updated, the gateways in the gateway group establish connection according to the updated list of the gateway group, and communication path information corresponding to each gateway is generated. The method is beneficial to establishing connection between gateways which are not in the same network area, and ensures the smoothness of network data transmission.
Referring to fig. 6, a method for multi-gateway communication provided in an embodiment of the present application is applied to a communication system, where the communication system includes a first gateway, a cloud server, and a second gateway, and the method includes:
step S410: the method comprises the steps that a cloud server pushes a gateway list to all gateways in a gateway group, wherein the gateway list comprises the unique identification and the corresponding IP addresses of all the gateways in the gateway group.
Step S420: and after receiving the gateway list, the first gateway in the gateway group detects whether a gateway is updated.
Step S430: and if the first gateway detects that the updated gateway exists in the gateway group to which the first gateway belongs based on the gateway list, updating the locally stored gateway list of the gateway group to which the first gateway belongs.
Optionally, the gateway having an update in the gateway group includes a case where a new gateway is added or deleted in the gateway group, and a case where an address of a gateway is updated in the gateway group. Both of these situations may cause the cloud server to update the gateway address table and push the updated gateway address table to all online gateways in the gateway group. When the gateway in the gateway group receives the gateway address table pushed by the cloud server, updating the content of the local gateway address table: if the gateway address item is newly added, trying to establish connection with the newly added gateway; if the gateway address entry is deleted, clearing the entry of the transfer table related to the gateway; if the gateway address entry is changed, the entry of the transfer table associated with the gateway is cleared and an attempt is made to establish a connection with the use address.
Step S440: and the first gateway sends a communication connection request to the updated gateway based on the updated IP address of the gateway, and updates the communication path information corresponding to the first gateway based on the result of the communication connection request.
It should be noted that the communication path information includes a communication path in which a communication connection is established in advance based on a specified communication protocol between the corresponding gateway and another gateway, and the communication path is a local communication path corresponding to the gateway.
Step S450: and if the first gateway receives the communication connection request sent by other gateways in the gateway group, establishing communication connection with the other gateways sending the communication connection request so that the other gateways update the corresponding communication path information.
Step S460: the first gateway determines a target communication path with a second gateway in the gateway group based on the updated communication path information.
Wherein the determining the policy of the target communication path comprises: firstly, judging whether a communication path between a first gateway and a second gateway is to pass through a transit gateway or not; if so, taking the sum of the communication time consumption between the first gateway and the transit gateway and the time consumption between the transit gateway and the second gateway as the communication time consumption of a communication path between the first gateway and the second gateway; and determining the communication path which consumes the least time for corresponding communication in the communication paths between the second gateway and the second gateway as a target communication path.
Step S470: the first gateway sends data to the second gateway based on the target communication path.
According to the multi-gateway communication method provided by the embodiment of the application, the cloud server pushes the gateway list to all gateways in the gateway group, and after receiving the gateway list, a first gateway in the gateway group detects whether the gateway is updated. And if the first gateway detects that the updated gateway exists in the gateway group to which the first gateway belongs based on the gateway list, updating the locally stored gateway list of the gateway group to which the first gateway belongs. The first gateway then sends a communication connection request to the updated gateway based on the updated IP address of the gateway, and updates the corresponding communication path information based on the result of the communication connection request. And finally, the first gateway determines a target communication path with a second gateway in the gateway group based on the updated communication path information, and the first gateway sends data to the second gateway based on the target communication path. The data transmission among networks is realized by establishing the transfer gateway through the gateway ad hoc network, so that the strong dependence on the cloud server is reduced, and the data is transmitted in the network of a user, so that the safety of the data transmission is improved.
Referring to fig. 7, an apparatus 500 for multiple gateway communication according to an embodiment of the present application includes: an information search unit 510, a path selection unit 520, and an action execution unit 530.
An information searching unit 510, configured to search the communication path information for the first gateway.
As one mode, the communication path information includes a communication path in which a communication connection is established in advance between the first gateway and another gateway based on a specified communication protocol, and the communication path is a local communication path corresponding to the gateway. In this manner, the information searching unit 510 is specifically configured to search, by the first gateway, a communication path corresponding to the first gateway, so that the first gateway transmits data to the second gateway.
A path selecting unit 520, configured to determine a target communication path between the second gateway and the second gateway from the communication paths.
As a mode, the target communication path is a communication path that takes the shortest time to transmit data between gateways. In this manner, the path selecting unit 520 is specifically configured to select, by searching all communication paths for data transmission of the first gateway, a communication path that takes the least time for communication with the communication gateway as the target communication path through comparison.
An action performing unit 530 for performing a preset operation.
Optionally, the preset operation includes: the first gateway sends data to the second gateway based on the target communication path.
Referring to fig. 8, an apparatus 600 for multiple gateway communication according to an embodiment of the present application includes: a gateway detection unit 610 and a gateway communication configuration unit 620.
The gateway detecting unit 610 is configured to update a gateway list of a gateway group after detecting that a gateway in the gateway group is updated.
The gateway list includes, as one approach, a gateway address table and a gateway relay table. The gateway detecting unit 610 is specifically configured to detect whether a gateway in the gateway group is updated, where there are multiple gateway update situations, and determine whether gateway information of all gateways in the gateway group is updated if there is a gateway update.
A gateway communication configuration unit 620, configured to send the updated gateway list to the gateways in the gateway group, so that the gateways in the gateway group attempt to establish a communication connection with the gateways in the updated gateway list based on a specified communication protocol, so as to generate communication path information corresponding to each gateway, so that each gateway performs data transmission with other gateways based on the communication path information, where the communication path information includes a communication path in which a communication connection is established in advance based on the specified communication protocol between the corresponding gateway and other gateways, and the communication path is a local communication path corresponding to the gateway.
It should be noted that the device embodiment and the method embodiment in the present application correspond to each other, and specific principles in the device embodiment may refer to the contents in the method embodiment, which is not described herein again.
Referring to fig. 9, a system 700 for multiple gateway communication according to an embodiment of the present application includes: cloud server 710, first gateway 720, and second gateway 730.
And the cloud server 710 is configured to push the gateway list to all gateways in the gateway group.
The first gateway 720 is used for detecting whether a gateway in the gateway group is updated or not based on the gateway list; and if detecting that the gateway in the gateway group is updated, updating a locally stored gateway list of the gateway group.
The gateway server is used for sending a communication connection request to the updated gateway based on the updated IP address of the gateway, and updating communication path information corresponding to the first gateway 720 based on the result of the communication connection request, where the communication path information includes a communication path in which communication connection is pre-established based on a specified communication protocol between the corresponding gateway and another gateway, and the communication path is a local communication path corresponding to the gateway; and if receiving the communication connection request sent by other gateways in the gateway group, establishing communication connection with the other gateways sending the communication connection request so that the other gateways update the corresponding communication path information.
And also for determining a target communication path with a second gateway 730 in the gateway group based on the updated communication path information.
A second gateway 730, configured to receive data sent by the first gateway 720 based on the target communication path.
A gateway provided by the present application will be described with reference to fig. 10.
An embodiment of the present invention provides a gateway 800, including: a processor 810, a communication module 820, a memory 830, and a bus. The processor 810, the communication module 820 and the memory 830 are connected to each other through the bus and perform communication with each other. The bus may be an ISA bus, PCI bus, EISA bus, or the like. The bus may be divided into an address bus, a data bus, a control bus, etc. Wherein:
and a memory 830 for storing programs. In particular, the memory 830 may be used to store software programs as well as various data. The memory 830 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, and an application program required for at least one function may include a program code including computer operating instructions. In addition to storing programs, the memory 830 may temporarily store messages or the like that the communication module 820 needs to send. Memory 830 may comprise high-speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
The processor 810 is configured to execute programs stored in the memory 830. The program, when executed by the processor, implements the steps of the method for multi-gateway communication of the above embodiments.
A server provided by the present application will be described below with reference to fig. 11.
The embodiment of the present invention provides a server for multi-gateway communication across sub-networks, which includes a processor and a memory, where the memory stores at least one instruction, at least one program, a code set, or a set of instructions, and the at least one instruction, the at least one program, the code set, or the set of instructions is loaded and executed by the processor to implement the method for multi-gateway communication provided by the above method embodiment.
The memory may be used to store programs and modules, and the processor may execute various functional applications and data processing by operating the programs and modules stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store programs required by an operating system, functions, and the like; the storage data area may store data created according to use of the apparatus, and the like. Further, the memory may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device. Accordingly, the memory may also include a memory controller to provide the processor access to the memory.
Fig. 11 is a block diagram of a hardware structure of a server for multi-gateway communication across subnetworks according to an embodiment of the present invention. As shown in fig. 11, the server 1100 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 1110 (the processors 1110 may include but are not limited to processing devices such as a microprocessor MCU or a programmable logic device FPGA), a memory 1130 for storing data, and one or more storage media 1120 (e.g., one or more mass storage devices) for storing applications 1123 or data 1122. The memory 1130 and the storage medium 1120 may be, among other things, transient storage or persistent storage. The program stored in the storage medium 1120 may include one or more modules, each of which may include a series of instruction operations for a server. Still further, the processor 1110 may be configured to communicate with the storage medium 1120, and execute a series of instruction operations in the storage medium 1120 on the server 1100. Server 1100 may also include one or more power supplies 1160, one or more wired or wireless network interfaces 1150, one or more input-output interfaces 1140, and/or one or more operating systems 1121, such as Windows Server, macOSXTM, unixTM, linuxTM, freeBSDTM, and so forth.
The input output interface 1140 may be used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the server 1100. In one example, i/o interface 1140 includes a network adapter (NIC) that may be coupled to other network devices via a base station to communicate with the internet. In one example, the input/output interface 1140 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
It will be understood by those skilled in the art that the structure shown in fig. 11 is merely illustrative and is not intended to limit the structure of the server for multi-gateway communication across subnets described above. For example, the server 1100 may also include more or fewer components than shown in FIG. 10, or have a different configuration than shown in FIG. 11.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the foregoing multi-gateway communication method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a component of' 8230; \8230;" does not exclude the presence of another like element in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
To sum up, according to the method, the device, and the information system for multi-gateway communication provided in the embodiments of the present application, the cloud server pushes the gateway list to all gateways in the gateway group, and after receiving the gateway list, the first gateway in the gateway group detects whether there is a gateway update. And if the first gateway detects that the updated gateway exists in the affiliated gateway group based on the gateway list, updating the locally stored gateway list of the affiliated gateway group. The first gateway then sends a communication connection request to the updated gateway based on the updated IP address of the gateway, and updates the corresponding communication path information based on the result of the communication connection request. And finally, the first gateway determines a target communication path with a second gateway in the gateway group based on the updated communication path information, and the first gateway sends data to the second gateway based on the target communication path. The strong dependence of the gateway on the cloud server is reduced by establishing the transfer gateway for transmitting data, and after the transfer gateway is established, the gateway can not forward the data through the cloud server, the data is transmitted in the network of the user, and the safety of data transmission is improved.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (14)

1. A method of multi-gateway communication, the method comprising:
if the first gateway detects that an updated gateway exists in a gateway group to which the first gateway belongs, updating a locally stored gateway list of the gateway group, wherein the gateway list comprises a unique identifier of each gateway in the gateway group and an IP address corresponding to each gateway;
sending a communication connection request to the updated gateway based on the updated IP address of the gateway, and updating communication path information corresponding to the first gateway based on a result of the communication connection request, wherein the communication path information corresponding to the first gateway comprises the communication path information between the first gateway and a second gateway;
the first gateway searches communication path information between the first gateway and the second gateway in a transfer table of the first gateway according to the unique identifier of the second gateway, wherein the communication path information between the first gateway and the second gateway comprises a communication path which is established in advance based on a specified communication protocol between the first gateway and the second gateway and communication time consumption corresponding to each communication path, the transfer table of the first gateway comprises the communication path information corresponding to the first gateway and the unique identifier of each gateway, and the first gateway and the second gateway are in the same home environment;
determining a target communication path between the first gateway and the second gateway from the searched communication paths based on communication time consumption;
and executing preset operation.
2. The method of claim 1, wherein the performing the preset operation comprises:
and sending data to the second gateway based on the target communication path.
3. The method according to claim 1, wherein the step of determining the target communication path between the first gateway and the second gateway from the found communication paths based on the communication elapsed time comprises:
and determining a communication path which consumes the least communication time as a target communication path from among communication paths between the first gateway and the second gateway.
4. The method according to claim 3, wherein the step of determining a communication path with least communication time consumption as the target communication path in the communication paths between the first gateway and the second gateway comprises:
judging whether a communication path between the first gateway and the second gateway is to pass through a transit gateway or not;
if the communication path between the first gateway and the second gateway is going to pass through the transit gateway, taking the sum of the communication elapsed time between the first gateway and the transit gateway and the elapsed time between the transit gateway and the second gateway as the communication elapsed time of the communication path between the first gateway and the second gateway;
and determining a communication path which consumes the least communication time as a target communication path from among communication paths between the first gateway and the second gateway.
5. The method according to claim 1, wherein the step of sending a communication connection request to the updated gateway based on the updated IP address of the gateway and updating the communication path information corresponding to the first gateway based on the result of the communication connection request comprises:
sending a communication connection request to the updated gateway based on the IP address of the updated gateway, and starting a timer to start timing;
if the information returned by the updated gateway is received, acquiring the timing length of the timer when the returned information is received, and determining the timing length as the communication time consumed by the first gateway for sending data to the updated gateway;
and updating the communication path information corresponding to the first gateway based on the communication time consumption of the first gateway for sending data to the updated gateway.
6. The method of claim 5, further comprising:
and if the returned information is detected to include the communication path information corresponding to the updated gateway, updating the communication path information of the first gateway based on the updated communication path information corresponding to the gateway.
7. The method according to any one of claims 2-4, further comprising:
if a communication connection request sent by other gateways except the first gateway based on the IP address of the first gateway in the gateway group is received, returning a response message to the other gateways, and starting a timer to start timing;
when receiving the confirmation messages sent by the other gateways, acquiring the timing length of the timer when receiving the confirmation messages sent by the other gateways, and determining the timing length as the communication time consumed by the first gateway for sending data to the other gateways;
and updating the communication path information corresponding to the first gateway based on the communication time consumption of the first gateway for sending data to the other gateways.
8. A method for multi-gateway communication, which is applied to a cloud server, and comprises the following steps:
after detecting that the IP address of the gateway in the gateway group is updated, the cloud server updates the gateway list of the gateway group to obtain an updated gateway list, wherein the updated gateway list comprises the unique identifier of each gateway in the gateway group and the IP address corresponding to each gateway;
sending the updated gateway list to gateways in the gateway group, so that the gateways in the gateway group try to establish communication connection with the gateways in the updated gateway list based on a specified communication protocol to generate communication path information corresponding to each gateway, and update a transfer table of each gateway based on the communication path information corresponding to each gateway, so that a first gateway searches the communication path information between the first gateway and the second gateway in the transfer table of the first gateway according to a unique identifier of the second gateway, determines a target communication path between the first gateway and the second gateway from the found communication paths based on communication time consumption, and performs data transmission based on the target communication path and the second gateway, wherein the transfer table of the first gateway includes the communication path information corresponding to the first gateway and the unique identifier of each gateway, the communication path information corresponding to the first gateway includes the communication path information between the first gateway and the second gateway, the communication path information between the first gateway and the second gateway includes the communication path information corresponding to the first gateway and the second gateway, and the communication path information corresponding to the first gateway is established based on the first communication path information and the second communication path information corresponding to the second gateway, and the communication path information corresponding to the home communication path is established based on the second communication protocol, and the home communication path information corresponding to the first gateway, and the home communication path.
9. A method of multi-gateway communication, the method comprising:
the method comprises the steps that a cloud server pushes a gateway list to all gateways in a gateway group, wherein the gateway list comprises a unique identifier of each gateway in the gateway group and an IP address corresponding to each gateway;
a first gateway in the gateway group receives the gateway list;
if the first gateway detects that the gateway group has an updated gateway based on the gateway list, updating a locally stored gateway list of the gateway group;
the first gateway sends a communication connection request to the updated gateway based on the updated IP address of the gateway, updates communication path information corresponding to the first gateway based on a result of the communication connection request, and updates a forwarding table of the first gateway based on the updated communication path information corresponding to the first gateway, where the forwarding table of the first gateway includes the communication path information corresponding to the first gateway and the unique identifier of each gateway, and the communication path information corresponding to the first gateway includes the communication path information between the first gateway and a second gateway;
if the first gateway receives a communication connection request sent by other gateways except the first gateway in the gateway group, establishing communication connection with the other gateways sending the communication connection request so that the other gateways update communication path information corresponding to the other gateways;
the first gateway searches communication path information between the first gateway and the second gateway from an updated transfer table corresponding to the first gateway according to the unique identifier of the second gateway, and determines a target communication path between the first gateway and the second gateway from the searched communication paths based on communication time consumption, wherein the communication path information between the first gateway and the second gateway comprises communication paths with communication connection pre-established between the first gateway and the second gateway based on a specified communication protocol and communication time consumption corresponding to each communication path, the communication paths are local communication paths corresponding to the first gateway, and the first gateway and the second gateway are in the same home environment;
and the first gateway sends data to the second gateway based on the target communication path.
10. An apparatus for multi-gateway communication, the apparatus comprising:
an information searching unit, configured to search, by a first gateway, communication path information between a first gateway and a second gateway in a relay table of the first gateway according to a unique identifier of the second gateway, where the communication path information between the first gateway and the second gateway includes a communication path between the first gateway and the second gateway, where communication connection is pre-established based on a specified communication protocol, and communication time corresponding to each communication path is consumed, the relay table of the first gateway includes the communication path information corresponding to the first gateway and the unique identifier of each gateway in a gateway group to which the first gateway belongs, the communication path information corresponding to the first gateway includes the communication path information between the first gateway and the second gateway, the first gateway and the second gateway are in the same home environment, and the communication path information corresponding to the first gateway is updated by the first gateway according to the following manner: if the first gateway detects that an updated gateway exists in the gateway group, updating a gateway list of the gateway group stored locally, sending a communication connection request to the updated gateway based on the IP address of the updated gateway, and updating communication path information corresponding to the first gateway based on the result of the communication connection request, wherein the gateway list comprises the unique identifier of each gateway and the IP address corresponding to each gateway;
a path selection unit, configured to determine a target communication path between the first gateway and the second gateway from the found communication paths based on communication time consumption;
and the action execution unit is used for executing preset operation.
11. An apparatus for multi-gateway communication, the apparatus comprising:
the gateway detection unit is used for updating a gateway list of a gateway group to obtain an updated gateway list after detecting that the gateway in the gateway group is updated, wherein the updated gateway list comprises the unique identifier of each gateway in the gateway group and the IP address corresponding to each gateway;
a gateway communication configuration unit, configured to send the updated gateway list to gateways in the gateway group, so that the gateways in the gateway group attempt to establish communication connection with the gateways in the updated gateway list based on a specified communication protocol to generate communication path information corresponding to each gateway, update a transfer table of each gateway based on the communication path information corresponding to each gateway, so that a first gateway searches, according to a unique identifier of a second gateway, communication path information between the first gateway and the second gateway in the transfer table of the first gateway, determine, based on communication time consumption, a target communication path between the first gateway and the second gateway from the found communication paths, and perform data transmission based on the target communication path and the second gateway, where the transfer table of the first gateway includes the communication path information corresponding to the first gateway and the unique identifier of each gateway, the communication path corresponding to the first gateway includes the communication path information between the first gateway and the second gateway, the communication path information between the first gateway and the second gateway includes the communication path information corresponding to the second communication path between the first gateway and the second gateway, and the communication path corresponding to the second gateway is established based on the communication path information corresponding to the home environment, and the communication path information corresponding to the second gateway, and the second gateway, where the communication path information corresponding to the first gateway is established based on the communication path, and the communication time consumption, and the communication path is the second communication path, and the home environment, where the communication path, and the communication path information corresponding to the second gateway, and the home environment.
12. A system for multi-gateway communication, the system comprising a first gateway, a cloud server and a second gateway,
the cloud server is used for pushing a gateway list to all gateways in a gateway group, wherein the gateway list comprises a unique identifier of each gateway in the gateway group and an IP address corresponding to each gateway;
the first gateway is used for detecting whether the updated gateway exists in the gateway group or not based on the gateway list; if the updated gateway is detected to exist in the gateway group, updating a locally stored gateway list of the gateway group;
the first gateway is configured to send a communication connection request to the updated gateway based on the updated IP address of the gateway, update communication path information corresponding to the first gateway based on a result of the communication connection request, and update a forwarding table of the first gateway based on the updated communication path information corresponding to the first gateway, where the forwarding table of the first gateway includes the communication path information corresponding to the first gateway and the unique identifier of each gateway, and the communication path information corresponding to the first gateway includes the communication path information between the first gateway and the second gateway;
the first gateway is further configured to establish a communication connection with the other gateways that send the communication connection request if receiving the communication connection request sent by the other gateways except the first gateway in the gateway group, so that the other gateways update the communication path information corresponding to the other gateways;
the first gateway is further configured to search, according to the unique identifier of the second gateway, communication path information between the first gateway and the second gateway from an updated transfer table corresponding to the first gateway, and determine a target communication path between the first gateway and the second gateway from the searched communication paths based on communication time consumption, where the communication path information between the first gateway and the second gateway includes a communication path between the first gateway and the second gateway, where the communication path is a local communication path corresponding to the first gateway, and the first gateway and the second gateway are in the same home environment, where the communication path information includes a communication path in which communication connection is pre-established based on a specified communication protocol, and communication time consumption corresponding to each communication path;
and the second gateway is used for receiving the data sent by the first gateway based on the target communication path.
13. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of multi-gateway communication according to any of claims 1 to 7.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of multi-gateway communication according to any one of claims 1 to 7.
CN201910990092.5A 2019-10-17 2019-10-17 Multi-gateway communication method, device and system and electronic equipment Active CN110868348B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910990092.5A CN110868348B (en) 2019-10-17 2019-10-17 Multi-gateway communication method, device and system and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910990092.5A CN110868348B (en) 2019-10-17 2019-10-17 Multi-gateway communication method, device and system and electronic equipment

Publications (2)

Publication Number Publication Date
CN110868348A CN110868348A (en) 2020-03-06
CN110868348B true CN110868348B (en) 2022-11-15

Family

ID=69652844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910990092.5A Active CN110868348B (en) 2019-10-17 2019-10-17 Multi-gateway communication method, device and system and electronic equipment

Country Status (1)

Country Link
CN (1) CN110868348B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111865736B (en) * 2020-07-17 2022-08-05 青岛易来智能科技股份有限公司 Equipment control method and device
CN112367309B (en) * 2020-10-27 2023-05-09 Oppo广东移动通信有限公司 Streaming media gateway dynamic networking method, device, system, terminal equipment and medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631073A (en) * 2009-07-28 2010-01-20 北京交通大学 Multi-path building method of external gateway protocol (EGP) and transmitting method thereof
CN110099078A (en) * 2018-01-29 2019-08-06 阿里巴巴集团控股有限公司 Communication between devices, message synchronization method, apparatus, equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101193053B (en) * 2006-11-23 2011-04-20 中兴通讯股份有限公司 A multi-gateway route selection method based on central management
CN101193335A (en) * 2006-11-23 2008-06-04 中兴通讯股份有限公司 System and method for selecting route under multi-gateway model of core network
CN101272287B (en) * 2008-04-17 2012-10-17 华为技术有限公司 Method, device and system for monitoring service quality of user service
CN108933733A (en) * 2018-07-10 2018-12-04 中国联合网络通信集团有限公司 Determination method, apparatus, equipment and the readable storage medium storing program for executing of communication path between gateway

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101631073A (en) * 2009-07-28 2010-01-20 北京交通大学 Multi-path building method of external gateway protocol (EGP) and transmitting method thereof
CN110099078A (en) * 2018-01-29 2019-08-06 阿里巴巴集团控股有限公司 Communication between devices, message synchronization method, apparatus, equipment and storage medium

Also Published As

Publication number Publication date
CN110868348A (en) 2020-03-06

Similar Documents

Publication Publication Date Title
Chakraborty et al. GSD: A novel group-based service discovery protocol for MANETS
US7116643B2 (en) Method and system for data in a collection and route discovery communication network
KR20070081733A (en) Apparatus for setting multipath and method thereof
JPH10501935A (en) Method and system for routing packets in a packet communication network using a locally configured routing table
Kasera et al. A location management protocol for hierarchically organized multihop mobile wireless networks
CN110868348B (en) Multi-gateway communication method, device and system and electronic equipment
CN103491590B (en) A kind of implementation method of wireless sensor network route of future generation
US8959193B2 (en) Group management device
CN108989220B (en) Routing method and routing system
CN103763750A (en) Method for fast achieving packet forwarding in wireless ad hoc network of TDMA protocol
CN102143164B (en) Message relaying method, message relaying device and base station
WO2015079284A1 (en) Methods and systems for processing internet protocol packets
CN103731820A (en) Method for access control based on MAC address conversion in IPv6 wireless router
CN103209207B (en) A kind of ordinary node of peer-to-peer network system is found and maintenance of neighbor nodal method
CN102891902B (en) Media access control address updating method and network equipment
CN113055297B (en) Network topology discovery method and device
CN107404438A (en) Network route method and network route system
CN101626341B (en) Method and device for synchronizing information under link-state protocol
CN111526512A (en) Gateway bridging method, device, equipment and medium based on Wi-Fi data packet
CN103139076A (en) Distributive hash table intercommunicative network system, inter-domain nodes and implement method
CN107592261A (en) Message processing method, device and router
Alnajjar et al. Performance analysis of routing protocols in delay/disruption tolerant mobile ad hoc networks
CN101330447A (en) Method for detecting next-hop MAC address
Cisco ISO CLNS Commands
Cisco ISO CLNS Commands

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant