Network communication system and method

By binding the corresponding relationship between the virtual network node of the slave device and the physical network node of the master device, combined with the address mapping module filtering mechanism, the problem of data packet confusion transmission in embedded devices is solved, and accurate data distribution of multiple network nodes on a single physical network card is achieved, meeting the needs of dynamic resource allocation and cost control.

CN120602453AActive Publication Date: 2025-09-05ZHIZHU COMMUNICATION TECHNOLOGY (CHENGDU) CO LTD

Patent Information

Application Number
CN202511014435.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-23
Publication Date
2025-09-05
Estimated Expiration
2045-07-23

AI Technical Summary

Technical Problem

In embedded devices, when existing technologies virtualize multiple IP addresses through a single physical Ethernet port, data packets may be confused in transmission due to the data transfer module, resulting in incorrect routing or repeated transmission of data packets between communication nodes, and increasing costs.

Method used

By binding the corresponding relationship between the virtual network node of the slave device and the physical network node of the master device, combined with the address mapping module filtering mechanism, data directional transmission is ensured.

Benefits of technology

It achieves accurate data distribution of virtualized multiple network nodes on a single physical network card, solves the problem of mixed data packet transmission, meets the needs of dynamic resource allocation of hardware devices, and takes into account both cost control and communication reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120602453A_ABST
    Figure CN120602453A_ABST
Patent Text Reader

Abstract

The invention discloses a network communication system and method, and belongs to the technical field of network communication. The system comprises a master device, a data transfer module and a slave device. The main equipment comprises a plurality of physical network nodes which are all in communication connection with the data transfer module; the slave device is provided with virtual network nodes in one-to-one correspondence with the physical network nodes, and the virtual network nodes are in communication connection with the data transfer module through the physical network card of the slave device. The slave device is used for acquiring first service data including a target logic address, determining a corresponding target physical network node, processing the service data by a corresponding source virtual network node, and sending the service data to the data transfer module through a physical network card, and the processed data includes a source physical address of the source virtual network node. And the data transfer module determines a corresponding target physical network node according to the source physical address, and forwards the first service data to the node. The problem of confusion transmission of data packets between peer-to-peer communication nodes is effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network communication technology, and in particular to a network communication system and method. Background Art

[0002] In the field of embedded devices, two methods are commonly used to support multiple IP address configurations. The first method is to use software technology to virtualize multiple IP addresses (Internet Protocol Address) and MAC addresses (Media Access Control Address) based on a single physical Ethernet port, so that these addresses share the same physical interface. The second method is to add additional physical network interface modules, such as connecting the W5500 (Ethernet controller) or ESP8266 / ESP32 (microcontroller chipset with integrated Wi-Fi function) via SPI (Serial Peripheral Interface) / UART (Universal Asynchronous Receiver / Transmitter) to expand the number of wired or wireless communication ports.

[0003] In actual application scenarios, there is a specific requirement: hardware devices need to dynamically allocate resources based on different application scenarios. For example, in scenario one, the device is used and configured as a single network node; in scenario two, the device's resources are divided and mapped into multiple groups, each of which operates as an independent network node. This situation is particularly common in communication base station products, such as remote radio units (RRUs), which have multiple transmit and receive channels. When the number of users in a deployment area is small but service bandwidth requirements are high, all RRU resources are allocated to a single small area (cell), and the RRU corresponds to a single network node. Conversely, if the number of users is large but service bandwidth requirements are low, the RRU's radio resources can be divided into multiple groups, each corresponding to a cell, thereby allowing the RRU to contain multiple network nodes.

[0004] Due to cost considerations, RRU devices do not support multiple network nodes (i.e., multiple IP addresses) by adding physical network interfaces. Therefore, multiple network nodes must be virtualized using software based on a single physical Ethernet port to support multiple IP addresses. To enable dynamic configuration of RRU network nodes, a data relay module implemented using an FPGA (Field-Programmable Gate Array) is added between the RRU and the upper-layer baseband unit (BBU) to aggregate and distribute data packets. Traditionally, the method of binding multiple IP addresses to a single physical network interface card (NIC) is achieved by modifying the ARP layer (Address Resolution Protocol). This method selects the corresponding MAC address network node based on the target IP address, thereby ensuring the correct diversion of communication data. However, the presence of this additional data relay module can lead to problems such as data packet confusion between peer communication nodes. Summary of the Invention

[0005] In order to solve the problems of the prior art, the embodiments of the present application provide a network communication system and method. The technical solution is as follows: In one aspect, a network communication system is provided, comprising a master device, a data transfer module, and a slave device, wherein the master device comprises at least one physical network node, each of which is communicatively connected to the data transfer module; the slave device comprises a virtual network node corresponding to the at least one physical network node, each of which is communicatively connected to the data transfer module via a physical network card of the slave device; The slave device is used to obtain first service data to be sent; the first service data includes a target logical address, and the target logical address indicates a target physical network node among the at least one physical network node for receiving the first service data; The slave device is further configured to determine a source virtual network node corresponding to the target physical network node among at least one of the virtual network nodes, process the first service data based on the source virtual network node, and send the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module is configured to determine the target physical network node corresponding to the source virtual network node in the at least one physical network node based on the source physical address, and send the first service data to the target physical network node.

[0006] In an exemplary embodiment, the master device is configured to send second service data to the slave device through the data transfer module; the second service data includes a target physical address, and the target physical address indicates a target virtual network node in at least one of the virtual network nodes that processes the second service data; The slave device is further used to receive the second business data through the physical network card, process the second business data based on the target virtual network node indicated by the target physical address, determine the source physical network node corresponding to the target virtual network node in the at least one physical network node based on the target physical address, and dispatch the processed second business data to a logic module used to process the business corresponding to the target virtual network node.

[0007] In an exemplary embodiment, the slave device further includes a first address mapping module, the first address mapping module being configured to maintain first address mapping information, the first address mapping information being configured to store a mapping relationship between a logical address and a physical address of the at least one physical network node; the first address mapping module being configured to: Checking whether the target logical address exists in the first address mapping information; If the target logical address does not exist in the first address mapping information, sending a network address request for the target logical address to the master device, so that the master device returns a network address reply indicating a target physical address corresponding to the target logical address; The first address mapping information is updated based on the target logical address and the corresponding target physical address.

[0008] In an exemplary embodiment, the first address mapping module is further configured to: Parsing the second service data to obtain a source logical address and a source physical address in the second service data; Determine whether the first address mapping information contains a source logical address in the second service data, or a source physical address in the second service data; When the source logical address in the second business data does not exist in the first address mapping information and the source physical address in the second business data does not exist in the first address mapping information, the first address mapping information is updated based on the source logical address and source physical address in the second business data.

[0009] In an exemplary embodiment, the slave device is further configured to: In the case of processing an address resolution data packet, parsing the address resolution data packet to obtain a verification logical address in the address resolution data packet; In the case where the verification logical address indicates any of the virtual network nodes, the verification logical address verifies whether the current virtual network node matches; the current virtual network node and the processing of the address resolution data packet belong to the same data transmission process.

[0010] In an exemplary embodiment, the slave device is also used to verify whether the correspondence between the physical network node indicated by the verification logical address and the current virtual network node is established based on preset node mapping information when the verification logical address indicates any of the physical network addresses; the preset node mapping information indicates a one-to-one correspondence between the physical network node of the master device and the virtual network node of the slave device.

