Network communication method and device for IoT device

By establishing an intersecting GRE tunnel between the UPF of IoT devices and multiple gateway devices, the problems of high transmission pressure and poor disaster recovery capabilities in Internet of Things devices network communication are solved, and efficient communication data transmission and strong disaster recovery capabilities are achieved.

CN118660013BActive Publication Date: 2025-02-28BEIJING VOLCANO ENGINE TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410733666.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2025-02-28
Estimated Expiration
2044-06-06

AI Technical Summary

Technical Problem

The prior art has problems of high transmission pressure and poor disaster recovery capabilities in network communication of IoT devices, which cannot meet the needs of large-scale IoT.

Method used

Load balancing and data transmission are achieved, reducing the transmission pressure of a single gateway device by establishing a universal routing encapsulated GRE tunnel between the user plane function (UPF) of IoT devices and multiple gateway devices.

Benefits of technology

It improves the transmission efficiency of communication data, enhances the disaster recovery capabilities of IoT communication, and ensures the continuity and stability of services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118660013B_ABST
    Figure CN118660013B_ABST
Patent Text Reader

Abstract

The disclosed embodiment provides a network communication method and device for an IoT device, the method comprising: in response to receiving multiple communication data between the IoT device and the network device, determining a target user plane function UPF to which the IoT device belongs, the target UPF being used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and load balancing is achieved through a cross-general routing encapsulation GRE tunnel; determining the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; transmitting multiple communication data according to the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device. The present application improves the load balancing capability of network communication of IoT devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of computer and network communication technology, and more particularly, to a network communication method and device for an Internet of Things device. Background Art

[0002] Computer and network communication technologies have driven the vigorous development of the Internet of Everything, such as smart homes, autonomous driving, and industrial manufacturing industries. The demand for communication between IoT devices and Internet resources is becoming increasingly strong.

[0003] Although the application of IoT devices connected to the Internet is very extensive, the technical solutions in related fields still have some shortcomings: 1. Direct connection between IoT devices and network devices: Although the direct line connection is stable and reliable, it consumes too much manpower and material resources and cannot meet the needs of large-scale IoT. 2. The solution of establishing a network link through VPN: Although it ensures a high level of security, it is not suitable for interconnection between intranets. Summary of the invention

[0004] The embodiments of the present disclosure provide a network communication method and device for an IoT device, which can reduce the transmission pressure of a single gateway device and improve the transmission efficiency of communication data.

[0005] In a first aspect, an embodiment of the present disclosure provides a network communication method for an IoT device, including:

[0006] In response to receiving a plurality of communication data between an IoT device and a network device, determining a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel;

[0007] Determine the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device;

[0008] Transmitting the plurality of communication data according to the GRE tunnels respectively corresponding to at least two gateway devices corresponding to the target UPF;

[0009] The multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

[0010] In a second aspect, an embodiment of the present disclosure provides a network communication device for an IoT device, including:

[0011] A first determination unit is used to determine, in response to receiving a plurality of communication data between an IoT device and a network device, a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel;

[0012] A second determining unit is used to determine the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device;

[0013] A communication unit, used to transmit the multiple communication data according to the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

[0014] In a third aspect, an embodiment of the present disclosure provides an electronic device, including: a processor and a memory;

[0015] The memory stores computer-executable instructions;

[0016] The processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the network communication method of the Internet of Things device as described in the first aspect and various possible designs of the first aspect.

[0017] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the network communication method of the Internet of Things device described in the first aspect and various possible designs of the first aspect is implemented.

[0018] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the network communication method for an Internet of Things device as described in the first aspect and various possible designs of the first aspect.

[0019] The network communication method and device of the Internet of Things device provided in this embodiment include: in response to receiving multiple communication data between the Internet of Things device and the network device, determining the target user plane function UPF to which the Internet of Things device belongs, the target UPF is used to provide routing and forwarding functions of user plane data packets; wherein each UPF is connected to at least two gateways and realizes load balancing through cross-general routing encapsulation GRE tunnels; determining the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit the communication data between the UPF and the gateway device; transmitting multiple communication data according to the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include the first communication data sent by the Internet of Things device to the network device and the second communication data sent by the network device to the Internet of Things device. In this technical solution, by establishing a GRE tunnel between the UPF and at least two gateway devices, the communication data on the UDF is transmitted, load balancing between at least two gateway devices is realized, the transmission pressure of a single gateway device is reduced, and the transmission efficiency of the communication data is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0021] Figure 1 A schematic diagram of an application scenario of the network communication method for an IoT device provided in an embodiment of the present disclosure;

[0022] Figure 2 The process of the network communication method of the Internet of Things device provided in the embodiment of the present disclosure Figure 1 ;

[0023] Figure 3 The process of the network communication method of the Internet of Things device provided in the embodiment of the present disclosure Figure 2 ;

[0024] Figure 4 Schematic diagram of a network communication method for an IoT device provided in an embodiment of the present disclosure Figure 1 ;

[0025] Figure 5 Schematic diagram of a network communication method for an IoT device provided in an embodiment of the present disclosure Figure 2 ;

[0026] Figure 6 The process of the network communication method of the Internet of Things device provided in the embodiment of the present disclosure Figure 2;

[0027] Figure 7 Schematic diagram of determining the connection status of a GRE tunnel provided in an embodiment of the present disclosure Figure 1 ;

[0028] Figure 8 A schematic diagram of the structure of a network communication device for an IoT device provided in an embodiment of the present disclosure;

[0029] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0030] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present disclosure.

[0031] The technical terms and technical background involved in the embodiments of the present disclosure are described as follows:

[0032] UPF: User Plane Function (UPF) is an important part of the 3GPP 5G core network system architecture, and is mainly responsible for the routing and forwarding of user plane data packets in the 5G core network.

