WO2024067255A1 - 数据传输系统、数据传输方法以及联网设备 - Google Patents

数据传输系统、数据传输方法以及联网设备 Download PDF

Info

Publication number
WO2024067255A1
WO2024067255A1 PCT/CN2023/119760 CN2023119760W WO2024067255A1 WO 2024067255 A1 WO2024067255 A1 WO 2024067255A1 CN 2023119760 W CN2023119760 W CN 2023119760W WO 2024067255 A1 WO2024067255 A1 WO 2024067255A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
address
gateway
destination
control device
Prior art date
Application number
PCT/CN2023/119760
Other languages
English (en)
French (fr)
Inventor
魏昌辉
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024067255A1 publication Critical patent/WO2024067255A1/zh

Links

Classifications

    • 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/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • 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

Definitions

  • the embodiments of the present application relate to the field of communication technology, and in particular, to a data transmission system, a data transmission method, and a networking device.
  • the central control screen is equipped with a screen that can provide users with touch screen interaction and voice interaction. Users can control the devices in the home through the central control screen.
  • the embodiments of the present application provide a data transmission system, a data transmission method and a networking device, which can access different networks and control devices in different networks.
  • an embodiment of the present application provides a data transmission system, which includes: a control device and a networking device, wherein the networking device accesses a first network through a first gateway, and the networking device accesses a second network through a second gateway, and the control device is bridged to the first gateway through the networking device, and the first network and the second network are different.
  • the control device is used to send the first data to the networking device.
  • the networking device is used to send the first data to the first gateway in response to the destination Internet Protocol IP address of the first data not being the IP address of the second gateway and the destination Media Access Control MAC address of the first data not being the MAC address of the networking device.
  • the networking device can determine that the destination end of the first data is not the second gateway but the first gateway bridged with the control device based on the fact that the destination IP address of the first data is not the IP address of the second gateway, and because the destination MAC address of the first data is not the MAC address of the networking device, the networking device can send the first data to the first gateway so that the first gateway can receive the first data.
  • the control device is further used to send the second data to the networked device.
  • the networked device is further used to send the second data to the second gateway in response to the destination IP address of the second data being the IP address of the second gateway.
  • the destination MAC address of the second data sent by the control device is the MAC address of the first gateway.
  • the control device sends the second data to the networked device the networked device will mistakenly send the second data to the first gateway based on the destination MAC address of the second data.
  • the destination IP address of the second data is used to indicate the destination end of the second data. Therefore, the networked device can send data to the second gateway based on the destination IP address of the second data.
  • the networked device can send the first data from the control device to the first gateway, and send the second data from the control device to the second gateway.
  • the control device can send data to gateways in two different networks, thereby enabling the control device to access different networks and control devices in different networks.
  • the networking device is specifically configured to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway, and the networking device is configured to send the second data to the second gateway according to the destination IP address of the second data in response to the destination MAC address of the second data being the MAC address of the networking device.
  • the destination MAC address of the second data sent by the control device is the MAC address of the first gateway.
  • the control device sends the second data to the networked device
  • the networked device will mistakenly send the second data to the first gateway based on the destination MAC address of the second data. Therefore, the networked device can use the destination MAC address of the second data as the MAC address of the networked device, so that the networked device can further process the second data.
  • the networked device responds that the destination MAC address of the second data is the MAC address of the networked device, because the destination IP address of the second data is the IP address of the second gateway.
  • the networked device can determine that the destination end of the second data is the second gateway. Therefore, the networked device can send data to the second gateway based on the destination IP address of the second data, and can avoid sending the second data to the first gateway by mistake.
  • the networking device includes: a processing module of a data link layer, a bridge of a data link layer, and a routing and forwarding module of a network layer, wherein the control device is bridged to the first gateway via the bridge.
  • the processing module is used to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway, and send the modified second data to the bridge.
  • the bridge is used to send the second data to the routing and forwarding module in response to the destination MAC address of the second data being the MAC address of the networking device, and the routing and forwarding module is used to send the second data to the second gateway according to the destination IP address of the second data.
  • the module of the data link layer only parses the packet header of the data link layer of the data packet carrying the second data to obtain the destination MAC address of the second data.
  • the processing module of the data link layer can parse the packet header of the network layer of the data packet carrying the second data to obtain the destination IP address of the second data.
  • the processing module of the data link layer can modify the destination MAC address of the second data to the MAC address of the networked device in response to the destination IP address of the second data being the IP address of the second gateway, so that the bridge can route the second data to the second gateway through the routing forwarding module, thereby avoiding the second data from being mistakenly sent to the first gateway.
  • the data link layer bridge can parse the data link layer header of the data packet carrying the second data to obtain the destination MAC address of the second data.
  • the bridge can determine that the destination of the second data is the networked device, and further send it to the routing and forwarding module for processing.
  • the routing and forwarding module of the network layer can parse the network layer header of the data packet carrying the second data to obtain that the destination IP address of the second data is the IP address of the second gateway.
  • the routing and forwarding module can determine that the destination of the second data is the second gateway, and therefore can send the second data to the second gateway according to the IP address of the second gateway.
  • the networking device includes: a processing module of a data link layer, a bridge of a data link layer, and a routing and forwarding module of a network layer, wherein the control device is bridged to the first gateway via the bridge.
  • the processing module is used to send the first data to the bridge in response to the destination IP address of the first data not being the IP address of the second gateway; the bridge is used to send the first data to the first gateway in response to the destination MAC address of the first data not being the MAC address of the networking device.
  • the processing module of the data link layer can parse the packet header of the network layer of the data packet carrying the first data to obtain the destination IP address of the first data, so that the processing module of the data link layer can respond to the fact that the destination IP address of the second data is not the IP address of the second gateway, and can determine that the destination end of the second data is not the second gateway, and thus can send the first data to the first gateway through the bridge.
  • the bridge can parse the packet header of the data link layer of the data packet carrying the second data to obtain the destination MAC address of the second data, and the bridge can respond to the fact that the destination MAC address of the second data is not the MAC address of the networked device, and can determine that the destination end of the second data is not the networked device, and further can send the first data to the first gateway.
  • the networking device can send the first data to the first gateway and the second data to the second gateway based on the processing module of the data link layer, the bridge of the data link layer, and the routing and forwarding module of the network layer, thereby achieving the purpose of controlling the device to access different networks.
  • the control device is specifically used to send the first data to the networked device in response to a first operation of the user, where the first operation is the user's operation of a first application of the control device, and the first application is used to control the device in the first network.
  • the control device may be installed with a first application, and the user's operation of the first application may trigger the control device to send the first data.
  • the first data may be a control signaling or a query request, which is not limited in this application.
  • control device is specifically used to send the first data to the networked device in response to receiving a trigger event from the networked device, and the trigger event is used to trigger the control device to control the device in the first network.
  • the networked device can send a trigger event to the control device, and the trigger event is used to trigger the control device to send the first data.
  • a sensor may collect data, and when the data meets a trigger condition, the sensor may send a trigger event to a networked device, and the networked device may control the device to send the trigger event.
  • the networked device may receive data collected from a sensor, and when the data meets a trigger condition, the trigger event may be sent to the control device.
  • the trigger condition may be understood as a condition that triggers the sending of a trigger event.
  • control device is specifically configured to periodically send the first data to the networked device.
  • the first data may be periodically sent to the networked device, and the first data is used to query the information of the device in the first network so as to determine the device status in time.
  • the control device may send the first data in any one of the methods “one” to “three”.
  • control device is specifically used to send the second data to the networked device in response to a second operation of the user, where the second operation is the user's operation of a second application of the control device, and the second application is used to control the device in the second network.
  • the control device may be installed with a second application, and the user's operation of the second application may trigger the control device to send the second data.
  • the second data may be a control signaling or a query request, which is not limited in this application.
  • control device is specifically used to periodically send the second data to the networked device.
  • control device can periodically send the second data to the networked device, and the second data is used to query the information of the device in the second network so as to determine the device status in time.
  • control device can send the second data in the method of "the fourth" or "the fifth".
  • control device can send the first data and the second data to the networked device in a variety of scenarios.
  • the data transmission method provided by the present application has a wide range of applications and many applicable scenarios.
  • control device is also used to send a first IP address and port information to the networked device, where the first IP address is an IP address in the first network allocated by the first gateway to the control device, and the port information is used to indicate: a port in the control device used to transmit data between the control device and the second gateway.
  • the control device when the control device is bridged to the first gateway through the networking device, the control device is further used to send a first IP address request to the networking device, and the first IP address request is used to request the first gateway to allocate an IP address in the first network to the control device.
  • the networking device is also used to send the first IP address request to the first gateway; receive the first IP address from the first gateway: send the first IP address to the control device. After obtaining the first IP address, the control device can send the first IP address and port information to the networking device.
  • the networking device is also used to configure data transmission rules based on the first IP address and the port information, and the data transmission rules are used to indicate: modify the destination IP address of the target data to the first IP address to transmit the target data to the control device, and the destination port of the target data is the port.
  • the networked device can pre-configure data transmission rules to facilitate accurate transmission of data from the second gateway to the control device, thereby achieving data interaction between the control device and the second gateway.
  • control device includes a second application, and the second application is used to configure the port.
  • the second application is used to control the device in the second network, and the second application can configure the port, which can not only realize the data transmission between the control device and the second gateway, but also the port configuration method is easy to implement.
  • the networking device is also used to receive third data from the second gateway.
  • the networking device can use the third data as the target data, and according to the data transmission rule, modify the destination IP address of the third data to the first IP address.
  • the networking device sends the third data to the control device according to the first IP address.
  • the destination IP address of the third data is the second IP address.
  • the second IP address can be an IP address in the second network assigned by the second gateway to the networking device.
  • the networked device can modify the destination IP address of the third data to the first IP address in response to the destination port of the third data being the port according to the configuration data transmission rule, so as to ensure that the third data can be transmitted to the control device.
  • the networked device modifies the destination IP address of the third data to the first IP address for the following purpose: after the networked device sends the third data to the control device, the control device parses and obtains that the destination IP address of the third data is the IP address of the control device, and determines that the third data is sent to itself, so that the processing can be carried out smoothly, avoiding the control device from discarding the third data.
  • the method for the networked device to obtain the second IP address is introduced.
  • the networked device is also used to obtain the second IP address of the networked device in the second network.
  • the IP address of the networked device in the second network can be obtained by manual static configuration or dynamic request of the networked device.
  • the control device is further configured to send the second IP address to the networked device in response to inputting the second IP address on the control device.
  • the networked device is specifically configured to receive the second IP address from the control device, where the second IP address is configured for the networked device on the control device.
  • the networked device is specifically used to send a second IP address request to the second gateway, where the second IP address request is used to request the second gateway to allocate an IP address in the second network to the networked device; and receive the second IP address from the second gateway.
  • the networking device is further configured to receive fourth data from the first gateway. In response to the destination MAC address of the fourth data not being the MAC address of the networking device, the networking device sends the fourth data to the control device.
  • the destination MAC address of the fourth data sent by the first gateway is the MAC address of the control device.
  • the networking device receives the fourth data, and in response to the destination MAC address of the fourth data not being the MAC address of the networking device, the fourth data is sent to the control device. In this way, the networking device can transmit the data from the first gateway to the control device.
  • the networked device can not only send the first data from the control device to the first gateway and the second data from the control device to the second gateway, but also send the data from the first gateway to the control device and send the data from the second gateway to the control device.
  • This enables the control device to interact with gateways in different networks, access different networks, and control devices in different networks.
  • the networking device includes: a LAN port, a first WAN port, and a second WAN port; the control device is bridged to the first gateway through the LAN port and the first WAN port, the networking device is connected to the first gateway through the first WAN port, and the networking device is connected to the second gateway through the second WAN port.
  • the control device is specifically used to send the first data to the networking device through the LAN port; the networking device is specifically used to send the first data to the first gateway through the first WAN port in response to the destination IP address of the first data not being the IP address of the second gateway and the destination MAC address of the first data not being the MAC address of the networking device; the control device is specifically used to send the second data to the networking device through the LAN port.
  • the networking device is specifically used to send the second data to the second gateway through the second WAN port in response to the destination IP address of the second data being the IP address of the second gateway.
  • the networking device is specifically used to receive the third data from the second gateway through the second WAN port.
  • the networking device can modify the destination IP address of the third data to the first IP address according to the data transmission rules and send the third data to the control device.
  • the networking device is specifically used to receive fourth data from the first gateway through the first WAN port, and the networking device sends the fourth data to the control device in response to the destination MAC address of the fourth data not being the MAC address of the networking device.
  • the networking device includes: a processing module of the data link layer, a bridge of the data link layer, and a routing and forwarding module of the network layer.
  • the control device is bridged to the first gateway via the bridge.
  • the networked device is specifically configured to receive the first data from the control device through a LAN port.
  • the processing module is configured to send the first data to the network bridge in response to the destination IP address of the first data not being the IP address of the second gateway.
  • the network bridge is configured to send the first data to the first gateway through the first WAN port in response to the destination MAC address of the first data not being the MAC address of the networked device.
  • the networking device is specifically configured to receive the second data from the control device through a LAN port.
  • the processing module is configured to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway, and send the modified second data to the bridge.
  • the bridge is configured to send the second data to the routing and forwarding module in response to the destination MAC address of the second data being the MAC address of the networking device.
  • the routing and forwarding module is configured to send the second data to the second gateway through the second WAN port according to the destination IP address of the second data.
  • the networked device receives the third data from the second gateway through the second WAN port.
  • the routing forwarding module is configured to modify the destination IP address of the third data to the IP address of the control device in response to the destination port of the third data being the port, and send the third data to the bridge.
  • the bridge sends the third data to the control device through the LAN port.
  • the networked device receives the fourth data from the first gateway through the first WAN port.
  • the network bridge is configured to send the fourth data to the control device through the LAN port in response to the destination MAC address of the fourth data not being the MAC address of the networked device.
  • control device can access different networks, and then control the devices in different networks.
  • the present application provides a data transmission method, which is applied to a networked device, wherein the networked device accesses a first network through a first gateway, the networked device accesses a second network through a second gateway, a control device is bridged to the first gateway through the networked device, and the first network and the second network are different.
  • the networked device receives first data from the control device; in response to the destination Internet Protocol IP address of the first data not being the IP address of the second gateway, and the destination Media Access Control MAC address of the first data not being the MAC address of the networked device, the networked device sends the first data to the first gateway; receives second data from the control device; in response to the destination IP address of the second data being the IP address of the second gateway, the networked device sends the second data to the second gateway.
  • sending the second data to the second gateway includes: in response to the destination IP address of the second data being the IP address of the second gateway, modifying the destination MAC address of the second data to the MAC address of the networked device; in response to the destination MAC address of the second data being the MAC address of the networked device, sending the second data to the second gateway according to the destination IP address of the second data.
  • the method further includes: receiving a first IP address and port information from the control device, the first IP address being an IP address in the first network assigned by the first gateway to the control device, and the port information being used to indicate: a port in the control device used to transmit data between the control device and the second gateway; configuring data transmission rules based on the first IP address and the port information, the data transmission rules being used to indicate: modifying the destination IP address of the target data to the first IP address so as to transmit the target data to the control device, and the destination port of the target data being the port.
  • the method also includes: receiving third data from the second gateway; in response to the destination port of the third data being the port, modifying the destination IP address of the third data to the first IP address according to the data transmission rule; and sending the third data to the control device according to the first IP address.
  • the destination IP address of the third data is a second IP address
  • the second IP address is an IP address in the second network allocated by the second gateway to the networked device.
  • the port is configured by a second application in the control device, and the second application is used to control a device in the second network.
  • the method further includes: receiving fourth data from the first gateway; and sending the fourth data to the control device in response to a destination MAC address of the fourth data not being a MAC address of the networked device.
  • the networking device includes: a LAN port, a first WAN port, and a second WAN port; the control device is bridged to the first gateway through the LAN port and the first WAN port, the networking device is connected to the first gateway through the first WAN port, and the networking device is connected to the second gateway through the second WAN port.
  • the receiving the first data from the control device includes: receiving the first data from the control device through the LAN port.
  • the sending of the first data to the first gateway in response to the destination Internet Protocol IP address of the first data not being the IP address of the second gateway and the destination Media Access Control MAC address of the first data not being the MAC address of the networked device comprises: sending the first data to the first gateway through the first WAN port in response to the destination IP address of the first data not being the IP address of the second gateway and the destination MAC address of the first data not being the MAC address of the networked device.
  • the receiving the second data from the control device includes: receiving the second data from the control device through the LAN port.
  • sending the second data to the second gateway includes: in response to the destination IP address of the second data being the IP address of the second gateway, sending the second data to the second gateway through the second WAN port.
  • the networking device further includes: a processing module of a data link layer, a bridge of a data link layer, and a routing and forwarding module of a network layer, wherein the control device is bridged to the first gateway via the bridge.
  • the processing module is used to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway, and send the modified second data to the bridge; the bridge is used to send the second data to the routing forwarding module in response to the destination MAC address of the second data being the MAC address of the networking device; the routing forwarding module is used to send the second data to the second gateway according to the destination IP address of the second data.
  • the second data is used to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway, and send the modified second data to the bridge; the bridge is used to send the second data to the routing forwarding module in response to the destination MAC address of the second data being the MAC address of the networking device; the routing forwarding module is used to send the second data to the second gateway according to the destination IP address of the second data.
  • the second data is used to modify the destination MAC address
  • the processing module is configured to send the first data to the network bridge in response to the destination IP address of the first data not being the IP address of the second gateway.
  • the network bridge is configured to send the first data to the first gateway in response to the destination MAC address of the first data not being the MAC address of the networked device.
  • the networking device is specifically used to receive the first data from the control device through the LAN port; the processing module is used to send the first data to the bridge in response to the destination IP address of the first data not being the IP address of the second gateway; the bridge is used to send the first data to the first gateway through the first WAN port in response to the destination MAC address of the first data not being the MAC address of the networking device.
  • the networking device is specifically used to receive the second data from the control device through the LAN port; the processing module is used to modify the destination MAC address of the second data to the MAC address of the networking device in response to the destination IP address of the second data being the IP address of the second gateway; and send the modified second data to the bridge; the bridge is used to send the second data to the routing and forwarding module in response to the destination MAC address of the second data being the MAC address of the networking device; the routing and forwarding module is used to send the second data to the second gateway through the second WAN port according to the destination IP address of the second data.
  • the networked device receives third data from the second gateway through the second WAN port; the routing forwarding module is used to modify the destination IP address of the third data to the IP address of the control device in response to the destination port of the third data being the port; and send the third data to the bridge; and the bridge sends the third data to the control device.
  • the networked device receives fourth data from the first gateway through the first WAN port; the bridge is used to send the fourth data to the control device in response to the destination MAC address of the fourth data not being the MAC address of the networked device.
  • an embodiment of the present application provides a networking device, which may include: a processor and a memory.
  • the memory is used to store computer executable program code, and the program code includes instructions; when the processor executes the instructions, the instructions cause the networking device to execute the method in the first aspect.
  • an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method in the first aspect.
  • an embodiment of the present application provides a computer-readable storage medium, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes the method in the first aspect above.
  • the present application provides a data transmission system, a data transmission method and a networking device.
  • a control device is bridged to a first gateway through the networking device.
  • the networking device accesses different networks through different gateways.
  • the control device sends first data to the first gateway
  • the networking device can respond to the fact that the destination IP address of the first data is not the IP address of the second gateway and the destination MAC address of the first data is not the MAC address of the networking device, so as to send the first data to the first gateway.
  • the networking device can respond to the fact that the destination IP address of the second data is the IP address of the second gateway, so as to send the second data to the second gateway.
  • the control device can access different networks, so as to achieve the purpose that the control device can control devices in different networks.
  • FIG1 is a schematic diagram of a network architecture provided in an embodiment of the present application.
  • FIG2 is a schematic diagram of an interface of a central control screen
  • FIG3 is a schematic diagram of another network architecture provided in an embodiment of the present application.
  • FIG4 is a schematic diagram showing a connection between devices in a home network and a community network
  • FIG5 is a schematic diagram of a central control screen accessing different networks provided by an embodiment of the present application.
  • FIG6 is a schematic diagram of a network architecture applicable to the data transmission method provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of an interface of a control device provided in an embodiment of the present application.
  • FIG8 is a flow chart of an embodiment of a data transmission method provided in an embodiment of the present application.
  • FIG9A is a flow chart of another embodiment of a data transmission method provided in an embodiment of the present application.
  • FIG9B is a flow chart of another embodiment of a data transmission method provided in an embodiment of the present application.
  • FIG10A is another schematic diagram of data transmission provided in an embodiment of the present application.
  • FIG10B is another schematic diagram of a data transmission method provided in an embodiment of the present application.
  • FIG10C is another schematic diagram of a data transmission method provided in an embodiment of the present application.
  • FIG11 is a flow chart of another embodiment of a data transmission method provided in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
  • FIG1 is a schematic diagram of a network architecture provided in an embodiment of the present application.
  • FIG1 takes a home environment as an example.
  • the network architecture includes: a central control screen 11, a smart host 12, a home gateway 13, and a smart device 14.
  • the home gateway 13 may be a switch, a router, etc., which is not limited in the embodiment of the present application.
  • FIG1 takes the home gateway 13 as a router for illustration.
  • the smart host 12 and the home gateway 13 can be connected by wire or wirelessly.
  • the smart host 12 can be connected by wire with the home gateway 13 via a network cable.
  • the central control screen 11 can be connected to the smart host 12 by wire. In one example, the central control screen 11 can be connected to the home gateway 13 wirelessly, such as the central control screen 11 can wirelessly access the home gateway 13. In this example, the network architecture shown in FIG. 1 may not include the smart host 12.
  • the central control screen 11 can access the home network through the home gateway 13
  • the central control screen 11 can also perform operations such as system upgrade, application download, and application upgrade in the central control screen 11.
  • the central control screen 11 can be detachably set on the smart host 12, or the central control screen 11 and the smart host 12 can be set separately.
  • the embodiment of the present application does not limit the setting method of the central control screen 11 and the smart host 12.
  • the central control screen 11 is used to provide an interface for interaction with the user.
  • the user can control the smart device 14 connected to the home gateway 13 through the central control screen 11.
  • the user can turn on the speaker, close the curtains, turn on the lights, etc. through the central control screen 11.
  • FIG2 is a schematic diagram of an interface of the central control screen.
  • the user can click on the music play control 21 on the interface of the central control screen 11.
  • the central control screen 11 can send an audio play instruction to the smart host 12 in response to the user clicking on the music play control 21.
  • the smart host 12 can send an audio play instruction to the home gateway 13, and the home gateway 13 can send an audio play instruction to the speaker in response to the audio play instruction.
  • the speaker can play audio in response to the audio play instruction.
  • the user can also interact with the central control screen 11 by voice to control the smart device 14.
  • the embodiment of the present application does not limit the interaction method between the user and the central control screen 11.
  • the user can also set the operation of the smart device 14 in various scene modes through the central control screen 11.
  • the scene modes may include but are not limited to: entering the living room mode, leaving the living room mode, watching the movie mode, relaxing mode, and focusing mode.
  • the central control screen 11 can control the lights to turn off and turn on the humidifier through the smart host 12 and the home gateway 13 to build a movie watching environment for the user.
  • the operation of the smart device 14 in various scene modes can also be pre-set by the central control screen 11, which is not described in detail in the embodiment of the present application.
  • the smart host 12 is used to transmit data from the central control screen 11 to the home gateway 13, and transmit data from the home gateway 13 to the central control screen 11.
  • the data from the central control screen 11 and the data from the home gateway 13 may include but are not limited to: signaling data and service data.
  • the signaling data from the central control screen 11 may include audio playback instructions, instructions for turning on lights, etc.
  • the service data from the central control screen 11 may include service data packets.
  • the smart device 14 can wirelessly access the home gateway 13.
  • the smart device 14 and the central control screen 11 are both in the home network, and the interaction between the central control screen 11 and the smart device 14 can be realized.
  • the smart devices 14 in different environments are different.
  • the smart devices 14 in the home environment may include but are not limited to: TV, speakers, smart screens, air conditioners, lights, and curtains.
  • FIG1 is illustrated by taking the smart devices including speakers and lights as an example.
  • the smart devices 14 in the factory environment may include but are not limited to: mechanical arms and robots.
  • the central control screen 11 can also be bound to the user's electronic device, and the user can operate the central control screen 11 on the electronic device to achieve the purpose of controlling the smart device 14 on the electronic device.
  • the electronic device can be a mobile phone, a portable android device (PAD), a personal digital assistant (PDA), a handheld device with wireless communication function, a computing device, or a wearable device, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, etc.
  • the form of the electronic device is not specifically limited in the embodiment of the present application.
  • the user can control the smart device 14 in the same network as the central control screen 11 through the central control screen 11.
  • the community network and the home network are different networks.
  • the central control screen 11 When the central control screen 11 is connected to the home network, it cannot be connected to the community network, so the user cannot control the smart access control, elevator and other equipment through the central control screen 11.
  • the central control screen 11 when a friend calls to open the door through the building access control, the central control screen 11 cannot control the device in a different network from the central control screen 11, so the user cannot conveniently control the door to open through the central control screen 11.
  • the central control screen 11 can only access one network and cannot access multiple networks at the same time, so the user cannot control the smart devices in multiple networks through one central control screen 11.
  • the first and second floors of the home use network 1, and the third and fourth floors use network 2.
  • the central control screen 11 accesses network 1 through the smart host 12 and the home gateway 13, the user can control the smart devices in network 1 through the central control screen 11, but cannot control the smart devices in network 2.
  • a central control screen 11 by adding a central control screen 11, the user can use another central control screen to control the smart device in the network 2, but this undoubtedly increases the user cost, and the user needs to use two central control screens 11 to control the smart device, which is inconvenient. Therefore, a method is urgently needed for a central control screen to access different networks so that the central control screen can control smart devices in different networks.
  • the network architecture of the community network can be shown in FIG3.
  • the network architecture of the community network can include: a central control screen 31, a community gateway 32, and a smart device 33 in the community network.
  • the community gateway 32 can include, but is not limited to: a switch or a router.
  • FIG3 takes the community gateway 32 as an example for explanation.
  • the central control screen 31 can be wirelessly connected or wired to the community gateway 32, and the community gateway 32 can be wirelessly connected to the smart device 33.
  • the central control screen 31 can access the community network through the community gateway 32.
  • the user can control the smart devices 33 in the community network through the central control screen 31.
  • the smart devices 33 may include but are not limited to: access control, elevator.
  • the user can operate the interface of the central control screen 31 to open the access control of the building.
  • the network architecture of the community network may include: a management center 34.
  • the community gateway 32 and the management center 34 may be connected by wire or wirelessly.
  • the staff may manage the center 34 to supervise the operation of the devices connected to the community network, such as the central control screen 31, the community gateway 32, and the access control, elevator, etc.
  • the community gateway 32 can be connected to the smart host 12. Referring to FIG4, although the community gateway 32 and the smart host 12 are physically connected, because the current central control screen is bridged to the home gateway through the smart host, and because the home network and the community network are different networks, the current central control screen can only access one network and cannot access the home network and the community network at the same time, so the central control screen cannot control the devices in the home network and the community network. It should be understood that FIG4 shows the home gateway and the community gateway, and does not show the devices in the home network and the devices in the community network.
  • the central control screen can access two different networks
  • the central control screen can access the home network and the community network.
  • two virtual local area network (VLAN) identifiers can be configured in the central control screen and the smart host 12 to distinguish data from different networks, and a transmission path for transmitting data from different networks can be configured in the smart host 12.
  • VLAN virtual local area network
  • the data transmission path may include: a first data transmission path and a second data transmission path, the first data transmission path is used to transmit data in a home network, and the second data transmission path is used to transmit data in a community network.
  • the first data transmission path includes: a VLAN1 module, a bridge 1, and a wide area network (WAN) 1 module.
  • the second data transmission path includes: a VLAN2 module, a bridge 2, and a WAN2 module.
  • the identification VLAN1 can be configured in the central control screen and the smart host 12 for transmitting data in the home network
  • the identification VLAN2 can be configured for transmitting data in the community network.
  • the central control screen sends data in the home network (such as audio playback instructions)
  • it can carry the identification VLAN1 to indicate that the data is data in the home network.
  • the smart host 12 receives data carrying the identification VLAN1, it can use the first data transmission path to transmit data to the home gateway 13, so that the central control screen can control the devices in the home network.
  • the central control screen when the central control screen sends data in the community network (such as an instruction to open the door), it can carry the identifier VLAN2 to indicate that the data is data in the community network.
  • the smart host 12 when the smart host 12 receives data carrying the identifier VLAN2, it can use the second data transmission path to transmit the data to the community gateway 32, so that the central control screen can control the devices in the community network.
  • the central control screen can access the home network and the community network, the central control screen needs to support dual uplink dialing, but the current central control screens do not support dual uplink dialing, and the scope of application of this method is small.
  • two VLAN identifiers need to be configured in the central control screen and the smart host 12, which is complex to configure, and the central control screen needs to perceive the service, that is, the central control screen needs to decide the identifier to carry according to the data in different networks, and the implementation logic is complex.
  • an embodiment of the present application provides a data transmission method, in which the relevant configuration of data transmission is only performed on the smart host, and the smart host decides the data transmission channel.
  • the central control screen does not need to support dual uplink dialing, and the central control screen does not need to perceive the service, so that the central control screen can access different networks.
  • the data transmission method provided in the embodiment of the present application can be applied not only to home environments, but also to scenes such as factories, hospitals, and schools, and the embodiment of the present application does not limit this.
  • two networks are used as an example for explanation.
  • the data transmission method provided in the embodiment of the present application can also be applied to scenes where the central control screen accesses three networks or even more networks.
  • multiple networks including a first network and a second network are taken as an example to illustrate the process in which the central control screen can access the first network and the second network.
  • the first network and the second network are different, and the first network and the second network are different can be understood as: the network segment where the first network is located is different from the network segment where the second network is located.
  • FIG6 is a schematic diagram of a network architecture applicable to the data transmission method provided in an embodiment of the present application.
  • the network architecture may include: a control device, a networking device, a first gateway, and a second gateway.
  • the networking device accesses the first network through the first gateway, the networking device accesses the second network through the second gateway, and the control device is bridged to the first gateway through the networking device.
  • the control device is bridged to the first gateway through the networking device, which can be understood as: the control device and the first gateway establish a data link layer connection through the networking device.
  • the networking device can build a path connecting the control device and the first gateway at the data link layer, and the path is used to transmit data between the control device and the first gateway.
  • the control device is bridged to the first gateway through the networking device, which can be regarded as a direct connection between the control device and the first gateway.
  • the data link layer can be called a media access control (MAC) layer.
  • control device may be a device including a display screen, such as a central control screen, a smart screen, a tablet computer, etc.
  • the networked device may be regarded as a device that assists the control device in connecting to the first gateway so that the control device can control the devices in the first network.
  • the networked device may be a smart host, a computer, etc. It should be understood that FIG6 takes the central control screen as an example of the control device.
  • the first network and the second network are different.
  • the first gateway may be a home router, the first network is a home network, the second gateway may be a community router, and the second network is a community network.
  • the first gateway may be a home router 1, the first network is a home network 1, the second gateway may be a home router 2, and the second network is a home network 2.
  • the networking device may include: a LAN port, a first WAN port, and a second WAN port.
  • the LAN port is used to connect the control device and the networking device.
  • the first WAN port is used to connect the networking device and the first gateway, and the second WAN port is used to connect the networking device and the second gateway.
  • the control device is connected to the networking device through the LAN port
  • the networking device is connected to the first gateway through the first WAN port
  • the networking device is connected to the second gateway through the second WAN port.
  • the networking device when the control device is connected to the networking device through the LAN port, and the networking device is connected to the first gateway through the first WAN port, the networking device can create a bridge, and the bridge is connected to the LAN port and the first WAN port respectively.
  • the control device can be bridged to the first gateway through the bridge.
  • the data link layer path established by the control device and the first gateway through the networking device may include: the LAN port, the bridge, and the first WAN port.
  • the networking device may include: a processing module of the data link layer, a bridge of the data link layer, and a routing and forwarding module of the network layer.
  • the embodiment of the present application does not limit the division of modules in the networking device, and the division of modules does not constitute a limitation on the structure of the networking device.
  • the network layer may be referred to as the Internet protocol (IP) layer.
  • IP Internet protocol
  • the processing module is used to process data from the control device to realize data interaction between the control device and the first gateway and the second gateway.
  • the LAN port, the bridge, and the first WAN port in the networking device are used to transmit interactive data between the control device and the first gateway.
  • the LAN port, the bridge, the routing and forwarding module, and the second WAN port in the networking device are used to transmit interactive data between the control device and the second gateway.
  • the processing module, the bridge, and the routing and forwarding module can refer to the relevant descriptions of the embodiments shown in Figures 9A-9B.
  • the interface of the control device may be as shown in Figure 7, where the control device is a central control screen as an example.
  • the interface of the control device may display a control area 71 for smart devices in the first network, and a control area 72 for smart devices in the second network.
  • the interface of the control device may also include a control area 72 for access control, elevators and other devices in the community network.
  • the control area 72 may include control controls 73 for access control, elevators and other devices.
  • the embodiment of the present application does not limit the style and layout of the interface of the control device.
  • the control controls 73 for access control, elevators and other devices may include: controls for opening access control, controls for closing access control, controls for opening elevators, and controls for closing elevators.
  • controls for opening access control controls for closing access control
  • controls for opening elevators controls for closing elevators.
  • control area 72 for opening access control is shown.
  • the control labeled 73 is used as an example for explanation.
  • the control device may include a plug-in or application for controlling access control, elevators and other devices, so that when the user operates the control control 73 in the control area 72, the control device can display the corresponding interface.
  • a plug-in or application for controlling access control, elevators and other devices can be set in the control device before the control device leaves the factory.
  • the control device can install a plug-in or application for controlling access control, elevators and other devices when the system or application is upgraded.
  • the plug-in or application for controlling access control, elevators and other devices in the second network is referred to as the second application
  • the application for controlling the smart device in the first network is referred to as the first application.
  • FIG8 is a flow chart of an embodiment of a data transmission method provided in an embodiment of the present application.
  • the data transmission method provided in an embodiment of the present application may include:
  • the control device is connected to the networking device, such as connecting the control device to the LAN port of the networking device by wire.
  • the networking device is connected to the first gateway, such as connecting the first gateway to the first WAN port of the networking device through a network cable.
  • the control device and the first gateway can establish a data link layer connection through the networking device to achieve bridging of the control device to the first gateway through the networking device.
  • the control device When the control device is connected to the networking device, and the networking device is connected to the first gateway via a network cable, the control device can send a first IP address request to the first gateway via the networking device.
  • the first IP address request is used to request the first gateway to allocate an IP address in the first network to the control device.
  • the IP address of the control device in the first network can be called the first IP address.
  • control device may send a first IP address request to the networked device, and the networked device may transparently transmit the first IP address request to the first gateway.
  • the first gateway sends the first IP address to the control device through the networking device in response to the first IP address request.
  • the first gateway may allocate the first IP address to the control device in response to the first IP address request. After the first gateway allocates the first IP address to the control device, the first gateway may send the first IP address to the networked device, and the networked device may transparently transmit the first IP address to the control device. In this way, the control device may obtain an IP address in the same network (or the same network segment) as the first gateway.
  • control device sends the first IP address and port information to the networked device.
  • the port can be understood as a virtual port allocated by the control device, which can be regarded as a port in the control device for transmitting data between the control device and the second gateway.
  • the "port for transmitting data between the control device and the second gateway" is referred to as the first port for explanation.
  • the port information may include: a port number and a protocol type for data transmission.
  • the protocol type may include, but is not limited to: a transmission control protocol (TCP) or a user datagram protocol (UDP).
  • TCP transmission control protocol
  • UDP user datagram protocol
  • the first port may be statically configured. For example, before the control device leaves the factory, a port for transmitting data exchanged between the control device and the second gateway has been configured on the control device, such as the first port is port 80 in the control device.
  • the port may be dynamically configured.
  • the second application may configure a port for transmitting data exchanged between the control device and the second gateway.
  • the networking device stores the first IP address and port information.
  • S804 is an optional step.
  • the networked device configures a data transmission rule according to the first IP address and port information.
  • the data transmission rule may be used to indicate a transmission mode of data whose destination port is the first port.
  • the data whose destination port is the first port may be referred to as target data.
  • the data transmission rule may be understood as: modifying the destination IP address of the target data to the first IP address to transmit the target data to the control device, and the destination port of the target data is the first port.
  • the networked device when the networked device receives data from the second gateway, if the destination port of the data is the first port, the networked device determines that the data is sent from the second gateway to the control device, and the networked device can modify the destination IP address of the data to the first IP address and send it to the control device. The networked device can modify the destination IP address of the data to the first IP address and send it to the control device through the first port.
  • the networked device receives When receiving data from the second gateway, the destination port of the data is also port 1.
  • the networking device determines that the data is sent by the second gateway to the control device.
  • the networking device can modify the destination IP address of the data to the first IP address and send the data to the control device through port 1.
  • the embodiment of the present application does not limit the order of connecting the control device to the networking device, connecting the networking device to the first gateway, and connecting the networking device to the second gateway.
  • the networking device is connected to the second gateway, such as the networking device connects the second gateway to the second WAN port via a network cable.
  • the networked device may send a second IP address request to the second gateway.
  • the second IP address request is used to request the second gateway to allocate an IP address of the networked device in the second network to the networked device, and the IP address of the networked device in the second network may be referred to as the second IP address.
  • the second gateway may allocate the second IP address to the networked device and send the second IP address to the networked device.
  • the second IP address of the networked device can be statically configured.
  • an icon 74 of a settings application is displayed on the interface of the control device.
  • the staff can configure the second IP address for the networked device in the settings application of the control device, such as the staff can enter the second IP address in the interface of the settings application.
  • the control device can send the second IP address to the networked device, so that the networked device can also obtain the second IP address.
  • the embodiment of the present application does not elaborate on the process of the staff configuring the IP address, and can refer to the relevant process of configuring the IP address for computers and other devices. It should be understood that the staff can be the person who installs the control device, the networked device, etc.
  • the networked device can obtain the IP address of the networked device in the same network (same network segment) as the second gateway.
  • the networked device can interact with the second gateway, and the networked device can interact with the first gateway through the network card.
  • the process of the networking device acquiring the second IP address can be regarded as the process of the networking device configuring the WAN information of the second network.
  • the networking device configuring the WAN information of the second network can be understood as: the networking device configures the IP address of the second WAN port used to connect the networking device and the second gateway as the second IP address.
  • the networking device performs configuration operations related to data transmission.
  • the networking device performs configuration operations related to data transmission, and no configuration is performed on the control device, which is simple to implement.
  • the data transmission method provided in the embodiment of the present application may include:
  • a control device sends first data to a networked device.
  • the networked device may receive the first data from the control device.
  • the first data is data sent by the control device to the first gateway.
  • the first data may be an audio playback instruction, a light-on instruction, and the like.
  • Scenario 1 In response to a first operation of a user, a control device sends first data to a networked device.
  • the first operation can be understood as: the user's operation on the first application in the control device, and the first application is an application for controlling devices in the first network.
  • the user clicks the audio playback control 75 in the control area 71 which can be understood as the user's operation on the first application in the control device, that is, the user's first operation.
  • the first operation can also be: the user controls the device in the first network by voice, such as the first operation can be the user saying "play audio".
  • the user operates the first application to query the information of the device in the first network.
  • the device information may include but is not limited to: the model, operating status, usage time, remaining power, system version, etc. of the device.
  • Scenario 2 In response to receiving a trigger event from a networked device, the first data is sent to the networked device, wherein the trigger event is used to trigger the control device to control the device in the first network.
  • the networked device can be connected to the sensors.
  • the sensors may include but are not limited to: distance sensors, infrared sensors, ambient light sensors, etc.
  • the networked device can be connected to the sensors via power line communication (PLC).
  • PLC power line communication
  • the sensor can collect data, and when the data meets the trigger condition, the sensor can send a trigger event to the networked device, and the networked device can control the device to send the trigger event.
  • the networked device can receive data collected from the sensor, and when the data meets the trigger condition, it can send a trigger event to the control device.
  • the trigger condition can be understood as a condition that triggers the sending of the trigger event.
  • the control device can determine the first data to be sent to the first gateway, so as to send the first data to the networked device.
  • the infrared sensor in the living room can detect whether the user enters the living room.
  • Trigger event 1 is used to characterize the user entering the living room.
  • the infrared sensor detecting that the user enters the living room can be regarded as a trigger condition.
  • the networked device can send trigger event 1 to the control device.
  • the control device can determine to trigger the entry into the living room mode according to trigger event 1. Entering the living room mode requires turning on the lights in the living room and the TV. Accordingly, the control device can send first data to the networked device, and the first data can be an instruction to turn on the lights in the living room and the TV.
  • the senor can also access the first network through the first gateway.
  • the sensor can collect data, and when the data meets the trigger condition, the sensor can send a trigger event to the first gateway, and the first gateway can send the trigger event to the control device through the networked device.
  • the control device can determine the first data to be sent to the first gateway in response to receiving the trigger condition from the networked device, so as to send the first data to the networked device, and the example of the infrared sensor can be referred to.
  • the trigger event sent by the first gateway to the control device can be regarded as the third data.
  • the senor may also be directly connected to the control device, the sensor may collect data, and when the data meets the trigger condition, the sensor may send a trigger event to the control device.
  • the control device may receive data collected from the sensor, so that when the data meets the trigger condition, it may determine to generate a trigger event.
  • the control device may determine the first data to be sent to the first gateway in response to receiving the trigger condition from the sensor, or determining to generate a trigger event, so as to send the first data to the networked device, and the example of the infrared sensor may be referred to for explanation.
  • Scenario 3 The control device periodically sends the first data to the networked device.
  • the first data is used to query the information of the device in the first network.
  • the control device can periodically query the operating status of the device in the first network to timely find the faulty device.
  • the control device can periodically send a request to query the operating status of the device in the first network to the networked device, and the request can be regarded as the first data.
  • the networking device In response to the destination IP address of the first data not being the IP address of the second gateway and the destination MAC address of the first data not being the MAC address of the networking device, the networking device sends the first data to the first gateway.
  • the first data may be sent in the form of a data packet, and the data packet carrying the first data may include the destination MAC address of the first data and the destination IP address of the first data. It is conceivable that the data packet carrying the first data may also include: a source MAC address, and the source MAC address may be regarded as the MAC address of the device sending the first data.
  • the embodiment of the present application does not elaborate on the content contained in the data packet.
  • the destination MAC address of the data sent by the control device is the MAC address of the next-hop device of the control device.
  • the control device is bridged to the first gateway through the networking device, and the first gateway can be used as the next-hop device of the control device. Therefore, the destination MAC address of the data sent by the control device is the MAC address of the first gateway.
  • the destination MAC address of the first data is also the MAC address of the first gateway.
  • the networked device can parse the packet header of the data link layer of the data packet carrying the first data to obtain the destination MAC address of the first data, and parse the packet header of the IP layer of the data packet carrying the first data to obtain the destination IP address of the first data.
  • the destination MAC address of the first data can be located in the packet header of the data link layer of the data packet carrying the first data
  • the destination IP address of the first data can be located in the packet header of the IP layer of the data packet carrying the first data.
  • the networking device detects whether the destination IP address of the first data is the IP address of the second gateway, wherein when the destination IP address of the first data is the IP address of the second gateway, the destination end of the first data is the second gateway, and when the destination IP address of the first data is not the IP address of the second gateway, the destination end of the first data is not the second gateway. Because the networking device connects the first gateway and the second gateway, when the destination end of the first data is not the second gateway, the networking device can determine that the destination end of the first data is the first gateway.
  • the destination end of the first data can be understood as: a device for receiving the first data.
  • the networked device can also detect whether the destination MAC address of the first data is the MAC address of the networked device, wherein, when the destination MAC address of the first data is the MAC address of the networked device, the networked device determines that the first data is sent to itself and processes it by itself. When the destination MAC address of the first data is not the MAC address of the networked device, the networked device can send the first data to the next hop device of the control device, that is, the first gateway.
  • the destination MAC address of the first data is the first gateway's MAC address, so the networking device can detect that the destination MAC address of the first data is not the MAC address of the networking device, and then send the first data to the first gateway, thereby achieving the purpose of sending the first data from the control device to the first gateway.
  • the first gateway may receive the first data.
  • the first gateway in response to receiving the first data, the first gateway may perform an operation in response to the first data.
  • the operation in response to the first data may be: the first gateway feeds back response information to the control device, or the first gateway controls the device in the first network to perform the corresponding operation.
  • the first gateway may send an audio playback instruction to the speaker in response to the audio playback instruction to control the speaker to play audio.
  • the first gateway may send a request to query the operating status to the device in the first network, the device in the first network may feed back its own operating status to the first gateway, and the first gateway may send the operating status of the device in the first network to the control device through the networked device.
  • S903 The control device sends second data to the networked device.
  • the networked device can receive the second data from the control device.
  • the second data is data sent by the control device to the second gateway.
  • the second data may be a command to open a door, a command to control an elevator, and the like.
  • Scenario 1 In response to a second operation of the user, the control device sends second data to the networked device.
  • the second operation can be understood as: the user's operation on the second application in the control device, and the second application is an application for controlling the device in the second network.
  • the user clicks the control 73 for opening the door in the control area 72 which can be understood as the user's operation on the second application in the control device, that is, the user's second operation.
  • the second operation can also be: the user's operation of controlling the device in the second network by voice, which can refer to the relevant description of the first operation.
  • the control device may send the second data to the networked device.
  • the control device may send an instruction to open the door to the networked device, and the instruction to open the door may be regarded as the second data.
  • the user operates the second application to query the information of the device in the second network.
  • the device information may include but is not limited to: the model, operating status, usage time, remaining power, system version, etc. of the device.
  • Scenario 2 The control device periodically sends the second data to the networked device.
  • the second data is used to query the information of the device in the first network.
  • the control device can periodically query the operating status of the device in the second network to timely find the faulty device.
  • the control device periodically sends a request to query the operating status of the device in the second network to the networked device, and the request can be regarded as the second data.
  • the sensor when a sensor is deployed in the second network, the sensor may also collect data, and when the data meets the trigger condition, the sensor may send a trigger event to the networked device, the second gateway, or the control device. In response to the trigger condition, the control device may send the second data to the networked device.
  • the trigger condition the control device may send the second data to the networked device.
  • the second data may be sent in the form of a data packet, and the data packet carrying the second data may include a destination MAC address of the second data and a destination IP address of the second data.
  • the destination IP address of the second data may indicate a destination end of the second data.
  • the destination end of the second data may be understood as: a device for receiving the second data.
  • the destination MAC address of the second data may be located in a packet header of a data link layer of a data packet carrying the second data
  • the destination IP address of the second data may be located in a packet header of an IP layer of a data packet carrying the second data.
  • the networked device may parse the header of the data link layer of the data packet carrying the second data to obtain the destination MAC address of the second data, and parse the header of the IP layer of the data packet carrying the second data to obtain the destination IP address of the second data.
  • the destination IP address of the second data is the IP address of the second gateway, and the networked device may determine that the destination end of the second data is the second gateway in response to the destination IP address of the data being the IP address of the second gateway.
  • the networked device determines that the destination of the second data is the second gateway. Based on the description in S902, because the control device is bridged to the first gateway through the networked device, the destination MAC address of the data sent by the control device is the MAC address of the first gateway, and therefore the destination MAC address of the second data is also the MAC address of the first gateway. If the networked device sends the second data according to the destination MAC address of the second data, the second data will be mistakenly sent to the first gateway, causing the second gateway to be unable to receive the second data. In an embodiment of the present application, the networked device can send the second data to the second gateway according to the destination IP address of the second data to avoid the second data being mistakenly sent to the first gateway.
  • the second gateway can receive the second data.
  • the first gateway in response to receiving the second data, can execute The row is operated in response to the second data.
  • the operation in response to the second data may be: the second gateway feeds back response information to the control device, or the second gateway controls the device in the second network to perform the corresponding operation.
  • the second gateway may send an instruction to open the door access control in response to the instruction to open the door access control to open the door access control.
  • the second gateway may send a request to query the operating status to the device in the second network, the device in the second network may feed back its own operating status to the second gateway, and the second gateway may send the operating status of the device in the second network to the control device through the networked device.
  • control device can access different networks, thereby achieving the purpose of the control device being able to control devices in different networks.
  • the networked device sending the first data to the first gateway in S902 can be regarded as: the networked device sending the first data to the first gateway in bridging mode
  • the networked device sending the second data to the second gateway in S904 can be regarded as: the networked device sending the second data to the second gateway in routing mode.
  • the control device is bridged to the first gateway through the networking device, and the networking device accesses different networks through different gateways.
  • the networking device can respond to the fact that the destination IP address of the first data is not the IP address of the second gateway, and the destination MAC address of the first data is not the MAC address of the networking device, to send the first data to the first gateway.
  • the control device sends the second data to the second gateway in order to avoid the networking device from mistakenly sending the second data to the first gateway, the networking device can respond to the fact that the destination IP address of the second data is the IP address of the second gateway, to send the second data to the second gateway.
  • the control device can send data to gateways in two different networks, so that the control device can access different networks, and further achieve the purpose of the control device controlling devices in different networks.
  • the networked device in order to ensure that the networked device can accurately send the second data to the second gateway, can modify the destination MAC address of the second data to be the MAC address of the networked device, so as to avoid sending the second data to the first gateway by mistake.
  • the data transmission method provided in the embodiment of the present application includes:
  • control device sends first data to the networked device.
  • S902A In response to the destination IP address of the first data not being the IP address of the second gateway and the destination MAC address of the first data not being the MAC address of the networking device, sending the first data to the first gateway.
  • the networking device receives the first data through the LAN port and can send the first data to the bridge.
  • the bridge can parse the packet header of the data link layer of the first data and obtain the destination MAC address of the first data, because the destination MAC address of the first data is the MAC address of the first gateway.
  • the bridge sends the first data to the first gateway.
  • the networking device receives the second data through the LAN port and can send the second data to the bridge.
  • the bridge can parse the packet header of the data link layer of the second data and obtain the destination MAC address of the second data, because the destination MAC address of the second data is the MAC address of the first gateway.
  • the bridge sends the second data to the first gateway.
  • the control device sends the first data to the networked device, and the networked device can receive the first data from the control device through the LAN port.
  • the processing module can parse the IP layer header of the data packet carrying the first data to obtain the destination IP address of the first data.
  • the processing module detects whether the destination IP address of the first data is the IP address of the second gateway, because the first data is the data sent by the control device to the first gateway, and therefore the destination IP address of the first data is not the IP address of the second gateway. It should be understood that the destination IP address of the first data is the IP address of the first gateway.
  • the processing module may send the first data to the bridge in response to the destination IP address of the first data not being the IP address of the second gateway.
  • the bridge may parse the header of the data link layer of the data packet carrying the first data to obtain the destination MAC address of the first data. Because the destination MAC address of the first data is the MAC address of the first gateway, not the MAC address of the networked device, the bridge responds to the first data. The destination MAC address is not the MAC address of the networked device, so it can be determined that the first data is not sent to itself, and the first data can be sent to the first gateway through the first WAN port.
  • the MAC address of the networking device may be the MAC address of the bridge.
  • control device sends second data to the networked device.
  • the networking device modifies the destination MAC address of the second data into the MAC address of the networking device.
  • the networked device can parse the IP layer header of the data packet carrying the second data to obtain the destination IP address of the second data. Because the second data is sent by the control device to the second gateway, the destination IP address of the second data is the IP address of the second gateway, and the networked device can determine that the destination of the second data is the second gateway. According to the description in S902, if the networked device sends the second data according to the destination MAC address of the second data, the second data will be sent to the first gateway by mistake.
  • the networked device in order to ensure that the second data can be sent to the second gateway, responds to the destination IP address of the second data being the IP address of the second gateway, and the networked device can modify the destination MAC address of the second data to the MAC address of the networked device.
  • the purpose is that the networked device does not send the data to the first gateway, but further processes the data internally to achieve sending the second data to the second gateway.
  • S905A In response to the destination MAC address of the second data being the MAC address of the networked device, the networked device sends the second data to the second gateway according to the destination IP address of the second data.
  • the networked device After the networked device recognizes that the destination MAC address of the second data is the MAC address of the networked device, the networked device can process the second data. Exemplarily, the networked device can send the second data to the second gateway based on that the destination IP address of the second data is the IP address of the second gateway.
  • the control device sends the second data to the networked device
  • the networked device can receive the second data through the LAN port
  • the processing module can parse the IP layer header of the data packet carrying the second data to obtain the destination IP address of the second data. Since the second data is sent by the control device to the second gateway, the destination IP address of the second data is the IP address of the second gateway, and according to the description in S902, because the destination MAC address of the second data is the MAC address of the first gateway, not the MAC address of the networked device, if the processing module directly sends the second data to the bridge, the bridge will send the second data to the first gateway. In order to prevent the bridge from sending the second data to the first gateway, but to route the second data to the second gateway by the routing forwarding module of the networked device, the bridge needs to first send the second data to the routing forwarding module of the networked device.
  • the processing module can modify the destination MAC address of the second data to the MAC address of the networked device in response to the destination IP address of the second data being the IP address of the second gateway, and send the second data with the modified destination MAC address to the network bridge.
  • the network bridge can parse the packet header of the data link layer of the data packet carrying the second data, and obtain that the destination MAC address of the second data is the MAC address of the networked device.
  • the network bridge In response to the destination MAC address of the second data being the MAC address of the networked device, the network bridge will not send the second data to the first gateway, but will send the second data to the routing and forwarding module, and the routing and forwarding module will further process the second data.
  • the routing and forwarding module can parse the packet header of the IP layer of the data packet carrying the second data, and obtain that the destination IP address of the second data is the IP address of the second gateway.
  • the routing and forwarding module can determine that the destination of the second data is the second gateway, so the routing and forwarding module can send the second data to the second gateway through the second WAN port.
  • the networked device when the control device sends the second data to the second gateway, in order to avoid the networked device from mistakenly sending the second data to the first gateway, can modify the destination MAC address of the second data to the MAC address of the networked device, so that the networked device can further process the second data.
  • the networked device can send the second data to the second gateway based on the destination IP address of the second data. In this way, the networked device can send the data from the control device to different gateways, so that the control device can access different networks.
  • the control device does not need to perceive the service, that is, the control device does not need to determine whether the data is sent to the first gateway or the second gateway.
  • the control device does not need to add additional identifiers to the data, nor does it need to configure VLAN in the control device, so that the control device is easy to replace after a subsequent failure.
  • the networked device can perform relevant configurations for data transmission by itself, and for the data sent by the control device to the second gateway, the MAC address in the data can be modified to the MAC address of the networked device, so that the data can be smoothly sent to the second gateway.
  • the transmission method in the embodiment of the present application enables the control device to access different networks, and the user can control devices in different networks through the control device, which can improve the user experience.
  • 9A-9B illustrate an example of a control device sending data to a first gateway and a second gateway. The following describes a process in which the first gateway and the second gateway send data to the control device.
  • the data transmission method provided in the embodiment of the present application may include:
  • the second gateway sends third data to the networked device.
  • the third data may be sent in the form of a data packet, and the data packet carrying the third data may include the destination MAC address, destination IP address, and destination port of the third data. Because the third data is data sent by the second gateway to the control device, the destination port of the third data is the first port, and the first port is a port in the control device for transmitting data between the control device and the second gateway.
  • the destination MAC address of the third data is the MAC address of the networking device
  • the destination IP address of the third data is the IP address of the networking device.
  • the destination MAC address of the third data is the MAC address of the second WAN port
  • the destination MAC address of the third data is the IP address of the second WAN port. According to the description in S806, the IP address of the second WAN port is the second IP address.
  • the networking device modifies the destination IP address of the third data to the first IP address.
  • the destination port of the third data is the first port, and the third data can be regarded as the target data. Because the networking device is pre-configured with the data transmission rule, the networking device responds that the destination port of the third data is the port in the control device used to transmit data between the second gateway and the control device, and the networking device can modify the destination IP address of the third data to the first IP address according to the data transmission rule.
  • the purpose of the networking device modifying the destination IP address of the third data to the first IP address is that after the networking device sends the third data to the control device, the control device parses the packet header of the IP layer of the data packet carrying the third data, and can obtain that the destination IP address of the third data is its own IP address, and determines that the third data is sent to itself, so it can be processed smoothly. If the networking device does not modify the destination IP address of the third data to the first IP address, but directly sends it to the control device, the control device parses the packet header of the IP layer of the data packet carrying the third data, and can obtain that the destination IP address of the third data is not its own IP address, and determines that the third data is not sent to itself, and then does not process it.
  • S1103 The networked device sends third data to the control device according to the first IP address.
  • the networked device modifies the destination IP address of the third data to the first IP address, it can be determined that the third data is sent to the control device, and thus the third data can be sent to the control device according to the first IP address. Specifically, the networked device can send the third data to the control device through the first port.
  • the second gateway sends the third data to the networked device, and the networked device can receive the third data through the second WAN port.
  • the routing forwarding module can parse the data link layer header and the IP layer header of the data packet carrying the third data to obtain the destination MAC address, destination IP address, and destination port of the third data.
  • the routing forwarding module can determine that the destination end of the third data is the control device, and the routing forwarding module can modify the destination IP address of the third data to the first IP address.
  • the routing forwarding module can send the third data with the modified destination IP address to the bridge, and the bridge can send the third data to the control device through the LAN port and the port in the control device used to transmit data between the second gateway and the control device according to the first IP address.
  • control device is bridged to the first gateway through the networking device, it can be regarded as a direct connection between the control device and the first gateway.
  • the destination MAC address of the fourth data is the MAC address of the control device
  • the destination IP address of the fourth data is the IP address of the control device.
  • the networking device receives the fourth data from the first gateway, it can send the fourth data to the control device according to the destination MAC address of the fourth data.
  • the first gateway sends the fourth data to the networked device
  • the networked device can receive the fourth data through the first WAN port
  • the bridge can parse the packet header of the data link layer of the data packet carrying the fourth data to obtain the destination MAC address of the fourth data. Because the destination MAC address of the fourth data is the MAC address of the control device, the bridge sends the fourth data to the control device through the LAN port in response to the destination MAC address of the fourth data not being the MAC address of the networked device.
  • the networked device can send data from the first gateway to the control device, and send data from the second gateway to the control device.
  • the embodiment of the present application can realize the interaction between the control device and the gateways in different networks, and can realize that the control device can access different networks, thereby achieving the purpose of the control device controlling devices in different networks, and can improve the user experience.
  • the embodiment of the present application further provides an electronic device, which may be the networking device, control device, first gateway, and second gateway described in the above embodiments.
  • the electronic device may include: a processor 1201 (e.g., a CPU), and a memory 1202.
  • the memory 1202 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk memory.
  • Various instructions may be stored in the memory 1202 to complete various processing functions and implement the data transmission method of the present application.
  • the electronic device involved in the present application may further include: a power supply 1203, a communication bus 1204 and a communication port 1205.
  • the above-mentioned communication port 1205 is used to realize the connection and communication between the electronic device and other peripherals.
  • the memory 1202 is used to store computer executable program code, and the program code includes instructions; when the processor 1201 executes the instruction, the instruction causes the processor 1201 of the electronic device to perform the action in the above-mentioned method embodiment, and its implementation principle and technical effect are similar, which will not be repeated here.
  • the electronic device may further include a display screen 1206, and the display screen 1206 is used to display an interface of the electronic device.
  • the embodiment of the present application also provides a data transmission system.
  • the data transmission system includes a networking device and a control device.
  • the networking device and the control device can interact to implement the data transmission method of the present application, and the description in the above embodiment can be referred to.
  • the data transmission system may further include: a first gateway and a second gateway.
  • modules or components described in the above embodiments may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASICs), or one or more microprocessors (digital signal processors, DSPs), or one or more field programmable gate arrays (FPGAs), etc.
  • ASICs application specific integrated circuits
  • DSPs digital signal processors
  • FPGAs field programmable gate arrays
  • the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program codes, such as a controller.
  • these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • the computer program product includes one or more computer instructions.
  • the computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
  • the computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.).
  • the computer-readable storage medium can be any available medium that can be accessed by the computer or a data storage device such as a server or data center that includes one or more available media integrated.
  • the available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.
  • SSD Solid State Disk
  • plural in this article refers to two or more than two.
  • the term “and/or” in this article is only a description of the association relationship of associated objects, indicating that three relationships may exist.
  • a and/or B can represent: A exists alone, A and B exist at the same time, and B exists alone.
  • the character "/" in this article generally indicates that the previous and next associated objects are in an "or” relationship; in the formula, the character "/" indicates that the previous and next associated objects are in a "division" relationship.
  • the size of the serial numbers of the above-mentioned processes does not mean the order of execution.
  • the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种数据传输系统、数据传输方法以及联网设备,控制设备通过联网设备桥接至第一网关,联网设备通过不同的网关接入不同的网络,当控制设备通过联网设备向第一网关发送第一数据时,联网设备响应于第一数据的目的IP地址不是第二网关的IP地址,且第一数据的目的MAC地址不是联网设备的MAC地址,可以实现向第一网关发送第一数据,当控制设备向第二网关发送第二数据时,为了避免联网设备错发第二数据至第一网关,联网设备可以响应于第二数据的目的IP地址是第二网关的IP地址,实现向第二网关发送第二数据,如此可以实现控制设备访问不同的网络,以达到控制设备可以控制不同的网络中的设备的目的。

