Data processing method, device and readable storage medium based on edge gateway device

By initializing virtual network components on the edge gateway device of the IoT platform and establishing connections using the MQTT protocol, the difficulty of remote maintenance of gateway boxes in the IoT platform is solved, stable data transmission and management are achieved, and system stability is improved and reliability.

CN119232545BActive Publication Date: 2025-02-21国投融合科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the IoT platform, tens of thousands of gateway boxes distributed at different users are difficult to maintain remotely due to the diverse network connection methods and the limitation of intranet IP addresses, and it is difficult to achieve effective connections in traditional VPN technology and network mapping configurations.

Method used

By initializing the virtual network component on the edge gateway device and establishing a connection with the message server using the MQTT client library, sending a virtual network connection message to establish a virtual network connection, a stable connection between the first network device and the second network device is achieved. and data transmission.

Benefits of technology

Stable connection and data transmission are achieved in a complex network environment, adapting to the connection needs of a large number of devices under the Internet of Things platform, improving the efficiency of data transmission and management convenience, and reducing maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119232545B_ABST
    Figure CN119232545B_ABST
Patent Text Reader

Abstract

The present application provides a data processing method, device and readable storage medium based on an edge gateway device, and relates to the field of communication technology. The method includes: after initializing the first virtual network component of the first network device, using the message queue telemetry transmission protocol MQTT client library to establish a connection between the first virtual network component and the message server; using the MQTT client library, sending a virtual network connection message to the message server; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; using the virtual network connection message, a virtual network connection is established with at least one of the second network devices. The solution of the present application can remotely maintain tens of thousands of gateway boxes distributed at different users and with different network connection methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a data processing method, device and readable storage medium based on an edge gateway device. Background Art

[0002] The IoT platform (including the sewage cloud control platform) is a cloud-edge collaborative environment consisting of a cloud center and tens of thousands (or even millions) of edge devices. In this scenario, there are many challenges, especially when it comes to remote maintenance of tens of thousands of gateway boxes distributed at different users.

[0003] First, the diversity of network connection methods brings great complexity. Different users have different network environments. Some use wireless network communication technology (WIFI) to connect, some use wired connections, and some use fourth-generation mobile communication technology (4G) or fifth-generation mobile communication technology (5G) to connect. Secondly, the network composition is diverse, and since the gateways are deployed at the customer site, the network structure cannot be controlled, and most of these gateway boxes are under the Internet Protocol (IP) address of the intranet, which brings huge obstacles to remote maintenance. Intranet IP means that their accessibility on the Internet is limited. To achieve remote maintenance, it is necessary to establish a connection through complex network mapping configuration or virtual private network (VPN) service. Network mapping technology often requires in-depth understanding and configuration of the user's network environment, and the gateways are deployed at the customer site, so the network structure and configuration cannot be controlled, which is almost an impossible task for tens of thousands of gateway boxes distributed at different users. Traditional VPN technology cannot meet the needs of sewage treatment monitoring scenarios of tens of thousands of edge devices, which greatly increases the workload and difficulty of maintenance.

[0004] Currently, when equipment needs maintenance, it is necessary to frequently go to the site to solve the problem. Due to the large number of gateway boxes and their distribution in different areas, each on-site solution consumes a huge amount of time and travel costs. Summary of the invention

[0005] The purpose of this application is to provide a data processing method, device and readable storage medium based on an edge gateway device to solve the problem of difficult maintenance when the number of gateway boxes is large in the prior art.

[0006] To achieve the above object, an embodiment of the present application provides a data processing method based on an edge gateway device, which is applied to a first network device, including:

[0007] After initializing the first virtual network component of the first network device, establishing a connection between the first virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library;

[0008] Using the MQTT client library, sending a virtual network connection message to the message server; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0009] The virtual network connection message is used to establish a virtual network connection with at least one of the second network devices.

[0010] Optionally, the method further comprises:

[0011] After the virtual network connection between the first network device and at least one of the second network devices is successful, a target data packet to be sent is constructed and sent to the successfully connected second network device; the target data packet carries a management control command.

[0012] Optionally, constructing a target data packet to be sent, and sending the target data packet to the successfully connected second network device includes:

[0013] Creating a target socket, and writing the target data packet into the target socket;

[0014] According to the target address of the target socket, the target data packet is transmitted to the first virtual network card of the first network device;

[0015] Using the first virtual network card, delivering the target data packet to the network protocol stack of the first network device;

[0016] According to the network protocol stack, sending the target data packet to a first real network card of the first network device;

[0017] According to the first real network card, the target data packet is sent to the second network device that is successfully connected.

[0018] Optionally, before establishing a connection between the first virtual network component and the message server using a message queue telemetry transport protocol MQTT client library, the method further includes:

[0019] Entering a user name and password into the management interface of the first network device;

[0020] Using the user name and password, send an authentication request to the authentication server to verify the identity information of the user;

[0021] When the authentication is successful, the tenant information of the user is obtained; the tenant information includes the tenant ID, tenant name, and a list of devices under the tenant;

[0022] Among them, in the management interface of the first network device, only the device list under the current tenant is displayed; when sending instructions or performing network configuration, the tenant information of the current user is checked, and only devices within the same tenant can be operated.

[0023] To achieve the above-mentioned purpose, the present application also provides a data processing method based on an edge gateway device, which is applied to a second network device, including:

[0024] After initializing the second virtual network component of the second network device, establishing a connection between the second virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library;

[0025] Using the MQTT client library, subscribing to a target topic and receiving a virtual network connection message published in the target topic; the virtual network connection message is sent by a first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0026] Parse the virtual network connection message, establish a virtual network connection with the first network device, and send a registration request to the central node.

[0027] Optionally, after parsing the virtual network connection message and establishing a virtual network connection with the first network device, the method further includes:

[0028] Using the target topic to receive a target data packet published by the first network device;

[0029] Using a second real network card of the second network device to transmit the target data packet to the kernel state of the second network device;

[0030] In the kernel state of the second network device, using the network protocol stack of the second network device to determine whether the address of the target data packet is the current second network device;

