Data communication method, device and equipment based on MESH network
Patent Information
- Application Number
- CN202310622730.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2026-10-30
- Estimated Expiration
- 2043-05-29
AI Technical Summary
由于有线组网方式需要预留布线空间,组网灵活性受限;而无线组网方式会限制多个路由器之间的距离
[0016]在本申请实施例中,利用隧道技术实现多个路由器之间的组网,而基于隧道技术在多个路由器之间建立的网络隧道不会受到距离的限制,也不需要布置较长网线;因此,本申请中能够实现路由器在跨视距的场景下进行组网,不会受限于传统的有线组网方式和无线组网方式的局限性,也即本申请能够提高MESH网络的广泛性,进而提高了基于MESH网络的数据通信的广泛性。
Smart Images

Figure CN116669228B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a data communication method, apparatus and device based on a MESH network. Background Technology
[0002] As the number of user terminals (home appliances and mobile phones, etc.) in the home increases and they are distributed more widely, in order to better provide network services for user terminals, it is necessary to deploy multiple routers in the home and connect these routers to form a wireless mesh network using Wireless Fidelity (WIFI). In this way, user terminals can access any router in the mesh network (such as the router closest to the user terminal) to achieve internet access.
[0003] In related technologies, multiple routers are connected via Wi-Fi using either wireless or wired methods to form a mesh network, upon which user terminals then communicate via data. However, wired networking requires reserved cabling space, limiting its flexibility; while wireless networking restricts the distance between multiple routers. Therefore, the networking methods in these technologies have certain limitations, which in turn limit communication capabilities based on mesh networks. Summary of the Invention
[0004] This application provides a data communication method, apparatus, and device based on a MESH network, which can improve the breadth of MESH networks and thus improve the breadth of data communication based on MESH networks.
[0005] On the one hand, a data communication method based on a MESH network is provided, the method comprising:
[0006] Establish a network tunnel between the first router and at least one second router;
[0007] Based on the network tunnel, the first router and the at least one second router are networked to obtain a wireless mesh network, wherein the first router is the master router in the mesh network, and the second router is a sub-router in the mesh network; and
[0008] When a user terminal accesses the MESH network via a target router among the at least one second router, the user terminal responds to control messages through the first router and data messages through the target router, based on the network tunnel between the target router and the first router.
[0009] On the other hand, a data communication device based on a MESH network is provided, the device comprising:
[0010] A module is established to create a network tunnel between the first router and at least one second router.
[0011] A networking module is configured to network the first router and the at least one second router based on the network tunnel to obtain a wireless mesh network, wherein the first router is the master router in the mesh network, and the second router is a sub-router in the mesh network; and
[0012] The communication module is configured to, when a user terminal accesses the MESH network via a target router among the at least one second router, respond to the user terminal's control messages through the first router and to respond to the user terminal's data messages through the target router, based on the network tunnel between the target router and the first router.
[0013] On the other hand, a router is provided, the router including a processor and a memory, the memory storing at least one piece of program code, the at least one piece of program code being loaded and executed by the processor to implement the data communication method based on the MESH network described above.
[0014] On the other hand, a computer-readable storage medium is provided, wherein at least one piece of program code is stored in the storage medium, the at least one piece of program code being loaded and executed by a processor to implement the above-described MESH network-based data communication method.
[0015] On the other hand, a computer program product is provided, which stores at least one piece of program code for execution by a processor to implement the data communication method based on a MESH network described above.
[0016] In this application embodiment, tunneling technology is used to realize networking between multiple routers. The network tunnels established between multiple routers based on tunneling technology are not limited by distance and do not require the laying of long network cables. Therefore, this application can realize networking of routers in cross-line-of-sight scenarios, without being limited by the limitations of traditional wired networking and wireless networking methods. In other words, this application can improve the breadth of MESH networks, thereby improving the breadth of data communication based on MESH networks. Attached Figure Description
[0017] Figure 1 A schematic diagram illustrating an implementation environment of a MESH network-based data communication method according to an exemplary embodiment of this application is shown.
[0018] Figure 2 A flowchart illustrating a MESH network-based data communication method is shown in an exemplary embodiment of this application;
[0019] Figure 3 A flowchart illustrating a MESH network-based data communication method is shown in an exemplary embodiment of this application;
[0020] Figure 4 This illustration shows a schematic diagram of a network formed by a first router and at least one second router, according to an exemplary embodiment of this application.
[0021] Figure 5 A flowchart illustrating a MESH network-based data communication method is shown in an exemplary embodiment of this application;
[0022] Figure 6 A block diagram of a MESH network-based data communication apparatus is shown in an exemplary embodiment of this application;
[0023] Figure 7 A block diagram of a router illustrated in an exemplary embodiment of this application is shown. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0025] In this article, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0026] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the control messages and data messages involved in this application were obtained under fully authorized conditions.
[0027] Please refer to Figure 1 This illustration shows a schematic diagram of an implementation environment for a MESH network-based data communication method according to an exemplary embodiment of this application. See also... Figure 1The implementation environment includes: a first router 101, at least one second router 102, and a user terminal 103. The first router 101 and at least one second router 102 are connected via Wi-Fi to form a mesh network, where the first router 101 is the master router and the second router 102 is a sub-router.
[0028] User terminal 103 can access the MESH network to achieve internet access. In some embodiments, user terminal 103 can access the MESH network via a first router 101 or any second router 102. In this embodiment, the router used by user terminal 103 to access the MESH network is not specifically limited. Furthermore, user terminal 103 can roam within the MESH network, meaning it can switch routers to access the MESH network. For example, user terminal 103 can initially access the MESH network via a sub-router, and then, if its location changes, it can switch to accessing the MESH network via a main router; or, if its location changes, it can switch to accessing the MESH network via another sub-router.
[0029] The first router 101 and the second router 102 can be routers with a wide area network (WAN) exit; for example, the first router 101 and the second router 102 can be customer premises equipment (CPE) or home wireless routers. The user terminal 103 can be a mobile phone, tablet computer, home appliance, or wearable device; the home appliance can be an air conditioner, refrigerator, washing machine, smart curtains, etc.
[0030] The number of second routers 102 can be one or more. Figure 1 The following description uses an example where the number of second routers 102 is two. In some embodiments, when there are multiple second routers 102, the first router 101 and the multiple second routers 102 can be evenly distributed within their respective spaces; for example, the first router 101 and the multiple second routers 102 can be evenly distributed throughout a home, thereby enabling seamless switching of the user terminal 103 between the multiple routers (first router 101 and multiple second routers 102). In some embodiments, the positions of the first router 101 and the multiple second routers 102 can be set according to the distribution of the user terminals 103 within the space where the routers are located, so that the routers meet load balancing requirements, thereby enabling the user terminals 103 within the space to obtain better network services.
[0031] Please refer to Figure 2 This document illustrates a flowchart of a MESH network-based data communication method according to an exemplary embodiment of this application. (Reference) Figure 2 The method includes:
[0032] Step 201: Establish a network tunnel between the first router and at least one second router.
[0033] In some embodiments, a network tunnel can be established between the first router and at least one second router using any tunneling technology; for example, the tunneling technology can be a Virtual eXtensible Local Area Network (VXLAN). Accordingly, this step can be: establishing a Layer 2 Ethernet network tunnel between the first router and at least one second router, thereby enabling cross-regional Layer 2 interconnection between the first router and at least one second router.
[0034] The implementing entity of this application can be a first router. In this step, a network tunnel is established between the first router and each second router; in addition, a network tunnel is also established between any two second routers. For example, if there are two second routers, namely second router 1 and second router 2, then a network tunnel is established between the first router and second router 1, between the first router and second router 2, and between second router 1 and second router 2.
[0035] Step 202: Based on the network tunnel, connect the first router and at least one second router to form a network to obtain a MESH network.
[0036] The first router is the master router in the MESH network, and the second router is a sub-router in the MESH network. Based on the network tunnel between the first router and at least one second router, the first router sends a networking protocol to at least one second router, enabling at least one second router to participate in the networking based on the networking protocol, thereby realizing the networking of the first router and at least one second router to form a MESH network.
[0037] In some embodiments, steps 201 and 202 are the process of MESH networking, and the MESH networking process only needs to be executed once. Subsequently, step 203 can be executed directly for data communication.
[0038] Step 203: When a user terminal accesses the MESH network through a target router in at least one second router, based on the network tunnel between the target router and the first router, the first router responds to the user terminal with control messages, and the target router responds to the user terminal with data messages.
[0039] User terminals can access the MESH network based on any router in the MESH network; for example, user terminals can access the MESH network based on the first router (master router), and user terminals can also access the MESH network based on any of the at least one second router (sub-router). In this embodiment of the application, the example of user terminals accessing the MESH network based on a second router is used for illustration, and for ease of description, the second router accessed by the user terminal is referred to as the target router.
[0040] In some embodiments, after a user terminal accesses the MESH network based on a router, it can switch the router it accesses within the MESH network, thus enabling roaming within the MESH network. For example, a user terminal may first access the MESH network based on a second router, and subsequently switch from the second router to the first router, thus accessing the MESH network based on the first router. Alternatively, a user terminal may switch from the second router to another second router, thus accessing the MESH network based on another second router.
[0041] In some embodiments, after a user terminal accesses the MESH network via a target router, the user terminal sends a control message to the target router. The target router receives the control message and, based on the network tunnel between the target router and a first router, forwards the control message to the first router, causing the first router to respond to the control message. Alternatively, the user terminal can also send a data message to the target router, which receives the data message and directly responds to it.
[0042] In this embodiment, the first router (master router) in the MESH network responds to the control messages of the user terminal, avoiding the conflict caused by the target routers (sub-routers) to which the user terminal is connected responding to the control messages. This means that this application enables seamless roaming for the user terminal within the MESH network. Since user terminals typically connect to the target router (sub-router) based on proximity, responding to data packets through the target router (sub-router) eliminates the need to send the packets back to the master router for processing, thus improving data packet response efficiency.
[0043] In related technologies, a first router and at least one second router are typically networked using either wireless or wired networking methods. Wired networking requires cabling, which limits the flexibility of home networking environments. While wireless networking offers greater flexibility in router placement, the ease with which wireless signals can interfere with the main router and sub-routers severely restricts the distance between them. Therefore, both of these networking methods can be considered line-of-sight networking.
[0044] In this application embodiment, tunneling technology is used to realize networking between multiple routers. The network tunnels established between multiple routers based on tunneling technology are not limited by distance and do not require the laying of long network cables. Therefore, this application can realize networking of routers in cross-line-of-sight scenarios, without being limited by the limitations of traditional wired networking and wireless networking methods. In other words, this application can improve the breadth of MESH networks, thereby improving the breadth of data communication based on MESH networks.
[0045] Please refer to Figure 3 This document illustrates a flowchart of a MESH network-based data communication method according to an exemplary embodiment of this application. (Reference) Figure 3 The method includes:
[0046] Step 301: Connect the first router and at least one second router to the WAN network so that a WAN channel is established between the first router and at least one second router through the WAN network.
[0047] Both the first and second routers are routers with WAN exits; for example, the first and second routers are CPEs or home wireless routers. In this step, the first and second routers dial into the WAN network via 4G or 5G air interface dialing or Point-to-Point Protocol over Ethernet (PPPoE), thereby enabling the first router to establish a WAN channel with at least one second router through the WAN network. In some embodiments, the first router establishes a WAN channel with each second router through the WAN network; and any two second routers also establish a WAN channel through the WAN network.
[0048] In the context of WIFI mesh networking in related technologies, the second router (sub-router) does not have a WAN exit function and does not perform Layer 3 forwarding; however, the second router in this embodiment has a WAN exit; therefore, the second router can also dial into the WAN network via 4G or 5G air interface; or, the second router can dial into the WAN via wired PPPoE, thereby enabling networking based on the WAN channel using tunneling technology.
[0049] Step 302: Based on the WAN channel, establish a VXLAN tunnel between the first router and at least one second router.
[0050] The first router establishes a VXLAN tunnel based on the WAN channel between the first router and at least one second router to build a virtual Layer 2 network in the WAN network. After the virtual Layer 2 network is built, the packets in the VXLAN tunnel will actually be forwarded on the public network, but the first router and at least one second router can be regarded as directly connected through the Layer 2 tunnel.
[0051] In some embodiments, since the packets in the VXLAN tunnel are actually forwarded on the public network, the tunnel can be established using VXLAN over IPSec. Accordingly, step 302 can be: the first router establishes a network tunnel between the first router and at least one second router using VXLAN over IPSec based on the WAN channel between the first router and at least one second router, thereby improving the security of packet transmission.
[0052] For example, refer to Figure 4 The first router is the MESH master router, and there are two second routers, namely MESH sub-router 1 and MESH sub-router 2. A VXLAN tunnel is established between the MESH master router and MESH sub-router 1, and a VXLAN tunnel is established between the MESH master router and MESH sub-router 2; a VXLAN tunnel is established between MESH sub-router 1 and MESH sub-router 2.
[0053] Step 303: Based on the VXLAN tunnel, connect the first router and at least one second router to form a network to obtain a MESH network.
[0054] The first router is the master router in the MESH network, and the second router is a sub-router. After establishing a VXLAN tunnel between the first router and at least one second router, the first and second routers are essentially directly connected via a Layer 2 tunnel. A Layer 2 tunnel can be considered a special type of wired direct connection. Therefore, in this step, we only need to reuse the wired networking method of Wi-Fi MESH to form a MESH network with the first router and at least one second router. Accordingly, this step can be:
[0055] The first router is connected to at least one second router via a wired network using a network cable; based on a VXLAN tunnel and a network cable, the first router and at least one second router are networked to obtain a MESH network.
[0056] In this embodiment, tunneling technology is used, and the wired networking method is reused, enabling networking without changing the existing networking method, thus exhibiting good adaptability. It should be noted that since the packets transmitted between the two routers are transmitted over the public internet, although the wired networking method is reused, a large number of network cables are not required. Compared to using a separate wired networking method in related technologies, this saves cabling space and overcomes the limitations of wired networking methods in related technologies.
[0057] In some embodiments, steps 301-303 are the process of MESH networking, and the MESH networking process only needs to be executed once. Subsequently, step 304 can be executed directly for data communication.
[0058] Step 304: When a user terminal accesses the MESH network through a target router in at least one second router, the user terminal sends a control message to the WAN network through the VXLAN tunnel between the target router and the first router. The network device in the WAN network forwards the control message to the first router, and the first router responds to the control message.
[0059] When a user terminal accesses a mesh network, it first determines the target router within the mesh network and then accesses the network based on that target router. In some embodiments, the user terminal can select the target router closest to it from the mesh network based on proximity, thereby reducing the problem of low response efficiency caused by long data transmission times. Alternatively, the user terminal can select the target router with the least load from the mesh network based on load balancing, thereby reducing the problem of low response efficiency caused by long queuing times. The user terminal can also select the target router with the strongest signal strength from the mesh network based on the signal strength of the routers, thereby improving response quality. These three methods are merely examples and do not limit the way the user terminal selects the target router.
[0060] In some embodiments, the target router determined by the user terminal from the MESH network can be either a first router or a second router. That is, the user terminal can access the MESH network based on the first router (main router) or the second router (sub-router). For example, continue to refer to... Figure 4 User terminal 1 accesses the MESH network through the MESH master router, while user terminals 2 and 3 access the MESH network through MESH sub-router 1. In this embodiment, the example is described using a second router as the target router determined by the user terminal from the MESH network. Accordingly, the target router is a router among at least one of the second routers.
[0061] In some embodiments, when the target router is the first router, step 304 can be: when the user terminal accesses the MESH network through the first router, the first router responds to the user terminal's control message. For example, the user's control message is a Dynamic Host Configuration Protocol (DHCP) request message for requesting address allocation, and the DHCP request message can be a DHCP request. Then, the steps for the first router to respond to the user terminal's control message can be: based on the DHCP request message, the first router allocates a network address to the user terminal, generates a first response message, the first response message carries the user terminal's network address and the first router's gateway address, and sends the first response message to the user terminal; the user terminal then performs data transmission based on the first response message. The first response message can be a DHCP reply.
[0062] For example, continue to refer to Figure 4 User terminal 2 sends a DHCP request to MESH sub-router 1. MESH sub-router 1 forwards the DHCP request to MESH master router. The master router generates a DHCP reply based on the DHCP request and forwards the DHCP reply to user terminal through MESH sub-router 1.
[0063] In some embodiments, when the target router is a router in at least one second router, this step can be implemented by the following steps (1) to (5):
[0064] (1) When a user terminal accesses the MESH network based on a target router in at least one second router, the target router sends the user terminal's control message to the WAN based on the VXLAN tunnel between the target router and the first router.
[0065] When a user terminal accesses the MESH network via a target router, it sends a control message to the target router. The target router receives the control message and, based on the VXLAN tunnel between the target router and the first router, sends the control message to the WAN.
[0066] In some embodiments, prior to this step, the first router and the second router negotiate so that after the second router receives the control message from the user terminal, it sends the control message from the user terminal to the first router for processing based on the network tunnel between the target router and the first router.
[0067] (2) Receive control messages from user terminals through network devices in the WAN network and forward the control messages to the first router.
[0068] (3) The first router receives the control message from the user terminal, generates a first response message based on the control message, and sends the first response message to the WAN network.
[0069] (4) The network devices in the WAN network receive the first response message and forward the first response message to the second router.
[0070] (5) The second router receives the first response message and forwards the first response message to the user terminal.
[0071] The user terminal receives the first response message, sends a data packet to the target router based on the first response message, and then executes step 305.
[0072] Step 305: Respond to the user terminal's data packets through the target router.
[0073] In this embodiment, the target router accessed by the user terminal responds to the user terminal's data packets. Therefore, the target router does not need to transmit the data packets to the first router, and the first router responds to the data packets, saving the time required for data transmission and improving the response efficiency of the data packets.
[0074] In some embodiments, data messages are data packets; for example, see [reference 1]. Figure 4 User terminal 2 sends data packets to MESH sub-router 1, and MESH sub-routers 1 forward the data packets to the WAN network.
[0075] In this application embodiment, tunneling technology is used to realize networking between multiple routers. The network tunnels established between multiple routers based on tunneling technology are not limited by distance and do not require the laying of long network cables. Therefore, this application can realize networking of routers in cross-line-of-sight scenarios, without being limited by the limitations of traditional wired networking and wireless networking methods. In other words, this application can improve the breadth of MESH networks, thereby improving the breadth of data communication based on MESH networks.
[0076] Please refer to Figure 5 This document illustrates a flowchart of a MESH network-based data communication method according to an exemplary embodiment of this application. (Reference) Figure 5 The method includes:
[0077] Step 501: Establish a network tunnel between the first router and at least one second router.
[0078] In some embodiments, this step can be implemented through steps 301-302, which will not be described in detail here.
[0079] Step 502: Based on the network tunnel, connect the first router and at least one second router to form a MESH network. The first router is the master router in the MESH network, and the second router is the sub-router in the MESH network.
[0080] In some embodiments, this step is the same as step 303, and will not be described again here.
[0081] Step 503: When a user terminal accesses the MESH network based on a target router in at least one second router, the user terminal sends a control message to the target router.
[0082] Control messages can be any message that requests the first router to process; for example, a control message can be a Dynamic Host Configuration Protocol (DHCP) message used to request an address. A DHCP request message can be a DHCP request.
[0083] Step 504: The target router receives the control message from the user terminal and forwards the control message to the first router through the network tunnel between the target router and the first router.
[0084] The target router sends control messages to the WAN network through the network tunnel between the target router and the first router; network devices in the WAN network forward the control messages to the first router.
[0085] In some embodiments, the target router encrypts the control message and forwards the encrypted control message to the first router through the network tunnel between the target router and the first router, thereby improving the security of control message transmission. For example, the target router encrypts the control message using IPSec.
[0086] Step 505: The first router receives a control message through the network tunnel between the target router and the first router, and generates a first response message based on the control message. The gateway address in the first response message is the gateway address of the first router.
[0087] In some embodiments, the first router receives the encrypted control message through the network tunnel between the target router and the first router, and decrypts the encrypted control message to obtain the control message. In some embodiments, the control message is a DHCP request message for requesting address allocation, and the first response message is a DHCP response message; then this step can be: the first router allocates a network address to the user terminal based on the DHCP request message, generates a DHCP response message, and the DHCP response message carries the network address and the gateway address of the first router.
[0088] Step 506: The first router sends a first response message to the target router through the network tunnel between the target router and the first router.
[0089] In some embodiments, the first router encrypts the first response message and sends the encrypted first response message to the target router through the network tunnel between the target router and the first router. For example, the first router encrypts the response message using IPSec.
[0090] Step 507: Receive the first response message through the target router, modify the gateway address in the first response message from the gateway address of the first router to the gateway address of the target router, obtain the second response message, and send the second response message to the user terminal.
[0091] In this embodiment of the application, the target router (sub-router) uses the method of modifying the DHCP reply message to make the final configured egress gateway of the user terminal meet the proximity principle. That is, the user terminal performs Layer 3 egress on the target router (sub-router) it accesses, without having to send the message back to the first router (main router) for processing, which can improve data transmission efficiency.
[0092] Step 508: The user terminal receives the second response message and, based on the second control message, sends a data packet to the target router.
[0093] The user terminal receives the second response message, obtains the gateway address of the target router and the network address of the user terminal from the second response message; configures its own network address and the gateway address of the target router based on the gateway address of the target router and the network address of the user terminal; and sends data packets to the target router based on its own network address and the gateway address of the target router.
[0094] Data packets can be data packets used by user terminals to interact with the WAN network via a router; for example, data packets can be video request packets; or, for example, data packets can be instant messaging messages; in this embodiment of the application, the specific content of the data packets is not specifically limited.
[0095] Step 509: The target router receives the data packets and outputs the data packets through the WAN exit of the target router.
[0096] The target router outputs data packets to the WAN network through its WAN exit. In related MESH networks, there is only one WAN exit, meaning only the main router has a WAN exit, and all Layer 3 services are forwarded through the main router. However, in this embodiment, the target router (sub-router) has a WAN exit, meaning it can directly output data packets through its own WAN exit.
[0097] In this embodiment, since the target router modifies the gateway address to its own gateway address in step 506, subsequent user terminal data packets are directly forwarded through the target router's WAN exit. Data services do not need to be forwarded to the first router (main router) for processing through the VXLAN tunnel. That is, this application achieves the nearest exit for data packets by modifying the DHCP reply message.
[0098] Please refer to Figure 6 This illustration shows a block diagram of a MESH network-based data communication apparatus according to an exemplary embodiment of this application. The apparatus includes:
[0099] Module 601 is used to establish a network tunnel between the first router and at least one second router.
[0100] Networking module 602 is used to network a first router and at least one second router based on a network tunnel to obtain a wireless mesh network, wherein the first router is the master router in the mesh network, and the second router is a sub-router in the mesh network; and
[0101] The communication module 603 is used to respond to the user terminal's control messages through the first router and to respond to the user terminal's data messages through the target router when the user terminal accesses the MESH network through the target router in at least one second router.
[0102] In some embodiments, the communication module 603 is configured to receive control messages from user terminals forwarded by the target router through a network tunnel between the target router and the first router; generate a first response message based on the control messages, wherein the gateway address in the first response message is the gateway address of the first router; send the first response message to the target router through the network tunnel between the target router and the first router; modify the gateway address in the first response message from the gateway address of the first router to the gateway address of the target router through the target router to obtain a second response message; and send the second response message to the user terminal.
[0103] In some embodiments, the control message is a Dynamic Host Configuration Protocol (DHCP) request message for requesting address allocation, and the first response message is a DHCP response message.
[0104] The communication module 603 is used to allocate network addresses to user terminals based on DHCP request messages; and to generate DHCP response messages, which carry the network address and the gateway address of the first router.
[0105] In some embodiments, the communication module 603 is configured to receive an encrypted control message forwarded by the target router through a network tunnel between the target router and the first router; and to decrypt the encrypted control message to obtain a control message.
[0106] The communication module 603 is used to encrypt the first response message; and to send the encrypted first response message to the target router through the network tunnel between the target router and the first router.
[0107] In some embodiments, the target router has a wide area network (WAN) exit;
[0108] The communication module 603 is used to receive data packets from user terminals through the target router and to output data packets through the WAN exit of the target router.
[0109] In some embodiments, the establishment module 601 is used to connect the first router and at least one second router to the WAN network, so that the first router and at least one second router establish a WAN channel through the WAN network; and based on the WAN channel between the first router and at least one second router, establish a Scalable Virtual Local Area Network (VXLAN) tunnel between the first router and at least one second router.
[0110] In some embodiments, the communication module 603 is used to control the target router to send control messages from the user terminal to the WAN network based on the VXLAN tunnel between the target router and the first router; and to forward the control messages to the first router through network devices in the WAN network, with the first router responding to the control messages.
[0111] In some embodiments, the networking module 602 is used to connect the first router and at least one second router via a wired networking method using a network cable; and to network the first router and at least one second router based on a network tunnel and a network cable to obtain a MESH network.
[0112] In this application embodiment, tunneling technology is used to realize networking between multiple routers. The network tunnels established between multiple routers based on tunneling technology are not limited by distance and do not require the laying of long network cables. Therefore, this application can realize networking of routers in cross-line-of-sight scenarios, without being limited by the limitations of traditional wired networking and wireless networking methods. In other words, this application can improve the breadth of MESH networks, thereby improving the breadth of data communication based on MESH networks.
[0113] It should be noted that the data communication device based on a MESH network provided in the above embodiments is only illustrated by the division of the above functional modules when performing data compression. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the user terminal can be divided into different functional modules to complete all or part of the functions described above. In addition, the data communication device based on a MESH network provided in the above embodiments and the data communication method embodiments based on a MESH network belong to the same concept, and the specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0114] Please refer to Figure 7 This document illustrates a block diagram of a router 700 according to an exemplary embodiment of this application. The router 700 in this application can be a first router as described in the above embodiments, or it can be a second router as described in the above embodiments. Furthermore, the router 700 in this application may include the following components: a processor 710 and a memory 720.
[0115] The processor 710 may include one or more processing cores. The processor 710 connects to various parts within the router 700 via various interfaces and lines, and performs various functions and processes data of the router 700 by running or executing instructions, programs, code sets, or instruction sets stored in the memory 720, and by calling data stored in the memory 720. Optionally, the processor 710 may be implemented using at least one hardware form of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), or Programmable Logic Array (PLA). The processor 710 may integrate one or a combination of several of the following: Central Processing Unit (CPU), Neural-network Processing Unit (NPU), and modem. The CPU primarily handles the operating system, user interface, and applications; the NPU is used to implement Artificial Intelligence (AI) functions; and the modem is used to handle wireless communication. It is understood that the modem may also not be integrated into the processor 710 and may be implemented as a separate chip.
[0116] The memory 720 may include random access memory (RAM) or read-only memory. Optionally, the memory 720 may include a non-transitory computer-readable storage medium. The memory 720 may be used to store instructions, programs, code, code sets, or instruction sets. The memory 720 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch function, sound playback function, image playback function, etc.), instructions for implementing the various method embodiments described below, etc.; the data storage area may store data created based on the use of the router 700 (such as audio data, phonebook, etc.).
[0117] In addition, those skilled in the art will understand that the structure of the router 700 shown in the above figures does not constitute a limitation on the router 700. The router 700 may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the router 700 also includes audio acquisition devices, speakers, radio frequency circuits, input units, sensors, audio circuits, a Wireless Fidelity (Wi-Fi) module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.
[0118] This application also provides a computer-readable medium storing at least one piece of program code, which is loaded and executed by the processor to implement the MESH network-based data communication method shown in the above embodiments.
[0119] This application also provides a computer program product that stores at least one piece of program code, which is loaded and executed by the processor to implement the MESH network-based data communication method shown in the above embodiments.
[0120] In some embodiments, the computer program product involved in the present application can be deployed and executed on a user terminal, or on multiple user terminals located in one location, or on multiple user terminals distributed in multiple locations and interconnected through a communication network. Multiple user terminals distributed in multiple locations and interconnected through a communication network can form a blockchain system.
[0121] Those skilled in the art will recognize that the functions described in the embodiments of this application in one or more of the above examples can be implemented using hardware, software, firmware, or any combination thereof. When implemented using software, these functions can be stored in a computer-readable medium or transmitted as one or more instructions or code on a computer-readable medium. Computer-readable media include computer storage media and communication media, wherein communication media include any medium that facilitates the transfer of a computer program from one place to another. Storage media can be any available medium that can be accessed by a general-purpose or special-purpose computer.
[0122] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A data communication method based on a mesh network, characterized in that, The method includes: Connect the first router and at least one second router to the WAN network so that the first router and the at least one second router can establish a WAN channel through the WAN network; Based on the WAN channel, a Scalable Virtual Local Area Network (VXLAN) tunnel is established between the first router and the at least one second router; Based on the VXLAN tunnel, the first router and the at least one second router are networked to form a wireless mesh network, wherein the first router is the master router in the mesh network, and the second router is a sub-router in the mesh network; and When a user terminal accesses the MESH network based on a target router among the at least one second router, the user terminal responds to control messages through the first router and data messages through the target router based on the VXLAN tunnel between the target router and the first router.
2. The method according to claim 1, characterized in that, The control message received by the user terminal via the first router, based on the VXLAN tunnel between the target router and the first router, includes: Through the VXLAN tunnel between the target router and the first router, the control message of the user terminal forwarded by the target router is received; A first response message is generated based on the control message, and the gateway address in the first response message is the gateway address of the first router; The first response message is sent to the target router through the VXLAN tunnel between the target router and the first router; By modifying the gateway address in the first response message from the gateway address of the first router to the gateway address of the target router through the target router, a second response message is obtained; and The second response message is sent to the user terminal.
3. The method according to claim 2, characterized in that, The control message is a Dynamic Host Configuration Protocol (DHCP) request message used to request address allocation, and the first response message is a DHCP response message; The generation of the first response message based on the control message includes: Based on the DHCP request message, a network address is assigned to the user terminal; Generate the DHCP response message, which carries the network address and the gateway address of the first router.
4. The method according to claim 2, characterized in that, The step of receiving the control message of the user terminal forwarded by the target router through the VXLAN tunnel between the target router and the first router includes: Through the VXLAN tunnel between the target router and the first router, receive encrypted control messages forwarded by the target router; The encrypted control message is decrypted to obtain the control message itself. The step of sending the first response message to the target router through the VXLAN tunnel between the target router and the first router includes: The first response message is encrypted; An encrypted first response message is sent to the target router through the VXLAN tunnel between the target router and the first router.
5. The method according to claim 1, characterized in that, The target router has a wide area network (WAN) exit; The data packets sent to the user terminal via the target router include: The target router receives the data packets from the user terminal. The data packets are output through the WAN exit of the target router.
6. The method according to claim 1, characterized in that, The control message received by the user terminal via the first router, based on the VXLAN tunnel between the target router and the first router, includes: Control the target router to send the user terminal's control message to the WAN network based on the VXLAN tunnel between the target router and the first router; The control message is forwarded to the first router by network devices in the WAN network, and the first router responds to the control message.
7. The method according to claim 1, characterized in that, The process of networking the first router and the at least one second router based on the VXLAN tunnel to obtain a wireless mesh network includes: The first router and the at least one second router are connected by a network cable using a wired networking method. Based on the VXLAN tunnel and the network cable, the first router and the at least one second router are networked to obtain a MESH network.
8. A data communication device based on a mesh network, characterized in that, The device includes: A module is established to connect a first router and at least one second router to a WAN network, so that the first router and the at least one second router establish a WAN channel through the WAN network; and based on the WAN channel, a Scalable Virtual Local Area Network (VXLAN) tunnel is established between the first router and the at least one second router. A networking module is configured to network the first router and the at least one second router based on the VXLAN tunnel to obtain a wireless mesh network, wherein the first router is the master router in the mesh network, and the second router is a sub-router in the mesh network; and The communication module is configured to, when a user terminal accesses the MESH network via a target router among the at least one second router, respond to the user terminal's control messages through the first router and to respond to the user terminal's data messages through the target router, based on the VXLAN tunnel between the target router and the first router.
9. The apparatus according to claim 8, characterized in that, The communication module is used to receive control messages of the user terminal forwarded by the target router through the VXLAN tunnel between the target router and the first router; A first response message is generated based on the control message, wherein the gateway address in the first response message is the gateway address of the first router; the first response message is sent to the target router through the VXLAN tunnel between the target router and the first router; the gateway address in the first response message is modified from the gateway address of the first router to the gateway address of the target router through the target router to obtain a second response message; and the second response message is sent to the user terminal.
10. The apparatus according to claim 9, characterized in that, The control message is a Dynamic Host Configuration Protocol (DHCP) request message used to request address allocation, and the first response message is a DHCP response message; The communication module is used to allocate a network address to the user terminal based on the DHCP request message; Generate the DHCP response message, which carries the network address and the gateway address of the first router.
11. The apparatus according to claim 9, characterized in that, The communication module is configured to receive encrypted control messages forwarded by the target router through a VXLAN tunnel between the target router and the first router; and to decrypt the encrypted control messages to obtain the control messages. The communication module is used to encrypt the first response message; An encrypted first response message is sent to the target router through the VXLAN tunnel between the target router and the first router.
12. The apparatus according to claim 8, characterized in that, The target router has a wide area network (WAN) exit; The communication module is used to receive data packets from the user terminal through the target router; and to output the data packets through the WAN exit of the target router.
13. The apparatus according to claim 8, characterized in that, The communication module is used to control the target router and send the control message of the user terminal to the WAN network based on the VXLAN tunnel between the target router and the first router; The control message is forwarded to the first router by network devices in the WAN network, and the first router responds to the control message.
14. The apparatus according to claim 8, characterized in that, The networking module is used to connect the first router and the at least one second router via a wired networking method using a network cable; and to network the first router and the at least one second router based on the VXLAN tunnel and the network cable to obtain a MESH network.
15. A router, characterized in that, The router includes a processor and a memory, the memory storing at least one piece of program code, which is loaded and executed by the processor to implement the data communication method based on a MESH network as described in any one of claims 1 to 7.
16. A computer-readable storage medium, characterized in that, The storage medium stores at least one piece of program code, which is loaded and executed by a processor to implement the data communication method based on a MESH network as described in any one of claims 1 to 7.
17. A computer program product, characterized in that, The computer program product stores at least one piece of program code, which is executed by a processor to implement the data communication method based on a MESH network as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method, network device and system for establishing tunnel
CN109104367A
Communication system and method based on fusion of LTE module and MESH module
CN110933734A