Description

数据传输系统、数据传输方法以及联网设备
本申请要求于2022年09月30日提交中国专利局、申请号为202211213899.6、申请名称为“数据传输系统、数据传输方法以及联网设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种数据传输系统、数据传输方法以及联网设备。
背景技术
随着全屋智能化的发展,家庭中的智能设备越来越多。中控屏配置有屏幕,可以为用户提供触屏交互和语音交互,用户通过中控屏可以控制家庭中的设备。
目前,如用户可以通过中控屏,控制与中控屏处于同一网络的设备,但对于与中控屏处于不同网络的设备,中控屏无法进行控制。因此,亟需一种可以访问不同网络,以实现控制处于不同网络的设备的方法。
发明内容
本申请实施例提供一种数据传输系统、数据传输方法以及联网设备,可以实现访问不同的网络,能够实现控制处于不同网络的设备。
第一方面,本申请实施例提供一种数据传输系统,数据传输系统包括:控制设备和联网设备,所述联网设备通过第一网关接入第一网络,所述联网设备通过第二网关接入第二网络,所述控制设备通过所述联网设备桥接至第一网关,所述第一网络和所述第二网络不同。
所述控制设备,用于向所述联网设备发送第一数据。所述联网设备,用于响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据。其中,联网设备可以根据第一数据的目的IP地址不是所述第二网关的IP地址,确定第一数据的目的端不是第二网关,而是与控制设备桥接的第一网关,且因为第一数据的目的MAC地址不是联网设备的MAC地址,联网设备可以向第一网关发送第一数据,以便于第一网关可以接收到第一数据。
所述控制设备,还用于向所述联网设备发送第二数据。所述联网设备,还用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据。其中,因为控制设备通过联网设备桥接至第一网关,控制设备发出的第二数据的目的MAC地址为第一网关的MAC地址,当控制设备向联网设备发送第二数据时,联网设备若根据第二数据的目的MAC地址,会将第二数据错发至第一网关,而第二数据的目的IP地址用于指示第二数据的目的端,因此联网设备可以根据第二数据的目的IP地址,实现向第二网关发送数据。
本申请中,联网设备可以实现将来自控制设备的第一数据发送至第一网关,且将来自控制设备的第二数据发送至第二网关,如此可以实现控制设备向处于两个不同网络中的网关发送数据,进而能够实现控制设备可以访问不同的网络,以实现控制设备可以控制处于不同网络的设备。
在一种可能的实现方式中,所述联网设备,具体用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,以及联网设备响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
在该可能的实现方式中,控制设备发出的第二数据的目的MAC地址为第一网关的MAC地址,当控制设备向联网设备发送第二数据时,联网设备若根据第二数据的目的MAC地址,会将第二数据错发至第一网关,因此联网设备可以将第二数据的目的MAC地址是所述联网设备的MAC地址,这样联网设备可以对第二数据进行进一步处理。
联网设备响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,因为第二数据的目的IP地址为第二网关的IP地址,联网设备可以确定第二数据的目的端为第二网关,因此联网设备可以根据第二数据的目的IP地址,实现向第二网关发送数据,可以避免将第二数据错发至第一网关。
在一种可能的实现方式中,所述联网设备包括:数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块,其中,所述控制设备通过所述网桥桥接至所述第一网关。所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,并向网桥发送修改后的所述第二数据。所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据,以及所述路由转发模块,用于根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
目前,数据链路层的模块仅会解析承载第二数据的数据包的数据链路层的包头,得到第二数据的目的MAC地址,本申请实施例中为了实现将第二数据发送至第二网关,数据链路层的处理模块可以解析承载第二数据的数据包的网络层的包头,得到第二数据的目的IP地址,如此数据链路层的处理模块可以响应于所述第二数据的目的IP地址是所述第二网关的IP地址,可以将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,以便于网桥通过路由转发模块,将第二数据路由至第二网关,可以避免将第二数据错发至第一网关。
其中,数据链路层的网桥可以解析承载第二数据的数据包的数据链路层的包头,得到第二数据的目的MAC地址,网桥响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,可以确定第二数据的目的端为联网设备,进一步可以发给路由转发模块处理。网络层的所述路由转发模块可以解析承载第二数据的数据包的网络层的包头,得到第二数据的目的IP地址是所述第二网关的IP地址,路由转发模块可以确定第二数据的目的端为第二网关,因此可以根据第二网关的IP地址,将第二数据发送至第二网关。
在一种可能的实现方式中,所述联网设备包括:数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块,其中,所述控制设备通过所述网桥桥接至所述第一网关。所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据;所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据。
本申请中,数据链路层的处理模块可以解析承载第一数据的数据包的网络层的包头,得到第一数据的目的IP地址,如此数据链路层的处理模块可以响应于所述第二数据的目的IP地址不是所述第二网关的IP地址,可以确定第二数据的目的端不是第二网关,因此可以通过网桥将第一数据发送至第一网关。其中,网桥可以解析承载第二数据的数据包的数据链路层的包头,得到第二数据的目的MAC地址,网桥响应于所述第二数据的目的MAC地址不是所述联网设备的MAC地址,可以确定第二数据的目的端不是联网设备,进一步可以将第一数据发送至第一网关。
本申请中,联网设备可以基于数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块,可以实现将第一数据发送至第一网关,以及将第二数据发送至第二网关,进而达到控制设备访问不同网络的目的。
下面对控制设备发送第一数据、第二数据的场景进行介绍:
其一,所述控制设备,具体用于响应于用户的第一操作,向所述联网设备发送所述第一数据,所述第一操作为所述用户对所述控制设备的第一应用的操作,所述第一应用用于控制处于所述第一网络的设备。换句话说,控制设备上可以安装有第一应用,用户操作第一应用可以触发控制设备发送第一数据,示例性的,该第一数据如可以为控制信令,或查询请求,本申请对此不作限制。
其二,所述控制设备,具体用于响应于接收到来自所述联网设备的触发事件,向所述联网设备发送所述第一数据,所述触发事件用于触发所述控制设备控制处于所述第一网络的设备。换句话说,联网设备可以向控制设备发送触发事件,触发事件用于触发控制设备发送第一数据。
在一种示例中,传感器可以采集数据,在数据满足触发条件时,传感器可以向联网设备发送触发事件,联网设备可以控制设备发送触发事件。或者,联网设备可以接收来自传感器采集的数据,以在数据满足触发条件时,可以向控制设备发送触发事件。触发条件可以理解为触发发送触发事件的条件。
其三,所述控制设备,具体用于周期性地向所述联网设备发送所述第一数据。示例性的,控制设备 可以周期性地向联网设备发送第一数据,第一数据用于查询第一网络中的设备的信息,以便于及时确定设备状态。
其中,控制设备可以采用“其一”至“其三”任一方式发送第一数据。
其四,所述控制设备,具体用于响应于用户的第二操作,向所述联网设备发送所述第二数据,所述第二操作为所述用户对所述控制设备的第二应用的操作,所述第二应用用于控制处于所述第二网络的设备。换句话说,控制设备上可以安装有第二应用,用户操作第二应用可以触发控制设备发送第二数据,示例性的,该第二数据如可以为控制信令,或查询请求,本申请对此不作限制。
其五,所述控制设备,具体用于周期性地向所述联网设备发送所述第二数据。示例性的,控制设备可以周期性地向联网设备发送第二数据,第二数据用于查询第二网络中的设备的信息,以便于及时确定设备状态。
其中,控制设备可以采用“其四”或“其五”中的方式发送第二数据。
在该实现方式中,控制设备可以在多种场景下,向联网设备发送第一数据、第二数据,本申请提供的数据传输方法的适用范围广,适用场景多。
在一种可能的实现方式中,所述控制设备,还用于向所述联网设备发送第一IP地址和端口信息,所述第一IP地址是所述第一网关为所述控制设备分配的所述第一网络中的IP地址,所述端口信息用于指示:所述控制设备中用于传输所述控制设备与所述第二网关之间的数据的端口。
在一种示例中,在控制设备通过所述联网设备桥接至所述第一网关的情况下,所述控制设备,还用于向所述联网设备发送第一IP地址请求,所述第一IP地址请求用于请求所述第一网关为所述控制设备分配所述第一网络中的IP地址。所述联网设备,还用于向所述第一网关发送所述第一IP地址请求;接收来自所述第一网关的第一IP地址:向所述控制设备发送所述第一IP地址。其中,所述控制设备在得到第一IP地址后,可以向所述联网设备发送第一IP地址和端口信息。
所述联网设备,还用于根据所述第一IP地址和所述端口信息,配置数据传输规则,所述数据传输规则用于指示:将目标数据的目的IP地址修改为所述第一IP地址,以将目标数据传输至所述控制设备,所述目标数据的目的端口为所述端口。
在该实现方式中,联网设备可以预先配置数据传输规则,便于实现将来自第二网关的数据准确传输至控制设备,实现控制设备和第二网关之间数据的交互。
在一种示例中,所述控制设备包括第二应用,所述第二应用用于配置所述端口。其中,所述第二应用用于控制处于所述第二网络的设备,第二应用可以配置所述端口,不仅可以实现该端口传输控制设备与所述第二网关之间的数据,且端口配置方式易实现。
其中,所述联网设备,还用于接收来自所述第二网关的第三数据。联网设备响应于所述第三数据的目的端口为所述端口,可以将第三数据作为目标数据,且根据所述数据传输规则,将所述第三数据的目的IP地址修改为所述第一IP地址。联网设备根据所述第一IP地址,向所述控制设备发送所述第三数据。在一种示例中,因为第二网关与联网设备连接,所述第三数据的目的IP地址是第二IP地址。其中,所述第二IP地址可以是所述第二网关为所述联网设备分配的所述第二网络中的IP地址。
在该实现方式中,联网设备可以根据配置数据传输规则,响应于所述第三数据的目的端口为所述端口,将所述第三数据的目的IP地址修改为所述第一IP地址,以保证第三数据可以传输至控制设备。另,联网设备将所述第三数据的目的IP地址修改为所述第一IP地址的目的在于:联网设备向控制设备发送第三数据后,控制设备解析得到第三数据的目的IP地址是控制设备的IP地址,确定第三数据是发送给自己的,因此可以顺利进行处理,避免控制设备丢弃第三数据。
这里对联网设备获取第二IP地址的方式进行介绍,在所述控制设备与所述第二网关连接的情况下,所述联网设备,还用于获取所述联网设备在所述第二网络中的第二IP地址。本申请中,可以采用人工静态配置或联网设备动态请求的方式,获取联网设备在第二网络中的IP地址。
其中,所述控制设备,还用于响应于在所述控制设备上输入所述第二IP地址,向所述联网设备发送所述第二IP地址。所述联网设备,具体用于接收来自所述控制设备的所述第二IP地址,所述第二IP地址是在所述控制设备上为所述联网设备配置的。或者,
所述联网设备,具体用于向所述第二网关发送第二IP地址请求,所述第二IP地址请求用于请求所述第二网关为所述联网设备分配所述第二网络中的IP地址;接收来自所述第二网关的所述第二IP地址。
在一种可能的实现方式中,所述联网设备,还用于接收来自所述第一网关的第四数据。联网设备响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
其中,因为控制设备通过联网设备桥接至第一网关,因此第一网关发送的第四数据的目的MAC地址为控制设备的MAC地址,联网设备接收到第四数据,响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据,这样可以实现联网设备向控制设备传输来自第一网关的数据。
综上,联网设备不仅可以实现将来自控制设备的第一数据发送至第一网关,将来自控制设备的第二数据发送至第二网关,还可以实现将来自第一网关的数据发送至控制设备,以及将来自第二网关的数据发送至控制设备,这样能够实现控制设备与不同网络中的网关的交互,可以实现控制设备访问不同的网络,进而可以实现控制设备控制不同网络中的设备。
在一种可能的实现方式中,所述联网设备包括:LAN口、第一WAN口,以及第二WAN口;所述控制设备通过所述LAN口和所述第一WAN口桥接至所述第一网关,所述联网设备通过所述第一WAN口与所述第一网关连接,所述联网设备通过所述第二WAN口与所述第二网关连接。
其中,所述控制设备,具体用于通过所述LAN口向所述联网设备发送所述第一数据;所述联网设备,具体用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,且所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据;所述控制设备,具体用于通过所述LAN口向所述联网设备发送所述第二数据。所述联网设备,具体用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
其中,所述联网设备,具体用于通过所述第二WAN口接收到来自所述第二网关的第三数据,联网设备响应于所述第三数据的目的端口为所述端口,可以根据所述数据传输规则,将所述第三数据的目的IP地址修改为所述第一IP地址,且向所述控制设备发送所述第三数据。
其中,所述联网设备,具体用于通过所述第一WAN口接收到来自所述第一网关的第四数据,联网设备响应于第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
在一种可能的实现方式中,所述联网设备包括:数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块。其中,所述控制设备通过所述网桥桥接至所述第一网关。这里结合联网设备的内部结构,对本申请实施例提供的数据传输方法进行说明:
其中,所述联网设备,具体用于通过LAN口接收来自所述控制设备的所述第一数据。所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据。所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据。
其中,所述联网设备,具体用于通过LAN口接收来自所述控制设备的所述第二数据。所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,且向所述网桥发送修改后的所述第二数据。所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据。所述路由转发模块,用于根据所述第二数据的目的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
在一种可能的实现方式中,所述联网设备通过所述第二WAN口接收到来自所述第二网关的第三数据。所述路由转发模块,用于响应于所述第三数据的目的端口为所述端口,将所述第三数据的目的IP地址修改为所述控制设备的IP地址,且向所述网桥发送所述第三数据。所述网桥,通过LAN口向所述控制设备发送所述第三数据。
在一种可能的实现方式中,所述联网设备通过所述第一WAN口接收到来自所述第一网关的第四数据。所述网桥,用于响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,通过LAN口向所述控制设备发送所述第四数据。
综上,通过联网设备内部模块的交互,可以实现控制设备与不同网络中的网关的数据的交互,可以 实现控制设备访问不同的网络,进而可以实现控制设备控制不同网络中的设备。
第二方面,本申请提供一种数据传输方法,应用于联网设备,所述联网设备通过第一网关接入第一网络,所述联网设备通过第二网关接入第二网络,控制设备通过所述联网设备桥接至所述第一网关,所述第一网络和所述第二网络不同。在该方法中,联网设备接收来自所述控制设备的第一数据;响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据;接收来自所述控制设备的第二数据;响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据。
在一种可能的实现方式中,所述响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据,包括:响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址;响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
在一种可能的实现方式中,所述方法还包括:接收来自所述控制设备的第一IP地址和端口信息,所述第一IP地址是所述第一网关为所述控制设备分配的所述第一网络中的IP地址,所述端口信息用于指示:所述控制设备中用于传输所述控制设备与所述第二网关之间的数据的端口;根据所述第一IP地址和所述端口信息,配置数据传输规则,所述数据传输规则用于指示:将目标数据的目的IP地址修改为所述第一IP地址,以将目标数据传输至所述控制设备,所述目标数据的目的端口为所述端口。
在一种可能的实现方式中,所述方法还包括:接收来自所述第二网关的第三数据;响应于所述第三数据的目的端口为所述端口,根据所述数据传输规则,将所述第三数据的目的IP地址修改为所述第一IP地址;根据所述第一IP地址,向所述控制设备发送所述第三数据。
在一种可能的实现方式中,所述第三数据的目的IP地址是第二IP地址,所述第二IP地址是所述第二网关为所述联网设备分配的所述第二网络中的IP地址。
在一种可能的实现方式中,所述端口为所述控制设备中的第二应用配置的,所述第二应用用于控制处于所述第二网络的设备。
在一种可能的实现方式中,所述方法还包括:接收来自所述第一网关的第四数据;响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
在一种可能的实现方式中,述联网设备包括:LAN口、第一WAN口,以及第二WAN口;所述控制设备通过所述LAN口和所述第一WAN口桥接至所述第一网关,所述联网设备通过所述第一WAN口与所述第一网关连接,所述联网设备通过所述第二WAN口与所述第二网关连接。
在一种可能的实现方式中,所述接收来自所述控制设备的第一数据,包括:通过所述LAN口接收来自所述控制设备的所述第一数据。
所述响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据,包括:响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,且所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据。
所述接收来自所述控制设备的第二数据,包括:通过所述LAN口接收来自所述控制设备的所述第二数据。
所述响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据,包括:响应于所述第二数据的目的IP地址是所述第二网关的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
在一种可能的实现方式中,所述联网设备还包括:数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块。其中,所述控制设备通过所述网桥桥接至所述第一网关。
所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,并向网桥发送修改后的所述第二数据;所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据;所述路由转发模块,用于根据所述第二数据的目的IP地址,向所述第二网关发送所 述第二数据。
在一种可能的实现方式中,所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据。所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据。
其中,所述联网设备,具体用于通过LAN口接收来自所述控制设备的所述第一数据;所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据;所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据。
所述联网设备,具体用于通过LAN口接收来自所述控制设备的所述第二数据;所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址;向所述网桥发送修改后的所述第二数据;所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据;所述路由转发模块,用于根据所述第二数据的目的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
在一种可能的实现方式中,所述联网设备通过所述第二WAN口接收到来自所述第二网关的第三数据;所述路由转发模块,用于响应于所述第三数据的目的端口为所述端口,将所述第三数据的目的IP地址修改为所述控制设备的IP地址;向所述网桥发送所述第三数据;所述网桥,向所述控制设备发送所述第三数据。
在一种可能的实现方式中,所述联网设备通过所述第一WAN口接收到来自所述第一网关的第四数据;所述网桥,用于响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
第三方面,本申请实施例提供一种联网设备,该联网设备可以包括:处理器、存储器。存储器用于存储计算机可执行程序代码,程序代码包括指令;当处理器执行指令时,指令使所述联网设备执行如第一方面中的方法。
第四方面,本申请实施例提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面中的方法。
第五方面,本申请实施例提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面中的方法。
上述第二方面至第五方面的各可能的实现方式,其有益效果可以参见上述第一方面所带来的有益效果,在此不加赘述。
本申请提供一种数据传输系统、数据传输方法以及联网设备,控制设备通过联网设备桥接至第一网关,联网设备通过不同的网关接入不同的网络,当控制设备向第一网关发送第一数据时,联网设备可以响应于第一数据的目的IP地址不是第二网关的IP地址,且第一数据的目的MAC地址不是联网设备的MAC地址,实现向第一网关发送第一数据,当控制设备向第二网关发送第二数据时,为了避免联网设备错发第二数据至第一网关,联网设备可以响应于第二数据的目的IP地址是第二网关的IP地址,实现向第二网关发送第二数据,如此可以实现控制设备访问不同的网络,以达到控制设备可以控制不同的网络中的设备的目的。
附图说明
图1为本申请实施例提供的一种网络架构示意图;
图2为中控屏的一种界面示意图;
图3为本申请实施例提供的另一种网络架构示意图;
图4为家庭网络和社区网络中的设备的一种连接示意图;
图5为本申请实施例提供的中控屏访问不同网络的一种示意图;
图6为本申请实施例提供的数据传输方法适用的网络架构示意图;
图7为本申请实施例提供的控制设备的一种界面示意图;
图8为本申请实施例提供的数据传输方法的一种实施例的流程示意图;
图9A为本申请实施例提供的数据传输方法的另一种实施例的流程示意图;
图9B为本申请实施例提供的数据传输方法的另一种实施例的流程示意图;
图10A为本申请实施例提供的数据传输的另一种示意图;
图10B为本申请实施例提供的数据传输方法的另一种示意图;
图10C为本申请实施例提供的数据传输方法的另一种示意图;
图11为本申请实施例提供的数据传输方法的另一种实施例的流程示意图;
图12为本申请实施例提供的电子设备的一种结构示意图。
具体实施方式
图1为本申请实施例提供的一种网络架构示意图。图1中以家庭环境为例,参照图1,该网络架构中包括:中控屏11、智能主机12、家庭网关13,以及智能设备14。家庭网关13如可以为交换机、路由器等,本申请实施例对此不作限制,图1中以家庭网关13为路由器为例进行说明。
智能主机12和家庭网关13可以有线连接或无线连接。示例性的,智能主机12可以通过网线与家庭网关13有线连接。
在一种示例中,中控屏11可以与智能主机12有线连接。在一种示例中,中控屏11可以与家庭网关13无线连接,如中控屏11可以无线接入家庭网关13,在该种示例中,图1所示的网络架构中可以不包括智能主机12。
因为中控屏11可以通过家庭网关13接入家庭网络,因此中控屏11还可以执行中控屏11中的系统升级、应用下载,以及应用升级等操作。在一种示例中,中控屏11可以可拆卸地设置在智能主机12上,或者中控屏11和智能主机12可以单独设置,本申请实施例对中控屏11和智能主机12的设置方式不做限制。
中控屏11,用于提供与用户交互的界面。用户可以通过中控屏11控制已接入家庭网关13的智能设备14。示例性的,用户通过中控屏11可以打开音箱、关闭窗帘,打开灯等。
图2为中控屏的一种界面示意图,参照图2,以用户通过中控屏触发音箱播放音频为例,用户可以点击中控屏11界面上的音乐播放控件21,中控屏11响应于用户点击音乐播放控件21的操作,可以向智能主机12发送音频播放指令。智能主机12可以向家庭网关13发送音频播放指令,家庭网关13响应于音频播放指令,可以向音箱发送音频播放指令。音箱响应于音频播放指令,可以播放音频。应注意,用户还可以通过语音方式与中控屏11进行交互,以实现对智能设备14的控制,本申请实施例对用户和中控屏11的交互方式不做限制。
另,用户还可以通过中控屏11设置各种场景模式下智能设备14的操作,场景模式可以包括但不限于:进入客厅模式、离开客厅模式、观影模式、放松模式,以及专注模式。示例性的,在观影模式下,中控屏11可以通过智能主机12和家庭网关13,控制灯关闭,且打开加湿器,以为用户构建观影环境。在一种示例中,各种场景模式下智能设备14的操作还可以是中控屏11预先设置的,本申请实施例对此不作赘述。
智能主机12,用于向家庭网关13传输来自中控屏11的数据,以及向中控屏11传输来自家庭网关13的数据。来自中控屏11的数据,以及来自家庭网关13的数据可以包括但不限于:信令数据和业务数据。来自中控屏11的信令数据如音频播放指令、打开灯的指令等,来自中控屏11的业务数据如业务数据包。
智能设备14可以无线接入家庭网关13,智能设备14与中控屏11均处于家庭网络中,可以实现中控屏11和智能设备14之间的交互。应理解,环境不同,环境中的智能设备14不同。示例性的,家庭环境中的智能设备14可以包括但不限于:电视、音箱、智慧屏、空调、灯,以及窗帘,图1中以智能设备包括音箱和灯为例进行说明。示例性的,工厂环境中的智能设备14可以包括但不限于:机械手臂、机器人。
在一种实施例中,中控屏11还可以与用户的电子设备绑定,用户可以在电子设备上实现对中控屏11的操作,以达到在电子设备上控制智能设备14的目的。示例性的,电子设备可以为手机、平板电脑(portable android device,PAD)、个人数字处理(personal digital assistant,PDA)、具有无线通信功能的手持设备、计算设备、或可穿戴设备,虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备等,本申请实施例中对电子设备的形态不做具体限定。
在图1所示的网络架构中,用户通过中控屏11可以对与中控屏11处于同一网络中的智能设备14进行控制,在一种可能的场景中,如智能门禁、电梯等处于社区网络中,社区网络与家庭网络是不同的网络, 中控屏11在已接入家庭网络的情况下,无法接入社区网络中,因此用户通过中控屏11无法控制智能门禁、电梯等设备。示例性的,如当朋友通过楼栋门禁呼叫开门时,由于中控屏11无法控制与中控屏11处于不同网络中的设备,因此用户无法便利地通过中控屏11控制门禁打开。
在另一种可能的场景中,若家庭环境中存在两个网络,或者用户的多个房屋中的网络不同,中控屏11只能接入一个网络,无法同时访问多个网络,因此用户也无法通过一个中控屏11实现对处于多个网络中的智能设备进行控制。示例性的,家庭中的一楼和二楼使用的是网络1,三楼和四楼使用的是网络2,若中控屏11通过智能主机12、家庭网关13接入网络1,则用户可以通过中控屏11控制处于网络1中的智能设备,但无法控制处于网络2中的智能设备。
在一种示例中,可以通过增加设置中控屏11的方式,用户可以使用另一中控屏对处于网络2下的智能设备进行控制,但无疑增加了用户成本,且用户需要通过两个中控屏11才能实现智能设备的控制,不便利。因此,亟需一种中控屏可以访问不同网络,以实现中控屏可以控制处于不同网络中的智能设备的方法。
以多个网络包括家庭网络和社区网络为例,社区网络的网络架构可以如图3所示。参照图3,社区网络的网络架构可以包括:中控屏31、社区网关32,以及社区网络中的智能设备33。社区网关32可以包括但不限于:交换机或路由器,图3中以社区网关32为路由器为例进行说明。其中,中控屏31可以与社区网关32无线连接或有线连接,社区网关32可以与智能设备33无线连接。
中控屏31,可以通过社区网关32接入社区网络。
用户可以通过中控屏31,控制社区网络中的智能设备33。示例性的,智能设备33可以包括但不限于:门禁、电梯。如用户可以操作中控屏31的界面,打开楼栋的门禁。
在一种示例中,社区网络的网络架构中可以包括:管理中心34。社区网关32和管理中心34可以有线连接或无线连接。示例性的,工作人员可以管理中心34,监管接入社区网络的设备的运行,接入社区网络的设备如中控屏31、社区网关32,以及门禁、电梯等。
若想要实现中控屏可以访问家庭网络和社区网络,在一种示例中,可以将社区网关32与智能主机12连接,参照图4,虽然社区网关32与智能主机12实现了物理连接,但因为目前的中控屏通过智能主机桥接至家庭网关,又因为家庭网络和社区网络是不同的网络,目前的中控屏只能接入一个网络中,不能同时实现访问家庭网络和社区网络,因此也不能实现中控屏控制家庭网络和社区网络中的设备。应理解,图4中示出了家庭网关和社区网关,并未示出处于家庭网络中的设备和社区网络中的设备。
在一种示例中,若中控屏支持双上行拨号,即中控屏可以接入两个不同的网络,则图4中,中控屏可以实现访问家庭网络和社区网络。或者,在一种实施例中,参照图5,对于支持双上行拨号的中控屏,可以在中控屏和智能主机12中配置两个虚拟局域网(virtual local area network,VLAN)的标识,以用于区分不同网络的数据,且可以在智能主机12中配置传输不同网络的数据的传输通路。
其中,数据传输通路可以包括:第一数据传输通路和第二数据传输通路,第一数据传输通路用于传输家庭网络中的数据,第二数据传输通路用于传输社区网络中的数据。示例性的,参照图5,第一数据传输通路包括:VLAN1模块、网桥1以及广域网(wide area network,WAN)1模块。第二数据传输通路包括:VLAN2模块、网桥2以及WAN2模块。
示例性的,可以在中控屏和智能主机12中配置标识VLAN1,以用于传输家庭网络中的数据,配置标识VLAN2,以用于传输社区网络中的数据。这样,中控屏在发送家庭网络中的数据(如音频播放指令)时,可以携带标识VLAN1,以表征该数据为家庭网络中的数据。相应的,智能主机12在接收到携带有标识VLAN1的数据时,可以采用第一数据传输通路向家庭网关13传输数据,这样可以实现中控屏对家庭网络中的设备的控制。
示例性的,中控屏在发送社区网络中的数据(如打开门禁的指令)时,可以携带标识VLAN2,以表征该数据为社区网络中的数据。相应的,智能主机12在接收到携带有标识VLAN2的数据时,可以采用第二数据传输通路向社区网关32传输数据,这样可以实现中控屏对社区网络中的设备的控制。
在图5所示的示例中,虽然能够实现中控屏访问家庭网络和社区网络,但是中控屏需要支持双上行拨号,但目前的中控屏均不支持双上行拨号,该方法的适用范围小。另外,图5所示的示例中还需要在中控屏和智能主机12中配置两个VLAN的标识,配置复杂,且中控屏需要感知业务,即中控屏需要根据不同网络中的数据决策携带的标识,实现逻辑复杂。
基于如上问题,本申请实施例提供一种数据传输方法,该方法中仅在智能主机上进行数据传输的相关配置,由智能主机决策数据的传输通道,中控屏无需支持双上行拨号,且中控屏无需对业务进行感知,就能实现中控屏访问不同网络。
应理解的是,本申请实施例提供的数据传输方法不仅可以适用于家庭环境中,还可以适用于工厂、医院、学校等场景中,本申请实施例对此不做限制。另外,如上示例场景中,以两个网络为例进行说明,本申请实施例提供的数据传输方法,还可以适用于中控屏访问三个网络甚至更多网络的场景中。
下述实施例中以多个网络包括第一网络和第二网络为例,说明中控屏可以访问第一网络和第二网络的过程。其中,第一网络和第二网络不同,其中,第一网络和第二网络不同可以理解为:第一网络所处的网段和第二网络所处的网段不同。
在介绍本申请实施例提供的数据传输方法之前,首先对本申请实施例提供的数据传输方法适用的网络架构进行说明:
图6为本申请实施例提供的数据传输方法适用的网络架构示意图。参照图6,该网络架构可以包括:控制设备、联网设备、第一网关,以及第二网关。其中,联网设备通过第一网关接入第一网络,联网设备通过第二网关接入第二网络,控制设备通过联网设备桥接至第一网关。
控制设备通过联网设备桥接至第一网关可以理解为:控制设备和第一网关通过联网设备建立数据链路层的连接。示例性的,当控制设备与联网设备连接,以及联网设备与第一网关连接后,联网设备可以在数据链路层构建一条联通控制设备和第一网关的通路,该通路用于传输控制设备和第一网关之间的数据。在一种示例中,控制设备通过联网设备桥接至第一网关,可以看作控制设备和第一网关直接连接。在一种示例中,数据链路层可以称为媒体访问控制(medium access control,MAC)层。
在一种示例中,控制设备可以为包含有显示屏的设备,如中控屏、智慧屏、平板电脑等设备。在一种示例中,联网设备可以看作辅助控制设备连接第一网关的设备,以便控制设备可以控制第一网络中的设备,联网设备如可以为智能主机、计算机等设备。应理解,图6中以控制设备为中控屏为例。
第一网络和第二网络不同。示例性的,如第一网关可以为家庭路由器,第一网络为家庭网络,第二网关可以为社区路由器,第二网络为社区网络。或者,第一网关为家庭路由器1,第一网络为家庭网络1,第二网关可以为家庭路由器2,第二网络为家庭网络2。
参照图6,联网设备可以包括:LAN口、第一WAN口,以及第二WAN口。LAN口,用于连接控制设备和联网设备。第一WAN口,用于连接联网设备和第一网关,第二WAN口,用于连接联网设备和第二网关。换句话说,控制设备通过LAN口与联网设备连接,联网设备通过第一WAN口与第一网关连接,联网设备通过第二WAN口与第二网关连接。
在一种示例中,当控制设备通过LAN口与联网设备连接,以及联网设备通过第一WAN口与第一网关连接后,联网设备可以创建网桥,网桥分别与LAN口、第一WAN口连接。其中,控制设备可以通过网桥桥接至第一网关。其中,控制设备和第一网关通过联网设备建立的数据链路层的通路可以包括:LAN口、网桥,以及第一WAN口。
在一种实施例中,参照图6,联网设备可以包括:数据链路层的处理模块、数据链路层的网桥,以及网络层的路由转发模块。本申请实施例并不限制联网设备中模块的划分,模块的划分并不构成对联网设备的结构的限制。在一种示例中,网络层可以称为互联网协议(internet protocol,IP)层。
处理模块,用于处理来自控制设备的数据,以实现控制设备与第一网关、第二网关之间数据交互。
其中,联网设备中的LAN口,网桥,以及第一WAN口,用于传输控制设备和第一网关之间的交互数据。联网设备中的LAN口、网桥、路由转发模块,以及第二WAN口,用于传输控制设备和第二网关之间的交互数据。处理模块、网桥,以及路由转发模块可以参照图9A-图9B所示的实施例中的相关描述。
在一种实施例中,控制设备的界面可以如图7所示,图7中以控制设备为中控屏为例。参照图7,控制设备的界面可以显示第一网络中的智能设备的控制区域71,以及第二网络中的智能设备的控制区域72。以第一网络为家庭网络,第二网络为社区网络为例,相较于图2,控制设备的界面上还可以包括门禁、电梯等处于社区网络中的设备的控制区域72,如控制区域72中可以包括门禁、电梯等设备的控制控件73,本申请实施例对控制设备的界面的样式以及布局等不做限制。门禁、电梯等设备的控制控件73如可以包括:打开门禁的控件、关闭门禁的控件、打开电梯的控件,以及关闭电梯的控件等。图7中以打开门禁 的控件标注为73为例进行说明。
在一种示例中,控制设备中可以包括用于控制门禁、电梯等设备的插件或应用程序,以在用户操作控制区域72中的控制控件73时,控制设备可以显示对应的界面。在一种示例中,可以在控制设备出厂前就在控制设备中设置用于控制门禁、电梯等设备的插件或应用程序。在一种示例中,控制设备可以在系统升级或应用升级时,安装用于控制门禁、电梯等设备的插件或应用程序。下述实施例中将用于控制门禁、电梯等第二网络中的设备的插件或应用程序,称为第二应用,以及将用于控制第一网络中的智能设备的应用程序称为第一应用。
下面结合具体的实施例对本申请实施例提供的数据传输方法行说明。下面这几个实施例可以相互结合,对于相同或相似的概念或过程可能在某些实施例不再赘述。
图8为本申请实施例提供的数据传输方法的一种实施例的流程示意图。参照图8,本申请实施例提供的数据传输方法可以包括:
S801,在控制设备通过联网设备桥接至第一网关的情况下,控制设备通过联网设备向第一网关发送第一IP地址请求。
参照图6,控制设备与联网设备连接,如将控制设备有线连接至联网设备的LAN口。联网设备与第一网关连接,如联网设备通过网线将第一网关连接至联网设备的第一WAN口。这样,控制设备和第一网关可以通过联网设备建立数据链路层的连接,以实现控制设备通过联网设备桥接至第一网关。
当控制设备与联网设备连接,且联网设备通过网线与第一网关连接,控制设备可以通过联网设备向第一网关发送第一IP地址请求。第一IP地址请求,用于请求第一网关为控制设备分配第一网络中的IP地址,第一网络中的控制设备的IP地址可以称为第一IP地址。
示例性的,参照图8,控制设备可以向联网设备发送第一IP地址请求,联网设备可以将该第一IP地址请求透传至第一网关。
S802,第一网关响应于第一IP地址请求,通过联网设备向控制设备发送第一IP地址。
第一网关响应于第一IP地址请求,可以为控制设备分配第一IP地址。在第一网关为控制设备分配第一IP地址后,第一网关可以向联网设备发送第一IP地址,联网设备可以将第一IP地址透传至控制设备。如此,控制设备可以得到与第一网关处于同一网络(或同一网段)的IP地址。
S803,控制设备向联网设备发送第一IP地址和端口信息。
端口可以理解为控制设备分配的虚拟端口,该端口可以看作控制设备中用于传输控制设备与第二网关之间的数据的端口。下述实施例中将“用于传输控制设备与第二网关之间的数据的端口”称为第一端口进行说明。
在一种示例中,端口信息可以包括:端口号以及数据传输的协议类型。协议类型可以包括但不限于:传输控制协议(transmission control protocol,TCP)或者用户数据报协议(user datagram protocol,UDP)。
在一种实施例中,第一端口可以为静态配置的。示例性的,如在控制设备出厂前,已经在控制设备上配置好了用于传输控制设备和第二网关之间交互的数据的端口,如第一端口为控制设备中的80端口。
在一种实施例中,端口可以为动态配置的。示例性的,当控制设备上安装第二应用后,第二应用可以配置用于传输控制设备和第二网关之间交互的数据的端口。
S804,联网设备存储第一IP地址和端口信息。
在一种示例中,S804为可选步骤。
S805,联网设备根据第一IP地址和端口信息,配置数据传输规则。
在一种示例中,数据传输规则可以用于指示目的端口为第一端口的数据的传输方式。其中,可以将目的端口为第一端口的数据称为目标数据。数据传输规则可以理解为:将目标数据的目的IP地址修改为第一IP地址,以将目标数据传输至控制设备,目标数据的目的端口为第一端口。
换句话说,当联网设备接收来自第二网关的数据时,若该数据的目的端口为第一端口,联网设备确定该数据是第二网关发送给控制设备的,联网设备可以将该数据的目的IP地址修改为第一IP地址,且发送给控制设备。其中,联网设备可以将数据的目的IP地址修改为第一IP地址,且通过第一端口发送给控制设备。
示例性的,如控制设备中用于传输第二网关和控制设备之间的数据的端口为端口1,联网设备接收 到来自第二网关的数据,该数据的目的端口也为端口1,联网设备确定该数据是第二网关发送给控制设备的,联网设备可以将该数据的目的IP地址修改为第一IP地址,且通过端口1将数据发送给控制设备。
S806,在联网设备与第二网关连接的情况下,联网设备获取联网设备在第二网络中的第二IP地址。
本申请实施例对控制设备与联网设备连接、联网设备与第一网关连接,以及联网设备与第二网关连接的先后顺序不做限制。
联网设备与第二网关连接,如联网设备通过网线将第二网关连接至第二WAN口。
在一种实施例中,与控制设备获取第一IP地址类似的,联网设备可以向第二网关发送第二IP地址请求。第二IP地址请求,用于请求第二网关为联网设备分配第二网络中的联网设备的IP地址,第二网络中的联网设备的IP地址可以称为第二IP地址。第二网关响应于第二IP地址请求,可以为联网设备分配第二IP地址,且向联网设备发送第二IP地址。
在一种实施例中,可以静态配置联网设备的第二IP地址。示例性的,参照图7,控制设备的界面上显示有设置应用的图标74,当联网设备与第二网关连接后,工作人员可以在控制设备的设置应用中为联网设备配置第二IP地址,如工作人员可以在设置应用的界面中输入第二IP地址。控制设备响应于工作人员为联网设备配置第二IP地址,可以向联网设备发送第二IP地址,如此联网设备也可以获取第二IP地址。本申请实施例对工作人员配置IP地址的过程不做赘述,可以参照目前为计算机等设备配置IP地址的相关过程。应理解,工作人员可以为安装控制设备、联网设备等的人。
如此,联网设备可以获取与第二网关处于同一网络(同一网段)的联网设备的IP地址。
综上,联网设备可以实现与第二网关进行交互,且联网设备可以通过网卡可以与第一网关进行交互。
在一种实施例中,联网设备获取第二IP地址的过程,可以看作联网设备配置第二网络的WAN信息的过程。联网设备配置第二网络的WAN信息可以理解为:联网设备将用于连接联网设备和第二网关的第二WAN口的IP地址配置为第二IP地址。
如上实施例中讲述的为控制设备连接联网设备,以及联网设备连接第一网关、第二网关后,联网设备执行数据传输相关的配置操作,本申请实施例中,仅由联网设备执行数据传输相关的配置操作,并未在控制设备上进行配置,实现简单。
在联网设备执行完成数据传输相关的配置操作后,用户可以通过控制设备控制第一网络中的设备和第二网络中的设备,可以实现控制设备可以访问两个网络。下述实施例对用户使用控制设备控制第一网络中的设备,以及第二网络中的设备的过程进行说明。参照图9A,本申请实施例提供的数据传输方法可以包括:
S901,控制设备向联网设备发送第一数据。
相应的,联网设备可以接收来自控制设备的第一数据。
第一数据为控制设备向第一网关发送的数据。示例性的,如第一网关为家庭网关时,第一数据可以为音频播放指令、打开灯的指令等。
这里对控制设备向联网设备发送第一数据的场景进行示例说明:
场景一:响应于用户的第一操作,控制设备向联网设备发送第一数据。
第一操作可以理解为:用户对控制设备中第一应用的操作,第一应用为用于控制第一网络中的设备的应用程序。示例性的,参照图7,用户点击控制区域71中的音频播放控件75,可以理解为用户对控制设备中第一应用的操作,即用户的第一操作。应注意,第一操作还可以为:用户通过语音方式控制第一网络中的设备的操作,如第一操作可以为用户说出“播放音频”的语音。本申请实施例中对用户对第一应用的操作方式不做限制。
在一种示例中,用户操作第一应用,还可以用于查询处于第一网络中的设备的信息。设备的信息可以包括但不限于:设备的型号、运行状态、使用时长、剩余电量,系统版本等。
场景二:响应于接收来自联网设备的触发事件,向联网设备发送所述第一数据。其中,触发事件用于触发控制设备控制处于第一网络的设备。
环境中存在传感器,联网设备可以与传感器连接。传感器可以包括但不限于:距离传感器,红外传感器,环境光传感器等。在一种示例中,联网设备可以与传感器电力线通信(power line communication,PLC)连接。
传感器可以采集数据,在数据满足触发条件时,传感器可以向联网设备发送触发事件,联网设备可以控制设备发送触发事件。或者,联网设备可以接收来自传感器采集的数据,以在数据满足触发条件时,可以向控制设备发送触发事件。触发条件可以理解为触发发送触发事件的条件。控制设备响应于接收到来自联网设备的触发条件,可以确定待发送至第一网关的第一数据,以向联网设备发送第一数据。
以红外传感器为例,客厅中的红外传感器可以检测用户是否进入客厅,当红外传感器检测到用户进入客厅时,可以向联网设备发送触发事件1,触发事件1用于表征用户进入客厅。其中,红外传感器检测到用户进入客厅可以看作触发条件。联网设备可以向控制设备发送触发事件1,基于图1的相关描述,控制设备根据触发事件1,可以确定触发进入客厅模式。进入客厅模式需要打开客厅的灯,以及电视。相应的,控制设备可以向联网设备发送第一数据,第一数据可以为打开客厅的灯以及电视的指令。
在一种示例中,传感器还可以通过第一网关接入第一网络。在该种示例中,传感器可以采集数据,在数据满足触发条件时,传感器可以向第一网关发送触发事件,第一网关可以通过联网设备向控制设备发送触发事件。在该种示例中,控制设备响应于接收到来自联网设备的触发条件,可以确定待发送至第一网关的第一数据,以向联网设备发送第一数据,可以参照红外传感器的示例说明。在一种示例中,第一网关向控制设备发送的触发事件可以看作第三数据。
在另一种示例中,传感器还可以直接与控制设备连接,传感器可以采集数据,在数据满足触发条件时,传感器可以向控制设备发送触发事件。或者,控制设备可以接收来自传感器采集的数据,以在数据满足触发条件时,可以确定生成触发事件。在该种示例中,控制设备响应于接收到来自传感器的触发条件,或者确定生成触发事件,可以确定待发送至第一网关的第一数据,以向联网设备发送第一数据,可以参照红外传感器的示例说明。
场景三:控制设备周期性地向联网设备发送第一数据。
第一数据用于查询第一网络中设备的信息。示例性的,如控制设备可以周期性地查询第一网络中的设备的运行状态,以及时发现故障的设备。在该种示例中,控制设备可以周期性地向联网设备发送查询第一网络中的设备的运行状态的请求,该请求可以看作第一数据。
S902,联网设备响应于第一数据的目的IP地址不是第二网关的IP地址,且第一数据的目的MAC地址不是联网设备的MAC地址,向第一网关发送第一数据。
本申请实施例中,第一数据可以以数据包的形式发送,承载第一数据的数据包中可以包括第一数据的目的MAC地址和第一数据的目的IP地址。可以想到的是,承载第一数据的数据包中还可以包括:源MAC地址,源MAC地址可以看作发送第一数据的设备的MAC地址,本申请实施例对数据包中包含的内容不做赘述。
控制设备发出的数据的目的MAC地址是控制设备的下一跳设备的MAC地址,本申请实施例中控制设备通过联网设备桥接至第一网关,第一网关可以作为控制设备的下一跳设备,因此控制设备发出的数据的目的MAC地址是第一网关的MAC地址。相应的,第一数据的目的MAC地址也是第一网关的MAC地址。
联网设备接收到来自控制设备的第一数据后,可以解析承载第一数据的数据包的数据链路层的包头,得到第一数据的目的MAC地址,以及解析承载第一数据的数据包的IP层的包头,得到第一数据的目的IP地址。在一种示例中,第一数据的目的MAC地址可以位于承载第一数据的数据包的数据链路层的包头中,第一数据的目的IP地址可以位于承载第一数据的数据包的IP层的包头中。
联网设备检测第一数据的目的IP地址是否是第二网关的IP地址,其中,当第一数据的目的IP地址是第二网关的IP地址时,第一数据的目的端是第二网关,当第一数据的目的IP地址不是第二网关的IP地址时,第一数据的目的端不是第二网关。因为联网设备连接第一网关和第二网关,因此当第一数据的目的端不是第二网关时,联网设备可以确定第一数据的目的端为第一网关。第一数据的目的端可以理解为:用于接收第一数据的设备。
另,联网设备还可以检测第一数据的目的MAC地址是否是联网设备的MAC地址,其中,当第一数据的目的MAC地址是联网设备的MAC地址时,联网设备确定该第一数据是发给自己的,由自己进行处理。当第一数据的目的MAC地址不是联网设备的MAC地址时,联网设备可以向控制设备的下一跳设备,即第一网关,发送第一数据。
应理解,因为控制设备通过联网设备桥接至第一网关,第一数据的目的MAC地址是第一网关的 MAC地址,因此联网设备可以检测到第一数据的目的MAC地址不是联网设备的MAC地址,进而向第一网关发送第一数据,达到了将来自控制设备的第一数据发送至第一网关的目的。
如此,第一网关可以接收到第一数据。在一种实施例中,第一网关响应于接收到第一数据,可以执行响应于第一数据的操作。
响应于第一数据的操作可以为:第一网关向控制设备反馈响应信息,或者第一网关控制第一网络中的设备执行相应的操作。示例性的,以第一数据为音频播放指令为例,第一网关响应于音频播放指令,可以向音箱发送音频播放指令,以控制音箱播放音频。示例性的,以第一数据为查询第一网络中的设备的运行状态的请求为例,第一网关可以向第一网络中的设备发送查询运行状态的请求,第一网络中的设备可以向第一网关反馈自己的运行状态,第一网关可以通过联网设备向控制设备发送第一网络中的设备的运行状态。
S903,控制设备向联网设备发送第二数据。
相应的,联网设备可以接收来自控制设备的第二数据。
第二数据为控制设备向第二网关发送的数据。示例性的,如第二网关为家庭网关时,第二数据可以为打开门禁的指令、控制电梯的指令等。
这里对控制设备向联网设备发送第二数据的场景进行示例说明:
场景一:响应于用户的第二操作,控制设备向联网设备发送第二数据。
第二操作可以理解为:用户对控制设备中第二应用的操作,第二应用为用于控制第二网络中的设备的应用程序。示例性的,参照图7,用户点击控制区域72中的打开门禁的控件73,可以理解为用户对控制设备中第二应用的操作,即用户的第二操作。应注意,第二操作还可以为:用户通过语音方式控制第二网络中的设备的操作,可以参照第一操作的相关描述。
响应于用户的第二操作,控制设备可以向联网设备发送第二数据。示例性的,控制设备响应于用户点击打开门禁的控件73,可以向联网设备发送打开门禁的指令,打开门禁的指令可以看作是第二数据。
在一种示例中,用户操作第二应用,还可以用于查询处于第二网络中的设备的信息。设备的信息可以包括但不限于:设备的型号、运行状态、使用时长、剩余电量,系统版本等。
场景二:控制设备周期性地向联网设备发送第二数据。
第二数据用于查询第一网络中设备的信息。示例性的,如控制设备可以周期性地查询第二网络中的设备的运行状态,以及时发现故障的设备,在该种示例中,控制设备周期性地向联网设备发送查询第二网络中的设备的运行状态的请求,该请求可以看作第二数据。
在一种示例中,当第二网络中部署有传感器时,也可以由传感器采集数据,在数据满足触发条件时,传感器可以向联网设备、第二网关、或控制设备发送触发事件。控制设备响应于触发条件,可以向联网设备发送第二数据。该种示例可以参照S901中的“场景二”中的相关描述。
S904,联网设备响应于第二数据的目的IP地址是第二网关的IP地址,向第二网关发送第二数据。
本申请实施例中,第二数据可以以数据包的形式发送,承载第二数据的数据包中可以包括第二数据的目的MAC地址和第二数据的目的IP地址。第二数据的目的IP地址可以指示第二数据的目的端。第二数据的目的端可以理解为:用于接收第二数据的设备。在一种示例中,第二数据的目的MAC地址可以位于承载第二数据的数据包的数据链路层的包头中,第二数据的目的IP地址可以位于承载第二数据的数据包的IP层的包头中。
在一种示例中,联网设备可以解析承载第二数据的数据包的数据链路层的包头,得到第二数据的目的MAC地址,以及解析承载第二数据的数据包的IP层的包头,得到第二数据的目的IP地址。其中,第二数据的目的IP地址是第二网关的IP地址,联网设备响应于数据的目的IP地址是第二网关的IP地址,可以确定第二数据的目的端为第二网关。
联网设备确定第二数据的目的端是第二网关,基于S902中的描述,因为控制设备通过联网设备桥接至第一网关,因此控制设备发出的数据的目的MAC地址是第一网关的MAC地址,因此第二数据的目的MAC地址也是第一网关的MAC地址。若联网设备根据第二数据的目的MAC地址发送第二数据,会将第二数据错发至第一网关,导致第二网关无法接收到第二数据。本申请实施例中,联网设备可以根据第二数据的目的IP地址,向第二网关发送第二数据,以避免第二数据错发至第一网关。
如此,第二网关可以接收到第二数据。在一种实施例中,第一网关响应于接收到第二数据,可以执 行响应于第二数据的操作。
响应于第二数据的操作可以为:第二网关向控制设备反馈响应信息,或者第二网关控制第二网络中的设备执行相应的操作。示例性的,以第二数据为打开门禁的指令为例,第二网关响应于打开门禁的指令,可以向门禁发送打开门禁的指令,以打开门禁。示例性的,以第二数据为查询第二网络中的设备的运行状态的请求为例,第二网关可以向第二网络中的设备发送查询运行状态的请求,第二网络中的设备可以向第二网关反馈自己的运行状态,第二网关可以通过联网设备向控制设备发送第二网络中的设备的运行状态。
综上,控制设备可以实现访问不同网络,进而可以达到控制设备可以控制不同网络中的设备的目的。参照图7,用户点击控制区域71中的音频播放控件75,可以实现控制家庭网络中的音箱播放音频,用户点击控制区域72中的打开门禁的控件73,也可以控制社区网络中的门禁打开,操作简便。
在一种实施例中,S902中联网设备向第一网关发送第一数据可以看作:联网设备采用桥接模式向第一网关发送第一数据,S904中联网设备向第二网关发送第二数据可以看作:联网设备采用路由模式向第二网关发送第二数据。
本申请实施例中,控制设备通过联网设备桥接至第一网关,联网设备通过不同的网关接入不同的网络,当控制设备向第一网关发送第一数据时,联网设备可以响应于第一数据的目的IP地址不是第二网关的IP地址,且第一数据的目的MAC地址不是联网设备的MAC地址,实现向第一网关发送第一数据,当控制设备向第二网关发送第二数据时,为了避免联网设备错发第二数据至第一网关,联网设备可以响应于第二数据的目的IP地址是第二网关的IP地址,实现向第二网关发送第二数据,如此可以实现控制设备向处于两个不同网络中的网关发送数据,能够实现控制设备可以访问不同的网络,且进一步可以达到控制设备控制不同的网络中的设备的目的。
在一种实施例中,为了保证联网设备可以准确将第二数据发送至第二网关,联网设备可以修改第二数据的目的MAC地址是联网设备的MAC地址,以避免将第二数据错发至第一网关。在该种实施例中,参照图9B,本申请实施例提供的数据传输方法包括:
S901A,控制设备向联网设备发送第一数据。
S901A可以参照S901中的相关描述。
S902A,响应于第一数据的目的IP地址不是第二网关的IP地址,且第一数据的目的MAC地址不是联网设备的MAC地址,向第一网关发送第一数据。
现有技术中,参照图1所示的联网设备的结构,以第一数据为例,联网设备通过LAN口接收到第一数据,可以向网桥发送第一数据,网桥可以解析第一数据的数据链路层的包头,可以得到第一数据的目的MAC地址,因为第一数据目的MAC地址是第一网关的MAC地址。网桥响应于第一数据目的MAC地址不是联网设备的MAC地址,向第一网关发送第一数据。
同理的,参照图1所示的联网设备的结构,以第二数据为例,联网设备通过LAN口接收到第二数据,可以向网桥发送第二数据,网桥可以解析第二数据的数据链路层的包头,可以得到第二数据的目的MAC地址,因为第二数据目的MAC地址是第一网关的MAC地址。网桥响应于第二数据目的MAC地址不是联网设备的MAC地址,向第一网关发送第二数据。
如此,现有技术中联网设备无论接收到第一数据还是第二数据,均会向第一网关发送,导致第二数据错发第一网关,第二网关无法接收到第二数据。
这里以图6中联网设备的内部结构为例,对S902A进行说明:
参照图10A,本申请实施例中,控制设备向联网设备发送第一数据,联网设备可以通过LAN口接收到来自控制设备的第一数据,处理模块可以解析承载第一数据的数据包的IP层的包头,得到第一数据的目的IP地址。处理模块检测第一数据的目的IP地址是否是第二网关的IP地址,因为第一数据是控制设备发送至第一网关的数据,因此第一数据的目的IP地址不是第二网关的IP地址。应理解,第一数据的目的IP地址是第一网关的IP地址。
其中,处理模块响应于第一数据的目的IP地址不是第二网关的IP地址,可以向网桥发送第一数据。网桥可以解析承载第一数据的数据包的数据链路层的包头,得到第一数据的目的MAC地址。因为第一数据的目的MAC地址是第一网关的MAC地址,不是联网设备的MAC地址,因此网桥响应于第一数据的 目的MAC地址不是联网设备的MAC地址,可以确定该第一数据不是发送给自己的,可以通过第一WAN口向第一网关发送第一数据。
在一种示例中,联网设备的MAC地址可以为网桥的MAC地址。
S903A,控制设备向联网设备发送第二数据。
S903A可以参照S903中的相关描述。
S904A,响应于第二数据的目的IP地址是第二网关的IP地址,联网设备将第二数据的目的MAC地址修改为联网设备的MAC地址。
其中,联网设备可以解析承载第二数据的数据包的IP层的包头,得到第二数据的目的IP地址。因为第二数据是控制设备发送至第二网关的,第二数据的目的IP地址是第二网关的IP地址,联网设备可以确定第二数据的目的端为第二网关,根据S902中的描述,若联网设备根据第二数据的目的MAC地址发送第二数据,会将第二数据错发至第一网关。
本申请实施例中,为了保证第二数据可以发送至第二网关,联网设备响应于第二数据的目的IP地址是第二网关的IP地址,联网设备可以将第二数据的目的MAC地址修改为联网设备的MAC地址,目的在于:联网设备不把数据发送至第一网关,而是由联网设备内部进行进一步处理,以实现将第二数据发送至第二网关。
S905A,响应于第二数据的目的MAC地址是联网设备的MAC地址,联网设备根据第二数据的目的IP地址,向第二网关发送第二数据。
联网设备将第二数据的目的MAC地址是联网设备的MAC地址后,联网设备可以对第二数据进行处理。示例性的,联网设备可以根据第二数据的目的IP地址是第二网关的IP地址,向第二网关发送第二数据。
这里以图6中联网设备的内部结构为例,对S904A-S905A进行说明:
参照图10B,本申请实施例中,控制设备向联网设备发送第二数据,联网设备可以通过LAN口接收到第二数据,处理模块可以解析承载第二数据的数据包的IP层的包头,得到第二数据的目的IP地址。由于第二数据为控制设备发送至第二网关的,第二数据的目的IP地址是第二网关的IP地址,且根据S902中的描述,因为第二数据的目的MAC地址是第一网关的MAC地址,不是联网设备的MAC地址,若处理模块直接向网桥会发送第二数据,则网桥会将第二数据发送至第一网关。为了不让网桥将第二数据发送至第一网关,而是由联网设备的路由转发模块将第二数据路由至第二网关,因此网桥需要先将第二数据发送至联网设备的路由转发模块。
为了实现网桥可以将第二数据发送至路由转发模块,处理模块响应于第二数据的目的IP地址是第二网关的IP地址,可以将第二数据的目的MAC地址修改为联网设备的MAC地址,且将修改了目的MAC地址的第二数据发送至网桥。这样,网桥接收到第二数据后,可以解析承载第二数据的数据包的数据链路层的包头,得到第二数据的目的MAC地址是联网设备的MAC地址,网桥响应于第二数据的目的MAC地址是联网设备的MAC地址,不会向第一网关发送第二数据,而是向路由转发模块发送第二数据,由路由转发模块对第二数据进行进一步处理。路由转发模块在接收到第二数据后,可以解析承载第二数据的数据包的IP层的包头,得到第二数据的目的IP地址是第二网关的IP地址,路由转发模块可以确定第二数据的目的端为第二网关,因此路由转发模块可以通过第二WAN口向第二网关发送第二数据。
本申请实施例中,当控制设备向第二网关发送第二数据时,为了避免联网设备错发第二数据至第一网关,联网设备可以将第二数据的目的MAC地址修改为联网设备的MAC地址,便于联网设备可以进一步处理第二数据,联网设备可以根据第二数据的目的IP地址,实现向第二网关发送第二数据,如此联网设备可以实现将来自控制设备的数据发送至不同的网关,能够实现控制设备可以访问不同的网络。
另外,本申请实施例中,控制设备无需感知业务,即控制设备无需确定数据是发送至第一网关的还是第二网关的,相较于图5中的方法,控制设备无需在数据中添加额外的标识,也无需在控制设备中进行VLAN的配置,这样控制设备在后续故障后便于更换。另外,本申请实施例中联网设备可以自行进行数据传输的相关配置,且对于控制设备发送至第二网关的数据,可以修改数据中的MAC地址为联网设备的MAC地址,以便该数据可以顺利发送至第二网关。本申请实施例中的传输方法,实现了控制设备可以访问不同网络,以及用户通过控制设备可以控制不同网络中的设备,可以提高用户体验。
图9A-图9B讲述了控制设备向第一网关、第二网关发送数据的示例,下面对第一网关和第二网关向控制设备发送数据的过程进行说明。
下面结合图11说明第二网关向控制设备发送数据的过程,参照图11,本申请实施例提供的数据传输方式可以包括:
S1101,第二网关向联网设备发送第三数据。
第三数据可以以数据包的形式发送,承载第三数据的数据包中可以包括第三数据的目的MAC地址、目的IP地址,以及目的端口。因为第三数据为第二网关向控制设备发送的数据,第三数据的目的端口为第一端口,第一端口为控制设备中用于传输控制设备和第二网关之间的数据的端口。
因为联网设备与第二网关连接,控制设备未与第二网关连接,因此第三数据的目的MAC地址是联网设备的MAC地址,第三数据的目的IP地址是联网设备的IP地址。因为联网设备通过第二WAN口与第二网关连接,因此第三数据的目的MAC地址是第二WAN口的MAC地址,以及第三数据的目的MAC地址是第二WAN口的IP地址。根据S806中的描述,第二WAN口的IP地址是第二IP地址。
S1102,响应于第三数据的目的端口为控制设备中用于传输第二网关和控制设备之间的数据的端口,联网设备将第三数据的目的IP地址修改为第一IP地址。
第三数据的目的端口为第一端口,可以将第三数据看作目标数据。因为联网设备预先配置了数据传输规则,因此联网设备响应于第三数据的目的端口为控制设备中用于传输第二网关和控制设备之间的数据的端口,联网设备可以根据数据传输规则,将第三数据的目的IP地址修改为第一IP地址。
其中,联网设备将第三数据的目的IP地址修改为第一IP地址的目的在于:联网设备向控制设备发送第三数据后,控制设备解析承载第三数据的数据包的IP层的包头,可以得到第三数据的目的IP地址是自己的IP地址,确定该第三数据是发送给自己的,因此可以顺利进行处理。若联网设备不将第三数据的目的IP地址修改为第一IP地址,而是直接发给控制设备,则控制设备解析承载第三数据的数据包的IP层的包头,可以得到第三数据的目的IP地址不是自己的IP地址,确定该第三数据不是发送给自己的,便不做处理。
S1103,联网设备根据第一IP地址,向控制设备发送第三数据。
联网设备将第三数据的目的IP地址修改为第一IP地址后,可以确定第三数据是发送给控制设备的,因此可以根据第一IP地址,向控制设备发送第三数据。具体的,联网设备可以通过第一端口,向控制设备发送第三数据。
这里以图6中联网设备的内部结构为例,对S1102进行说明:
参照图10C,本申请实施例中,第二网关向联网设备发送第三数据,联网设备可以通过第二WAN口接收到第三数据,路由转发模块可以解析承载第三数据的数据包的数据链路层的包头和IP层的包头,得到第三数据的目的MAC地址、目的IP地址,以及目的端口。路由转发模块响应于第三数据的目的端口为控制设备中用于传输第二网关和控制设备之间的数据的端口,路由转发模块可以确定第三数据的目的端为控制设备,路由转发模块可以将第三数据的目的IP地址修改为第一IP地址。路由转发模块可以向网桥发送修改了目的IP地址的第三数据,网桥可以根据第一IP地址,通过LAN口、控制设备中用于传输第二网关和控制设备之间的数据的端口,向控制设备发送第三数据。
另外,因为控制设备通过联网设备桥接至第一网关,可以看作控制设备和第一网关直连连接,在一种实施例中,在第一网关向控制设备发送第四数据时,第四数据的目的MAC地址是控制设备的MAC地址,第四数据的目的IP地址是控制设备的IP地址。当联网设备接收来自第一网关的第四数据时,可以根据第四数据的目的MAC地址,向控制设备发送第四数据。
具体的,第一网关向联网设备发送第四数据,联网设备可以通过第一WAN口接收到第四数据,网桥可以解析承载第四数据的数据包的数据链路层的包头,得到第四数据的目的MAC地址。因为第四数据的目的MAC地址是控制设备的MAC地址,因此网桥响应于第四数据的目的MAC地址不是联网设备的MAC地址,通过LAN口向控制设备发送第四数据。
本申请实施例中,联网设备可以将来自第一网关的数据发送至控制设备,以及将来自第二网关的数据发送至控制设备。综上,本申请实施例可以实现控制设备与不同网络中的网关的交互,可以实现控制设备可以访问不同网络,进而达到控制设备控制不同网络中的设备的目的,可以提高用户体验。
在一种实施例中,本申请实施例还提供一种电子设备,该电子设备可以为上述实施例中所述的联网设备、控制设备、第一网关,以及第二网关。参照图12,该电子设备中可以包括:处理器1201(例如CPU)、存储器1202。存储器1202可能包含高速随机存取存储器(random-access memory,RAM),也可能还包括非易失性存储器(non-volatile memory,NVM),例如至少一个磁盘存储器,存储器1202中可以存储各种指令,以用于完成各种处理功能以及实现本申请的数据传输方法。
可选的,本申请涉及的电子设备还可以包括:电源1203、通信总线1204以及通信端口1205。上述通信端口1205用于实现电子设备与其他外设之间进行连接通信。在本申请实施例中,存储器1202用于存储计算机可执行程序代码,程序代码包括指令;当处理器1201执行指令时,指令使电子设备的处理器1201执行上述方法实施例中的动作,其实现原理和技术效果类似,在此不再赘述。
在一种实施例中,电子设备中还可以包括显示屏1206,显示屏1206用于显示电子设备的界面。
在一种实施例中,本申请实施例还提供一种数据传输系统,参照图6,该数据传输系统中包括联网设备和控制设备,联网设备和控制设备可以交互实现本申请的数据传输方法,可以参照上述实施例中的描述。
在一种实施例中,数据传输系统还可以包括:第一网关和第二网关。
需要说明的是,上述实施例中所述的模块或部件可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个专用集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital signal processor,DSP),或,一个或者多个现场可编程门阵列(field programmable gate array,FPGA)等。再如,当以上某个模块通过处理元件调度程序代码的形式实现时,该处理元件可以是通用处理器,例如中央处理器(central processing unit,CPU)或其它可以调用程序代码的处理器如控制器。再如,这些模块可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行计算机程序指令时,全部或部分地产生按照本申请实施例的流程或功能。计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘Solid State Disk(SSD))等。
本文中的术语“多个”是指两个或两个以上。本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系;在公式中,字符“/”,表示前后关联对象是一种“相除”的关系。另外,需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
可以理解的是,在本申请的实施例中涉及的各种数字编号仅为描述方便进行的区分,并不用来限制本申请的实施例的范围。
可以理解的是,在本申请的实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请的实施例的实施过程构成任何限定。