[0031] If the current network device is the second network device, the target data packet is received using the second virtual network card of the second network device.

[0032] Optionally, after receiving the target data packet using the second virtual network card of the second network device, the method further includes:

[0033] storing the target data packet in an internal buffer of the second network device;

[0034] The required read data in the internal buffer is read by using the first network device.

[0035] Optionally, after sending the registration request to the central node, the method further includes:

[0036] A heartbeat signal is regularly sent to the central node; the heartbeat signal is used to indicate its own online status and connection status; wherein the central node is used to update the status information of the current second network device according to the heartbeat signal, and notify other second network nodes that subscribe to the same target topic.

[0037] To achieve the above-mentioned purpose, the present application also provides a data processing device based on an edge gateway device, which is applied to a first network device, including:

[0038] A first processing module, configured to establish a connection between the first virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the first virtual network component of the first network device;

[0039] A second processing module is used to send a virtual network connection message to the message server using the MQTT client library; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0040] The third processing module is used to use the virtual network connection message to establish a virtual network connection with at least one of the second network devices.

[0041] To achieve the above-mentioned purpose, the present application also provides a data processing device based on an edge gateway device, which is applied to a second network device, including:

[0042] a fourth processing module, configured to establish a connection between the second virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the second virtual network component of the second network device;

[0043] A fifth processing module is used to use the MQTT client library to subscribe to a target topic and receive a virtual network connection message published in the target topic; the virtual network connection message is sent by the first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0044] The sixth processing module is used to parse the virtual network connection message, establish a virtual network connection with the first network device, and send a registration request to the central node.

[0045] To achieve the above objectives, the present application also provides a readable storage medium on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps in any of the methods described above are implemented.

[0046] The beneficial effects of the above technical solution of the present application are as follows:

[0047] In an embodiment of the present application, after initializing the first virtual network component of the first network device, a connection between the first virtual network component and a message server is established using a message queue telemetry transmission protocol MQTT client library; a virtual network connection message is sent to the message server using the MQTT client library; the virtual network connection message corresponds to a target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; and a virtual network connection is established with at least one of the second network devices using the virtual network connection message. In the application scenario of the Internet of Things, the present application utilizes the joint work between the first network device and the second network device to ensure stable connection and data transmission in a complex network environment, can adapt to the connection requirements of a large number of devices in the Internet of Things platform scenario, achieve efficient data transmission and management, and can automatically adjust the network connection according to different device distributions and network environment changes to improve the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 This is a flow chart of a data processing method based on an edge gateway device and applied to a first network device according to an embodiment of the present application;

[0049] Figure 2 This is a second flowchart of the authentication method applied to a mobile terminal according to an embodiment of the present application;

[0050] Figure 3 This is a third flowchart of the authentication method applied to a mobile terminal according to an embodiment of the present application;

[0051] Figure 4 This is an application flow chart of the authentication method of an embodiment of the present application;

[0052] Figure 5 for Figure 4 Connection diagram of each device in. DETAILED DESCRIPTION

[0053] In order to make the technical problems, technical solutions and advantages to be solved by the present application clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.

[0054] It should be understood that the references to "one embodiment" or "an embodiment" throughout the specification mean that the specific features, structures, or characteristics associated with the embodiment are included in at least one embodiment of the present application. Therefore, the references to "in one embodiment" or "in an embodiment" appearing throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.

[0055] In the embodiments of the present application, the term "and / or" describes the association relationship of the associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.

[0056] In the embodiments of the present application, the term "plurality" refers to two or more than two, and other quantifiers are similar.

[0057] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0058] In order to enable those skilled in the art to better understand the embodiments of the present application, the following description is first made:

[0059] 1. VPN (Virtual Private Network) Technology: VPN is a virtual private network. It uses encryption technology, tunneling technology, and identity authentication to create a secure communication channel on the public network. Users can remotely and securely access private network resources through VPN, just like being in a local network. It can break through geographical restrictions and enable corporate employees to work efficiently no matter where they are. However, the IoT platform scenario is different from the office scenario. The number of devices in the IoT platform scenario is very large, and multiple edge gateways are often required to have the same tunnel IP. In addition, there are multiple programmable logic controllers (PLC) devices under each edge gateway. These PLC devices cannot run VPN clients but need to be remotely accessible. At the same time, different edge devices belong to different tenants and require dynamic tenant isolation. These are not convenient for traditional VPN technology to meet.

[0060] 2. Port mapping technology: By performing port mapping on the user's router, the specific port of the gateway box in the intranet can be exposed to the public Internet, thereby achieving remote access. This method is relatively simple, and remote maintenance can be achieved as long as the user cooperates with the port mapping operation. However, port mapping has certain security risks because it directly exposes the intranet device to the public Internet and is vulnerable to external attacks. In addition, the setting methods of port mapping for routers of different brands and models are different, and maintenance personnel need to have certain network knowledge and skills to set it correctly. Moreover, if the user changes the router or the network environment changes, the port mapping may need to be reset. The most important thing is that the network where each edge gateway is located needs to have a static public IP, which cannot be met in the actual environment.

[0061] 3. Dynamic Domain Name Resolution (DDNS) Technology: For gateway boxes with dynamic IP addresses, DDNS technology can be used to bind the dynamic IP address to a fixed domain name. Maintenance personnel can access the gateway box through this fixed domain name without worrying about changes in its IP address. The advantage of this technology is that it can adapt to changes in dynamic IP addresses without frequent reconfiguration. However, this technology requires that each edge gateway environment has a dynamic public IP, and now the operators assign IPs after multiple network address translation (NAT) conversions, so this is also not met in the actual environment.

[0062] 4. Third-party remote control software: Some third-party remote control software can achieve remote maintenance by installing client programs on the gateway box. For example, teamviewer, ToDesk and other software. These software are usually easy to use and do not require complex network configuration. However, there are multiple PLC devices under each edge gateway. These PLC devices cannot run VPN clients but need to be directly accessed remotely. Because many PLC devices have dedicated management software, these software do not support installation on edge gateways and can only be directly managed through the maintenance personnel's computer, which is something that teamviewer, ToDesk and other software cannot meet.