[0033] GRE tunnel: Generic Routing Encapsulation (English: Generic Routing Encapsulation) is a flexible and universal network encapsulation technology that can establish a virtual connection between different network protocols and realize the intercommunication between network layer protocols. In this embodiment, the GRE tunnel between the UPF and the gateway device can transmit the communication data between the gateway device and the UPF.

[0034] At present, computer and network communication technologies are driving the vigorous development of the Internet of Things, such as smart homes, autonomous driving, and industrial manufacturing industries. The demand for communication between IoT devices and Internet resources is becoming increasingly strong.

[0035] Although IoT devices are widely used to access the Internet, the technical solutions in related fields still have some shortcomings:

[0036] 1. Direct connection between IoT devices and network devices: Although direct line connection is stable and reliable, it consumes too much manpower and material resources and cannot meet the needs of large-scale IoT.

[0037] 2. The solution of establishing a network link through VPN: Although it ensures a higher level of security, it is not suitable for interconnection between intranets.

[0038] 3. The connection solution based on the network connection products currently provided by cloud service providers mainly focuses on the health check between IoT devices and network devices. It is difficult to effectively deal with various complex situations and has poor disaster recovery capabilities.

[0039] In response to the technical problem of poor disaster recovery capability in the prior art, the inventor's technical conception is as follows: establish GRE tunnels between UPF and multiple gateway devices, achieve load balancing through cross-GRE tunnels, and ensure service continuity and stability.

[0040] Accordingly, the specific steps may include: first, in response to receiving multiple communication data between the IoT device and the network device, determine the target user plane function UPF to which the IoT device belongs, the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and load balancing is achieved through cross-general routing encapsulation GRE tunnels. Then, determine the GRE tunnels corresponding to each of the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device. Finally, transmit multiple communication data according to the GRE tunnels corresponding to each of the at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include the first communication data sent by the IoT device to the network device and the second communication data sent by the network device to the IoT device.

[0041] In this technical solution, by establishing a GRE tunnel between the UPF and at least two gateway devices, the communication data on the UDF is transmitted, and load balancing between at least two gateway devices is achieved, which reduces the transmission pressure of a single gateway device and thus improves the transmission efficiency of the communication data. Furthermore, in this technical solution, when a gateway device fails, the GRE tunnel corresponding to another gateway device can be switched to transmit the communication data, thereby improving the disaster recovery capability of the IoT communication.

[0042] The application scenarios of the embodiments of the present disclosure are explained below:

[0043] The network communication method for the IoT device provided in the embodiments of the present disclosure can be applied to the IoT communication scenarios between various IoT devices. Figure 1 Schematic diagram of application scenarios of the network communication method for IoT devices provided in the embodiment of the present disclosure. Figure 1As shown, the IoT device can be registered to UPF1 and UPF2 through the IoT card. Among them, UPF1 and UPF2 can correspond to different IoT card number segments. Among them, a first GRE tunnel is established between UPF1 and gateway 1, and a second GRE tunnel is established between UPF1 and gateway 2. A third GRE tunnel is established between UPF2 and gateway 1, and a fourth GRE tunnel is established between UPF2 and gateway 2. UPF1 and UPF2 can send resource access requests to gateway 1 and gateway 2 respectively through the GRE tunnel. Gateway 1 and gateway 2 send resource access requests to the network device through the forwarding router. The network device sends data packets corresponding to the resource access request to gateway 1 and gateway 2 through the forwarding router. Gateway 1 and gateway 2 return data packets corresponding to the resource access request to UPF1 and UPF2 respectively through the GRE tunnel.

[0044] Among them, UPF is mainly responsible for the routing and forwarding of user plane data packets in the network. Usually, IoT cards need to be registered with the corresponding UPF. The gateway is the core component of this architecture, which is used for connection and data forwarding between networks.

[0045] In this IoT communication architecture, GRE tunnels are established between UPF and multiple gateways to transmit communication data on UDF through multiple gateways, reducing the transmission pressure of a single gateway device. In addition, if gateway 1 fails, data packets can continue to be transmitted through gateway 2, thus ensuring the continuity and stability of the service and improving the disaster recovery capability of IoT communication.

[0046] The following is a specific implementation process of the network communication method and device of the Internet of Things device involved in the embodiment of the present disclosure. Some examples are for illustrative purposes only and are not intended to be limiting. The execution subject of the network communication method of the Internet of Things device involved in the embodiment of the present disclosure is an electronic device, which can be a computer, a mobile phone, a tablet, a server, etc.

[0047] Figure 2 Schematic diagram of the network communication method process of the Internet of Things device provided in the embodiment of the present disclosure Figure 1 ,like Figure 2 As shown, the network communication method of the IoT device may include:

[0048] S201. In response to receiving multiple communication data between the IoT device and the network device, determine the target user plane function UPF to which the IoT device belongs, and the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and realizes load balancing through a cross-general routing encapsulation GRE tunnel.

[0049] In the disclosed embodiment, the IoT device can register with the UPF through the IoT card to realize IoT communication between the IoT device and the network device. Optionally, according to the card number of the IoT card used by the IoT device, the UPF corresponding to the card number can be determined as the target UPF to which the IoT device belongs. Among them, the target UPF can provide routing and forwarding functions for user plane data packets. For example, the target UPF can receive a resource access request sent by the IoT device, and can also send a data packet corresponding to the resource access request to the IoT device. Among them, the IoT device can be a car, a household appliance, etc.

[0050] In some embodiments, the plurality of communication data includes first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device. In the embodiments of the present disclosure, the number of UPFs may be one or more. For example, Figure 1 As shown, there are two UPFs, namely: UPF1 and UPF2.

[0051] S202. Determine the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device.

[0052] In the disclosed embodiment, a GRE tunnel can be built between the UPF and the gateway device through the GRE tunnel technology to achieve a point-to-point connection between the UPF and the gateway device. Among them, multiple communication data can be transmitted by sending messages, and the messages of different protocols are encapsulated through the GRE tunnel for communication.