Claims (24)

  1. 一种数据传输系统,其特征在于,所述数据传输系统包括:控制设备和联网设备,所述联网设备通过第一网关接入第一网络,所述联网设备通过第二网关接入第二网络,所述控制设备通过所述联网设备桥接至所述第一网关,所述第一网络和所述第二网络不同;
    所述控制设备,用于向所述联网设备发送第一数据;
    所述联网设备,用于响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据;
    所述控制设备,还用于向所述联网设备发送第二数据;
    所述联网设备,还用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据。
  2. 根据权利要求1所述的系统,其特征在于,所述联网设备,具体用于:
    响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址;
    响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
  3. 根据权利要求2所述的系统,其特征在于,所述联网设备包括数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块,其中,所述控制设备通过所述网桥桥接至所述第一网关;
    所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,并向所述网桥发送修改后的所述第二数据;
    所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据;
    所述路由转发模块,用于根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
  4. 根据权利要求1-3中任一项所述的系统,其特征在于,所述联网设备包括数据链路层的处理模块和数据链路层的网桥,其中,所述控制设备通过所述网桥桥接至所述第一网关;
    所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据;
    所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据。
  5. 根据权利要求1-4中任一项所述的系统,其特征在于,所述控制设备,具体用于响应于用户的第一操作,向所述联网设备发送所述第一数据,所述第一操作为所述用户对所述控制设备的第一应用的操作,所述第一应用用于控制处于所述第一网络的设备;或者,所述控制设备,具体用于响应于接收到来自所述联网设备的触发事件,向所述联网设备发送所述第一数据,所述触发事件用于触发所述控制设备控制处于所述第一网络的设备;或者,所述控制设备,具体用于周期性地向所述联网设备发送所述第一数据;和/或,
    所述控制设备,具体用于响应于用户的第二操作,向所述联网设备发送所述第二数据,所述第二操作为所述用户对所述控制设备的第二应用的操作,所述第二应用用于控制处于所述第二网络的设备;或者,所述控制设备,具体用于周期性地向所述联网设备发送所述第二数据。
  6. 根据权利要求1-5中任一项所述的系统,其特征在于,所述控制设备,还用于向所述联网设备发送第一IP地址和端口信息,所述第一IP地址是所述第一网关为所述控制设备分配的所述第一网络中的IP地址,所述端口信息用于指示:所述控制设备中用于传输所述控制设备与所述第二网关之间的数据的端口;
    所述联网设备,还用于根据所述第一IP地址和所述端口信息,配置数据传输规则,所述数据传输规则用于指示:将目标数据的目的IP地址修改为所述第一IP地址,以将所述目标数据传输至所述控制设备,所述目标数据的目的端口为所述端口。
  7. 根据权利要求6所述的系统,其特征在于,所述联网设备,还用于:
    接收来自所述第二网关的第三数据;
    响应于所述第三数据的目的端口为所述端口,根据所述数据传输规则,将所述第三数据的目的IP地址修改为所述第一IP地址;
    根据所述第一IP地址,向所述控制设备发送所述第三数据。
  8. 根据权利要求7所述的系统,其特征在于,所述第三数据的目的IP地址是第二IP地址,所述第二IP地址是所述第二网关为所述联网设备分配的所述第二网络中的IP地址。
  9. 根据权利要求6-8中任一项所述的系统,其特征在于,所述控制设备包括第二应用,所述第二应用用于配置所述端口,所述第二应用用于控制处于所述第二网络的设备。
  10. 根据权利要求1-9中任一项所述的系统,其特征在于,所述联网设备,还用于:
    接收来自所述第一网关的第四数据;
    响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
  11. 根据权利要求1所述的系统,其特征在于,所述联网设备包括:LAN口、第一WAN口,以及第二WAN口,所述联网设备通过所述第一WAN口与所述第一网关连接,所述联网设备通过所述第二WAN口与所述第二网关连接,所述控制设备通过所述LAN口和所述第一WAN口桥接至所述第一网关。
  12. 根据权利要求11所述的系统,其特征在于,所述控制设备,具体用于通过所述LAN口向所述联网设备发送所述第一数据;
    所述联网设备,具体用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,且所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据;
    所述控制设备,具体用于通过所述LAN口向所述联网设备发送所述第二数据;
    所述联网设备,具体用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
  13. 一种数据传输方法,其特征在于,应用于联网设备,所述联网设备通过第一网关接入第一网络,所述联网设备通过第二网关接入第二网络,控制设备通过所述联网设备桥接至所述第一网关,所述第一网络和所述第二网络不同,所述方法包括:
    接收来自所述控制设备的第一数据;
    响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据;
    接收来自所述控制设备的第二数据;
    响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据。
  14. 根据权利要求13所述的方法,其特征在于,所述响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据,包括:
    响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址;
    响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
  15. 根据权利要求14所述的方法,其特征在于,所述联网设备包括数据链路层的处理模块、数据链路层的网桥、以及网络层的路由转发模块,其中,所述控制设备通过所述网桥桥接至所述第一网关;
    所述处理模块,用于响应于所述第二数据的目的IP地址是所述第二网关的IP地址,将所述第二数据的目的MAC地址修改为所述联网设备的MAC地址,并向所述网桥发送修改后的所述第二数据;
    所述网桥,用于响应于所述第二数据的目的MAC地址是所述联网设备的MAC地址,向所述路由转发模块发送所述第二数据;
    所述路由转发模块,用于根据所述第二数据的目的IP地址,向所述第二网关发送所述第二数据。
  16. 根据权利要求13-15中任一项所述的方法,其特征在于,所述联网设备包括数据链路层的处理模块和数据链路层的网桥,其中,所述控制设备通过所述网桥桥接至所述第一网关;
    所述处理模块,用于响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,向所述网桥发送所述第一数据;
    所述网桥,用于响应于所述第一数据的目的MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据。
  17. 根据权利要求13-16中任一项所述的方法,其特征在于,所述方法还包括:
    接收来自所述控制设备的第一IP地址和端口信息,所述第一IP地址是所述第一网关为所述控制设备分配的所述第一网络中的IP地址,所述端口信息用于指示:所述控制设备中用于传输所述控制设备与所述第二网关之间的数据的端口;
    根据所述第一IP地址和所述端口信息,配置数据传输规则,所述数据传输规则用于指示:将目标数据的目的IP地址修改为所述第一IP地址,以将所述目标数据传输至所述控制设备,所述目标数据的目的端口为所述端口。
  18. 根据权利要求17所述的方法,其特征在于,所述方法还包括:
    接收来自所述第二网关的第三数据;
    响应于所述第三数据的目的端口为所述端口,根据所述数据传输规则,将所述第三数据的目的IP地址修改为所述第一IP地址;
    根据所述第一IP地址,向所述控制设备发送所述第三数据。
  19. 根据权利要求18所述的方法,其特征在于,所述第三数据的目的IP地址是第二IP地址,所述第二IP地址是所述第二网关为所述联网设备分配的所述第二网络中的IP地址。
  20. 根据权利要求17-19中任一项所述的方法,其特征在于,所述端口为所述控制设备中的第二应用配置的,所述第二应用用于控制处于所述第二网络的设备。
  21. 根据权利要求13-20中任一项所述的方法,其特征在于,所述方法还包括:
    接收来自所述第一网关的第四数据;
    响应于所述第四数据的目的MAC地址不是所述联网设备的MAC地址,向所述控制设备发送所述第四数据。
  22. 根据权利要求13所述的方法,其特征在于,所述联网设备包括:LAN口、第一WAN口,以及第二WAN口,所述联网设备通过所述第一WAN口与所述第一网关连接,所述联网设备通过所述第二WAN口与所述第二网关连接,所述控制设备通过所述LAN口和所述第一WAN口桥接至所述第一网关。
  23. 根据权利要求22所述的方法,其特征在于,所述接收来自所述控制设备的第一数据,包括:
    通过所述LAN口接收来自所述控制设备的所述第一数据;
    所述响应于所述第一数据的目的互联网协议IP地址不是所述第二网关的IP地址,且所述第一数据的目的媒体访问控制MAC地址不是所述联网设备的MAC地址,向所述第一网关发送所述第一数据,包括:
    响应于所述第一数据的目的IP地址不是所述第二网关的IP地址,且所述第一数据的目的MAC地址不是所述联网设备的MAC地址,通过所述第一WAN口向所述第一网关发送所述第一数据;
    所述接收来自所述控制设备的第二数据,包括:
    通过所述LAN口接收来自所述控制设备的所述第二数据;
    所述响应于所述第二数据的目的IP地址是所述第二网关的IP地址,向所述第二网关发送所述第二数据,包括:
    响应于所述第二数据的目的IP地址是所述第二网关的IP地址,通过所述第二WAN口向所述第二网关发送所述第二数据。
  24. 一种联网设备,其特征在于,包括:处理器和存储器;
    所述存储器存储计算机指令;
    所述处理器执行所述存储器存储的计算机指令,使得所述处理器执行如权利要求13-23中任一项所述的方法。