[0063] 5. IPv6 technology: IPv6 has a huge address space and can assign a globally unique IP address to each gateway box, thereby achieving direct remote access without the need for complex network penetration and other operations. Using IPv6 technology can greatly simplify the remote maintenance process and improve maintenance efficiency. However, the popularity of IPv6 is not high enough at present. The network environment of many users may not support IPv6, and the user's network cannot be controlled. Therefore, IPv6 is still a beautiful vision and cannot meet the current actual needs.

[0064] The embodiment of the present application provides a data processing method, device and readable storage medium based on an edge gateway device, which can solve the problem of remote maintenance of tens of thousands of gateway boxes distributed at different users and having different network connection modes and intranet IPs in the Internet of Things scenario. Among them, the method and the device are based on the same application concept. Since the principles of solving the problem by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0065] like Figure 1 As shown, an embodiment of the present application provides a data processing method based on an edge gateway device, which is applied to a first network device, including:

[0066] Step 11, after initializing the first virtual network component of the first network device, establishing a connection between the first virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library;

[0067] Step 12, using the MQTT client library to send a virtual network connection message to the message server; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0068] Step 13: Use the virtual network connection message to establish a virtual network connection with at least one of the second network devices.

[0069] The above method in this application can be applied to Figure 2 The network architecture diagram shown includes a management program, an edge gateway device, an MQTT client library connected to the management program and the edge gateway device respectively, a message server connected to the MQTT client library, and a central node connected to the message server. The first network device can be Figure 2 The management program in the second network device can be an edge gateway device, where the edge gateway nodes: These nodes are usually various IoT devices, responsible for collecting and processing data. They are deployed at the customer site and usually face complex network environments, such as NAT (Network Address Translation), firewalls, etc. Management program: As a management-side program, the management program is responsible for configuring and managing multiple edge gateway nodes. Through the management program, the operator can connect the management-side operating system and a specific edge gateway node to a virtual network. Central node: As a registration center, the central node is responsible for maintaining information of all connected nodes to ensure effective communication between different nodes. The management program can run anywhere on the Internet. In the maintenance scenario of the Internet of Things (IoT) system, the use of Figure 2 Systems in the network, such as edge gateway nodes, hypervisors, and central nodes, work together through these components to ensure stable connections and data transmission in complex network environments.

[0070] The IoT system is a cloud-edge collaborative environment consisting of a cloud center and tens of thousands (possibly millions in the future) of edge devices.

[0071] MQTT client library is a library written in different programming languages ​​to implement the client functions of the MQTT protocol. MQTT (Message Queuing Telemetry Transport) is a lightweight message transmission protocol, especially suitable for IoT applications in low-bandwidth and unstable network environments. The MQTT client library enables developers to use the MQTT protocol to publish and subscribe messages in various programming environments.

[0072] Before step 11, after the first network device is started, that is, after the hypervisor is started, the following steps will be performed first: Initialize the first virtual network component of the first network device: The hypervisor contains the first network device virtual network component and prepares to establish a connection with the second network device (edge ​​gateway device). At this time, the hypervisor will load the necessary configuration and prepare the parameters for establishing the virtual network. Establish a connection with the message server: The hypervisor uses the TCP (Transmission Control Protocol) protocol to connect to the message server through the MQTT client library. This process includes the establishment of a network connection and the handshake of the MQTT protocol.

[0073] In step 11: During the connection process, the management program performs the following operations: Send a connection request: Use the MQTT protocol to send a connection request to the server, including the client ID, user name and password. Confirm that the connection is successful: The message server responds to the connection request. After confirming that the connection is successful, the management program can perform subsequent publishing and subscription operations.

[0074] In step 12, before publishing the message to the message server, a virtual network connection message needs to be constructed. When the hypervisor needs to create a virtual network for a specific application scenario, a virtual network connection message is constructed: information containing the node identification and virtual network parameters of the edge gateway device (such as the virtual network group to be joined) is constructed. Sending a virtual network connection message: Through the MQTT client library, the hypervisor publishes the network connection message to a specific topic, namely the target topic. This application corresponds the virtual network connection message to the target topic. During the publishing process, the hypervisor ensures the QoS (quality of service) setting of the message to ensure the reliability of data transmission.

[0075] This process involves: Data encapsulation: Virtual network connection messages are encapsulated in MQTT format in user mode and transmitted through the TCP protocol.

[0076] Correspondingly, at least one second network device (edge ​​gateway device) obtains the virtual network connection message by subscribing to the target topic, and then synchronously realizes the virtual network connection between the first network device and at least one of the second network devices.

[0077] The first network device acts as a management program, that is, as an edge management terminal. As a key link in management, the edge management terminal can run anywhere on the Internet. This includes the edge management terminal, which mainly assumes the responsibility of comprehensive management of edge devices. On the one hand, the edge management terminal can monitor the data collection process on the edge side in real time, ensuring that all kinds of data from the operating status of the equipment to the collection of sensors enter the system accurately and timely, providing a reliable data basis for subsequent analysis and processing. On the other hand, the edge management terminal has powerful management capabilities and can directly log in to the system of the edge gateway for bottom-level management. It can deeply understand the operating status, configuration parameters, etc. of the edge gateway, and accurately adjust and optimize it. At the same time, the edge management terminal pays close attention to the execution of the algorithm model on the edge side, ensures that the latest process algorithm model issued by the central node is correctly stored and executed, and coordinates the data interaction and sharing between the edge side and the central node to ensure the stability and efficiency of data transmission.

[0078] The method of the present application also includes:

[0079] After the virtual network connection between the first network device and at least one of the second network devices is successful, a target data packet to be sent is constructed and sent to the successfully connected second network device; the target data packet carries a management control command.

[0080] In an embodiment of the present application, a virtual connection is established between a first network device and a group of second network devices, and a target data packet is sent through a target topic to achieve a one-control-many effect, and the second network devices that do not need to interact can also be isolated.

[0081] Specifically, constructing a target data packet to be sent, and sending the target data packet to the successfully connected second network device, includes:

[0082] Creating a target socket, and writing the target data packet into the target socket;

[0083] According to the target address of the target socket, the target data packet is transmitted to the first virtual network card of the first network device;

[0084] Using the first virtual network card, delivering the target data packet to the network protocol stack of the first network device;

[0085] According to the network protocol stack, sending the target data packet to a first real network card of the first network device;

[0086] According to the first real network card, the target data packet is sent to the second network device that is successfully connected.

[0087] In the embodiment of the present application, after the first network device is connected to at least one second network device, the first network device can send data. The data sending process is the application sending the target data packet, including. When the target data packet needs to be sent through the virtual network, the first network device will: (1) prepare data: construct the target data packet to be sent, such as management control commands, etc. The specific format depends on the needs of the application. Create a target socket: The application uses the socket API to create a TCP or UDP socket and specify the target address and port. This process involves calling the socket() function to create a socket object. (2) Data flows to the operating system: At this time, the target data packet enters the kernel state of the operating system from the user state. The specific steps are as follows: Socket programming: Use the socket() function to create a socket, and then use the connect() function to establish a connection with the target address to ensure that the socket is connected to the target service. Write the target data packet to the socket: Write the target data packet to the socket through the send() function, and the data will be placed in the operating system's send buffer.

[0088] The role of the first virtual network card: (1) The first virtual network card driver processes the target data packet: When the target data packet is written to the socket, the operating system of the first network device will: Select the first virtual network card: According to the routing selection of the target address, pass the target data packet to the corresponding first virtual network card driver. The first virtual network card is responsible for logically simulating the network interface. (2) Encapsulation of the first virtual network card driver: In the kernel state of the first network device, the first virtual network card driver encapsulates the target data packet and adds the necessary protocol header information. This process ensures that the target data packet can be correctly processed in the virtual network.

[0089] The target data packet is sent to the first real network card of the first network device: The target data packet is passed to the network protocol stack: The target data packet driven by the virtual network card will be passed to the kernel-state network protocol stack. The network protocol stack is responsible for further processing of the target data packet, including determining the routing and encapsulation of the target data packet.

[0090] Sending through the first real network card: the network protocol stack of the first network device sends the target data packet to the real network card according to the routing selection, and the first real network card driver is responsible for sending the target data packet to the physical network.

[0091] Through all the internal processing of the first network device, the target data packet can be sent to the corresponding second network device in the case of virtual network connection, realizing the support of the same tunnel IP for multiple edge gateways, solving the IP allocation and management problems of multiple edge gateways in the IoT scenario, and improving the utilization efficiency of network resources. It is convenient to uniformly manage and maintain multiple edge gateways and reduce management costs.

[0092] Optionally, before step 11, the method of the present application further includes:

[0093] Entering a user name and password into the management interface of the first network device;

[0094] Using the user name and password, send an authentication request to the authentication server to verify the identity information of the user;

[0095] When the authentication is successful, the tenant information of the user is obtained; the tenant information includes the tenant ID, tenant name, and a list of devices under the tenant;

[0096] Among them, in the management interface of the first network device, only the device list under the current tenant is displayed; when sending instructions or performing network configuration, the tenant information of the current user is checked, and only devices within the same tenant can be operated.

[0097] In the embodiment of the present application, a tenant isolation mechanism is set up. In order to ensure the security of the management program and the isolation of the data, the system is designed with a tenant isolation mechanism. User login process: The management program requires the user to log in to obtain the user's identity information and the corresponding tenant information. The specific process is as follows: Login interface: After the user opens the management program, use the management interface of the first network device to enter the user name and password. Identity authentication: The management program verifies the user's identity information by sending a request to the authentication server. If the verification is successful, the system will return the user's tenant information. Acquisition and storage of tenant information: After the user successfully logs in, the management program will: Obtain tenant information: Retrieve tenant information related to the user from the database, including tenant ID, tenant name, list of devices under the tenant, etc. Storing tenant information: Store tenant information in memory for subsequent operations.

[0098] Implementation of tenant isolation: The management program will follow the following principles throughout the operation process to ensure isolation between tenants: Filtering of device lists: In the device management interface, the management program only displays the device list under the current tenant to ensure that users cannot access devices of other tenants. Permission control: When sending instructions or performing network configuration, the management program will check the tenant information of the current user to ensure that only devices within the same tenant can be operated.

[0099] This application implements tenant isolation through the above process, protects the implementation method and management mechanism of tenant dynamic isolation, and ensures the data security and independence of different tenants.

[0100] This application uses innovative technology to achieve remote maintenance in the face of tens of thousands of gateway boxes distributed in different users, with various network connection methods and in intranet IP. It breaks through the intranet IP restrictions, adapts to a variety of connection methods, and can manage the same tunnel IP of multiple edge gateways. At the same time, it dynamically isolates the devices of different tenants to ensure data security and independence, and also meets the remote access needs of PLC devices that cannot run VPN clients, providing an efficient and secure solution for IoT device management.

[0101] In a specific embodiment, the second gateway device takes a gateway box as an example, and VPN self-organizing network, network detection and initialization can be implemented between the first network device and the second network device: First, the first network device detects the network environment of each gateway box and identifies its connection mode (WIFI, wired connection, 4 / 5G connection, etc.). According to the detection results, a unique identifier is assigned to each gateway box, and its network parameters are recorded. Start the VPN service, establish a virtual network interface, and prepare for subsequent data transmission. Each gateway box sends its own identifier and network information to the first network device through a specific protocol, and the first network device stores this information in the node list. When a connection needs to be established, the first network device selects a suitable node for connection based on the information in the node list. The connection process uses encrypted communication to ensure data security. For newly added gateway boxes, the first network device will automatically discover nodes and incorporate them into the virtual network.

[0102] In a virtual network, data transmission uses tunneling technology to encapsulate the original data in a specific data packet and transmit it through the virtual network. The first network device automatically selects the best routing path based on the target address and node list to ensure that the data can reach the target node quickly and accurately.

[0103] In the case where multiple edge gateways have the same tunnel IP, the first network device will use special identification and routing strategies to ensure that data packets can be correctly distributed to each gateway box.