[0053] For example, Figure 1 As shown, cross 4 tunnels are established between UPF1, UPF2, gateway 1 and gateway 2; wherein, a first GRE tunnel is established between UPF1 and gateway 1, and a second GRE tunnel is established between UPF1 and gateway 2. A third GRE tunnel is established between UPF2 and gateway 1, and a fourth GRE tunnel is established between UPF2 and gateway 2. Communication data between UPF1, UPF2, gateway 1 and gateway 2 is transmitted through the cross 4 tunnels.

[0054] S203, transmit multiple communication data through the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

[0055] Exemplarily, the target UPF is UPF 1. Communication data between UPF 1 and gateway 1 can be transmitted through the first GRE tunnel. Communication data between UPF 1 and gateway 2 can be transmitted through the second GRE tunnel.

[0056] In this technical solution, a GRE tunnel is established between the UPF and at least two gateway devices to transmit communication data on the UDF, thereby achieving load balancing between at least two gateway devices, reducing the transmission pressure of a single gateway device, and thereby improving the transmission efficiency of the communication data.

[0057] It should be noted that in this IoT communication architecture, when a gateway device fails, the GRE tunnel corresponding to another gateway device can be directly switched to transmit communication data, thereby improving the disaster recovery capability of IoT communication.

[0058] In the disclosed embodiment, the GRE tunnel can provide users with two flexible connection modes: public network mode and dedicated line mode, to cover more usage scenarios. The public network mode adapts to the needs of fast and free network connection, focusing on the convenience of the solution; while the dedicated line mode meets the occasions with higher data protection needs, such as finance, medical and other fields, focusing on the security of the solution. Through the design of these two modes, we can choose appropriate solutions according to different scenario requirements, so as to provide the best possible customer experience. It can be seen that the IoT communication architecture meets the networking needs of IoT industry users and Internet resources, and supports consumers' mobile devices to achieve intranet connection with network resources through IoT cards, so that IoT card users can access related network resources through a safe, stable and reliable network.

[0059] For example, Figure 1 As shown, four cross tunnels are established between UPF1, UPF2, gateway 1 and gateway 2; among them, a first GRE tunnel is established between UPF1 and gateway 1, and a second GRE tunnel is established between UPF1 and gateway 2. A third GRE tunnel is established between UPF2 and gateway 1, and a fourth GRE tunnel is established between UPF2 and gateway 2. If gateway 1 fails, data packets can continue to be transmitted through gateway 2, thereby ensuring the continuity and stability of the service and improving the disaster recovery capability of IoT communications.

[0060] Figure 3 Schematic diagram of the network communication method process of the Internet of Things device provided in the embodiment of the present disclosure Figure 2 In the embodiment of the present disclosure, based on the specific method of transmitting multiple communication data through the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF in S203, the disaster recovery capability of the Internet of Things communication is described in detail. Figure 3 As shown, the method may include:

[0061] S301. Monitor the operating status of at least two gateway devices corresponding to the target UPF, where the operating status includes normal and faulty.

[0062] In the disclosed embodiment, the operation status of the gateway device can be determined by the connection status of the GRE tunnel between the gateway device and each UPF.

[0063] Optionally, if the GRE tunnels between each UPF and the gateway device are all in a disconnected state, it is determined that the gateway device is faulty. Accordingly, monitoring the operating status of at least two gateway devices corresponding to the target UPF may include: for each gateway device, determining the connection status of the GRE tunnel established between the gateway device and each UPF; if the connection status of the GRE tunnel established between the gateway device and each UPF is all in a disconnected state, it is determined that the operating status of the gateway device is faulty; if the connection status of one or more GRE tunnels is in a connected state, it is determined that the operating status of the gateway device is normal.

[0064] For example, Figure 1 As shown, 4 cross tunnels are established between UPF1, UPF2, gateway 1 and gateway 2; among which, a first GRE tunnel is established between UPF1 and gateway 1, and a second GRE tunnel is established between UPF1 and gateway 2. A third GRE tunnel is established between UPF2 and gateway 1, and a fourth GRE tunnel is established between UPF2 and gateway 2.

[0065] For gateway 1, if the first GRE tunnel and the third GRE tunnel are in a disconnected state, it is determined that the operating status of gateway 1 is faulty; if the first GRE tunnel and / or the third GRE tunnel are in a connected state, it is determined that the operating status of gateway 1 is normal.

[0066] For gateway 2, if the second GRE tunnel and the fourth GRE tunnel are in a disconnected state, it is determined that the operating status of gateway 2 is faulty; if the second GRE tunnel and / or the fourth GRE tunnel are in a connected state, it is determined that the operating status of gateway 2 is normal.

[0067] S302. When the operating status of at least two gateway devices corresponding to the target UPF is normal, the communication data corresponding to each GRE tunnel is transmitted through the GRE tunnel between the UPF and the at least two gateway devices.

[0068] S303. In the event that any gateway device corresponding to the target UPF fails in operation, the target communication data corresponding to the gateway device with the failed operation status is diverted to other gateway devices in normal operation status, and the target communication data is transmitted through the GRE tunnel between the target UPF and the gateway device in normal operation status.

[0069] For example, Figure 1As shown, the target UPF is UPF1. A first GRE tunnel is established between UPF1 and gateway 1, and a second GRE tunnel is established between UPF1 and gateway 2. In this case, if the operation status of gateway 1 fails, the target communication data between UPF1 and gateway 1 can be transmitted through the second GRE tunnel.

[0070] In some embodiments, the target communication data includes a first resource access request and a first data packet fed back by the network device based on the first resource access request; accordingly, transmitting the target communication data through a GRE tunnel between the target UPF and a gateway device in a normal operating state includes the following steps:

[0071] (1) If the target UPF receives a first resource access request sent by the IoT device, the first resource access request is transmitted to the gateway device in normal operation through the GRE tunnel between the target UPF and the gateway device in normal operation.

[0072] (2) A first resource access request is sent to a forwarding router through a gateway device in a normal operating state, and the first resource access request is sent to a network device through the forwarding router.

[0073] In some embodiments, the forwarding router can implement the cutover of the corresponding line based on the health status of the gateway based on load balancing, ensuring that when a problem occurs in the gateway or the network, the data flow can be seamlessly transferred to another healthy line to ensure the continuity and stability of communication. Exemplarily, the forwarding router can be an ECMP (Equal cost multi-path) forwarding router.

[0074] (3) Add a diversion route corresponding to the gateway device with a faulty operation status in the routing table of the forwarding router, where the diversion route includes the device identifier of the gateway device with a normal operation status and the address information of the target UPF.

[0075] In some embodiments, Figure 4 As shown, when adding a diversion route corresponding to a gateway device with a running fault, it can be determined whether a diversion route already exists. If it already exists, there is no need to add a diversion route. If it does not exist, add a diversion route.

[0076] It should be noted that when the operation state of the gateway device fails, the gateway route corresponding to the gateway device is deleted. When the operation state of the gateway device returns to normal, the gateway route corresponding to the gateway device is added. Optionally, the gateway route corresponding to the gateway device may include the device identification of the gateway device and the address information of the target UPF.

[0077] In the disclosed embodiment, the unhealthy gateway is removed from the routing system by controlling the forwarding route, and then the traffic is redirected to a healthy gateway. In this way, the return traffic of the network device can continue to smoothly reach the target IoT device through the healthy gateway. This method not only ensures the continuity of the data transmission process, but also greatly improves the stability and robustness of the network, and users can hardly feel the service interruption caused by network problems.

[0078] For example, Figure 5 As shown, the target UPF is UPF1. If the first GRE tunnel and the second GRE tunnel between UPF1 and gateway 1 are abnormally connected, it is determined that the operation status of gateway 1 is faulty. At this time, the gateway route corresponding to gateway 1 needs to be deleted. When the first GRE tunnel and the second GRE tunnel return to normal, it is determined that the operation status of gateway 1 returns to normal. At this time, the gateway route corresponding to gateway 1 needs to be added. Among them, the gateway route corresponding to gateway 1 may include the device identification of gateway 1 and the address information of UPF1.

[0079] (4) If the forwarding router receives the first data packet fed back by the network device, it sends the first data packet to the gateway device in normal operation status according to the diversion route.

[0080] (5) The first data packet is transmitted to the target UPF through the GRE tunnel between the target UPF and the gateway device in normal operation through the gateway device in normal operation, and the first data packet is forwarded to the IoT device through the target UPF.

[0081] In the disclosed embodiment, it is possible to respond to the health status of each gateway in real time and automatically add or delete diversion routes. This means that once a gateway device fails, the system can automatically program its peer gateway into the route and automatically remove the diversion route after the gateway is restored. This mechanism of automatically controlling diversion routes not only enhances the flexibility of routing and enables seamless switching of traffic from a faulty gateway to a healthy gateway, but also significantly improves the fault tolerance and recovery capabilities of the network, greatly optimizing the robustness and reliability of the system.

[0082] In some embodiments, a preset address set (eg, access blacklist) may be added to the routing table to implement data access control and filter traffic, effectively blocking attacks by abnormal traffic. Optionally, the preset address set may include address information of multiple network devices.

[0083] It should be noted that if Figure 5As shown, before adding the diversion route corresponding to the gateway device with an operating status failure, the method also includes: determining the operating status of the UPF; if the operating status of the UPF is normal, adding the diversion route corresponding to the gateway device with an operating status failure in the routing table of the forwarding router; if the operating status of the UPF is faulty, reporting the fault to the monitoring server corresponding to the UPF.

[0084] In some embodiments, the operation status of the UPF can be determined by the connection status of the GRE tunnel between the UPF and each gateway device. Accordingly, determining the operation status of the UPF includes: determining the connection status of the GRE tunnel established between the UPF and each gateway device; if the connection status of the GRE tunnel established between the UPF and each gateway device is in a disconnected state, then determining that the operation status of the UPF is faulty; if there are one or more GRE tunnels in a connected state, then determining that the operation status of the UPF is normal.

[0085] In the disclosed embodiment, the operating status of the UPF and the gateway device can be determined based on the connection status of the GRE tunnel, and the health check mechanism is optimized to provide a more efficient and accurate cross-device health detection method so that when problems arise, rapid response and processing can be performed to ensure service continuity and stability.

[0086] In the disclosed embodiment, by establishing a GRE tunnel between the UPF and two gateway devices, when one gateway device fails, the GRE tunnel corresponding to the other gateway device can be directly switched to transmit communication data, thereby improving the disaster recovery capability of the Internet of Things communication and maintaining efficient and stable operation even in a complex and changing environment.

[0087] Figure 6 Schematic diagram of the network communication method process of the Internet of Things device provided in the embodiment of the present disclosure Figure 3 In the embodiment of the present disclosure, a specific method for determining the connection status of a GRE tunnel is described in detail. Figure 6 As shown, the method for determining the connection status of the GRE tunnel established between the gateway device and each UPF may include:

[0088] S601. Periodically send a first detection message to each UPF through a gateway device.

[0089] In the disclosed embodiment, the first detection message is used to perform a health check on the GRE tunnel. In some embodiments, the source address of the local end and the destination address of the opposite end can be encapsulated into a Keepalive message and sent to the opposite end in combination with the characteristics of the GRE message. The opposite end decapsulates the message, identifies it as a Keepalive message, and then sends a reply packet according to the source address of the sender, thereby achieving health detection.