PCT/CN2023/119760 2022-09-30 2023-09-19 数据传输系统、数据传输方法以及联网设备 WO2024067255A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211213899.6 2022-09-30
CN202211213899.6A CN117812117A (zh) 2022-09-30 2022-09-30 数据传输系统、数据传输方法以及联网设备

Publications (1)

Publication Number Publication Date
WO2024067255A1 true WO2024067255A1 (zh) 2024-04-04

Family

ID=90432285

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/119760 WO2024067255A1 (zh) 2022-09-30 2023-09-19 数据传输系统、数据传输方法以及联网设备

Country Status (2)

Country Link
CN (1) CN117812117A (zh)
WO (1) WO2024067255A1 (zh)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108471383A (zh) * 2018-02-08 2018-08-31 华为技术有限公司 报文转发方法、装置和系统
CN108600415A (zh) * 2018-05-28 2018-09-28 郑州云海信息技术有限公司 一种虚拟网络访问外网的方法、系统及sdn控制器
CN110086782A (zh) * 2019-03-29 2019-08-02 岭博科技(北京)有限公司 一种酒店物联智控系统及智能控制设备的方法和电子设备
US20200068627A1 (en) * 2018-08-24 2020-02-27 Ledvance Llc Bluetooth low energy backed smart lighting system
CN112235175A (zh) * 2020-09-01 2021-01-15 深圳市共进电子股份有限公司 一种网桥设备的访问方法、访问装置及网桥设备
CN113132218A (zh) * 2019-12-31 2021-07-16 中兴通讯股份有限公司 一种家庭网关访问方法、装置、系统处理器及存储介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108471383A (zh) * 2018-02-08 2018-08-31 华为技术有限公司 报文转发方法、装置和系统
CN108600415A (zh) * 2018-05-28 2018-09-28 郑州云海信息技术有限公司 一种虚拟网络访问外网的方法、系统及sdn控制器
US20200068627A1 (en) * 2018-08-24 2020-02-27 Ledvance Llc Bluetooth low energy backed smart lighting system
CN110086782A (zh) * 2019-03-29 2019-08-02 岭博科技(北京)有限公司 一种酒店物联智控系统及智能控制设备的方法和电子设备
CN113132218A (zh) * 2019-12-31 2021-07-16 中兴通讯股份有限公司 一种家庭网关访问方法、装置、系统处理器及存储介质
CN112235175A (zh) * 2020-09-01 2021-01-15 深圳市共进电子股份有限公司 一种网桥设备的访问方法、访问装置及网桥设备