[0104] The first network device creates independent groups for different tenants, and each group has a unique identifier. Tenants can name and describe the groups according to their needs for easy management and identification. The administrator of the first network device can create, delete, modify and other operations on the groups to meet different business needs. When creating a group, the tenant can set a common password. This password will serve as the access credential for the group, and only users who know the password can join the group. When a user tries to join a group, the first network device will ask the user to enter the password for verification. After the verification is passed, the user's device will be included in the virtual network of the group. In order to ensure the security of the password, the system uses encrypted storage and transmission to prevent the password from being stolen or cracked.

[0105] In the same group, the first network device and at least one second network device can communicate through the virtual network. The present application encrypts and manages the communication within the group to ensure the security and integrity of the data. Different groups are isolated from each other and cannot communicate directly. Through strict access control and data isolation mechanisms, data from different tenants are prevented from interfering with each other.

[0106] The first network device automatically identifies the tenant to which the device belongs based on the device's identifier and network information. Based on the tenant identification result, the device is assigned to the corresponding group. Each tenant's device is in an independent group to achieve dynamic isolation between tenants. Tenants can add or delete devices at any time, and the first network device will automatically update the group information to ensure the effectiveness of isolation. For the data of different tenants, the first network device uses encrypted storage and transmission to ensure data security. The first network device strictly controls access to the data of different tenants through technical means such as access control lists. Only authorized users can access the data of a specific tenant. During data transmission, the first network device will mark and filter the data packets to ensure that the data of different tenants will not interfere with each other. The administrator of the first network device can adjust the network bandwidth, storage capacity and other resources of the group according to the needs of the tenants to ensure that each tenant can obtain good service quality.

[0107] In a specific embodiment, in the sewage treatment scenario, the equipment is widely distributed in villages in different provinces and cities, and the number of equipment is huge (currently more than 20,000), and the traditional remote maintenance method faces great challenges. In particular, when the equipment is deployed at the customer site, they are usually located in a mobile intranet environment (4G Internet access, the operator has enabled NAT) and cannot be directly accessed. Since most of the gateway boxes of these devices have intranet IP addresses, traditional VPN technology and network mapping configuration become complicated and difficult to implement. Using the method of the present application, when the user logs in to the system, the user's tenant identity will first be identified according to the login ID, and the device list related to the tenant will be automatically loaded. The MQTT protocol is used to interact with each device for information and status, and the basic information of these devices is obtained in real time, including the name of the device, IMEI, current status (such as online or offline), etc. In this way, the user can understand the latest status of the devices within his management scope through the device list without joining the network.

[0108] In the device list, users can select a specific device and choose "Join Network" or "Leave Network" to manage the connection status of the device.

[0109] Join the network: When the user clicks "Join the network", the first network device will establish a tunnel connection with the second network device and the central node through network penetration technology. This technology allows the device to successfully connect to the virtual private network in the intranet environment, allowing users to bypass network firewalls and intranet IP restrictions and directly access the internal system of the second network device. After joining the network, the "Joined" status of the device will be displayed as "Yes", and the user can perform remote maintenance operations, such as logging into the device's Linux system, viewing logs, debugging PLC programs, or remote upgrades.

[0110] Exit network: When the user clicks "Exit network", the first network device will stop the network penetration connection of the device and remove the first network device from the virtual private network. After exiting, the "Joined" status of the first network device will be displayed as "No" in the second network device. Disconnecting not only releases network resources, but also ensures that the second network device will not be connected to externally when remote access is not required.

[0111] Dynamic network penetration management: The network penetration process of the second network device joining the network is managed dynamically on demand. Through MQTT monitoring and obtaining device information, users can understand the basic information and online status of the second network device at any time, and only start the penetration operation when necessary to complete remote maintenance work. The encryption and dynamic establishment mechanism of the network penetration channel ensures the security and flexible remote management of the device in a complex network environment.

[0112] Application example: Sewage systems are spread across villages in many different provinces, cities, districts and counties. Different projects belong to different tenants and have different administrators. When a regional administrator needs to remotely maintain a second network device (edge-side device), after the first network device logs into the system, the administrator can select the second network device and click the "Join Network" button to start the penetration connection and update the device status to "online". Then, the administrator can remotely diagnose and maintain the device through the network connection. After the maintenance is completed, the administrator clicks the "Exit Network" button to disconnect, and the device status returns to "offline".

[0113] Through this process description, this application uses the MQTT protocol to obtain device information and status before joining the network, and then opens or closes the network penetration connection according to user needs. This design not only improves the efficiency of remote maintenance, but also ensures the isolation and security of the device when maintenance is not required. Therefore, through the solution of this application, devices distributed in different areas can be remotely maintained safely and reliably.

[0114] In summary, the method of this application can achieve the following effects:

[0115] 1. Meet the needs of a large number of devices: Adapt to the large number of devices in the IoT platform scenario, and enable multiple edge gateways to have the same tunnel IP, which is convenient for management and resource allocation.

[0116] 2. Support remote access to devices without VPN client: For PLC devices that cannot run VPN client, remote access can still be achieved, expanding the scope of maintainable devices.

[0117] 3. Dynamic isolation of tenants: Different edge devices can be dynamically isolated when they belong to different tenants to ensure the data security and independence of each tenant and avoid mutual interference.

[0118] 4. Advantages of self-organizing networks: The characteristics of self-organizing networks make the system more flexible, and can quickly adjust the network structure according to actual needs, thereby improving the system's adaptability and stability.

[0119] 5. Solve the shortcomings of traditional solutions:

[0120] Compared with port mapping technology, there is no security risk of exposing intranet devices directly to the public Internet, nor is it necessary for each edge gateway to have a static public IP, and the network environment requirements are lower. Compared with dynamic domain name resolution (DDNS) technology, there is no need to rely on each edge gateway to have a dynamic public IP, which overcomes the limitation of multiple NAT conversion IPs allocated by operators in the actual environment. Different from third-party remote control software, it can meet the needs of remote direct access to multiple PLC devices, especially for PLC devices that have dedicated management software and do not support installation on edge gateways and can only be managed directly by maintenance personnel's computers. Compared with IPv6 technology, it is not limited by the current low popularity of IPv6 and the uncontrollable user network environment, and can effectively meet current actual needs.