[0011] In an exemplary embodiment, the main device further includes a second address mapping module, the second address mapping module is used to maintain second address mapping information, and the second address mapping information is used to store a mapping relationship between a logical address and a physical address of at least one of the virtual network nodes.

[0012] In an exemplary embodiment, the slave device includes physical resources shared by the virtual network nodes and logical resources corresponding to each of the virtual network nodes; For each of the virtual network nodes, the virtual network node is configured to occupy the logical resource corresponding to the virtual network node when the physical resource is occupied, and to seize the physical resource and release the logical resource when the physical resource is released.

[0013] In an exemplary embodiment, the slave device is further configured to initialize the virtual network node; For each of the virtual network nodes, the physical resources and the logical resources corresponding to the virtual network node are configured to be open to the virtual network node when initialization of the virtual network node is completed.

[0014] On the other hand, a network communication method based on the network communication system according to any of the above embodiments is provided, wherein the system includes a master device, a data transfer module, and a slave device, wherein the master device includes at least one physical network node, each of which is communicatively connected to the data transfer module, and the slave device includes a virtual network node corresponding to the at least one physical network node, and the virtual network node is communicatively connected to the data transfer module via a physical network card of the slave device; the method includes: The slave device obtains first service data to be sent; the first service data includes a target logical address, and the target logical address indicates a target physical network node among the at least one physical network node for receiving the first service data; The slave device determines a source virtual network node corresponding to the target physical network node among at least one of the virtual network nodes, processes the first service data based on the source virtual network node, and sends the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module determines the target physical network node corresponding to the source virtual network node in the at least one physical network node based on the source physical address, and sends the first service data to the target physical network node.

[0015] On the other hand, an electronic device is provided, including a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the network communication method of any of the above aspects.

[0016] On the other hand, a computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the network communication method as described in any of the above aspects.

[0017] In another aspect, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of an electronic device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the electronic device to perform any of the aforementioned network communication methods.

[0018] An embodiment of the present application provides a network communication system, which sets a slave device virtual network node corresponding to the master device physical network node. When the slave device obtains the first business data to be sent, the corresponding target physical network node is determined according to the target logical address, and the data is processed by the corresponding source virtual network node, and a clear source physical address identifier is added to the data packet. The data transfer module then directly determines the corresponding target physical network node based on the source physical address and sends the data, thereby bypassing the address mapping confusion problem that may be caused by the existence of the data transfer module in the traditional reliance on ARP protocol. It realizes the virtualization of multiple network nodes on a single physical network card, ensuring that the data packet can be accurately distributed to the target physical network node through the data transfer module, effectively solving the problem of confused transmission of data packets between peer communication nodes, and meeting the needs of dynamic resource allocation of hardware devices, taking into account cost control and communication reliability. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0020] Figure 1 This is a structural block diagram of a network communication system provided by an embodiment of the present application; Figure 2 This is a flow chart of a data transmission method provided by an embodiment of the present application; Figure 3 This is a flow chart of a data receiving method provided in an embodiment of the present application; Figure 4 This is a flow chart of a method for sending an address resolution data packet provided in an embodiment of the present application; Figure 5 This is a flowchart of a method for maintaining address mapping information provided by an embodiment of the present application; Figure 6 This is a flow chart of a method for receiving an address resolution data packet provided in an embodiment of the present application; Figure 7 This is a flow chart of an Ethernet driver initialization method provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products, or devices.

[0023] It is understandable that in the specific implementation of this application, related data such as user information is involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0024] Considering cost factors, embedded slave devices use software methods to virtualize multiple network nodes based on a single physical Ethernet port to support multiple IP addresses, adding a data transfer module between the slave and master devices. However, the presence of the newly added data transfer module may lead to problems such as the confusion of data packets transmitted between peer communication nodes. This is because the data transfer module is responsible for processing data packets from different logical network nodes and forwarding them to the corresponding physical network interfaces. However, this mechanism may cause the source and destination address information of the data packets to become unclear during the aggregation and redistribution process, especially when multiple logical network nodes share the same physical interface, increasing the risk of data packets being misrouted or sent repeatedly. In addition, because the ARP protocol relies on MAC addresses to determine the next-hop address, the data transfer module may not accurately maintain the MAC address table of each logical network node, further exacerbating the possibility of data packet confusion.

[0025] In view of this, the embodiment of the present application ensures directional data transmission by binding the correspondence between the virtual network node of the slave device and the physical network node of the master device, combined with the address mapping module filtering mechanism.

[0026] See also Figure 1 , which shows a structural block diagram of a network communication system provided by an embodiment of the present application. Figure 1 As shown, the system may include a master device, a data transfer module, and a slave device. The master device includes at least one physical network node, and the at least one physical network node is respectively connected to the data transfer module for communication. The slave device includes a virtual network node corresponding to the at least one physical network node, and the virtual network node is connected to the data transfer module for communication via the physical network card of the slave device. Specifically, Figure 1 The figure shows a typical application scenario of the network communication system of the present application, in which the slave device is an embedded device that supports multiple logical address configurations, and the master device communicates with the slave device through a data transfer module. The master device includes at least one physical network node. In the figure, two physical network nodes are used as an example, denoted as eth0 and eth1. Each physical network node establishes a communication connection with the data transfer module through an independent physical communication channel (such as optical fiber or network cable). The slave device is configured with virtual network nodes corresponding to the physical network nodes, denoted as e0 and e1 in the figure. The virtual network nodes exchange data with the data transfer module through the physical network card of the slave device, forming a corresponding communication link of "physical network node-data transfer module-virtual network node".

[0027] Among them, the master device is a device that contains at least one physical network node (such as a baseband unit BBU). The physical network node refers to a hardware module with independent network communication functions (such as an Ethernet interface unit) that can independently send and receive data; the slave device is a device that needs to communicate with the master device (such as a remote radio unit RRU). Its virtual network node is a logical communication unit virtualized on a single physical network card through software technology. There is a preset one-to-one correspondence with the physical network node of the master device (such as physical node eth0 corresponds to virtual node e0) to ensure the directionality of the communication link.

[0028] In the specific implementation, the slave device runs on RT-Thread RTOS (Real-Time Operating System) and uses lwIP-2.0.2 (Lightweight IP version 2.0.2, lightweight TCP / IP protocol stack). The slave device uses software to virtualize virtual network nodes based on the physical network card. The physical network nodes of the master device communicate with the virtual network nodes of the slave device through the transmission channel. Figure 1 For example, eth0 communicates with e0, and eth1 communicates with e1. This logically implements point-to-point communication between physical network nodes and virtual network nodes.

[0029] The slave device is configured to obtain first service data to be transmitted. The first service data includes a target logical address, which indicates a target physical network node, among at least one physical network node, that is to receive the first service data. Specifically, the first service data is service data transmitted from the slave device to the master device, and the target logical address (e.g., an IP address) included in the data clearly indicates the target physical network node, within the master device, that is to receive the data. The slave device processes the data by determining a source virtual network node corresponding to the target physical network node, and causes the processed data to carry the source physical address (e.g., a MAC address), which uniquely identifies the source virtual network node.