[0090] It should be noted that since the above Keepalive message is a native GRE Keepalive message constructed based on the Linux kernel protocol stack, the Keepalive message is a function of the GRE tunnel protocol, supports the RFC standard and directly adapts to the operator's solution, so the availability of the Keepalive detection message is relatively high. Among them, the RFC standard is a series of memoranda issued by the Internet Engineering Task Force.

[0091] Furthermore, to ensure the efficiency of health checks, in some embodiments, the present application can also implement packet sending and receiving through the concurrent form of go language coroutines to avoid excessive load on a single process.

[0092] S602. For each GRE tunnel corresponding to the UPF, determine the sending status of the first detection message according to whether the gateway device receives the first response message from the UPF.

[0093] S603: Determine the connection status of the GRE tunnel according to the sending status of the first detection message.

[0094] In some embodiments, the first connection state includes a connected state and a disconnected state. The sending status of the first detection message includes successful sending and failed sending. Accordingly, this step may include: if the first detection message fails to be sent, determining the number of consecutive failures of sending the first detection message, if the number reaches a first threshold, determining that the GRE tunnel is in a disconnected state; if the first detection message is sent successfully, determining the number of consecutive successful sending of the first detection message, if the number reaches a second threshold, determining that the GRE tunnel is in a connected state.

[0095] In the embodiment of the present disclosure, the values ​​of the first threshold and the second threshold are not specifically limited and can be set and modified as needed. For example, the first threshold is 3 and the second threshold is 3.

[0096] In some other embodiments, the first connection state includes a connected state, a connection ready state, a disconnected state, and a disconnected ready state. Figure 7 As shown, according to the sending situation of the first detection message, the connection state of the GRE tunnel is determined, which may include the following multiple situations:

[0097] 1. If the first detection message fails to be sent and the GRE tunnel is in a connected state, the connection state of the GRE tunnel is switched from a connected state to a disconnection ready state.

[0098] 2. If the first detection message fails to be sent and the GRE tunnel is in a disconnection preparation state, determine the number of consecutive failures in sending the first detection message, and if the number reaches a first threshold, switch the connection state of the GRE tunnel from the disconnection preparation state to the disconnected state.

[0099] 3. If the first detection message fails to be sent and the GRE tunnel is in a disconnected state, the disconnected state continues to be maintained.

[0100] 4. If the first detection message is sent successfully and the GRE tunnel is in a connected state, the connection state is maintained.

[0101] 5. If the first detection message is sent successfully and the GRE tunnel is in a disconnected state or a disconnected ready state, the connection state of the GRE tunnel is switched from the disconnected state to the connected ready state.

[0102] 6. If the first detection message is sent successfully and the GRE tunnel is in a connection preparation state, determine the number of times the first detection message is successfully sent continuously, and if the number reaches a second threshold, switch the connection state of the GRE tunnel from the connection preparation state to the connection state.

[0103] In the disclosed embodiment, in this IoT communication architecture, by creating a GRE tunnel between the UPF and at least two gateway devices, the transmission pressure of a single gateway device is reduced, thereby improving the transmission efficiency of communication data. In addition, when any gateway device fails, the GRE tunnel corresponding to another gateway device can be directly switched to transmit communication data, thereby improving the disaster recovery capability of IoT communication. Among them, the GRE tunnel can also provide two flexible connection methods: public network and dedicated line, to achieve cross-device health detection.

[0104] Figure 8 A schematic diagram of the structure of a network communication device for an IoT device provided in an embodiment of the present disclosure, such as Figure 8 As shown, the network communication device of the IoT device includes:

[0105] The first determination unit 801 is used to determine the target user plane function UPF to which the IoT device belongs in response to receiving multiple communication data between the IoT device and the network device, and the target UPF is used to provide routing and forwarding functions of user plane data packets; wherein each UPF is connected to at least two gateways and realizes load balancing through a cross-general routing encapsulation GRE tunnel;

[0106] A second determining unit 802 is used to determine the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device;

[0107] The communication unit 803 is used to transmit the multiple communication data according to the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include the first communication data sent by the IoT device to the network device and the second communication data sent by the network device to the IoT device.

[0108] According to one or more embodiments of the present disclosure, the communication unit 803 transmits the multiple communication data according to the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, specifically including: monitoring the operating status of the at least two gateway devices corresponding to the target UPF, the operating status including normal and faulty; when the operating status of the at least two gateway devices corresponding to the target UPF is normal, transmitting the communication data corresponding to each GRE tunnel through the GRE tunnel between the UPF and the at least two gateway devices; when the operating status of any gateway device corresponding to the target UPF is faulty, directing the target communication data corresponding to the gateway device with the faulty operating status to other gateway devices with normal operating status, and transmitting the target communication data through the GRE tunnel between the target UPF and the gateway device with normal operating status.

[0109] According to one or more embodiments of the present disclosure, the communication unit 803 monitors the operating status of at least two gateway devices corresponding to the target UPF, specifically including: for each gateway device, determining the connection status of the GRE tunnel established between the gateway device and each UPF; if the connection status of the GRE tunnel established between the gateway device and each UPF is in a disconnected state, determining that the operating status of the gateway device is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the operating status of the gateway device is normal.

[0110] According to one or more embodiments of the present disclosure, the communication unit 803 determines the connection status of the GRE tunnel established between the gateway device and each UPF, specifically including: periodically sending a first detection message to each UPF through the gateway device; for the GRE tunnel corresponding to each UPF, judging the sending status of the first detection message according to whether the gateway device receives the first response message of the UPF; and determining the connection status of the GRE tunnel according to the sending status of the first detection message.

[0111] According to one or more embodiments of the present disclosure, the sending status of the first detection message includes successful sending and failed sending; accordingly, the communication unit 803 determines the connection status of the GRE tunnel according to the sending status of the first detection message, specifically including: if the first detection message fails to be sent, determining the number of consecutive failures in sending the first detection message, if the number reaches a first threshold, determining that the GRE tunnel is in a disconnected state; if the first detection message is sent successfully, determining the number of consecutive successful sending of the first detection message, if the number reaches a second threshold, determining that the GRE tunnel is in a connected state.