[0121] Reference Figure 3 As shown, the present application provides a data processing method based on an edge gateway device, which is applied to a second network device, including:

[0122] Step 31, after initializing the second virtual network component of the second network device, establishing a connection between the second virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library;

[0123] Step 32, using the MQTT client library, subscribing to the target topic, and receiving the virtual network connection message published in the target topic; the virtual network connection message is sent by the first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0124] Step 33: parse the virtual network connection message, establish a virtual network connection with the first network device, and send a registration request to the central node.

[0125] The second network device in this application is also used in Figure 2 The network architecture in the present application. The second network device may include: Data acquisition: a large amount of raw data is collected from the edge node front-end device, including the current operation status of the equipment and the water quality collected by the sensor. Edge-side algorithm model execution: responsible for receiving the latest process algorithm model issued by the central node computing center, and storing it, and performing calculations according to the actual algorithm calculation requirements, and the calculated results and equipment status are exchanged and shared through the network and the central node computing center.

[0126] The central node consists of the following parts: Data aggregation layer: realizes the aggregation of data from each edge side to a unified node for analysis and processing. The aggregated data undergoes preliminary cleaning and governance to ensure data quality. Algorithm model layer: The cloud computing center can analyze big data based on different types of massive data, and can send the process model and data formed by big data analysis to the edge node. The overall system consists of cloud computing nodes and edge computing nodes. The cloud computing node is responsible for collecting data on the edge side, using the big data support of the cloud to realize the learning and generation of process models based on artificial intelligence (AI), and send the process model to the edge computing node; the edge computing node is responsible for running the model to realize intelligent execution on the edge side. By generating the process model in the cloud and sending it down and running it on the edge side, the intelligent distribution and aggregation of data is realized, thereby realizing the cloud-edge fusion of the system.

[0127] Before step 31, the second network device (edge ​​gateway device) needs to be initialized: Run the second virtual network component of the second network device: Each edge network device runs the second virtual network component, which is responsible for handling the connection with the external network. This process includes loading the configuration file and initializing the network interface. After initializing the second virtual network component of the second network device, connect to the message server: The edge gateway device establishes a connection with the message server through the MQTT client library. The process is similar to the hypervisor to ensure that instructions can be received.

[0128] In step 32, after establishing a connection between the second virtual network component and the message server using the MQTT client library of the message queue telemetry transmission protocol, the second network device will: send a subscription request: the edge gateway device sends a subscription request through the MQTT client library, specifying the topic to be subscribed, that is, the target topic, which is mainly used to receive messages published by the hypervisor. Wait for messages: once the subscription is successful, the edge gateway device will enter a waiting state, waiting for instructions from the first network device (such as the hypervisor).

[0129] Specifically, the second network device receives the MQTT message from the target topic. When the management program publishes the virtual network connection message established by the virtual network, the message server will push this message to all corresponding edge gateway devices that have subscribed to the target topic. Take one of the edge gateway devices processing the received message as an example: the second virtual network component of the edge gateway device receives the virtual network connection message through the MQTT client library and passes it to the virtual network component for processing. Parsing instructions and registration: After receiving the virtual network connection message, the second virtual network component on the edge gateway device will: Parse the message content: extract the virtual network parameters (such as the virtual network group to be joined), and also include other configuration information, such as the security authentication information of the node. Prepare for registration: Based on the parsed parameters, the edge gateway device sends a registration request to the central node, including the node's external network IP, port, virtual IP, virtual MAC address and other information.

[0130] The method of the present application is applied to Figure 2 The architecture can adapt to the connection requirements of a large number of devices in the IoT platform scenario, flexibly build network architecture, and achieve efficient data transmission and management. It can automatically adjust network connections according to different device distributions and network environment changes to improve system stability and reliability.

[0131] Further, after sending the registration request to the central node, the method further includes:

[0132] A heartbeat signal is regularly sent to the central node; the heartbeat signal is used to indicate its own online status and connection status; wherein the central node is used to update the status information of the current second network device according to the heartbeat signal, and notify other second network nodes that subscribe to the same target topic.

[0133] In the embodiment of the present application, the central node processes the registration request: Receive the registration request: The central node receives the registration information of the edge gateway node and records it in the registration center. This process involves the verification and storage of the registration information. Maintain node information: Ensure that the information of all registered nodes is synchronized, including the status and connection information of the nodes.

[0134] Heartbeat detection and connection maintenance: The second network device sends heartbeat signals regularly. The management program and edge gateway nodes will send heartbeat signals to the central node regularly to indicate their online status. The heartbeat signal usually contains the node's status information, such as load, connection status, etc. The central node can update the node status: The central node updates the node's status information based on the heartbeat signal. If a node does not send a heartbeat signal for a long time, the central node will consider the node to be offline and notify other second network nodes that subscribe to the same target topic.

[0135] In the present application, after step 33, the method further includes:

[0136] Using the target topic to receive a target data packet published by the first network device;

[0137] Using a second real network card of the second network device to transmit the target data packet to the kernel state of the second network device;

[0138] In the kernel state of the second network device, using the network protocol stack of the second network device to determine whether the address of the target data packet is the current second network device;

[0139] If the current network device is the second network device, the target data packet is received using the second virtual network card of the second network device.

[0140] In the embodiment of the present application, when the edge gateway device receives the target data packet issued by the first network device, it will first go through the following process: The second real network card of the second network device receives the data: The target data packet reaches the second real network card of the edge gateway device through the network, and the second real network card receives the target data packet and passes it to the network card driver. Data is transferred to the kernel state: The second real network card driver transfers the data from the user state to the kernel state, and this process usually involves removing the physical layer and data link layer headers of the data packet.

[0141] In kernel mode, the network protocol stack of the second network device will: Decapsulate the data: remove the header information of the physical layer and data link layer, and determine the target address of the data according to the network layer protocol. If the target address of the data is the current node, continue processing. Pass to the virtual network card driver: The data will be passed to the second virtual network card driver of the second network device for further processing.