[0030] The slave device is further configured to determine a source virtual network node corresponding to the target physical network node among the at least one virtual network node, process the first service data based on the source virtual network node, and send the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module is used to determine a target physical network node corresponding to the source virtual network node in at least one physical network node based on the source physical address, and send the first service data to the target physical network node.

[0031] Specifically, the underlying driver of the device associates virtual network nodes with the physical network card through a software mechanism. Specifically, while the underlying driver processing functions of the physical network card interface do not directly distinguish between virtual network nodes, when the underlying Ethernet communication transceiver process calls the transceiver function, it passes in the network interface data structure pointer of the corresponding virtual network node based on the trigger message. This binds the data to be sent and received to the corresponding virtual network node data structure, ensuring that the processed service data accurately carries the source physical address of the source virtual network node.

[0032] See also Figure 2 , which shows a flow chart of a data sending method provided by an embodiment of the present application. It should be noted that this specification provides method operation steps such as the embodiments or flow charts, but may include more or fewer operation steps based on conventional or non-creative work. The order of steps listed in the embodiments is only one way of executing the steps among many orders and does not represent the only order of execution. When the actual system or product is executed, it can be executed in the order of the methods shown in the embodiments or the drawings or in parallel (for example, in a parallel processor or multi-threaded processing environment). Figure 2The driver-layer data transmission process is detailed. The slave device initiates a send operation by calling the rt_stm32_eth_tx function. The dev parameter identifies the corresponding source virtual network node (such as e0 or e1), and the _rt_seek_eth function is used to retrieve the virtual network node's structure. When the DMA descriptor becomes available, the first service data containing the target logical address is copied to the DMA send buffer (split into pieces if necessary). Finally, the HAL_ETH_TransmitFrame() function is called to initiate the transmission, handling send errors such as underflow. Because virtual network nodes share the physical network card's data transfer channel (i.e., physical resources), only one virtual network node is allowed to use physical resources to send data at a time, ensuring that the processed first service data carries a unique source physical address. Before calling rt_stm32_eth_tx, the source virtual network node's to-be-transmitted data is copied to the pbuf buffer, ensuring the data is bound to the source virtual network node.

[0033] It can be seen from the above technical solutions of the embodiment of the present application that the embodiment of the present application sets a slave device virtual network node corresponding to the master device physical network node. When the slave device obtains the first business data to be sent, the corresponding target physical network node is determined according to the target logical address, and the data is processed by the corresponding source virtual network node, and a clear source physical address identifier is added to the data packet. The data transfer module then directly determines the corresponding target physical network node based on the source physical address and sends the data, thereby bypassing the address mapping confusion problem that may be caused by the existence of the data transfer module in the traditional reliance on ARP protocol. It realizes the virtualization of multiple network nodes on a single physical network card, ensuring that the data packet can be accurately distributed to the target physical network node through the data transfer module, effectively solving the problem of confused transmission of data packets between peer communication nodes, and at the same time meeting the needs of dynamic resource allocation of hardware devices, taking into account cost control and communication reliability. When the slave device works in single logical address mode, the physical network card is bound to one network node, and the average communication time of ping packets between the master device and the slave device is low; when switching to multi-logical address mode, the virtual network node is implemented through software virtualization, and the average communication time of the same type of ping packets increases slightly, but this system makes the increase very small, and the impact of software processing on actual applications can be ignored.

[0034] In one exemplary embodiment, a master device is configured to send second service data to a slave device via a data transfer module. The second service data includes a target physical address, which indicates a target virtual network node, among at least one virtual network node, that processes the second service data. The second service data is service data sent by the master device to the slave device, and the target physical address (e.g., the MAC address of virtual network node e0) included in the data directly indicates the target virtual network node within the slave device that is to process the data, ensuring that the data is directed to the corresponding logical unit.

[0035] The slave device is further configured to receive second service data via a physical network card, process the second service data based on the target virtual network node indicated by the target physical address, determine the source physical network node corresponding to the target virtual network node from at least one physical network node based on the target physical address, and dispatch the processed second service data to a logic module configured to handle the service corresponding to the target virtual network node. Specifically, after receiving the second service data, the slave device's physical network card parses the target physical address to determine the target virtual network node and processes the data based on the node's dedicated logical resources. Simultaneously, the slave device reversely maps the source physical network node from which the data was sent in the master device (e.g., e0 corresponds to eth0) based on the target physical address, ensuring that the data processing results are correctly associated with the sending node of the master device. The slave device dispatches the data to a logic module configured to handle the service corresponding to the target virtual network node. This logic module is an application layer unit bound to the target virtual network node (e.g., e0 corresponds to the process handling eth0 services), ensuring precise matching of service data with application scenarios.

[0036] Specifically, there is a preset one-to-one correspondence between the physical network nodes of the master device and the virtual network nodes of the slave device (e.g., eth0 corresponds to e0, and eth1 corresponds to e1). When the master device sends second service data to the slave device via the data transfer module, the data includes a target physical address, which is used to indicate the target virtual network node (e.g., e0 or e1) that will process the data. After receiving the second service data, the slave device can determine the corresponding target virtual network node based on the source logical address of the master device in the communication data packet (the logical address of the corresponding physical network node). When receiving the address resolution data packet, the target virtual network node (e0 or e1) is determined by the source logical address (e.g., the IP address of eth0 or eth1). When sending data, the corresponding source virtual network node is selected based on the target logical address (the IP address of eth0 or eth1). This ensures that the logical address and physical address of the corresponding virtual network node of the slave device are stored in the address mapping table of the physical network node of the master device, thereby ensuring communication directionality.

[0037] Because the master device communicates with the slave device through only one physical network node at a time, the upper-layer UDP / TCP protocol (User Datagram Protocol / Transmission Control Protocol) uses a single processing process. Within the process, the corresponding slave device virtual network node is determined based on the logical address of the master device's communication gateway, ensuring point-to-point communication of the upper-layer data.

[0038] See also Figure 3 , which is a flow chart of a data receiving method provided in an embodiment of the present application. Figure 3 This section demonstrates the driver-layer data reception process. Specifically, the arrival of Ethernet data triggers the ETH_IRQHandler interrupt, which is then called by HAL_ETH_IRQHandler to handle the interrupt. Once the interrupt is handled, the HAL_ETH_RxCpltCallback callback function continues the subsequent operations. The _rt_determine_eth() function parses the target physical address (MAC address) in the data to determine the corresponding target virtual network node (such as e0 or e1). The eth_device_ready() function is then called to notify the target virtual network node of the data arrival. Data is read via the rt_stm32_eth_rx() function, which copies the data from the DMA buffer to the pbuf buffer of the target virtual network node. Finally, the DMA descriptor is released to prepare for the next reception. The upper-layer application then parses the data in the pbuf buffer and dispatches it to the corresponding service logic module.

[0039] At the Ethernet driver layer, virtual network node identification is implemented based on the physical address (MAC address) through the __rt_determine_eth() function. The callback function accurately matches the corresponding target virtual network node according to the target physical address carried by the ETH_HandleTypeDef parameter to ensure that the second service data is correctly processed and dispatched.