[0112] According to one or more embodiments of the present disclosure, the target communication data includes a first resource access request and a first data packet fed back by the network device based on the first resource access request; the communication unit 803 transmits the target communication data through the GRE tunnel between the target UPF and a gateway device in a normal operating state, specifically including: if the target UPF receives a first resource access request sent by an IoT device, the first resource access request is transmitted to the gateway device in a normal operating state through the GRE tunnel between the target UPF and the gateway device in a normal operating state; the first resource access request is sent to a forwarding router through the gateway device in a normal operating state, and the first resource access request is transmitted to the forwarding router through the forwarding router A resource access request is sent to a network device; a diversion route corresponding to the gateway device with an operating fault is added to the routing table of the forwarding router, wherein the diversion route includes the device identifier of the gateway device with a normal operating status and the address information of the target UPF; if the forwarding router receives a first data packet fed back by the network device, the first data packet is sent to the gateway device with a normal operating status according to the diversion route; the first data packet is transmitted to the target UPF through the gateway device with a normal operating status by utilizing the GRE tunnel between the target UPF and the gateway device with a normal operating status, and the first data packet is forwarded to the IoT device through the target UPF.

[0113] According to one or more embodiments of the present disclosure, the communication unit 803 is also used to delete the diversion route if the operating status of the gateway device with the operating status failure returns to normal, and transmit the target communication data through the GRE tunnel between the UPF and the gateway device with the operating status failure.

[0114] According to one or more embodiments of the present disclosure, the network communication device also includes: a monitoring unit; the monitoring unit is used to determine the operating status of the UPF; if the operating status of the UPF is normal, the diversion route corresponding to the gateway device with the operating status failure is added to the routing table of the forwarding router; if the operating status of the UPF is faulty, the fault is reported to the monitoring server corresponding to the UPF.

[0115] According to one or more embodiments of the present disclosure, the monitoring unit determines the running status of the UPF, specifically including: determining the connection status of the GRE tunnel established between the UPF and each gateway device; if the connection status of the GRE tunnel established between the UPF and each gateway device is in a disconnected state, determining that the running status of the UPF is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the running status of the UPF is normal.

[0116] refer to Fig. 9, which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0117] like Fig. 9 As shown, the electronic device 900 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.

[0118] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0119] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0120] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0121] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.

[0122] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0123] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0124] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0125] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".

[0126] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0127] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0128] In a first aspect, according to one or more embodiments of the present disclosure, a network communication method for an IoT device is provided, comprising:

[0129] In response to receiving a plurality of communication data between an IoT device and a network device, determining a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel;

[0130] Determine the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device;

[0131] Transmitting the plurality of communication data according to the GRE tunnels respectively corresponding to at least two gateway devices corresponding to the target UPF;

[0132] The multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

[0133] According to one or more embodiments of the present disclosure, the transmission of the multiple communication data according to the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF includes: monitoring the operating status of the at least two gateway devices corresponding to the target UPF, the operating status including normal and faulty; when the operating status of the at least two gateway devices corresponding to the target UPF is normal, transmitting the communication data corresponding to each GRE tunnel through the GRE tunnel between the UPF and the at least two gateway devices; when the operating status of any gateway device corresponding to the target UPF is faulty, directing the target communication data corresponding to the gateway device with the faulty operating status to other gateway devices with normal operating status, and transmitting the target communication data through the GRE tunnel between the target UPF and the gateway device with normal operating status.

[0134] According to one or more embodiments of the present disclosure, the monitoring of the operating status of at least two gateway devices corresponding to the target UPF includes: for each gateway device, determining the connection status of the GRE tunnel established between the gateway device and each UPF; if the connection status of the GRE tunnel established between the gateway device and each UPF is in a disconnected state, determining that the operating status of the gateway device is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the operating status of the gateway device is normal.

[0135] According to one or more embodiments of the present disclosure, determining the connection status of the GRE tunnel established between the gateway device and each UPF includes: periodically sending a first detection message to each UPF through the gateway device; for the GRE tunnel corresponding to each UPF, judging the sending status of the first detection message according to whether the gateway device receives the first response message from the UPF; and determining the connection status of the GRE tunnel according to the sending status of the first detection message.

[0136] According to one or more embodiments of the present disclosure, the sending status of the first detection message includes successful sending and failed sending; accordingly, determining the connection status of the GRE tunnel based on the sending status of the first detection message includes: if the first detection message fails to be sent, determining the number of consecutive failures in sending the first detection message, and if the number reaches a first threshold, determining that the GRE tunnel is in a disconnected state; if the first detection message is sent successfully, determining the number of consecutive successful sending of the first detection message, and if the number reaches a second threshold, determining that the GRE tunnel is in a connected state.

[0137] According to one or more embodiments of the present disclosure, the target communication data includes a first resource access request and a first data packet fed back by the network device based on the first resource access request; the target communication data is transmitted through the GRE tunnel between the target UPF and the gateway device in normal operation, including: if the target UPF receives the first resource access request sent by the IoT device, the first resource access request is transmitted to the gateway device in normal operation through the GRE tunnel between the target UPF and the gateway device in normal operation; the first resource access request is sent to the forwarding router through the gateway device in normal operation, and the first resource access request is sent to the network device through the forwarding router; the diversion route corresponding to the gateway device with the faulty operation is added to the routing table of the forwarding router, and the diversion route includes the device identification of the gateway device in normal operation and the address information of the target UPF; if the forwarding router receives the first data packet fed back by the network device, the first data packet is sent to the gateway device in normal operation according to the diversion route; the first data packet is transmitted to the target UPF through the gateway device in normal operation using the GRE tunnel between the target UPF and the gateway device in normal operation, and the first data packet is forwarded to the IoT device through the target UPF.