[0142] This application realizes the process of penetrating the intranet of the Internet of Things virtual network through the above process.

[0143] Further, after receiving the target data packet using the second virtual network card of the second network device, the method further includes:

[0144] storing the target data packet in an internal buffer of the second network device;

[0145] The required read data in the internal buffer is read by using the first network device.

[0146] In an embodiment of the present application, the target data packet is stored in the internal buffer of the second network device, that is, after receiving the data, the virtual network card driver of the second network device stores it in the internal buffer, and the target data packet waits in the buffer for reading by the operating system or application, and data storage and processing are achieved through the above process.

[0147] In summary, this application solves the IP allocation and management problems of multiple edge gateways in the IoT scenario and improves the utilization efficiency of network resources. It is convenient to uniformly manage and maintain multiple edge gateways and reduce management costs. For PLC devices that cannot run VPN clients, an effective remote access solution is provided, which expands the scope of application of the system. Through special technical means, it is ensured that these devices can be remotely accessed and managed securely and stably. In the IoT platform, devices of different tenants can be dynamically isolated to ensure the data security and privacy of each tenant. It provides a flexible tenant management mechanism that can be dynamically adjusted and configured according to the needs of tenants.

[0148] Reference Figure 4 As shown, the embodiment of the present application also provides a data processing device based on an edge gateway device, which is applied to a first network device, including:

[0149] A first processing module 41 is configured to establish a connection between the first virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the first virtual network component of the first network device;

[0150] The second processing module 42 is used to send a virtual network connection message to the message server using the MQTT client library; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0151] The third processing module 43 is used to use the virtual network connection message to establish a virtual network connection with at least one of the second network devices.

[0152] Optionally, the data processing device based on the edge gateway device of the present application further includes:

[0153] The first sending module is used to construct a target data packet to be sent after the virtual network connection between the first network device and at least one of the second network devices is successfully established, and send the target data packet to the successfully connected second network device; the target data packet carries a management control command.

[0154] Optionally, the first sending module includes:

[0155] A first processing unit, configured to create a target socket and write the target data packet into the target socket;

[0156] A second processing unit, configured to transmit the target data packet to a first virtual network card of the first network device according to a target address of the target socket;

[0157] A third processing unit, configured to transmit the target data packet to a network protocol stack of the first network device by using the first virtual network card;

[0158] a fourth processing unit, configured to send the target data packet to a first real network card of the first network device according to the network protocol stack;

[0159] A sending unit is used to send the target data packet to the successfully connected second network device according to the first real network card.

[0160] Optionally, before establishing a connection between the first virtual network component and the message server using a message queue telemetry transmission protocol MQTT client library, the apparatus of the present application further includes:

[0161] An input module, used to input a user name and password into the management interface of the first network device;

[0162] A second sending module is used to send an authentication request to an authentication server using the user name and password to verify the identity information of the user;

[0163] An acquisition module, used to acquire the tenant information of the user when the authentication is successful; the tenant information includes the tenant identifier, the tenant name, and the device list under the tenant;

[0164] Among them, in the management interface of the first network device, only the device list under the current tenant is displayed; when sending instructions or performing network configuration, the tenant information of the current user is checked, and only devices within the same tenant can be operated.

[0165] Among them, the implementation embodiments of the data processing method based on the edge gateway device applied to the first network device are all applicable to the embodiments of the data processing device based on the edge gateway device applied to the first network device, and can also achieve the same technical effect.

[0166] Reference Figure 5 As shown, an embodiment of the present application provides a data processing device based on an edge gateway device, which is applied to a second network device, including:

[0167] A fourth processing module 51 is configured to establish a connection between the second virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the second virtual network component of the second network device;

[0168] The fifth processing module 52 is used to use the MQTT client library to subscribe to the target topic and receive the virtual network connection message published in the target topic; the virtual network connection message is sent by the first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network;

[0169] The sixth processing module 53 is used to parse the virtual network connection message, establish a virtual network connection with the first network device, and send a registration request to the central node.

[0170] Optionally, the device of the present application further includes:

[0171] A first receiving module, configured to receive a target data packet issued by a first network device using the target topic;

[0172] A seventh processing module, configured to transmit the target data packet to the kernel state of the second network device by using the second real network card of the second network device;

[0173] an eighth processing module, configured to determine, in the kernel state of the second network device, by using the network protocol stack of the second network device whether the address of the target data packet is the current second network device;

[0174] The second receiving module is used to receive the target data packet by using the second virtual network card of the second network device if the current device is the second network device.

[0175] Optionally, the device of the present application further includes:

[0176] A storage module, used for storing the target data packet in an internal buffer of the second network device;

[0177] The reading module is used to read the required reading data in the internal buffer by using the first network device.

[0178] Optionally, the device of the present application further includes:

[0179] The third sending module is used to periodically send a heartbeat signal to the central node; the heartbeat signal is used to indicate its own online status and connection status; wherein the central node is used to update the status information of the current second network device according to the heartbeat signal, and notify other second network nodes that subscribe to the same target topic.

[0180] Among them, the implementation embodiments of the data processing method based on the edge gateway device applied to the second network device are all applicable to the embodiments of the data processing device based on the edge gateway device applied to the second network device, and can also achieve the same technical effect.

[0181] A readable storage medium in an embodiment of the present application stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the data processing method based on the edge gateway device as described above are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0182] The processor is the processor in the data processing method based on the edge gateway device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0183] The present application also provides a computer program product, including computer instructions, which, when executed by a processor, implement the above Figure 1 or Figure 3 The various processes of the method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0184] The above exemplary embodiments are described with reference to the accompanying drawings, and many different forms and embodiments are feasible without departing from the spirit and teachings of the present application. Therefore, the present application should not be constructed as a limitation of the exemplary embodiments proposed herein. More specifically, these exemplary embodiments are provided so that the present application will be perfect and complete, and the scope of the present application will be conveyed to those who are familiar with the technology. In these figures, the component sizes and relative sizes may be exaggerated for clarity. The terms used here are only based on the purpose of describing specific exemplary embodiments and are not intended to be limiting. As used herein, unless the text clearly indicates otherwise, the singular forms "one", "an" and "the" are intended to include these multiple forms. It will be further understood that the terms "comprising" and / or "including" when used in this specification indicate the presence of the features, integers, steps, operations, components and / or components, but do not exclude the presence or increase of one or more other features, integers, steps, operations, components, components and / or their groups. Unless otherwise indicated, when stated, a range of values ​​includes the upper and lower limits of that range and any subranges therebetween.