[0040] It can be seen from the above technical solutions of the embodiment of the present application that the embodiment of the present application forms a closed loop with the forward mechanism when sending data through reverse address mapping and node binding, thereby ensuring the accuracy of two-way communication. The target physical address carried by the second business data directly points to the target virtual network node that processes the data, ensuring that the data is directed to the corresponding logical unit; the slave device reversely maps the source physical network node based on the target physical address and dispatches the processing results, ensuring the correct association between the business data and the sending node of the master device. This mechanism solves the problem of reverse transmission address ambiguity that may be caused by the data transfer module, ensures that upper-layer UDP / TCP and other protocols can achieve point-to-point communication based on the node correspondence, and improves the accuracy and integrity of two-way communication.

[0041] The slave device's first address mapping module is responsible for maintaining first address mapping information, which stores the correspondence between the logical addresses (e.g., IP addresses) and physical addresses (e.g., MAC addresses) of the master device's physical network nodes. Because communication between the master device's physical network nodes (e.g., eth0, eth1) and the slave device's virtual network nodes (e.g., e0, e1) requires a data relay module implemented in an FPGA, address resolution packets (e.g., ARP packets) received by the slave device may occasionally contain confusion between the logical and physical addresses of the physical network nodes. Therefore, the first address mapping module parses and filters the master device's address resolution packets received to ensure a one-to-one correspondence between the logical and physical addresses of the physical network nodes in the first address mapping information.

[0042] In one exemplary embodiment, the slave device further includes a first address mapping module configured to maintain first address mapping information, which stores a mapping between a logical address and a physical address of at least one physical network node. Specifically, the first address mapping information is a table (e.g., an ARP table) storing the correspondence between the logical addresses (e.g., IP addresses) and physical addresses (e.g., MAC addresses) of the physical network nodes of the master device, and serves as a key basis for the slave device to resolve target nodes.

[0043] The first address mapping module is used to: check whether the target logical address exists in the first address mapping information; if the target logical address does not exist in the first address mapping information, send a network address request for the target logical address to the master device, so that the master device returns a network address reply, and the network address reply indicates the target physical address corresponding to the target logical address; based on the target logical address and the corresponding target physical address, update the first address mapping information. Specifically, when the slave device processes the first business data, the first address mapping module first checks whether the target logical address contained in the data exists in the mapping information: if not, the module sends a network address request (such as an ARP request packet) to the master device, and the request carries the target logical address to be queried; after receiving the request, the master device returns a network address reply (such as an ARP response packet) to clarify the target physical address corresponding to the target logical address; the slave device updates the first address mapping information based on the reply to ensure that subsequent data can correctly resolve the target node.

[0044] See also Figure 4 , which is a flow chart of a method for sending an address resolution data packet provided in an embodiment of the present application. Figure 4This section demonstrates the process for sending an address resolution packet. Specifically, it checks the validity of input parameters, including the virtual network node identifier (netif), data buffer (q), and target logical address (ipaddr). If multi-IP mode is supported, the GetCorrNetif() function is called to determine the corresponding source virtual network node based on the target logical address (i.e., the logical address of the target physical network node of the master device). Processing continues only when the slave device has completed initialization (allowing responses); otherwise, the original process is executed. Based on the target address type (unicast in this scenario), the target physical address corresponding to the target logical address is retrieved from the first address mapping information. The packet is then sent using the etharp_output_to_arp_index or etharp_query functions. If the target logical address does not exist in the first address mapping information, the first address mapping module sends a network address request for the target logical address to the master device. After the master device returns a network address reply containing the target physical address, the first address mapping information is updated based on the target logical and physical addresses to ensure the accuracy of subsequent data transmission.

[0045] As can be seen from the above technical solutions of the embodiment of the present application, the embodiment of the present application dynamically maintains the mapping relationship between the logical address and the physical address of the physical network node of the master device through the first address mapping module, thereby solving the problem of missing or outdated address information caused by the data transfer module. When the target logical address does not exist, the module actively requests and updates the mapping information to ensure that the slave device always holds the correct address correspondence, avoiding the failure of the first business data transmission due to unknown addresses. This mechanism realizes the real-time and accuracy of address mapping, provides a reliable address resolution basis for sending data from the slave device to the master device, and improves the stability of communication.

[0046] In an exemplary embodiment, the first address mapping module is also used to: parse the second business data to obtain the source logical address and source physical address in the second business data; determine whether the source logical address in the second business data or the source physical address in the second business data exists in the first address mapping information; and update the first address mapping information based on the source logical address and source physical address in the second business data when the source logical address in the second business data does not exist in the first address mapping information and the source physical address in the second business data does not exist in the first address mapping information.

[0047] Specifically, after receiving the second service data from the slave device, the first address mapping module parses the data and extracts the source logical address (e.g., the IP address of eth0) and the source physical address (e.g., the MAC address of eth0) of the source physical network node of the master device. These two addresses together identify the sending node of the master device. The module then determines whether the source logical address or the source physical address already exists in the first address mapping information. Only if neither exists does the module update the mapping information (adding a new address correspondence) based on the parsed result. If either address exists, the module does not update the mapping information to avoid address conflicts (e.g., the same IP address corresponds to different MAC addresses).

[0048] Specifically, the first address mapping module is also responsible for dynamically improving the first address mapping information by parsing the second service data received from the device. Specifically, the first address mapping module parses the second service data, extracts the source logical address (i.e., the logical address of the source physical network node of the master device) and the source physical address (i.e., the physical address of the physical network node), and determines whether the source logical address or source physical address already exists in the first address mapping information. If neither exists, it indicates that the corresponding relationship is a new entry. The module will update the first address mapping information based on the parsed source logical address and source physical address. If either address exists, it will not be updated to avoid conflicts.

[0049] See also Figure 5 , which is a flow chart of a method for maintaining address mapping information provided in an embodiment of the present application. Figure 5 The maintenance process for the first address mapping information is demonstrated. Specifically, variables are initialized, and then all entries in the first address mapping information are traversed. Each entry undergoes multiple checks: Checking whether the entry is empty (logical address is 0); if the input source logical address matches the entry's logical address, further checking the physical address. If the entry's physical address is all zero and the input physical address is non-zero, the overwrite is allowed; otherwise, checking whether the physical addresses are different (logical address conflict); if the physical addresses are the same, marking them as already existing; regardless of whether the logical addresses match, checking for duplicate physical addresses (excluding the entry itself). Based on the check result, a status code is returned: 1 indicates a logical address conflict or physical address duplication; 2 indicates the first address mapping information is empty; 3 indicates the input source logical address and source physical address already exist; and 0 indicates no conflict or duplication. Only when the status code is 2 (empty information) or 0 (no conflict) is the correspondence between the source logical address and the source physical address added to the first address mapping information, ensuring the accuracy and uniqueness of the information.

[0050] As can be seen from the technical solutions described above in the embodiments of the present application, the first address mapping module verifies and updates the source address in the second service data, ensuring the uniqueness and accuracy of the address mapping information. The module updates the mapping only when both the source logical address and the source physical address are absent, avoiding the introduction of duplicate addresses or address conflicts and effectively filtering out address confusion caused by the data transfer module (e.g., address confusion between eth0 and eth1). This mechanism maintains the purity of the first address mapping information, prevents packet disarray or loss caused by incorrect address association, and further improves the reliability of address resolution.