[0138] According to one or more embodiments of the present disclosure, it also includes: if the operating status of the gateway device with the operating status failure returns to normal, the diversion route is deleted, and the target communication data is transmitted through the GRE tunnel between the UPF and the gateway device with the operating status failure.

[0139] According to one or more embodiments of the present disclosure, before adding the diversion route corresponding to the gateway device with the operating status fault in the routing table of the forwarding router, the method also includes: determining the operating status of the UPF; if the operating status of the UPF is normal, adding the diversion route corresponding to the gateway device with the operating status fault in the routing table of the forwarding router; if the operating status of the UPF is faulty, reporting the fault to the monitoring server corresponding to the UPF.

[0140] According to one or more embodiments of the present disclosure, determining the running status of the UPF includes: determining the connection status of the GRE tunnel established between the UPF and each gateway device; if the connection status of the GRE tunnel established between the UPF and each gateway device is in a disconnected state, determining that the running status of the UPF is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the running status of the UPF is normal.

[0141] In a second aspect, according to one or more embodiments of the present disclosure, a network communication device of an IoT device is provided, including:

[0142] A first determination unit is used to determine, in response to receiving a plurality of communication data between an IoT device and a network device, a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel;

[0143] A second determining unit is used to determine the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device;

[0144] A communication unit, used to transmit the multiple communication data according to the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

[0145] According to one or more embodiments of the present disclosure, the communication unit transmits the multiple communication data according to the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, specifically including: monitoring the operating status of the at least two gateway devices corresponding to the target UPF, the operating status including normal and faulty; when the operating status of the at least two gateway devices corresponding to the target UPF is normal, transmitting the communication data corresponding to each GRE tunnel through the GRE tunnel between the UPF and the at least two gateway devices; when the operating status of any gateway device corresponding to the target UPF is faulty, directing the target communication data corresponding to the gateway device with the faulty operating status to other gateway devices with normal operating status, and transmitting the target communication data through the GRE tunnel between the target UPF and the gateway device with normal operating status.

[0146] According to one or more embodiments of the present disclosure, the communication unit monitors the operating status of at least two gateway devices corresponding to the target UPF, specifically including: for each gateway device, determining the connection status of the GRE tunnel established between the gateway device and each UPF; if the connection status of the GRE tunnel established between the gateway device and each UPF is in a disconnected state, determining that the operating status of the gateway device is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the operating status of the gateway device is normal.

[0147] According to one or more embodiments of the present disclosure, the communication unit determines the connection status of the GRE tunnel established between the gateway device and each UPF, specifically including: periodically sending a first detection message to each UPF through the gateway device; for the GRE tunnel corresponding to each UPF, judging the sending status of the first detection message according to whether the gateway device receives the first response message of the UPF; and determining the connection status of the GRE tunnel according to the sending status of the first detection message.

[0148] According to one or more embodiments of the present disclosure, the sending status of the first detection message includes successful sending and failed sending; accordingly, the communication unit determines the connection status of the GRE tunnel according to the sending status of the first detection message, specifically including: if the first detection message fails to be sent, determining the number of consecutive failures in sending the first detection message, if the number reaches a first threshold, determining that the GRE tunnel is in a disconnected state; if the first detection message is sent successfully, determining the number of consecutive successful sending of the first detection message, if the number reaches a second threshold, determining that the GRE tunnel is in a connected state.

[0149] According to one or more embodiments of the present disclosure, the target communication data includes a first resource access request and a first data packet fed back by the network device based on the first resource access request; the communication unit transmits the target communication data through a GRE tunnel between the target UPF and a gateway device in a normal operating state, specifically including: if the target UPF receives a first resource access request sent by an IoT device, the first resource access request is transmitted to the gateway device in a normal operating state through the GRE tunnel between the target UPF and the gateway device in a normal operating state; the first resource access request is sent to a forwarding router through the gateway device in a normal operating state, and the first resource access request is transmitted to the forwarding router through the forwarding router A resource access request is sent to a network device; a diversion route corresponding to the gateway device with an operating fault is added to the routing table of the forwarding router, wherein the diversion route includes the device identifier of the gateway device with a normal operating status and the address information of the target UPF; if the forwarding router receives a first data packet fed back by the network device, the first data packet is sent to the gateway device with a normal operating status according to the diversion route; the first data packet is transmitted to the target UPF through the gateway device with a normal operating status by utilizing the GRE tunnel between the target UPF and the gateway device with a normal operating status, and the first data packet is forwarded to the IoT device through the target UPF.

[0150] According to one or more embodiments of the present disclosure, the communication unit is also used to delete the diversion route if the operating status of the gateway device with the operating status failure returns to normal, and transmit the target communication data through the GRE tunnel between the UPF and the gateway device with the operating status failure.

[0151] According to one or more embodiments of the present disclosure, the network communication device also includes: a monitoring unit; the monitoring unit is used to determine the operating status of the UPF; if the operating status of the UPF is normal, the diversion route corresponding to the gateway device with the operating status failure is added to the routing table of the forwarding router; if the operating status of the UPF is faulty, the fault is reported to the monitoring server corresponding to the UPF.

[0152] According to one or more embodiments of the present disclosure, the monitoring unit determines the running status of the UPF, specifically including: determining the connection status of the GRE tunnel established between the UPF and each gateway device; if the connection status of the GRE tunnel established between the UPF and each gateway device is in a disconnected state, determining that the running status of the UPF is faulty; if there are one or more GRE tunnels that are in a connected state, determining that the running status of the UPF is normal.

[0153] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: at least one processor and a memory;

[0154] The memory stores computer-executable instructions;

[0155] The at least one processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the network communication method of the Internet of Things device as described in the first aspect and various possible designs of the first aspect.

[0156] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the network communication method of the Internet of Things device described in the first aspect and various possible designs of the first aspect is implemented.