[0185] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A data processing method based on an edge gateway device, characterized in that: Applied to a first network device, comprising: After initializing the first virtual network component of the first network device, establishing a connection between the first virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library; Using the MQTT client library, sending a virtual network connection message to the message server; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; Using the virtual network connection message, establish a virtual network connection with at least one of the second network devices; The method further comprises: after the virtual network connection between the first network device and at least one of the second network devices is successfully established, constructing a target data packet to be sent, and sending the target data packet to the successfully connected second network device; the target data packet carries a management control command; Among them, constructing a target data packet to be sent and sending the target data packet to the successfully connected second network device includes: creating a target socket and writing the target data packet into the target socket; delivering the target data packet to the first virtual network card of the first network device according to the target address of the target socket; delivering the target data packet to the network protocol stack of the first network device by using the first virtual network card; sending the target data packet to the first real network card of the first network device according to the network protocol stack; and sending the target data packet to the successfully connected second network device according to the first real network card.

2. The method according to claim 1, characterized in that Before establishing a connection between the first virtual network component and the message server using a message queue telemetry transport protocol MQTT client library, the method further includes: Entering a user name and password into the management interface of the first network device; Using the user name and password, send an authentication request to the authentication server to verify the identity information of the user; When the authentication is successful, the tenant information of the user is obtained; the tenant information includes the tenant ID, tenant name, and a list of devices under the tenant; Among them, in the management interface of the first network device, only the device list under the current tenant is displayed; when sending instructions or performing network configuration, the tenant information of the current user is checked, and only devices within the same tenant can be operated.

3. A data processing method based on an edge gateway device, characterized in that: Applied to the second network device, comprising: After initializing the second virtual network component of the second network device, establishing a connection between the second virtual network component and a message server using a message queue telemetry transmission protocol MQTT client library; Using the MQTT client library, subscribing to a target topic and receiving a virtual network connection message published in the target topic; the virtual network connection message is sent by a first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; Parsing the virtual network connection message, establishing a virtual network connection with the first network device, and sending a registration request to the central node; Wherein, after parsing the virtual network connection message and establishing a virtual network connection with the first network device, the method further comprises: using the target topic to receive a target data packet issued by the first network device; using the second real network card of the second network device to transfer the target data packet to the kernel state of the second network device; in the kernel state of the second network device, using the network protocol stack of the second network device to determine whether the address of the target data packet is the current second network device; if it is the current second network device, using the second virtual network card of the second network device to receive the target data packet; After the target data packet is received by the second virtual network card of the second network device, the method further includes: storing the target data packet in an internal buffer of the second network device; and reading required data in the internal buffer by using the first network device.

4. The method according to claim 3, characterized in that: After sending the registration request to the central node, the method further includes: A heartbeat signal is regularly sent to the central node; the heartbeat signal is used to indicate its own online status and connection status; wherein the central node is used to update the status information of the current second network device according to the heartbeat signal, and notify other second network nodes that subscribe to the same target topic.

5. A data processing device based on an edge gateway device, characterized in that: Applied to a first network device, comprising: A first processing module, configured to establish a connection between the first virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the first virtual network component of the first network device; A second processing module is used to send a virtual network connection message to the message server using the MQTT client library; the virtual network connection message corresponds to the target topic; wherein the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; A third processing module, configured to use the virtual network connection message to establish a virtual network connection with at least one of the second network devices; The device further comprises: a first sending module, configured to construct a target data packet to be sent after the virtual network connection between the first network device and at least one of the second network devices is successfully established, and send the target data packet to the successfully established second network device; the target data packet carries a management control command; The first sending module includes: a first processing unit, used to create a target socket and write the target data packet into the target socket; a second processing unit, used to transfer the target data packet to the first virtual network card of the first network device according to the target address of the target socket; a third processing unit, used to transfer the target data packet to the network protocol stack of the first network device using the first virtual network card; a fourth processing unit, used to send the target data packet to the first real network card of the first network device according to the network protocol stack; a sending unit, used to send the target data packet to the second network device that is successfully connected according to the first real network card.

6. A data processing device based on an edge gateway device, characterized in that: Applied to the second network device, comprising: a fourth processing module, configured to establish a connection between the second virtual network component and a message server by using a message queue telemetry transmission protocol MQTT client library after initializing the second virtual network component of the second network device; A fifth processing module is used to use the MQTT client library to subscribe to a target topic and receive a virtual network connection message published in the target topic; the virtual network connection message is sent by the first network device to the target topic in the message server; the virtual network connection message includes identification information of at least one second network device connected to the virtual network and network parameter information of the virtual network; a sixth processing module, configured to parse the virtual network connection message, establish a virtual network connection with the first network device, and send a registration request to a central node; The device further comprises: a first receiving module, configured to receive a target data packet issued by the first network device using the target topic; a seventh processing module, configured to transfer the target data packet to the kernel state of the second network device using the second real network card of the second network device; an eighth processing module, configured to determine whether the address of the target data packet is the current second network device using the network protocol stack of the second network device in the kernel state of the second network device; and a second receiving module, configured to receive the target data packet using the second virtual network card of the second network device if the address is the current second network device; The device also includes: a storage module, used to store the target data packet in an internal buffer of the second network device; and a reading module, used to read the required read data in the internal buffer using the first network device.

7. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps in the method according to any one of claims 1 to 2 are implemented; or, when executed, the steps in the method according to any one of claims 3 to 4 are implemented.

Citation Information

Patent Citations

  • Interaction method and device, and computer readable storage medium

    CN109327513A

  • Digital twin virtual-real network information real-time interaction method

    CN113608887A