[0051] In an exemplary embodiment, the slave device is also used to: when processing an address resolution data packet, parse the address resolution data packet to obtain a verification logical address in the address resolution data packet; when the verification logical address indicates any virtual network node, verify whether the verification logical address matches the current virtual network node; the processing of the current virtual network node and the address resolution data packet belong to the same data transmission process.

[0052] Among them, the address resolution data packet is a data packet used to query or respond to address mapping relationships (such as ARP request / response), and the verification logical address (such as the IP address to be queried) contained therein is used to determine the target node of the data packet.

[0053] Specifically, when verifying a logical address that indicates any virtual network node of a slave device (e.g., the IP address of e0), the slave device verifies that the address matches the current virtual network node—the virtual node of the data transmission process handling the packet (e.g., the processing process of e0 corresponds to e0). If there is a mismatch, the packet is discarded to avoid incorrect resolution. This ensures that the address resolution packet is processed only by the target virtual node, preventing cross-node address information interference and ensuring clear and executable logic.

[0054] Specifically, during data transmission, the current virtual network node is the source virtual network node. During this process, if the slave device processes an address resolution data packet, the verification logical address in the address resolution data packet is extracted. If the verification logical address indicates a virtual network node, the verification logical address is compared to see if it indicates the source virtual network node, thereby verifying the correctness of the source virtual network node. During data reception, the current virtual network node is the target virtual network node. During this process, if the slave device processes an address resolution data packet, the verification logical address in the address resolution data packet is extracted. If the verification logical address indicates a virtual network node, the verification logical address is compared to see if it indicates the target virtual network node, thereby verifying the correctness of the target virtual network node.

[0055] It can be seen from the above technical solutions of the embodiment of the present application that the embodiment of the present application accurately guarantees the correctness of the node during data sending and receiving by verifying the matching of the verification logical address and the current virtual network node when processing the address resolution data packet. In the data sending scenario, the current virtual network node is the source virtual network node. If the verification logical address of the address resolution data packet indicates the virtual network node, by comparing whether the address points to the source virtual network node, the legitimacy of the source virtual network node can be directly verified, avoiding the wrong source virtual network node from participating in data transmission, and preventing the data packet from being sent to the wrong link due to source node mismatch; in the data receiving scenario, the current virtual network node is the target virtual network node. If the verification logical address indicates the virtual network node, by comparing whether the address points to the target virtual network node, it can ensure that the data is processed by the correct target virtual network node, and prevent the non-target node from mistakenly receiving the data. This verification mechanism filters abnormal address resolution requests from the node identity level, avoids cross-node address information interference, lays the foundation for the directionality of subsequent data transmission, and effectively reduces communication confusion caused by node identification errors.

[0056] In an exemplary embodiment, the slave device is also used to verify whether the correspondence between the physical network node indicated by the verification logical address and the current virtual network node is established based on the preset node mapping information when the verification logical address indicates any physical network address; the preset node mapping information indicates a one-to-one correspondence between the physical network node of the master device and the virtual network node of the slave device.