[0157] In a fifth aspect, according to one or more embodiments of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the network communication method for the Internet of Things device as described in the first aspect and various possible designs of the first aspect.

[0158] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.

[0159] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0160] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.

Claims

1. A network communication method for an IoT device, characterized in that: include: In response to receiving a plurality of communication data between an IoT device and a network device, determining a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel; Determine the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device; Transmitting the plurality of communication data according to the GRE tunnels respectively corresponding to at least two gateway devices corresponding to the target UPF; The multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

2. The method according to claim 1, characterized in that The transmitting the plurality of communication data through GRE tunnels respectively corresponding to at least two gateway devices corresponding to the target UPF includes: Monitor the operating status of at least two gateway devices corresponding to the target UPF, where the operating status includes normal and faulty; When the operation status of at least two gateway devices corresponding to the target UPF is normal, the communication data corresponding to each GRE tunnel is transmitted through the GRE tunnel between the UPF and the at least two gateway devices; In the event that any gateway device corresponding to the target UPF fails in operation, the target communication data corresponding to the gateway device with the failed operation status is diverted to other gateway devices with normal operation status, and the target communication data is transmitted through the GRE tunnel between the target UPF and the gateway device with normal operation status.

3. The method according to claim 2, characterized in that The monitoring the operating status of at least two gateway devices corresponding to the target UPF includes: For each gateway device, determine the connection status of the GRE tunnel established between the gateway device and each UPF; If the connection status of the GRE tunnel established between the gateway device and each UPF is in a disconnected state, it is determined that the operation status of the gateway device is faulty; If the connection status of one or more GRE tunnels is in a connected state, it is determined that the operation status of the gateway device is normal.

4. The method according to claim 3, characterized in that The determining the connection status of the GRE tunnel established between the gateway device and each UPF includes: Periodically sending a first detection message to each UPF through the gateway device; For each GRE tunnel corresponding to the UPF, judging the sending status of the first detection message according to whether the gateway device receives the first response message of the UPF; The connection status of the GRE tunnel is determined according to the sending status of the first detection message.

5. The method according to claim 4, characterized in that The sending status of the first detection message includes sending success and sending failure; Correspondingly, determining the connection state of the GRE tunnel according to the sending status of the first detection message includes: If the first detection message fails to be sent, determining the number of consecutive failures in sending the first detection message, and if the number reaches a first threshold, determining that the GRE tunnel is in a disconnected state; If the first detection message is sent successfully, the number of times the first detection message is sent successfully in succession is determined, and if the number reaches a second threshold, it is determined that the GRE tunnel is in a connected state.

6. The method according to claim 2, characterized in that The target communication data includes a first resource access request and a first data packet fed back by the network device based on the first resource access request; The transmitting the target communication data through the GRE tunnel between the target UPF and the gateway device in a normal operating state includes: If the target UPF receives the first resource access request sent by the IoT device, the first resource access request is transmitted to the gateway device in normal operation through the GRE tunnel between the target UPF and the gateway device in normal operation; Sending a first resource access request to a forwarding router through the gateway device in normal operation state, and sending the first resource access request to a network device through the forwarding router; Adding a diversion route corresponding to the gateway device with a faulty operation status in the routing table of the forwarding router, wherein the diversion route includes the device identifier of the gateway device with a normal operation status and the address information of the target UPF; If the forwarding router receives the first data packet fed back by the network device, the first data packet is sent to the gateway device in normal operation state according to the diversion route; The first data packet is transmitted to the target UPF through the GRE tunnel between the target UPF and the gateway device in normal operating state, and the first data packet is forwarded to the IoT device through the target UPF.

7. The method according to claim 6, characterized in that Also includes: If the operating status of the gateway device with the operating status failure returns to normal, the diversion route is deleted, and the target communication data is transmitted through the GRE tunnel between the target UPF and the gateway device with the operating status failure.

8. The method according to claim 6, characterized in that Before adding the diversion route corresponding to the gateway device with the operating status failure in the routing table of the forwarding router, the method further includes: Determining the operating status of the target UPF; If the target UPF is in normal operation, the diversion route corresponding to the gateway device with the operating status failure is added to the routing table of the forwarding router; if the target UPF is in faulty operation, the failure is reported to the monitoring server corresponding to the target UPF.

9. The method according to claim 8, characterized in that The determining the operating state of the target UPF includes: Determine the connection status of the GRE tunnel established between the target UPF and each gateway device; If the connection status of the GRE tunnel established between the target UPF and each gateway device is in a disconnected state, it is determined that the operation status of the target UPF is faulty; If the connection status of one or more GRE tunnels is in a connected state, it is determined that the operating status of the target UPF is normal.

10. A network communication device for an Internet of Things device, characterized in that: include: A first determination unit is used to determine, in response to receiving a plurality of communication data between an IoT device and a network device, a target user plane function UPF to which the IoT device belongs, wherein the target UPF is used to provide routing and forwarding functions for user plane data packets; wherein each UPF is connected to at least two gateways and implements load balancing through a cross-general routing encapsulation GRE tunnel; A second determining unit is used to determine the GRE tunnels corresponding to the at least two gateway devices corresponding to the target UPF, wherein the GRE tunnels are used to transmit communication data between the UPF and the gateway device; A communication unit, used to transmit the multiple communication data according to the GRE tunnels corresponding to at least two gateway devices corresponding to the target UPF; wherein the multiple communication data include first communication data sent by the IoT device to the network device and second communication data sent by the network device to the IoT device.

11. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer execution instructions stored in the memory, so that the processor executes the network communication method of the Internet of Things device as described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the network communication method for the Internet of Things device as described in any one of claims 1 to 9 is implemented.

13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the network communication method for an IoT device as described in any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Message sending method and device, network equipment and storage medium

    CN117278358A

  • Method and device, network element and device for implementing user plane function management

    WO2018059043A1