Also Published As

Publication number Publication date
CN117812117A (zh) 2024-04-02

Similar Documents

Publication Publication Date Title
US10901470B2 (en) Power distribution unit self-identification
US9992158B2 (en) Locale profile for a fabric network
US8645567B2 (en) Method and system for packet filtering for local host-management controller pass-through communication via network controller
EP2080272B1 (en) Unification of multimedia devices
JP6656612B2 (ja) ネットワークサービス構成方法およびネットワーク管理装置
JP6982104B2 (ja) Brasシステムベースのパケットカプセル化方法および装置
KR20100050517A (ko) 네트워크 장치의 데이터 스트림 제어
JP2015508607A (ja) 通信ネットワークのためのクラウドコンピューティングで制御されるゲートウェイ
JP2010049676A (ja) ソケットapiコール・エミュレーションの方法およびシステム
EP2611073B1 (en) Transmission management apparatus, transmission system, transmission management method, and computer-readable recording medium
JP2004048649A (ja) ネットワークデバイス管理方法、ネットワークデバイス管理プログラム及びネットワーク制御装置
US20120191816A1 (en) Method and apparatus for collecting diagnostic information
JP2003203025A (ja) 機能的ネットワークを構成するための方法および配置、ならびに機能的にネットワーク接続された装置の動作を制御するための方法および配置
KR102120548B1 (ko) 클라우드 기반의 IoT 네트워크 가상화 시스템 및 네트워킹 방법
JP2016515317A (ja) マルチコントローラネットワークにおける相互作用制御の設定
US11153118B2 (en) Technique for executing a service in a local area network through a wide area communication network
WO2024067255A1 (zh) 数据传输系统、数据传输方法以及联网设备
CN107231275B (zh) 用于用户设备与家居设备连接配置的方法
CN108702315A (zh) 在连接到不同网络的两个本地设备之间建立连接
US7734758B1 (en) USB encapsulation for network transmission
Van Seghbroeck et al. WS-Gesture, a gesture-based state-aware control framework
TW201814608A (zh) 物聯系統及其建立連線之方法
JP5721184B2 (ja) 電子機器制御システム及び電子機器制御方法
JP2017068511A (ja) 機器管理方法及び機器管理装置
JP2015220525A (ja) 制御装置、制御システム、制御方法、及び、プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23870487

Country of ref document: EP

Kind code of ref document: A1