[0057] Specifically, when the verification logical address indicates any physical network node on the master device (such as the IP address of eth0), the slave device verifies that the physical network node corresponds to the current virtual network node (e.g., eth0 must correspond to e0) using pre-set node mapping information (e.g., a table storing eth0 to e0 and eth1 to e1). If the correspondence is not established (e.g., eth0's address is processed by e1), the slave device rejects the address resolution packet to prevent the incorrect address mapping from being recorded. If the address is established, the slave device processes the address normally and updates the mapping information. This mechanism further ensures the accuracy of address resolution by verifying the node correspondence.

[0058] Specifically, when processing an address resolution packet (such as an ARP packet), the slave device parses the packet to obtain the verification logical address contained therein and performs a matching verification based on this address. If the verification logical address indicates any virtual network node of the slave device, the slave device verifies whether the verification logical address matches the current virtual network node (the current virtual network node and the processing of the address resolution packet belong to the same data transmission process). If the verification logical address indicates any physical network node of the master device, the slave device verifies whether the correspondence between the physical network node of the master device and the virtual network node of the slave device is established based on the preset node mapping information (this information clearly defines the one-to-one correspondence between the physical network node of the master device and the virtual network node of the slave device, such as eth0 corresponding to e0 and eth1 corresponding to e1).

[0059] Specifically, during data transmission, the current virtual network node is the source virtual network node. During this process, if the slave device processes an address resolution data packet, the verification logical address in the address resolution data packet is extracted. If the verification logical address indicates a physical network node, a determination is made as to whether the physical network node indicated by the verification logical address corresponds to the source virtual network node, thereby verifying the correctness of the source virtual network node. During data reception, the current virtual network node is the target virtual network node. During this process, if the slave device processes an address resolution data packet, the verification logical address in the address resolution data packet is extracted. If the verification logical address indicates a physical network node, a determination is made as to whether the physical network node indicated by the verification logical address corresponds to the target virtual network node, thereby verifying the correctness of the target virtual network node.

[0060] See also Figure 6 , which is a flow chart of a method for receiving an address resolution data packet provided in an embodiment of the present application. Figure 6This demonstrates the input processing flow for address resolution packets. Specifically, the packet format is verified, and the hardware type, length, protocol type, and length are checked to ensure compliance with Ethernet address resolution protocol standards. Invalid packets are discarded and an error is logged. If valid, the source and destination logical addresses are extracted. If the interface has an IP configured and supports multi-IP mode, the GetActiveNetif() function is called to determine the virtual network node to which the verified logical address belongs, setting for_us=1 and setting the corresponding node. Otherwise, the target IP address is directly compared; if there is a mismatch, for_us=0 is set. The is_mac_repeated() function, combined with the previously described method for maintaining the first address mapping information, checks whether the source logical address and the source physical address are duplicated. Based on the result, the first address mapping information is updated. The address resolution request is processed. If the request is directed to a slave device, for_us=1, and the slave device has completed initialization (allowing responses), an address resolution reply is sent; otherwise, the request is ignored. If the address resolution reply is correct, the DHCP (Dynamic Host Configuration Protocol) module is notified, which processes the address resolution reply. Otherwise, the corresponding information is recorded. Finally, the memory of the received address resolution packet is released. Through the above process, it is ensured that the processing of the address resolution data packet complies with the preset node mapping relationship to avoid address confusion.

[0061] As can be seen from the above technical solutions of the embodiments of the present application, the embodiments of the present application further enhance the accuracy of the data transmission link by verifying the correspondence between the physical network node and the current virtual network node based on the preset node mapping information. In the data sending scenario, the current virtual network node is the source virtual network node. If the verification logical address of the address resolution data packet indicates the physical network node, by verifying whether the physical network node and the source virtual network node meet the preset correspondence (such as the master device physical node eth0 corresponding to the slave device source virtual node e0), it can be ensured that the source virtual network node and the target physical network node of the master device are in the correct preset link, thereby avoiding link mismatch between the source node and the physical node; in the data receiving scenario, the current virtual network node is the target virtual network node. If the verification logical address indicates the physical network node, by verifying the preset correspondence between the physical network node and the target virtual network node, it can be ensured that the target virtual network node and the source physical network node of the master device are in the correct link, thereby avoiding link mismatch between the target node and the physical node. This verification mechanism based on preset mapping filters out abnormal address resolution requests at the node link level, completely eliminating the problem of cross-link transmission of data packets caused by confusion in node correspondence, ensuring that data always flows in the preset "physical network node-virtual network node" link, further improving the reliability of communication.

[0062] In an exemplary embodiment, the master device further includes a second address mapping module, which is used to maintain second address mapping information, and the second address mapping information is used to store a mapping relationship between a logical address and a physical address of at least one virtual network node.

[0063] Specifically, the method for the second address mapping module to maintain the second address mapping information may refer to the method for the first address mapping module to maintain the second address mapping information.

[0064] The second address mapping module, a unit in the master device that maintains virtual network node address mappings, stores the correspondence between the logical address (e.g., IP address of e0) and the physical address (e.g., MAC address of e0) of the slave device's virtual network node. This module's functionality is symmetrical to that of the first address mapping module in the slave device, ensuring that the master device can correctly resolve the address information of the slave device's virtual node, providing the foundation for address resolution in bidirectional communication.

[0065] As can be seen from the above technical solutions of the embodiments of the present application, the embodiments of the present application maintain the address mapping of the virtual network node of the slave device through the second address mapping module of the master device, forming a symmetric mechanism with the first address mapping module of the slave device, thereby solving the problem of the master device resolving the address of the slave device virtual node. The second address mapping information ensures that the master device can accurately obtain the correspondence between the logical address and the physical address of the virtual network node, providing a reliable address resolution basis for the transmission of the second service data, ensuring the directionality of the data sent by the master device to the slave device, and improving the address resolution system for two-way communication.

[0066] The presence of the newly added data transfer module may cause packets to be transmitted out of sequence, resulting in temporal aliasing. This occurs because the module processes, aggregates, and redistributes packets from different logical network nodes. Under high load, packets from different sources may arrive at the aggregation module simultaneously, resulting in inconsistent processing and forwarding delays. Furthermore, if the system does not accurately timestamp or prioritize each packet, these packets may lose their original timing relationship during the aggregation and distribution process, causing the packets received at the receiver to be out of order, a phenomenon known as temporal aliasing. This non-sequential transmission can severely impact real-time applications such as voice calls and video conferencing, potentially leading to reduced quality of service.

[0067] In view of this, in the embodiments of the present application, the master device communicates with the slave device through only one physical network node at a time. The upper-layer UDP / TCP protocol uses a single processing process to determine the corresponding slave device virtual network node based on the master device's gateway address, ensuring that data is processed sequentially within the same node. The underlying driver limits data transmission to only one virtual network node at a time, preventing data packet cross-addressing caused by simultaneous transmissions from virtual network nodes and ensuring transmission order.

[0068] In an exemplary embodiment, the slave device includes physical resources shared by the virtual network nodes and logical resources corresponding to each virtual network node; For each virtual network node, the virtual network node is configured to occupy the logical resources corresponding to the virtual network node when the physical resources are occupied, and to seize the physical resources and release the logical resources when the physical resources are released.

[0069] The physical resources shared by virtual network nodes refer to the hardware resources of the slave device (such as physical network cards and DMA controllers); the logical resources corresponding to each virtual network node refer to software resources (such as dedicated buffers and configuration parameters).

[0070] Specifically, when physical resources are occupied, the virtual node first occupies its own logical resources (such as cached data). Once the physical resources are released, the virtual node immediately preempts the physical resources and releases the logical resources (such as transferring cached data to the physical buffer for transmission). This logical resource temporary storage and physical resource preemption enables orderly communication among multiple nodes within a single physical resource, avoiding resource conflicts.

[0071] Specifically, the virtual network nodes of the slave device (e.g., e0 and e1) share physical resources (e.g., physical ETH peripherals, physical layer, DMA resources, and interrupt handling modules), while each virtual network node possesses independent logical resources (e.g., network interface configuration, IP parameters, link status, and dedicated data buffers). Specifically, the physical address (e.g., MAC address) of virtual network node e1 is set to the last digit of the physical address of e0 plus 1, ensuring that the two physical addresses are different but associated. At the driver layer, virtual network nodes share physical resources, but their respective network interfaces, configurations, and status are logically independent. The PHY (Physical Layer Device) monitoring thread is responsible for detecting the physical link status corresponding to the two virtual network nodes and synchronously notifying each node.

[0072] As can be seen from the above technical solutions of the embodiments of the present application, for each virtual network node in the embodiments of the present application, when physical resources are occupied by other nodes, the node will first occupy its own corresponding logical resources (such as a dedicated data buffer) to cache data to be transmitted; until the physical resources are released, the node will immediately preempt the physical resources and release the cached data in the logical resources, thus achieving time-sharing multiplexing of physical resources. Through the "logical resource temporary storage-physical resource preemption" mechanism, orderly data transmission of multiple virtual network nodes under a single physical resource is achieved. While controlling hardware costs (no need to increase physical interfaces), the orderly data transmission of multiple virtual nodes is ensured, packet aliasing or loss caused by resource conflicts is avoided, and the utilization efficiency of physical resources is improved.

[0073] The presence of the newly added data transit module may cause data packets to linger in the network card and be sent out after an indefinite delay. This is because the module needs to process data packets from different logical network nodes and aggregate, analyze, and redistribute them. During this process, to ensure that the data packets are correctly routed to the destination, the module may need to temporarily store the data packets while waiting for sufficient information to accurately select a path. This additional processing step increases the time that data packets stay at the network interface, resulting in indefinite delays. Especially under high load conditions, as the amount of data to be processed increases, data packets may experience longer wait times, further exacerbating delays. In addition, this design may also introduce complex scheduling mechanisms to manage data flows of different priorities, which may also cause some data packets to be sent later to prioritize urgent or important traffic.

[0074] In view of this, the embodiments of the present application reduce data retention by optimizing the real-time processing mechanism of the underlying driver. When receiving data from the device, after the Ethernet interrupt is triggered, the corresponding virtual network node is immediately notified, the data is copied from the DMA (Direct Memory Access) buffer to the pbuf (Packet Buffer) of the corresponding virtual network node and the DMA descriptor is released to avoid data retention in the buffer. When sending data from the device, the availability of the DMA descriptor is checked before sending, and the transmission is started immediately to reduce the waiting time of the data in the network card. In addition, a PHY monitoring thread is created during initialization to regularly check the status of the physical link to ensure that the link is unobstructed and avoid data retention due to link abnormalities.

[0075] In an exemplary embodiment, the slave device is also used to initialize the virtual network node. Specifically, the slave device will initialize the virtual network node (such as e0, e1). Only after the initialization is completed, the physical resources and the logical resources corresponding to the virtual network node will be open to it, avoiding communication errors caused by non-initialization (such as the second address mapping information of the master device recording error information). In the specific implementation, a corresponding network interface data structure is created for each virtual network node based on the lwIP-2.0.2 protocol stack to support the adaptation of network communication. Since the master device may initiate asynchronous communication with the slave device at any time, if the slave device has not completed the initialization of the network port and the master device has attempted to communicate with it, an error message may be recorded in the second address mapping information of the master device. To avoid such problems, a global variable is defined to identify whether the slave device has completed the initialization of the network port. Only after the initialization is completed is the slave device allowed to process the reception and transmission operations of the address resolution data packet.

[0076] For each virtual network node, physical resources and logical resources corresponding to the virtual network node are configured to be open to the virtual network node when initialization of the virtual network node is completed.

[0077] Specifically, initializing a virtual network node from a device involves configuring network parameters (such as IP and MAC addresses), allocating logical resources, and establishing node mappings. Opening physical and logical resources to a virtual network node means that only after initialization is complete can the node use resources like the physical network card and DMA, as well as access its own logical resources. This prevents uninitialized virtual nodes from participating in communications (e.g., address recording errors caused by premature data transmission from the master device), ensuring that nodes are fully functional before being put into use.

[0078] Specifically, refer to Figure 7 , which is a flow chart of an Ethernet driver initialization method provided in an embodiment of the present application. Figure 7The Ethernet initialization process is shown. Specifically, the system is initialized. Specifically, the entire Ethernet system is initialized through the rt_hw_stm32_eth_init() function, and the receive buffer (Rx_Buff), transmit buffer (Tx_Buff) and DMA descriptors (DMARxDscrTab, DMATxDscrTab, etc.) are allocated; the physical address of the virtual network node is configured. For example, e0 uses the passed physical address, and e1 uses the address with 1 added to the last digit of the address; virtual network node registration, for example, calling the eth_device_init() function to register e0 and e1 respectively, e0 corresponds to the stm32_eth_device structure, and its network interface pointer is stored in pRRU_eth_dev1; e1 corresponds to the stm32_eth_device1 structure, and its network interface pointer is stored in pRRU_eth_dev2; the physical layer PHY monitoring thread is started. Specifically, the "phy" thread is created to run the phy_monitor_thread_entry() function, which automatically detects the PHY address and initializes the PHY, and regularly checks the physical link status changes through timers or interrupts.

[0079] In addition, the link status of each virtual network node is independently controlled by the eth_change_linkstatus() function to ensure that the resource opening status of each virtual network node matches the initialization progress and ensure communication stability.

[0080] As can be seen from the above technical solutions of the embodiments of the present application, the embodiments of the present application solve the error problem caused by uninitialized nodes participating in communication by opening resources after the virtual network node is initialized. The master device may initiate communication asynchronously. If the slave device node is not initialized, it is easy to cause errors in the master device address table. By limiting the timing of resource opening, this mechanism ensures that virtual nodes only participate in communication after initialization steps such as network parameter configuration and resource allocation are completed. This avoids address resolution errors or data transmission failures caused by incomplete node functions, and improves the stability of system startup and operation.

[0081] Corresponding to the network communication systems provided in the above-mentioned embodiments, an embodiment of the present application also provides a network communication method. Since the network communication method provided in the embodiment of the present application corresponds to the network communication systems provided in the above-mentioned embodiments, the implementation methods of the aforementioned network communication systems are also applicable to the network communication method provided in this embodiment and will not be described in detail in this embodiment.

[0082] The embodiment of the present application provides a network communication method based on the network communication system provided in any of the above embodiments. The method has the function of implementing the network communication system in the above system embodiment. The function can be implemented by hardware or by hardware executing corresponding software. The system includes a master device, a data transfer module and a slave device. The master device includes at least one physical network node, and the at least one physical network node is respectively connected to the data transfer module for communication. The slave device includes a virtual network node corresponding to the at least one physical network node, and the virtual network node is connected to the data transfer module for communication through the physical network card of the slave device. The method may include: Acquire first service data to be sent from the device; the first service data includes a target logical address, and the target logical address indicates a target physical network node in at least one physical network node for receiving the first service data; The slave device determines a source virtual network node corresponding to the target physical network node from at least one virtual network node, processes first service data based on the source virtual network node, and sends the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module determines a target physical network node corresponding to the source virtual network node in at least one physical network node based on the source physical address, and sends the first service data to the target physical network node.

[0083] In an exemplary embodiment, the method further comprises: The master device sends the second service data to the slave device through the data transfer module; the second service data includes a target physical address, and the target physical address indicates a target virtual network node in at least one virtual network node that processes the second service data; The slave device receives second business data through a physical network card, processes the second business data based on a target virtual network node indicated by a target physical address, determines a source physical network node corresponding to the target virtual network node in at least one physical network node based on the target physical address, and dispatches the processed second business data to a logic module for processing a business corresponding to the target virtual network node.

[0084] In an exemplary embodiment, the slave device further includes a first address mapping module, the first address mapping module is used to maintain first address mapping information, the first address mapping information is used to store a mapping relationship between a logical address and a physical address of at least one physical network node; the method further includes: The first address mapping module checks whether the target logical address exists in the first address mapping information; If the target logical address does not exist in the first address mapping information, sending a network address request for the target logical address to the master device, so that the master device returns a network address reply indicating a target physical address corresponding to the target logical address; The first address mapping information is updated based on the target logical address and the corresponding target physical address.

[0085] In an exemplary embodiment, the method further comprises: The first address mapping module parses the second service data to obtain a source logical address and a source physical address in the second service data; Determine whether the first address mapping information contains a source logical address in the second service data or a source physical address in the second service data; When the source logical address in the second business data does not exist in the first address mapping information and the source physical address in the second business data does not exist in the first address mapping information, the first address mapping information is updated based on the source logical address and the source physical address in the second business data.

[0086] In an exemplary embodiment, the method further comprises: When processing the address resolution data packet, the slave device parses the address resolution data packet to obtain the verification logical address in the address resolution data packet; In the case where the verification logical address indicates any virtual network node, the verification logical address verifies whether the current virtual network node matches; the processing of the current virtual network node and the address resolution data packet belong to the same data transmission process.

[0087] In an exemplary embodiment, the method further comprises: When the verification logical address indicates any physical network address, the slave device verifies whether the correspondence between the physical network node indicated by the verification logical address and the current virtual network node is established based on the preset node mapping information; the preset node mapping information indicates a one-to-one correspondence between the physical network node of the master device and the virtual network node of the slave device.

[0088] In an exemplary embodiment, the master device further includes a second address mapping module, which is used to maintain second address mapping information, and the second address mapping information is used to store a mapping relationship between a logical address and a physical address of at least one virtual network node.

[0089] In an exemplary embodiment, the slave device includes physical resources shared by the virtual network nodes and logical resources corresponding to each virtual network node; for each virtual network node, the method further includes: When physical resources are occupied, the virtual network node occupies the logical resources corresponding to the virtual network node until the physical resources are released, at which time the virtual network node seizes the physical resources and releases the logical resources.

[0090] In an exemplary embodiment, the method further comprises: Initialize the virtual network node from the device; For each virtual network node, the physical resources and the logical resources corresponding to the virtual network node are opened to the virtual network node when the initialization of the virtual network node is completed.

[0091] It should be noted that the methods provided in the above embodiments are only illustrated by the division of the above functional modules when implementing their functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the methods provided in the above embodiments and the system embodiments are based on the same concept. The specific implementation process is detailed in the system embodiment and will not be repeated here.

[0092] An embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores at least one instruction or at least one program, and the at least one instruction or the at least one program is loaded and executed by the processor to implement any one of the network communication methods provided in the above method embodiments.

[0093] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, application programs required for functions, etc.; the data storage area can store data created based on the use of the device, etc. In addition, the memory can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide the processor with access to the memory.

[0094] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal, server, or similar computing device. That is, the electronic device may include a computer terminal, server, or similar computing device. The embodiments of the present invention provide a computer device that runs a network communication method. The internal structure of the computer device may include, but is not limited to: a processor, a network interface, and a memory. The processor, network interface, and memory in the computer device may be connected via a bus or other means.

[0095] Among them, the processor (or CPU (Central Processing Unit)) is the computing core and control core of the computer device. The network interface may optionally include a standard wired interface, a wireless interface (such as WI-FI, a mobile communication interface, etc.). Memory is a memory device in a computer device for storing programs and data. It is understandable that the memory here can be a high-speed RAM storage device or a non-volatile memory device (non-volatile memory), such as at least one disk storage device; optionally, it can also be at least one storage device located away from the aforementioned processor. The memory provides a storage space, which stores the operating system of the electronic device, which may include but is not limited to: Windows system (an operating system), Linux (an operating system), Android (Android, a mobile operating system) system, IOS (a mobile operating system) system, etc., and the present invention is not limited to this; and, in the storage space, one or more instructions suitable for being loaded and executed by the processor are also stored, and these instructions can be one or more computer programs (including program codes). In the embodiment of this specification, the processor loads and executes one or more instructions stored in the memory to implement the network communication method provided in the above method embodiment.

[0096] An embodiment of the present application also provides a computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a network communication method. The at least one instruction or the at least one program is loaded and executed by the processor to implement any one of the network communication methods provided in the above method embodiments.

[0097] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.

[0098] It should be noted that the order of the embodiments of the present application described above is for descriptive purposes only and does not represent the superiority or inferiority of the embodiments. The above description is of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0099] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the method embodiments are generally similar to the system embodiments, so the description is relatively simple. For relevant parts, refer to the description of the system embodiments.

[0100] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by a program instructing the relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0101] The above are only preferred embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A network communication system, characterized in that: The system includes a master device, a data transfer module, and a slave device, wherein the master device includes at least one physical network node, each of which is communicatively connected to the data transfer module; the slave device includes a virtual network node corresponding to the at least one physical network node, and the virtual network node is communicatively connected to the data transfer module via a physical network card of the slave device; The slave device is used to obtain first service data to be sent; the first service data includes a target logical address, and the target logical address indicates a target physical network node among the at least one physical network node for receiving the first service data; The slave device is further configured to determine a source virtual network node corresponding to the target physical network node among at least one of the virtual network nodes, process the first service data based on the source virtual network node, and send the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module is configured to determine the target physical network node corresponding to the source virtual network node in the at least one physical network node based on the source physical address, and send the first service data to the target physical network node.

2. The network communication system according to claim 1, wherein: The master device is configured to send second service data to the slave device through the data transfer module; the second service data includes a target physical address, and the target physical address indicates a target virtual network node in at least one of the virtual network nodes that processes the second service data; The slave device is further used to receive the second business data through the physical network card, process the second business data based on the target virtual network node indicated by the target physical address, determine the source physical network node corresponding to the target virtual network node in the at least one physical network node based on the target physical address, and dispatch the processed second business data to a logic module used to process the business corresponding to the target virtual network node.

3. The network communication system according to claim 2, wherein: The slave device further includes a first address mapping module, the first address mapping module being configured to maintain first address mapping information, the first address mapping information being configured to store a mapping relationship between a logical address and a physical address of the at least one physical network node; the first address mapping module being configured to: Checking whether the target logical address exists in the first address mapping information; If the target logical address does not exist in the first address mapping information, sending a network address request for the target logical address to the master device, so that the master device returns a network address reply indicating a target physical address corresponding to the target logical address; The first address mapping information is updated based on the target logical address and the corresponding target physical address.

4. The network communication system according to claim 3, wherein: The first address mapping module is further configured to: Parsing the second service data to obtain a source logical address and a source physical address in the second service data; Determine whether the first address mapping information contains a source logical address in the second service data, or a source physical address in the second service data; When the source logical address in the second business data does not exist in the first address mapping information and the source physical address in the second business data does not exist in the first address mapping information, the first address mapping information is updated based on the source logical address and source physical address in the second business data.

5. The network communication system according to claim 3, wherein: The slave device is further configured to: In the case of processing an address resolution data packet, parsing the address resolution data packet to obtain a verification logical address in the address resolution data packet; In the case where the verification logical address indicates any of the virtual network nodes, the verification logical address verifies whether the current virtual network node matches; the current virtual network node and the processing of the address resolution data packet belong to the same data transmission process.

6. The network communication system according to claim 5, characterized in that: The slave device is also used to verify whether the correspondence between the physical network node indicated by the verification logical address and the current virtual network node is established based on preset node mapping information when the verification logical address indicates any of the physical network addresses; the preset node mapping information indicates a one-to-one correspondence between the physical network node of the master device and the virtual network node of the slave device.

7. The network communication system according to any one of claims 3 to 6, characterized in that: The master device further includes a second address mapping module, where the second address mapping module is used to maintain second address mapping information, where the second address mapping information is used to store a mapping relationship between a logical address and a physical address of at least one of the virtual network nodes.

8. The network communication system according to claim 1 or 2, characterized in that: The slave device includes physical resources shared by the virtual network nodes and logical resources corresponding to each of the virtual network nodes; For each of the virtual network nodes, the virtual network node is configured to occupy the logical resource corresponding to the virtual network node when the physical resource is occupied, and to seize the physical resource and release the logical resource when the physical resource is released.

9. The network communication system according to claim 8, wherein: The slave device is further configured to initialize the virtual network node; For each of the virtual network nodes, the physical resources and the logical resources corresponding to the virtual network node are configured to be open to the virtual network node when initialization of the virtual network node is completed.

10. A network communication method based on the network communication system according to any one of claims 1 to 9, characterized in that: The system includes a master device, a data transfer module, and a slave device, wherein the master device includes at least one physical network node, each of which is communicatively connected to the data transfer module; the slave device includes a virtual network node corresponding to the at least one physical network node, and the virtual network node is communicatively connected to the data transfer module via a physical network card of the slave device; and the method includes: The slave device obtains first service data to be sent; the first service data includes a target logical address, and the target logical address indicates a target physical network node among the at least one physical network node for receiving the first service data; The slave device determines a source virtual network node corresponding to the target physical network node among at least one of the virtual network nodes, processes the first service data based on the source virtual network node, and sends the processed first service data to the data transfer module through the physical network card; the processed first service data includes a source physical address indicating the source virtual network node; The data transfer module determines the target physical network node corresponding to the source virtual network node in the at least one physical network node based on the source physical address, and sends the first service data to the target physical network node.

Citation Information

Patent Citations

  • IMS service processing method and device, system equipment and storage medium

    CN114448946A

  • Container cluster management system

    CN119211021A

  • Response time for a gateway connecting a lower bandwidth network with a higher speed network

    US20150142945A1

Cited By

  • Communication link monitoring method and device, electronic equipment, storage medium and product

    CN121000636A